Thread (15 messages) 15 messages, 2 authors, 2021-02-25

Re: [PATCH v3 02/11] drm: Rename plane atomic_check state names

From: Thomas Zimmermann <tzimmermann@suse.de>
Date: 2021-02-22 09:04:55
Also in: amd-gfx, dri-devel, linux-amlogic, linux-arm-msm, linux-mips, linux-renesas-soc, linux-samsung-soc, linux-tegra, lkml, nouveau, virtualization


Am 19.02.21 um 16:12 schrieb Maxime Ripard:
Hi Thomas,

Thanks for your review!

On Fri, Feb 19, 2021 at 03:49:22PM +0100, Thomas Zimmermann wrote:
quoted
quoted
diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c
index 075508051b5f..1873a155bb26 100644
--- a/drivers/gpu/drm/imx/ipuv3-plane.c
+++ b/drivers/gpu/drm/imx/ipuv3-plane.c
@@ -337,12 +337,12 @@ static const struct drm_plane_funcs ipu_plane_funcs = {
   };
   static int ipu_plane_atomic_check(struct drm_plane *plane,
-				  struct drm_plane_state *state)
+				  struct drm_plane_state *new_state)
This function uses a different naming convention then the others?
quoted
   {
   	struct drm_plane_state *old_state = plane->state;
So, the function already had a variable named old_state, so I was
actually trying to make the drivers consistent here: having one variable
with old_state and new_plane_state felt weird.

The heuristic is thus to use the convention of the driver if one exists
already, and if there's none pick new_plane_state.

It makes it indeed inconsistent across drivers, but it felt more natural
to be consistent within a single driver.
Makes sense.
Maxime
-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help