[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231029220710.47063-1-nicymimz@gmail.com>
Date: Mon, 30 Oct 2023 01:07:09 +0300
From: Nancy Nyambura <nicymimz@...il.com>
To: gagallo7+outreachy@...il.com
Cc: nicydaniels@...il.com, outreachy@...ts.linux.dev,
Nancy Nyambura <nicymimz@...il.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-media@...r.kernel.org, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: [PATCH] Media: omap4iss: Enable RSZB and update resizer control
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 <nicymimz@...il.com>
---
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 <sergio.a.aguirre@...il.com>
*/
-#include <linux/module.h>
-#include <linux/uaccess.h>
-#include <linux/delay.h>
-#include <linux/device.h>
-#include <linux/dma-mapping.h>
-#include <linux/mm.h>
-#include <linux/sched.h>
-
-#include "iss.h"
-#include "iss_regs.h"
-#include "iss_resizer.h"
+ #include <linux/module.h>
+ #include <linux/uaccess.h>
+ #include <linux/delay.h>
+ #include <linux/device.h>
+ #include <linux/dma-mapping.h>
+ #include <linux/mm.h>
+ #include <linux/sched.h>
+
+ #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
Powered by blists - more mailing lists