Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2410088rdh; Sun, 29 Oct 2023 15:07:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHUc483jNJmTy+yc6KFLLDfSC+1xlIa+XX+Uyfy+gTIN3L+qnZbutpLn1Yn72tirMiUiI7X X-Received: by 2002:a17:903:2345:b0:1cc:38e6:f097 with SMTP id c5-20020a170903234500b001cc38e6f097mr4601520plh.7.1698617255597; Sun, 29 Oct 2023 15:07:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698617255; cv=none; d=google.com; s=arc-20160816; b=SyRUGc656amulFMb9/Pf/5Qopqiwwv8NoDzbB8SrGUde+xVJUEFBaGf0z8d9mkvmlU 5vuejIIlunJkirnMRIF1oQPnMDs2OkQd6+mFzjimXozSC5CTzlXcLbVNVjdXOvojiYH4 N8D7hlYvjkowFQJuatbloqDZ+yX/T6ne2CzE+uH0Ob5S2BAN/GoEr26UrgkaIfC+HUlv NMTuce97ca7s6Bs3+OOPrdF6IVghNz8e2C89z/ujTu17lwYDHeYc2Kg3ShTVd6lmKV+i p9gJNbUw9Irf6L8N5FZ242Xv+xjbjiNCe/nIQ0hZg3AVzQwq9exK87aQ27/fdJ9w8z4O 456A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=5EcvsKKWujXN1u8l3ldEd2sae45jZkF+al3+Z3aUziI=; fh=FR3kUBvA5mZkKYQM/14bblVW1VqUJeY11lfNGK+Cm1Q=; b=Zm5Bb+3N7K/KqxGwchoJ+MEi85JFfDt7anj1ppF5Oy5ApRljrBfnY/776UD4hQqKzc OwmRuoBHPsq5b/jcEkSuUYrGTDKjl2Jwacid3L7S5t2OKM8OPsEcl55rb8+Vs4zsu7RZ we+dYGsUEtxzSKwbt1x/6sM8CT5tqh2MLEvsLeHFPYyJzgdYFTP943Vjg1GCXq214YUL K56xLsRahKKYbGDwR/4Ei8pJ8TWe+lKFgiT97cL48+4j8hZJ6cJn8dSEDIUXmZHwvqXP LsUhWigpC6h3DGBpGTGRvE4sNCRQpOwJU0TIFc3d+8ddaRSpcY+7Sd3hMZ75Af0WnYKe e/KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Ykp3APiP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id i6-20020a170902c94600b001cc53dbf53dsi93030pla.648.2023.10.29.15.07.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 15:07:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Ykp3APiP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 639C78059E56; Sun, 29 Oct 2023 15:07:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230299AbjJ2WH2 (ORCPT + 99 others); Sun, 29 Oct 2023 18:07:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbjJ2WH0 (ORCPT ); Sun, 29 Oct 2023 18:07:26 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8454FB7; Sun, 29 Oct 2023 15:07:24 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-53e07db272cso5989555a12.3; Sun, 29 Oct 2023 15:07:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698617243; x=1699222043; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=5EcvsKKWujXN1u8l3ldEd2sae45jZkF+al3+Z3aUziI=; b=Ykp3APiPqQ957qiKoZU8smBtJd36q9r27JZx5haEwS9qw5qWbcyb+AeQzQs4ZdV7oI CA0tkGSep7ipHhBvH5T8h8h95wk8kBLJXAXikoPAUsZ/ydWmR/ikttcxgD2wsBM+murQ 8VtifmOw6jy4jP1SFNdPVvzwaEcvAdl1HbAs/04Rc9cy69dJi8dLQwDtaGu6FX/Bg4ck HlOyS9BRoMEYZZpfK4pm6QPZRu6I+LSD2sbvn+wkgRanq7A1pXuFvR7qBeSuujBrQJXQ VKLGUpzIe/P2lEYPIJ1HtZZgp/Bw4dWjcR7xXQWBmD503IfOrUoJBSzbUe8ZTw+desFe YbhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698617243; x=1699222043; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5EcvsKKWujXN1u8l3ldEd2sae45jZkF+al3+Z3aUziI=; b=HbJmhJHhrteiCaTvRN9YeMv4qStih127WpaTlhB1qBhyeB3bSqM0u7POcmt0ntKSPh 1u67zEyP7vTqs/uBNCfocCSRT5UHUKNQ6fG49CcTwCcxow7QAIKuVr/I4ZI2N0g7vtQG nYd96+mNWcUDN5P8GbA1DzyHmIB/VCt4EL08ZQFHkAlaXVuJ3KUYqay766Vy9W1U6Krf ne+yyyNUj3ckcR8qPAFsp2nkH7MXnSiR1K1oFIgHOalBmEj50euEECQCJwrGtqwIAKyF ynSP5PaYQ/u5AIwH3Tj+k1hDltOgr7BCYjrJS0VZl462B1L2FzLmP/duTPUsJXsurEG/ Fhqw== X-Gm-Message-State: AOJu0YzU2iDi5qoEaCFLpB+p/0yPOzB/wvAK1KzlZvZvDnuKAxsiw4lm JFNFl+Derd7tPWtpSSw9iMw= X-Received: by 2002:aa7:d50b:0:b0:53e:7d60:58bb with SMTP id y11-20020aa7d50b000000b0053e7d6058bbmr6906369edq.27.1698617242685; Sun, 29 Oct 2023 15:07:22 -0700 (PDT) Received: from nancy-1-2.. ([105.163.156.232]) by smtp.googlemail.com with ESMTPSA id u23-20020a056402111700b00533dd4d2947sm5073092edv.74.2023.10.29.15.07.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 15:07:22 -0700 (PDT) From: Nancy Nyambura To: gagallo7+outreachy@gmail.com Cc: nicydaniels@gmail.com, outreachy@lists.linux.dev, Nancy Nyambura , Laurent Pinchart , Mauro Carvalho Chehab , Greg Kroah-Hartman , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] Media: omap4iss: Enable RSZB and update resizer control Date: Mon, 30 Oct 2023 01:07:09 +0300 Message-Id: <20231029220710.47063-1-nicymimz@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 29 Oct 2023 15:07:33 -0700 (PDT) Enable RSZB functionality in the OMAP4 ISS driver. This change sets the RSZB system configuration register to enable the RSZB module. Additionally, it updates the resizer control by setting the RSZ_EN_EN flag as required. This change enhances the driver's capabilities and prepares it for future developments. Signed-off-by: Nancy Nyambura --- drivers/staging/media/omap4iss/iss_resizer.c | 34 +++++++++++--------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/drivers/staging/media/omap4iss/iss_resizer.c b/drivers/staging/media/omap4iss/iss_resizer.c index a5f8f9f1ab16..23089eeaf448 100644 --- a/drivers/staging/media/omap4iss/iss_resizer.c +++ b/drivers/staging/media/omap4iss/iss_resizer.c @@ -7,17 +7,17 @@ * Author: Sergio Aguirre */ -#include -#include -#include -#include -#include -#include -#include - -#include "iss.h" -#include "iss_regs.h" -#include "iss_resizer.h" + #include + #include + #include + #include + #include + #include + #include + + #include "iss.h" + #include "iss_regs.h" + #include "iss_resizer.h" static const unsigned int resizer_fmts[] = { MEDIA_BUS_FMT_UYVY8_1X16, @@ -30,11 +30,11 @@ static const unsigned int resizer_fmts[] = { * * Also prints other debug information stored in the RESIZER module. */ -#define RSZ_PRINT_REGISTER(iss, name)\ + #define RSZ_PRINT_REGISTER(iss, name)\ dev_dbg(iss->dev, "###RSZ " #name "=0x%08x\n", \ iss_reg_read(iss, OMAP4_ISS_MEM_ISP_RESIZER, RSZ_##name)) -#define RZA_PRINT_REGISTER(iss, name)\ + #define RZA_PRINT_REGISTER(iss, name)\ dev_dbg(iss->dev, "###RZA " #name "=0x%08x\n", \ iss_reg_read(iss, OMAP4_ISS_MEM_ISP_RESIZER, RZA_##name)) @@ -116,8 +116,12 @@ static void resizer_enable(struct iss_resizer_device *resizer, u8 enable) RSZ_SRC_EN_SRC_EN, enable ? RSZ_SRC_EN_SRC_EN : 0); /* TODO: Enable RSZB */ - iss_reg_update(iss, OMAP4_ISS_MEM_ISP_RESIZER, RZA_EN, RSZ_EN_EN, - enable ? RSZ_EN_EN : 0); + u32 reg_value = ioread32(iss->base_addr + OMAP4_ISS_MEM_ISP_RESIZER, + + RZ_SYSCONFIG); + reg_value |= RSZ_SYSCONFIG_RSZB_CLK_EN; + iowrite32(reg_value, iss->base_addr + OMAP4_ISS_MEM_ISP_RESIZER, + + RSZ_SYSCONFIG); + } /* ----------------------------------------------------------------------------- -- 2.40.1