linux-stable/drivers/gpu/drm/tegra
Maxime Ripard ba5c164946
drm: Rename plane atomic_check state names
Most drivers call the argument to the plane atomic_check hook simply
state, which is going to conflict with the global atomic state in a
later rework. Let's rename it to new_plane_state (or new_state depending
on the convention used in the driver).

This was done using the coccinelle script below, and built tested:

@ plane_atomic_func @
identifier helpers;
identifier func;
@@

 static const struct drm_plane_helper_funcs helpers = {
 	.atomic_check = func,
 };

@ has_old_state @
identifier plane_atomic_func.func;
identifier plane;
expression e;
symbol old_state;
symbol state;
@@

 func(struct drm_plane *plane, struct drm_plane_state *state)
 {
 	...
 	struct drm_plane_state *old_state = e;
 	...
 }

@ depends on has_old_state @
identifier plane_atomic_func.func;
identifier plane;
symbol old_state;
@@

 func(struct drm_plane *plane,
-	struct drm_plane_state *state
+	struct drm_plane_state *new_state
     )
 {
 	<+...
-	state
+	new_state
	...+>
 }

@ has_state @
identifier plane_atomic_func.func;
identifier plane;
symbol state;
@@

 func(struct drm_plane *plane, struct drm_plane_state *state)
 {
 	...
 }

@ depends on has_state @
identifier plane_atomic_func.func;
identifier plane;
symbol old_state;
@@

 func(struct drm_plane *plane,
-	struct drm_plane_state *state
+	struct drm_plane_state *new_plane_state
     )
 {
 	<+...
-	state
+	new_plane_state
	...+>
 }

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-2-maxime@cerno.tech
2021-02-24 20:26:55 +01:00
..
dc.c drm: Rename plane atomic_check state names 2021-02-24 20:26:55 +01:00
dc.h
dp.c
dp.h
dpaux.c
dpaux.h
drm.c drm/tegra: Annotate dma-fence critical section in commit path 2021-02-23 12:54:19 +01:00
drm.h drm/tegra: output: Support DRM bridges 2020-09-17 12:30:11 +02:00
dsi.c drm next for 5.10-rc1 2020-10-15 10:46:16 -07:00
dsi.h
falcon.c
falcon.h
fb.c
gem.c Merge drm/drm-next into drm-misc-next 2020-11-02 11:17:54 +01:00
gem.h
gr2d.c
gr2d.h
gr3d.c
gr3d.h
hda.c
hda.h
hdmi.c
hdmi.h
hub.c drm: Rename plane atomic_check state names 2021-02-24 20:26:55 +01:00
hub.h
Kconfig
Makefile
mipi-phy.c
mipi-phy.h
output.c drm/tegra: output: Do not put OF node twice 2020-11-13 21:38:35 +01:00
plane.c drm/gem: Move drm_gem_fb_prepare_fb() to GEM atomic helpers 2021-02-23 08:54:22 +01:00
plane.h
rgb.c drm/tegra: output: rgb: Wrap directly-connected panel into DRM bridge 2020-09-17 12:31:18 +02:00
sor.c drm/tegra: sor: Disable clocks on error in tegra_sor_init() 2020-11-26 18:44:48 +01:00
sor.h
trace.c
trace.h
vic.c
vic.h