media: staging/ipu7: add register definitions cleanup in TODO
Subsystems (3)
PATCH 1/3 media: staging/ipu7: add register definitions cleanup in TODO
From: Bingbu Cao <[email protected]>
Some register definitions need a cleanup, so add a new item in TODO.
--- drivers/staging/media/ipu7/TODO | 4 ++++ 1 file changed, 4 insertions(+)
drivers/staging/media/ipu7/TODO +4 -0
@@ -17,3 +17,7 @@ staging directory. - Work with the common IPU module Sakari commented much of the driver code is the same than the IPU6 driver. IPU7 driver is expected to work with the common IPU module in future. + +- Register definition cleanup + Cleanup the register definitions, remove some unnecessary macros + and 'U' suffix.
Signature · 1 line
2.34.1
PATCH 2/3 media: staging/ipu7: Use RUNTIME_PM_OPS and SYSTEM_SLEEP_PM_OPS macros
From: Bingbu Cao <[email protected]>
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS(), which avoid build warning without adding __maybe_unsed attributes.
--- drivers/staging/media/ipu7/ipu7.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/media/ipu7/ipu7.c +2 -4
@@ -2745,10 +2745,8 @@ static int ipu7_runtime_resume(struct device *dev) }static const struct dev_pm_ops ipu7_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(&ipu7_suspend, &ipu7_resume) -SET_RUNTIME_PM_OPS (&ipu7_suspend,/* Same as in suspend flow */ - &ipu7_runtime_resume, -NULL ) + SYSTEM_SLEEP_PM_OPS(&ipu7_suspend, &ipu7_resume) +RUNTIME_PM_OPS (&ipu7_suspend, &ipu7_runtime_resume,NULL ) };static const struct pci_device_id ipu7_pci_tbl[] = {
Signature · 1 line
2.34.1
PATCH 3/3 media: staging/ipu7: Take 0xff as the invalid dt value
In reply to [email protected]From: Bingbu Cao <[email protected]>
The CSI-2 data type value is a 8-bit data, using 0xff instead of 0xffff as the invalid value.
--- drivers/staging/media/ipu7/ipu7-isys-subdev.c | 2 +- drivers/staging/media/ipu7/ipu7-isys-video.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/ipu7/ipu7-isys-subdev.c +1 -1
@@ -49,7 +49,7 @@ unsigned int ipu7_isys_mbus_code_to_mipi(u32 code)return MIPI_CSI2_DT_RAW8 ;default :WARN_ON (1 ); -return 0xffff ; +return 0xff ; } }
drivers/staging/media/ipu7/ipu7-isys-video.c +1 -1
@@ -1004,7 +1004,7 @@ int ipu7_isys_setup_video(struct ipu7_isys_video *av,if (ret == -ENOIOCTLCMD ) { av->vc =0 ; av->dt =ipu7_isys_mbus_code_to_mipi (pfmt->code); -if (av->dt ==0xffff ) +if (av->dt ==0xff )return -EINVAL ; *nr_queues =1 ; }else if (*nr_queues && !ret) {
Signature · 1 line
2.34.1
Sakari Ailus
maintainerHi Bingbu,
Thanks for the patch.
Quoted 15 lines · On Tue, Jun 03, 2025 at 03:49:12PM +0800, [email protected] wrote:
From: Bingbu Cao <[email protected]>
Some register definitions need a cleanup, so add a new item in TODO.
Signed-off-by Bingbu Cao <[email protected]>--- drivers/staging/media/ipu7/TODO | 4 ++++ 1 file changed, 4 insertions(+)drivers/staging/media/ipu7/TODO +0
-0
drivers/staging/media/ipu7/TODO staging directory. · line 23
Quoted 7 lines
drivers/staging/media/ipu7/TODO +4
-0@@ -17,3 +17,7 @@ staging directory. - Work with the common IPU module Sakari commented much of the driver code is the same than the IPU6 driver. IPU7 driver is expected to work with the common IPU module in future. + +- Register definition cleanup + Cleanup the register definitions, remove some unnecessary macros + and 'U' suffix.
As noted, after reflecting on the topic, I'm fine with that (as long as the figure is meant to be unsigned, decimal or hexadecimal).
This should be really about the fitness for the purpose of the register definitions as well as their naming (e.g. missing IPU7 prefix).
Quoted 1 line
\ No newline at end of file
Please add the newline.
Signature · 3 lines
Regards, Sakari Ailus