Hello, This patch series modernizes the VSP1 driver by using scoped guards and moving loop index variable declarations to the loop statements.
Patches 01/11 and 02/11 prepare for the introduction of scoped guards by splitting a large function to lower the indentation level. As the function is called by DRM clients (R-Car DU and RZ DU drivers), an inline compatibility wrapper is introduced. The clients are then updated in patches 03/11 and 04/11, and the compatibility wrapper removed in 11/11. Patches 05/11 to 08/11 then introduce guards and scoped guards for mutexes and spin locks. There isn't much to say about this, the changes are pretty boring, but generate a nice reduction of 148 lines. I advise reviewers to apply the changes and use 'git show -b', as a large part of the modified lines in 06/11 and 08/11 are just indentation changes due to scoped guards. Patch 09/11 continues with the introduction of a helper macro to simplifying iteration over format arrays, which occurs 6 times in the driver. Patch 10/11 ends the modernization effort with declaring index variables in for loop statements to avoid using index variables outside of the loop unintentionally. Patch 03/11 and 04/11 touch the DRM subsystem and depend on 02/11. They could be delayed by one kernel release (in which case 11/11 would need to be delayed by two releases), but I would prefer merging them through the media tree if possible if there's no objection from the DRM maintainers. I don't expect conflicting changes in the R-Car DU driver for v7.2. Dave, Sima, could you give your ack for this ? Laurent Pinchart (11): media: renesas: vsp1: Avoid forward function declaration media: renesas: vsp1: Split vsp1_du_setup_lif() drm: renesas: rcar-du: Switch to new VSP API drm: renesas: rz-du: Switch to new VSP API media: renesas: vsp1: Use mutex guards media: renesas: vsp1: Use mutex scoped guards media: renesas: vsp1: Use spinlock guards media: renesas: vsp1: Use spinlock scoped guards media: renesas: vsp1: Simplify iteration over format arrays media: renesas: vsp1: Declare index variables in for loop statement media: renesas: vsp1: Drop deprecated vsp1_du_setup_lif() function drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c | 4 +- drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c | 4 +- .../media/platform/renesas/vsp1/vsp1_brx.c | 40 +-- .../media/platform/renesas/vsp1/vsp1_clu.c | 18 +- drivers/media/platform/renesas/vsp1/vsp1_dl.c | 75 ++--- .../media/platform/renesas/vsp1/vsp1_drm.c | 269 +++++++++--------- .../media/platform/renesas/vsp1/vsp1_drv.c | 42 ++- .../media/platform/renesas/vsp1/vsp1_entity.c | 31 +- .../media/platform/renesas/vsp1/vsp1_hgo.c | 17 +- .../media/platform/renesas/vsp1/vsp1_hgt.c | 27 +- .../media/platform/renesas/vsp1/vsp1_histo.c | 55 ++-- .../media/platform/renesas/vsp1/vsp1_hsit.c | 15 +- .../media/platform/renesas/vsp1/vsp1_lut.c | 18 +- .../media/platform/renesas/vsp1/vsp1_pipe.c | 65 ++--- .../media/platform/renesas/vsp1/vsp1_rwpf.c | 44 +-- .../media/platform/renesas/vsp1/vsp1_sru.c | 13 +- .../media/platform/renesas/vsp1/vsp1_uds.c | 13 +- .../media/platform/renesas/vsp1/vsp1_uif.c | 29 +- .../media/platform/renesas/vsp1/vsp1_video.c | 191 +++++-------- .../media/platform/renesas/vsp1/vsp1_wpf.c | 38 +-- include/media/vsp1.h | 5 +- 21 files changed, 413 insertions(+), 600 deletions(-) base-commit: bc1ba628e37c93cf2abeb2c79716f49087f8a024 prerequisite-patch-id: 5aca4e543fab1580689807ae68bea97cf436124b prerequisite-patch-id: 1f31895481c2e7c8ba2adac3b2067236c8fec8b6 prerequisite-patch-id: c83c8d5e318389b8cab7761c5012ce9fad95337c -- Regards, Laurent Pinchart
