Thread (4 messages) 4 messages, 2 authors, 2021-02-22

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

From: Maxime Ripard <hidden>
Date: 2021-02-19 15:13:55
Also in: amd-gfx, dri-devel, linux-amlogic, linux-arm-msm, linux-mediatek, linux-renesas-soc, linux-samsung-soc, linux-tegra, lkml, nouveau

Hi Thomas,

Thanks for your review!

On Fri, Feb 19, 2021 at 03:49:22PM +0100, Thomas Zimmermann wrote:
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.

Maxime

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help