Skip to contentSkip to conversation

drm: Start subclassing crtc_state.

PATCH In review Maarten Lankhorst 10 participants 36 messages Mar 1, 2019 – Apr 25, 2019 1 message not in the archive

Subsystems (23)
lore
Share & tools
lore

Maarten Lankhorst

author maintainer
#0 lore raw

cover drm: Start subclassing crtc_state.

When we want to start adding default values to crtc_state, it makes sense fix all drivers to call __drm_atomic_helper_crtc_reset, like we do for connectors and planes.

Maarten Lankhorst (17):
drm/vc4: Fix memory leak during gpu reset.
drm/atomic: Create __drm_atomic_helper_crtc_reset() for subclassing crtc_state. drm/docs: Fix typo in __drm_atomic_helper_connector_reset
drm/amd: Convert to using __drm_atomic_helper_crtc_reset() for reset. drm/mali: Convert to using __drm_atomic_helper_crtc_reset() for reset. drm/atmel-hlcdc: Convert to using __drm_atomic_helper_crtc_reset() for reset. drm/i915: Use the new __drm_atomic_helper_crtc_reset() helper. drm/imx: Convert to using __drm_atomic_helper_crtc_reset() for reset. drm/mediatek: Convert to using __drm_atomic_helper_crtc_reset() for reset. drm/msm: Convert to using __drm_atomic_helper_crtc_reset() for reset. drm/omap: Convert to using __drm_atomic_helper_crtc_reset() for reset. drm/rcar-du: Convert to using __drm_atomic_helper_crtc_reset() for reset. drm/rockchip: Convert to using __drm_atomic_helper_crtc_reset() for reset. drm/tegra: Convert to using __drm_atomic_helper_crtc_reset() for reset. drm/vc4: Convert to using __drm_atomic_helper_crtc_reset() for reset. drm/vkms: Convert to using __drm_atomic_helper_crtc_reset() for reset. drm/vmwgfx: Convert to using __drm_atomic_helper_crtc_reset() for reset.

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++----
 drivers/gpu/drm/arm/malidp_crtc.c             | 28 ++++++---------
 .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c    | 29 ++++++---------
 drivers/gpu/drm/drm_atomic_state_helper.c     | 36 +++++++++++++++----
 drivers/gpu/drm/i915/intel_display.c          |  5 ++-
 drivers/gpu/drm/imx/ipuv3-crtc.c              | 30 ++++++----------
 drivers/gpu/drm/mediatek/mtk_drm_crtc.c       | 29 ++++++---------
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c      |  6 ++--
 drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c     | 28 ++++++---------
 drivers/gpu/drm/nouveau/dispnv50/head.c       | 13 ++-----
 drivers/gpu/drm/omapdrm/omap_crtc.c           | 11 +++---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c        | 11 ++----
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c   | 22 ++++++------
 drivers/gpu/drm/tegra/dc.c                    | 30 ++++++----------
 drivers/gpu/drm/vc4/vc4_crtc.c                |  9 ++---
 drivers/gpu/drm/vkms/vkms_crtc.c              | 33 +++++++----------
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c           | 20 +++--------
 include/drm/drm_atomic_state_helper.h         |  2 ++
 18 files changed, 145 insertions(+), 207 deletions(-)
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#1 lore raw

PATCH 1/17 drm/vc4: Fix memory leak during gpu reset.

__drm_atomic_helper_crtc_destroy_state does not free memory, it only cleans it up. Fix this by calling the functions own destroy function.

Fixes 6d6e50039187 ("drm/vc4: Allocate the right amount of space for boot-time CRTC state.")
Cc Eric Anholt <[email protected]>
Cc <[email protected]> # v4.6+
---
 drivers/gpu/drm/vc4/vc4_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_crtc.c +1 -1
index 730008d3da76..e7c04a9eb219 100644
@@ -1042,7 +1042,7 @@ static void
 vc4_crtc_reset(struct drm_crtc *crtc)
 {
 	if (crtc->state)
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
+		vc4_crtc_destroy_state(crtc->state);
 
 	crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL);
 	if (crtc->state)
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/17
#2 lore raw

Re: [PATCH 01/17] drm/vc4: Fix memory leak during gpu reset.

Quoted 2 lines · Maarten Lankhorst

__drm_atomic_helper_crtc_destroy_state does not free memory, it only cleans it up. Fix this by calling the functions own destroy function.

author maintainer
#3 lore raw

PATCH 2/17 drm/atomic: Create __drm_atomic_helper_crtc_reset() for subclassing crtc_state.

In reply to Maarten Lankhorst

We already have __drm_atomic_helper_connector_reset() and __drm_atomic_helper_plane_reset(), extend this to crtc as well.

This will allow us to set default values in the crtc_state, without having to do it in each driver separately.

Of all drivers that need conversion, only nouveau is done in this commit, because it wrote its own __drm_atomic_helper_crtc_reset(), clashing with the drm core.

---
 drivers/gpu/drm/drm_atomic_state_helper.c | 34 +++++++++++++++++++----
 drivers/gpu/drm/nouveau/dispnv50/head.c   | 13 ++-------
 include/drm/drm_atomic_state_helper.h     |  2 ++
 3 files changed, 33 insertions(+), 16 deletions(-)
drivers/gpu/drm/drm_atomic_state_helper.c +28 -6
index 4985384e51f6..bc5ee66f75b3 100644
@@ -55,6 +55,29 @@
  * for these functions.
  */
 
+/**
+ * __drm_atomic_helper_crtc_reset - reset state on CRTC
+ * @crtc: drm CRTC
+ * @crtc_state: CRTC state to assign
+ *
+ * Initializes the newly allocated @crtc_state and assigns it to
+ * the &drm_crtc->state pointer of @crtc, usually required when
+ * initializing the drivers or when called from the &drm_crtc_funcs.reset
+ * hook.
+ *
+ * This is useful for drivers that subclass the CRTC state.
+ */
+void
+__drm_atomic_helper_crtc_reset(struct drm_crtc *crtc,
+			       struct drm_crtc_state *crtc_state)
+{
+	if (crtc_state)
+		crtc_state->crtc = crtc;
+
+	crtc->state = crtc_state;
+}
+EXPORT_SYMBOL(__drm_atomic_helper_crtc_reset);
+
 /**
  * drm_atomic_helper_crtc_reset - default &drm_crtc_funcs.reset hook for CRTCs
  * @crtc: drm CRTC
@@ -64,14 +87,13 @@
  */
 void drm_atomic_helper_crtc_reset(struct drm_crtc *crtc)
 {
-	if (crtc->state)
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
-
-	kfree(crtc->state);
-	crtc->state = kzalloc(sizeof(*crtc->state), GFP_KERNEL);
+	struct drm_crtc_state *crtc_state =
+		kzalloc(sizeof(*crtc->state), GFP_KERNEL);
 
 	if (crtc->state)
-		crtc->state->crtc = crtc;
+		crtc->funcs->atomic_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, crtc_state);
 }
 EXPORT_SYMBOL(drm_atomic_helper_crtc_reset);
 
drivers/gpu/drm/nouveau/dispnv50/head.c +3 -10
index 2e7a0c347ddb..93754743090f 100644
@@ -419,16 +419,6 @@ nv50_head_atomic_duplicate_state(struct drm_crtc *crtc)
 	return &asyh->state;
 }
 
-static void
-__drm_atomic_helper_crtc_reset(struct drm_crtc *crtc,
-			       struct drm_crtc_state *state)
-{
-	if (crtc->state)
-		crtc->funcs->atomic_destroy_state(crtc, crtc->state);
-	crtc->state = state;
-	crtc->state->crtc = crtc;
-}
-
 static void
 nv50_head_reset(struct drm_crtc *crtc)
 {
@@ -437,6 +427,9 @@ nv50_head_reset(struct drm_crtc *crtc)
 	if (WARN_ON(!(asyh = kzalloc(sizeof(*asyh), GFP_KERNEL))))
 		return;
 
+	if (crtc->state)
+		nv50_head_atomic_destroy_state(crtc, crtc->state);
+
 	__drm_atomic_helper_crtc_reset(crtc, &asyh->state);
 }
 
include/drm/drm_atomic_state_helper.h +2 -0
index 66c92cbd8e16..4e6d2e7a40b8 100644
@@ -37,6 +37,8 @@ struct drm_private_state;
 struct drm_modeset_acquire_ctx;
 struct drm_device;
 
+void __drm_atomic_helper_crtc_reset(struct drm_crtc *crtc,
+				    struct drm_crtc_state *state);
 void drm_atomic_helper_crtc_reset(struct drm_crtc *crtc);
 void __drm_atomic_helper_crtc_duplicate_state(struct drm_crtc *crtc,
 					      struct drm_crtc_state *state);
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#4 lore raw

PATCH 3/17 drm/docs: Fix typo in __drm_atomic_helper_connector_reset

In reply to Maarten Lankhorst
---
 drivers/gpu/drm/drm_atomic_state_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_atomic_state_helper.c +1 -1
index bc5ee66f75b3..172c8c698a46 100644
@@ -335,7 +335,7 @@ EXPORT_SYMBOL(drm_atomic_helper_plane_destroy_state);
  * @conn_state: connector state to assign
  *
  * Initializes the newly allocated @conn_state and assigns it to
- * the &drm_conector->state pointer of @connector, usually required when
+ * the &drm_connector->state pointer of @connector, usually required when
  * initializing the drivers or when called from the &drm_connector_funcs.reset
  * hook.
  *
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#5 lore raw

PATCH 4/17 drm/amd: Convert to using __drm_atomic_helper_crtc_reset() for reset.

In reply to Maarten Lankhorst

Convert amd to using __drm_atomic_helper_crtc_reset(), instead of writing its own version.

Cc Harry Wentland <[email protected]>
Cc Leo Li <[email protected]>
Cc Alex Deucher <[email protected]>
Cc "Christian König" <[email protected]>
Cc "David (ChunMing) Zhou" <[email protected]>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -8
index 0642dfe22582..975ed22e39d2 100644
@@ -3072,18 +3072,12 @@ static void dm_crtc_destroy_state(struct drm_crtc *crtc,
 
 static void dm_crtc_reset_state(struct drm_crtc *crtc)
 {
-	struct dm_crtc_state *state;
+	struct dm_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
 
 	if (crtc->state)
 		dm_crtc_destroy_state(crtc, crtc->state);
 
-	state = kzalloc(sizeof(*state), GFP_KERNEL);
-	if (WARN_ON(!state))
-		return;
-
-	crtc->state = &state->base;
-	crtc->state->crtc = crtc;
-
+	__drm_atomic_helper_crtc_reset(crtc, &state->base);
 }
 
 static struct drm_crtc_state *
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#6 lore raw

PATCH 5/17 drm/mali: Convert to using __drm_atomic_helper_crtc_reset() for reset.

In reply to Maarten Lankhorst

Convert mali to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding malidp_crtc_destroy_state(), call it directly for freeing the old state.

Cc Liviu Dudau <[email protected]>
Cc Brian Starkey <[email protected]>
---
 drivers/gpu/drm/arm/malidp_crtc.c | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)
drivers/gpu/drm/arm/malidp_crtc.c +11 -17
index 56aad288666e..d6690e016f0b 100644
@@ -463,23 +463,6 @@ static struct drm_crtc_state *malidp_crtc_duplicate_state(struct drm_crtc *crtc)
 	return &state->base;
 }
 
-static void malidp_crtc_reset(struct drm_crtc *crtc)
-{
-	struct malidp_crtc_state *state = NULL;
-
-	if (crtc->state) {
-		state = to_malidp_crtc_state(crtc->state);
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
-	}
-
-	kfree(state);
-	state = kzalloc(sizeof(*state), GFP_KERNEL);
-	if (state) {
-		crtc->state = &state->base;
-		crtc->state->crtc = crtc;
-	}
-}
-
 static void malidp_crtc_destroy_state(struct drm_crtc *crtc,
 				      struct drm_crtc_state *state)
 {
@@ -493,6 +476,17 @@ static void malidp_crtc_destroy_state(struct drm_crtc *crtc,
 	kfree(mali_state);
 }
 
+static void malidp_crtc_reset(struct drm_crtc *crtc)
+{
+	struct malidp_crtc_state *state =
+		kzalloc(sizeof(*state), GFP_KERNEL);
+
+	if (crtc->state)
+		malidp_crtc_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &state->base);
+}
+
 static int malidp_crtc_enable_vblank(struct drm_crtc *crtc)
 {
 	struct malidp_drm *malidp = crtc_to_malidp_device(crtc);
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
maintainer Acked-by on v1 5/17
#7 lore raw

Re: [PATCH 05/17] drm/mali: Convert to using __drm_atomic_helper_crtc_reset() for reset.

Hi Maarten,

Quoted 6 lines · Maarten Lankhorst

Convert mali to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding malidp_crtc_destroy_state(), call it directly for freeing the old state.

If you need me to take this patch into malidp tree let me know, otherwise I expect is going to show up in drm-misc-next at some moment.

Best regards,
Liviu

Quoted 58 lines
Cc Brian Starkey <[email protected]>
---
 drivers/gpu/drm/arm/malidp_crtc.c | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)
drivers/gpu/drm/arm/malidp_crtc.c +11 -17
index 56aad288666e..d6690e016f0b 100644
@@ -463,23 +463,6 @@ static struct drm_crtc_state *malidp_crtc_duplicate_state(struct drm_crtc *crtc)
 	return &state->base;
 }
 
-static void malidp_crtc_reset(struct drm_crtc *crtc)
-{
-	struct malidp_crtc_state *state = NULL;
-
-	if (crtc->state) {
-		state = to_malidp_crtc_state(crtc->state);
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
-	}
-
-	kfree(state);
-	state = kzalloc(sizeof(*state), GFP_KERNEL);
-	if (state) {
-		crtc->state = &state->base;
-		crtc->state->crtc = crtc;
-	}
-}
-
 static void malidp_crtc_destroy_state(struct drm_crtc *crtc,
 				      struct drm_crtc_state *state)
 {
@@ -493,6 +476,17 @@ static void malidp_crtc_destroy_state(struct drm_crtc *crtc,
 	kfree(mali_state);
 }
 
+static void malidp_crtc_reset(struct drm_crtc *crtc)
+{
+	struct malidp_crtc_state *state =
+		kzalloc(sizeof(*state), GFP_KERNEL);
+
+	if (crtc->state)
+		malidp_crtc_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &state->base);
+}
+
 static int malidp_crtc_enable_vblank(struct drm_crtc *crtc)
 {
 	struct malidp_drm *malidp = crtc_to_malidp_device(crtc);
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 12 lines
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#8 lore raw

PATCH 6/17 drm/atmel-hlcdc: Convert to using __drm_atomic_helper_crtc_reset() for reset.

In reply to Maarten Lankhorst

Convert atmel-hlcdc to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

---
 .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c    | 29 +++++++------------
 1 file changed, 11 insertions(+), 18 deletions(-)
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +11 -18
index 8070a558d7b1..816161d0a09d 100644
@@ -400,24 +400,6 @@ void atmel_hlcdc_crtc_irq(struct drm_crtc *c)
 	atmel_hlcdc_crtc_finish_page_flip(drm_crtc_to_atmel_hlcdc_crtc(c));
 }
 
-static void atmel_hlcdc_crtc_reset(struct drm_crtc *crtc)
-{
-	struct atmel_hlcdc_crtc_state *state;
-
-	if (crtc->state) {
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
-		state = drm_crtc_state_to_atmel_hlcdc_crtc_state(crtc->state);
-		kfree(state);
-		crtc->state = NULL;
-	}
-
-	state = kzalloc(sizeof(*state), GFP_KERNEL);
-	if (state) {
-		crtc->state = &state->base;
-		crtc->state->crtc = crtc;
-	}
-}
-
 static struct drm_crtc_state *
 atmel_hlcdc_crtc_duplicate_state(struct drm_crtc *crtc)
 {
@@ -447,6 +429,17 @@ static void atmel_hlcdc_crtc_destroy_state(struct drm_crtc *crtc,
 	kfree(state);
 }
 
+static void atmel_hlcdc_crtc_reset(struct drm_crtc *crtc)
+{
+	struct atmel_hlcdc_crtc_state *state =
+		kzalloc(sizeof(*state), GFP_KERNEL);
+
+	if (crtc->state)
+		atmel_hlcdc_crtc_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &state->base);
+}
+
 static int atmel_hlcdc_crtc_enable_vblank(struct drm_crtc *c)
 {
 	struct atmel_hlcdc_crtc *crtc = drm_crtc_to_atmel_hlcdc_crtc(c);
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#9 lore raw

PATCH 7/17 drm/i915: Use the new __drm_atomic_helper_crtc_reset() helper.

In reply to Maarten Lankhorst

i915 has its own hw readout and doesn't use the reset helpers directly. Still it has 2 places where it initialises the crtc_state. Fix those by calling __drm_atomic_helper_crtc_reset().

Cc Jani Nikula <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Rodrigo Vivi <[email protected]>
---
 drivers/gpu/drm/i915/intel_display.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_display.c +2 -3
index 7c5e84ef5171..2e14a50dbf6f 100644
@@ -14447,9 +14447,8 @@ static int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)
 		ret = -ENOMEM;
 		goto fail;
 	}
+	__drm_atomic_helper_crtc_reset(&intel_crtc->base, &crtc_state->base);
 	intel_crtc->config = crtc_state;
-	intel_crtc->base.state = &crtc_state->base;
-	crtc_state->base.crtc = &intel_crtc->base;
 
 	primary = intel_primary_plane_create(dev_priv, pipe);
 	if (IS_ERR(primary)) {
@@ -15986,7 +15985,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
 
 		__drm_atomic_helper_crtc_destroy_state(&crtc_state->base);
 		memset(crtc_state, 0, sizeof(*crtc_state));
-		crtc_state->base.crtc = &crtc->base;
+		__drm_atomic_helper_crtc_reset(&crtc->base, &crtc_state->base);
 
 		crtc_state->base.active = crtc_state->base.enable =
 			dev_priv->display.get_pipe_config(crtc, crtc_state);
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#10 lore raw

PATCH 8/17 drm/imx: Convert to using __drm_atomic_helper_crtc_reset() for reset.

In reply to Maarten Lankhorst

Convert imx to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

---
 drivers/gpu/drm/imx/ipuv3-crtc.c | 30 ++++++++++--------------------
 1 file changed, 10 insertions(+), 20 deletions(-)
drivers/gpu/drm/imx/ipuv3-crtc.c +10 -20
index ec3602ebbc1c..54a32c6f2407 100644
@@ -101,26 +101,6 @@ static void ipu_crtc_atomic_disable(struct drm_crtc *crtc,
 	drm_crtc_vblank_off(crtc);
 }
 
-static void imx_drm_crtc_reset(struct drm_crtc *crtc)
-{
-	struct imx_crtc_state *state;
-
-	if (crtc->state) {
-		if (crtc->state->mode_blob)
-			drm_property_blob_put(crtc->state->mode_blob);
-
-		state = to_imx_crtc_state(crtc->state);
-		memset(state, 0, sizeof(*state));
-	} else {
-		state = kzalloc(sizeof(*state), GFP_KERNEL);
-		if (!state)
-			return;
-		crtc->state = &state->base;
-	}
-
-	state->base.crtc = crtc;
-}
-
 static struct drm_crtc_state *imx_drm_crtc_duplicate_state(struct drm_crtc *crtc)
 {
 	struct imx_crtc_state *state;
@@ -144,6 +124,16 @@ static void imx_drm_crtc_destroy_state(struct drm_crtc *crtc,
 	kfree(to_imx_crtc_state(state));
 }
 
+static void imx_drm_crtc_reset(struct drm_crtc *crtc)
+{
+	struct imx_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
+
+	if (crtc->state)
+		imx_drm_crtc_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &state->base);
+}
+
 static int ipu_enable_vblank(struct drm_crtc *crtc)
 {
 	struct ipu_crtc *ipu_crtc = to_ipu_crtc(crtc);
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#11 lore raw

PATCH 9/17 drm/mediatek: Convert to using __drm_atomic_helper_crtc_reset() for reset.

In reply to Maarten Lankhorst

Convert mediatek to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

Cc Philipp Zabel <[email protected]>
Cc Matthias Brugger <[email protected]>
---
 drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 29 +++++++++----------------
 1 file changed, 10 insertions(+), 19 deletions(-)
drivers/gpu/drm/mediatek/mtk_drm_crtc.c +10 -19
index acad088173da..3b18bbadd415 100644
@@ -108,25 +108,6 @@ static void mtk_drm_crtc_destroy(struct drm_crtc *crtc)
 	drm_crtc_cleanup(crtc);
 }
 
-static void mtk_drm_crtc_reset(struct drm_crtc *crtc)
-{
-	struct mtk_crtc_state *state;
-
-	if (crtc->state) {
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
-
-		state = to_mtk_crtc_state(crtc->state);
-		memset(state, 0, sizeof(*state));
-	} else {
-		state = kzalloc(sizeof(*state), GFP_KERNEL);
-		if (!state)
-			return;
-		crtc->state = &state->base;
-	}
-
-	state->base.crtc = crtc;
-}
-
 static struct drm_crtc_state *mtk_drm_crtc_duplicate_state(struct drm_crtc *crtc)
 {
 	struct mtk_crtc_state *state;
@@ -150,6 +131,16 @@ static void mtk_drm_crtc_destroy_state(struct drm_crtc *crtc,
 	kfree(to_mtk_crtc_state(state));
 }
 
+static void mtk_drm_crtc_reset(struct drm_crtc *crtc)
+{
+	struct mtk_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
+
+	if (crtc->state)
+		mtk_drm_crtc_destroy_state(crtc, &state->base);
+
+	__drm_atomic_helper_crtc_reset(crtc, &state->base);
+}
+
 static bool mtk_drm_crtc_mode_fixup(struct drm_crtc *crtc,
 				    const struct drm_display_mode *mode,
 				    struct drm_display_mode *adjusted_mode)
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#12 lore raw

PATCH 10/17 drm/msm: Convert to using __drm_atomic_helper_crtc_reset() for reset.

In reply to Maarten Lankhorst

Convert msm to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c  |  6 ++---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 28 +++++++++--------------
 2 files changed, 13 insertions(+), 21 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +2 -4
index b776fca571f3..eb156cb73dd4 100644
@@ -753,14 +753,12 @@ void dpu_crtc_commit_kickoff(struct drm_crtc *crtc, bool async)
 
 static void dpu_crtc_reset(struct drm_crtc *crtc)
 {
-	struct dpu_crtc_state *cstate;
+	struct dpu_crtc_state *cstate = kzalloc(sizeof(*cstate), GFP_KERNEL);
 
 	if (crtc->state)
 		dpu_crtc_destroy_state(crtc, crtc->state);
 
-	crtc->state = kzalloc(sizeof(*cstate), GFP_KERNEL);
-	if (crtc->state)
-		crtc->state->crtc = crtc;
+	__drm_atomic_helper_crtc_reset(crtc, &cstate->base);
 }
 
 /**
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c +11 -17
index b0cf63c4e3d7..bf24a08feab9 100644
@@ -1002,23 +1002,6 @@ mdp5_crtc_atomic_print_state(struct drm_printer *p,
 	drm_printf(p, "\tcmd_mode=%d\n", mdp5_cstate->cmd_mode);
 }
 
-static void mdp5_crtc_reset(struct drm_crtc *crtc)
-{
-	struct mdp5_crtc_state *mdp5_cstate;
-
-	if (crtc->state) {
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
-		kfree(to_mdp5_crtc_state(crtc->state));
-	}
-
-	mdp5_cstate = kzalloc(sizeof(*mdp5_cstate), GFP_KERNEL);
-
-	if (mdp5_cstate) {
-		mdp5_cstate->base.crtc = crtc;
-		crtc->state = &mdp5_cstate->base;
-	}
-}
-
 static struct drm_crtc_state *
 mdp5_crtc_duplicate_state(struct drm_crtc *crtc)
 {
@@ -1046,6 +1029,17 @@ static void mdp5_crtc_destroy_state(struct drm_crtc *crtc, struct drm_crtc_state
 	kfree(mdp5_cstate);
 }
 
+static void mdp5_crtc_reset(struct drm_crtc *crtc)
+{
+	struct mdp5_crtc_state *mdp5_cstate =
+		mdp5_cstate = kzalloc(sizeof(*mdp5_cstate), GFP_KERNEL);
+
+	if (crtc->state)
+		mdp5_crtc_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &mdp5_cstate->base);
+}
+
 static const struct drm_crtc_funcs mdp5_crtc_funcs = {
 	.set_config = drm_atomic_helper_set_config,
 	.destroy = mdp5_crtc_destroy,
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
reviewer
#13 lore raw

Re: [PATCH 10/17] drm/msm: Convert to using __drm_atomic_helper_crtc_reset() for reset.

Quoted 62 lines · Maarten Lankhorst

Convert msm to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c  |  6 ++---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 28 +++++++++--------------
 2 files changed, 13 insertions(+), 21 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +2 -4
index b776fca571f3..eb156cb73dd4 100644
@@ -753,14 +753,12 @@ void dpu_crtc_commit_kickoff(struct drm_crtc *crtc, bool async)
 
 static void dpu_crtc_reset(struct drm_crtc *crtc)
 {
-	struct dpu_crtc_state *cstate;
+	struct dpu_crtc_state *cstate = kzalloc(sizeof(*cstate), GFP_KERNEL);
 
 	if (crtc->state)
 		dpu_crtc_destroy_state(crtc, crtc->state);
 
-	crtc->state = kzalloc(sizeof(*cstate), GFP_KERNEL);
-	if (crtc->state)
-		crtc->state->crtc = crtc;
+	__drm_atomic_helper_crtc_reset(crtc, &cstate->base);
 }
 
 /**
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c +0 -17
index b0cf63c4e3d7..bf24a08feab9 100644
@@ -1002,23 +1002,6 @@ mdp5_crtc_atomic_print_state(struct drm_printer *p,
 	drm_printf(p, "\tcmd_mode=%d\n", mdp5_cstate->cmd_mode);
 }
 
-static void mdp5_crtc_reset(struct drm_crtc *crtc)
-{
-	struct mdp5_crtc_state *mdp5_cstate;
-
-	if (crtc->state) {
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
-		kfree(to_mdp5_crtc_state(crtc->state));
-	}
-
-	mdp5_cstate = kzalloc(sizeof(*mdp5_cstate), GFP_KERNEL);
-
-	if (mdp5_cstate) {
-		mdp5_cstate->base.crtc = crtc;
-		crtc->state = &mdp5_cstate->base;
-	}
-}
-
 static struct drm_crtc_state *
 mdp5_crtc_duplicate_state(struct drm_crtc *crtc)
 {

drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c static void mdp5_crtc_destroy_state(struct drm_crtc *crtc, struct drm_crtc_state · line 1035

Quoted 7 lines
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c +4 -0
@@ -1046,6 +1029,17 @@ static void mdp5_crtc_destroy_state(struct drm_crtc *crtc, struct drm_crtc_state
 	kfree(mdp5_cstate);
 }
 
+static void mdp5_crtc_reset(struct drm_crtc *crtc)
+{
+	struct mdp5_crtc_state *mdp5_cstate =
+		mdp5_cstate = kzalloc(sizeof(*mdp5_cstate), GFP_KERNEL);

Assigned twice for good measure ;)

Quoted 13 lines
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c +7 -0
+
+	if (crtc->state)
+		mdp5_crtc_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &mdp5_cstate->base);
+}
+
 static const struct drm_crtc_funcs mdp5_crtc_funcs = {
 	.set_config = drm_atomic_helper_set_config,
 	.destroy = mdp5_crtc_destroy,
Signature · 1 line
2.20.1
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#14 lore raw

PATCH 11/17 drm/omap: Convert to using __drm_atomic_helper_crtc_reset() for reset.

In reply to Maarten Lankhorst

Convert omap to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

---
 drivers/gpu/drm/omapdrm/omap_crtc.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/gpu/drm/omapdrm/omap_crtc.c +5 -6
index d99e24dcc0bf..2546002b1c5c 100644
@@ -549,14 +549,13 @@ static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,
 
 static void omap_crtc_reset(struct drm_crtc *crtc)
 {
-	if (crtc->state)
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
-
-	kfree(crtc->state);
-	crtc->state = kzalloc(sizeof(struct omap_crtc_state), GFP_KERNEL);
+	struct omap_crtc_state *crtc_state =
+		kzalloc(sizeof(*crtc_state), GFP_KERNEL);
 
 	if (crtc->state)
-		crtc->state->crtc = crtc;
+		drm_atomic_helper_crtc_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &crtc_state->base);
 }
 
 static struct drm_crtc_state *
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#15 lore raw

PATCH 12/17 drm/rcar-du: Convert to using __drm_atomic_helper_crtc_reset() for reset.

In reply to Maarten Lankhorst

Convert rcar-du to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +3 -8
index 4cdea14d552f..7766551e67fc 100644
@@ -891,22 +891,17 @@ static void rcar_du_crtc_cleanup(struct drm_crtc *crtc)
 
 static void rcar_du_crtc_reset(struct drm_crtc *crtc)
 {
-	struct rcar_du_crtc_state *state;
+	struct rcar_du_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
 
-	if (crtc->state) {
+	if (crtc->state)
 		rcar_du_crtc_atomic_destroy_state(crtc, crtc->state);
-		crtc->state = NULL;
-	}
 
-	state = kzalloc(sizeof(*state), GFP_KERNEL);
+	__drm_atomic_helper_crtc_reset(crtc, &state->state);
 	if (state == NULL)
 		return;
 
 	state->crc.source = VSP1_DU_CRC_NONE;
 	state->crc.index = 0;
-
-	crtc->state = &state->state;
-	crtc->state->crtc = crtc;
 }
 
 static int rcar_du_crtc_enable_vblank(struct drm_crtc *crtc)
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#16 lore raw

Re: [PATCH 12/17] drm/rcar-du: Convert to using __drm_atomic_helper_crtc_reset() for reset.

Hi Maarten,

Thank you for the patch.

Quoted 3 lines · Maarten Lankhorst

Convert rcar-du to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

I don't think the second sentence applies to this patch.

Quoted 17 lines
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +0 -1
index 4cdea14d552f..7766551e67fc 100644
@@ -891,22 +891,17 @@ static void rcar_du_crtc_cleanup(struct drm_crtc *crtc)
 
 static void rcar_du_crtc_reset(struct drm_crtc *crtc)
 {
-	struct rcar_du_crtc_state *state;

drivers/gpu/drm/rcar-du/rcar_du_crtc.c static void rcar_du_crtc_cleanup(struct drm_crtc *crtc) · line 899

Quoted 10 lines
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +3 -4
+	struct rcar_du_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
 
-	if (crtc->state) {
+	if (crtc->state)
 		rcar_du_crtc_atomic_destroy_state(crtc, crtc->state);
-		crtc->state = NULL;
-	}
 
-	state = kzalloc(sizeof(*state), GFP_KERNEL);
+	__drm_atomic_helper_crtc_reset(crtc, &state->state);

state may be NULL here if the above kzalloc() failed. Let's keep the original order of the function, and simply call __drm_atomic_helper_crtc_reset() after the NULL check below.

Quoted 11 lines
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +0 -3
 	if (state == NULL)
 		return;
 
 	state->crc.source = VSP1_DU_CRC_NONE;
 	state->crc.index = 0;
-
-	crtc->state = &state->state;
-	crtc->state->crtc = crtc;
 }
 
 static int rcar_du_crtc_enable_vblank(struct drm_crtc *crtc)
Signature · 7 lines
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#17 lore raw

Re: [PATCH 12/17] drm/rcar-du: Convert to using __drm_atomic_helper_crtc_reset() for reset.

Op 01-03-2019 om 14:13 schreef Laurent Pinchart:

Quoted 35 lines

Hi Maarten,

Thank you for the patch.

Quoted 3 lines · Maarten Lankhorst

Convert rcar-du to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

I don't think the second sentence applies to this patch.

Quoted 25 lines
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +2 -4
index 4cdea14d552f..7766551e67fc 100644
@@ -891,22 +891,17 @@ static void rcar_du_crtc_cleanup(struct drm_crtc *crtc)
 
 static void rcar_du_crtc_reset(struct drm_crtc *crtc)
 {
-	struct rcar_du_crtc_state *state;
+	struct rcar_du_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
 
-	if (crtc->state) {
+	if (crtc->state)
 		rcar_du_crtc_atomic_destroy_state(crtc, crtc->state);
-		crtc->state = NULL;
-	}
 
Quoted 5 lines

drivers/gpu/drm/rcar-du/rcar_du_crtc.c static void rcar_du_crtc_cleanup(struct drm_crtc *crtc) · line 899

Quoted 2 lines
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +1 -1
-	state = kzalloc(sizeof(*state), GFP_KERNEL);
+	__drm_atomic_helper_crtc_reset(crtc, &state->state);

state may be NULL here if the above kzalloc() failed. Let's keep the original order of the function, and simply call __drm_atomic_helper_crtc_reset() after the NULL check below.

There were 10 different ways crtc was implemented, I felt it was good to settle on one.

We don't handle during reset at all, would need to start propagating this first before we should handle errors, imho.

Looking more closely, it's the same way that errors in rcar_du_plane_reset() are handled. :)

Cheers,

~Maarten

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#18 lore raw

Re: [PATCH 12/17] drm/rcar-du: Convert to using __drm_atomic_helper_crtc_reset() for reset.

Hi Marteen,

Quoted 39 lines · Maarten Lankhorst

Op 01-03-2019 om 14:13 schreef Laurent Pinchart:

Quoted 31 lines · Maarten Lankhorst
Quoted 3 lines

Convert rcar-du to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

I don't think the second sentence applies to this patch.

Quoted 25 lines
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +2 -4
index 4cdea14d552f..7766551e67fc 100644
@@ -891,22 +891,17 @@ static void rcar_du_crtc_cleanup(struct drm_crtc *crtc)
 
 static void rcar_du_crtc_reset(struct drm_crtc *crtc)
 {
-	struct rcar_du_crtc_state *state;
+	struct rcar_du_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
 
-	if (crtc->state) {
+	if (crtc->state)
 		rcar_du_crtc_atomic_destroy_state(crtc, crtc->state);
-		crtc->state = NULL;
-	}
 
Quoted 6 lines

drivers/gpu/drm/rcar-du/rcar_du_crtc.c static void rcar_du_crtc_cleanup(struct drm_crtc *crtc) · line 899

Quoted 2 lines
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +1 -1
-	state = kzalloc(sizeof(*state), GFP_KERNEL);
+	__drm_atomic_helper_crtc_reset(crtc, &state->state);

state may be NULL here if the above kzalloc() failed. Let's keep the original order of the function, and simply call __drm_atomic_helper_crtc_reset() after the NULL check below.

Quoted 3 lines

There were 10 different ways crtc was implemented, I felt it was good to settle on one.

We don't handle during reset at all, would need to start propagating this first before we should handle errors, imho.

That's not the point. As state can be NULL, you could end up dereferencing a NULL pointer. The fact that the base state is the first field in the rcar_du_crtc_state structure is just luck, and shouldn't be relied on.

Quoted 2 lines

Looking more closely, it's the same way that errors in rcar_du_plane_reset() are handled. :)

It's not, the return value of kzalloc() is checked explicitly in rcar_du_plane_reset() before calling __drm_atomic_helper_plane_reset(). Please copy the code flow of rcar_du_plane_reset() to implement rcar_du_crtc_reset().

Signature · 7 lines
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#19 lore raw

Re: [PATCH 12/17] drm/rcar-du: Convert to using __drm_atomic_helper_crtc_reset() for reset.

Op 01-03-2019 om 15:36 schreef Laurent Pinchart:

Quoted 40 lines

Hi Marteen,

Quoted 37 lines · Maarten Lankhorst

Op 01-03-2019 om 14:13 schreef Laurent Pinchart:

Quoted 36 lines · Maarten Lankhorst
Quoted 3 lines

Convert rcar-du to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

I don't think the second sentence applies to this patch.

Quoted 17 lines
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +0 -1
index 4cdea14d552f..7766551e67fc 100644
@@ -891,22 +891,17 @@ static void rcar_du_crtc_cleanup(struct drm_crtc *crtc)
 
 static void rcar_du_crtc_reset(struct drm_crtc *crtc)
 {
-	struct rcar_du_crtc_state *state;

drivers/gpu/drm/rcar-du/rcar_du_crtc.c static void rcar_du_crtc_cleanup(struct drm_crtc *crtc) · line 899

Quoted 10 lines
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +3 -4
+	struct rcar_du_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
 
-	if (crtc->state) {
+	if (crtc->state)
 		rcar_du_crtc_atomic_destroy_state(crtc, crtc->state);
-		crtc->state = NULL;
-	}
 
-	state = kzalloc(sizeof(*state), GFP_KERNEL);
+	__drm_atomic_helper_crtc_reset(crtc, &state->state);

state may be NULL here if the above kzalloc() failed. Let's keep the original order of the function, and simply call __drm_atomic_helper_crtc_reset() after the NULL check below.

Quoted 7 lines
Quoted 3 lines

There were 10 different ways crtc was implemented, I felt it was good to settle on one.

We don't handle during reset at all, would need to start propagating this first before we should handle errors, imho.

That's not the point. As state can be NULL, you could end up dereferencing a NULL pointer. The fact that the base state is the first field in the rcar_du_crtc_state structure is just luck, and shouldn't be relied on.

Would it be ok if I changed it to state ? &state->state : NULL and let the compiler deal with it?

Will probably fix up all other patches as well before committing.

Quoted 7 lines
Quoted 2 lines

Looking more closely, it's the same way that errors in rcar_du_plane_reset() are handled. :)

It's not, the return value of kzalloc() is checked explicitly in rcar_du_plane_reset() before calling __drm_atomic_helper_plane_reset(). Please copy the code flow of rcar_du_plane_reset() to implement rcar_du_crtc_reset().

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#20 lore raw

Re: [PATCH 12/17] drm/rcar-du: Convert to using __drm_atomic_helper_crtc_reset() for reset.

Hi Marteen,

Quoted 41 lines · Maarten Lankhorst

Op 01-03-2019 om 15:36 schreef Laurent Pinchart:

Quoted 40 lines · Maarten Lankhorst
Quoted 39 lines

Op 01-03-2019 om 14:13 schreef Laurent Pinchart:

Quoted 31 lines · Maarten Lankhorst
Quoted 3 lines

Convert rcar-du to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

I don't think the second sentence applies to this patch.

Quoted 25 lines
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +2 -4
index 4cdea14d552f..7766551e67fc 100644
@@ -891,22 +891,17 @@ static void rcar_du_crtc_cleanup(struct drm_crtc *crtc)
 
 static void rcar_du_crtc_reset(struct drm_crtc *crtc)
 {
-	struct rcar_du_crtc_state *state;
+	struct rcar_du_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
 
-	if (crtc->state) {
+	if (crtc->state)
 		rcar_du_crtc_atomic_destroy_state(crtc, crtc->state);
-		crtc->state = NULL;
-	}
 
Quoted 5 lines

drivers/gpu/drm/rcar-du/rcar_du_crtc.c static void rcar_du_crtc_cleanup(struct drm_crtc *crtc) · line 899

Quoted 2 lines
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +1 -1
-	state = kzalloc(sizeof(*state), GFP_KERNEL);
+	__drm_atomic_helper_crtc_reset(crtc, &state->state);

state may be NULL here if the above kzalloc() failed. Let's keep the original order of the function, and simply call __drm_atomic_helper_crtc_reset() after the NULL check below.

There were 10 different ways crtc was implemented, I felt it was good to settle on one.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

We don't handle during reset at all, would need to start propagating this first before we should handle errors, imho.

That's not the point. As state can be NULL, you could end up dereferencing a NULL pointer. The fact that the base state is the first field in the rcar_du_crtc_state structure is just luck, and shouldn't be relied on.

Would it be ok if I changed it to state ? &state->state : NULL and let the compiler deal with it?

What's wrong with a proper implementation ?

static void rcar_du_crtc_reset(struct drm_crtc *crtc)

{
	struct rcar_du_crtc_state *state;

	if (crtc->state) {
		rcar_du_crtc_atomic_destroy_state(crtc, crtc->state);
		crtc->state = NULL;
	}

	state = kzalloc(sizeof(*state), GFP_KERNEL);
	if (state == NULL)
		return;

	__drm_atomic_helper_crtc_reset(crtc, &state->state);

	state->crc.source = VSP1_DU_CRC_NONE;
	state->crc.index = 0;
}
Quoted 1 line

Will probably fix up all other patches as well before committing.

You won't commit this one before I ack it, right ? :-)

Quoted 6 lines
Quoted 6 lines
Quoted 2 lines

Looking more closely, it's the same way that errors in rcar_du_plane_reset() are handled. :)

It's not, the return value of kzalloc() is checked explicitly in rcar_du_plane_reset() before calling __drm_atomic_helper_plane_reset(). Please copy the code flow of rcar_du_plane_reset() to implement rcar_du_crtc_reset().

Signature · 7 lines
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

A message that is not in the archive (sent off-list or not yet received): 20190301125627.7285-1-maarten.lankhorst-VuQAYsv1563Yd54FQh9/[email protected]

#22 lore raw

PATCH 13/17 drm/rockchip: Convert to using __drm_atomic_helper_crtc_reset() for reset.

Convert rockchip to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 22 ++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +11 -11
index c7d4c6073ea5..1cf1658f1c01 100644
@@ -1201,17 +1201,6 @@ static void vop_crtc_destroy(struct drm_crtc *crtc)
 	drm_crtc_cleanup(crtc);
 }
 
-static void vop_crtc_reset(struct drm_crtc *crtc)
-{
-	if (crtc->state)
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
-	kfree(crtc->state);
-
-	crtc->state = kzalloc(sizeof(struct rockchip_crtc_state), GFP_KERNEL);
-	if (crtc->state)
-		crtc->state->crtc = crtc;
-}
-
 static struct drm_crtc_state *vop_crtc_duplicate_state(struct drm_crtc *crtc)
 {
 	struct rockchip_crtc_state *rockchip_state;
@@ -1233,6 +1222,17 @@ static void vop_crtc_destroy_state(struct drm_crtc *crtc,
 	kfree(s);
 }
 
+static void vop_crtc_reset(struct drm_crtc *crtc)
+{
+	struct rockchip_crtc_state *crtc_state =
+		kzalloc(sizeof(*crtc_state), GFP_KERNEL);
+
+	if (crtc->state)
+		vop_crtc_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &crtc_state->base);
+}
+
 #ifdef CONFIG_DRM_ANALOGIX_DP
 static struct drm_connector *vop_get_edp_connector(struct vop *vop)
 {
Signature · 7 lines
2.20.1


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
maintainer Reviewed-by on v1 13/17
#23 lore raw

Re: [PATCH 13/17] drm/rockchip: Convert to using __drm_atomic_helper_crtc_reset() for reset.

Am Freitag, 1. März 2019, 13:56:23 CET schrieb Maarten Lankhorst:

Quoted 8 lines

Convert rockchip to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

so I've looked up the patch2 that introduces __drm_atomic_helper_crtc_reset in patchwork and compared results and everything looks as it should be I think ;-) , so

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#24 lore raw

PATCH 14/17 drm/tegra: Convert to using __drm_atomic_helper_crtc_reset() for reset.

In reply to Maarten Lankhorst

Convert tegra to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

---
 drivers/gpu/drm/tegra/dc.c | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)
drivers/gpu/drm/tegra/dc.c +11 -19
index 607a6ea17ecc..57c88d78cdaa 100644
@@ -1153,25 +1153,6 @@ static void tegra_dc_destroy(struct drm_crtc *crtc)
 	drm_crtc_cleanup(crtc);
 }
 
-static void tegra_crtc_reset(struct drm_crtc *crtc)
-{
-	struct tegra_dc_state *state;
-
-	if (crtc->state)
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
-
-	kfree(crtc->state);
-	crtc->state = NULL;
-
-	state = kzalloc(sizeof(*state), GFP_KERNEL);
-	if (state) {
-		crtc->state = &state->base;
-		crtc->state->crtc = crtc;
-	}
-
-	drm_crtc_vblank_reset(crtc);
-}
-
 static struct drm_crtc_state *
 tegra_crtc_atomic_duplicate_state(struct drm_crtc *crtc)
 {
@@ -1198,6 +1179,17 @@ static void tegra_crtc_atomic_destroy_state(struct drm_crtc *crtc,
 	kfree(state);
 }
 
+static void tegra_crtc_reset(struct drm_crtc *crtc)
+{
+	struct tegra_dc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
+
+	if (crtc->state)
+		tegra_crtc_atomic_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &state->base);
+	drm_crtc_vblank_reset(crtc);
+}
+
 #define DEBUGFS_REG32(_name) { .name = #_name, .offset = _name }
 
 static const struct debugfs_reg32 tegra_dc_regs[] = {
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Acked-by on v1 14/17
#25 lore raw

Re: [PATCH 14/17] drm/tegra: Convert to using __drm_atomic_helper_crtc_reset() for reset.

Quoted 47 lines · Maarten Lankhorst

Convert tegra to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

---
 drivers/gpu/drm/tegra/dc.c | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)
drivers/gpu/drm/tegra/dc.c +1 -19
index 607a6ea17ecc..57c88d78cdaa 100644
@@ -1153,25 +1153,6 @@ static void tegra_dc_destroy(struct drm_crtc *crtc)
 	drm_crtc_cleanup(crtc);
 }
 
-static void tegra_crtc_reset(struct drm_crtc *crtc)
-{
-	struct tegra_dc_state *state;
-
-	if (crtc->state)
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
-
-	kfree(crtc->state);
-	crtc->state = NULL;
-
-	state = kzalloc(sizeof(*state), GFP_KERNEL);
-	if (state) {
-		crtc->state = &state->base;
-		crtc->state->crtc = crtc;
-	}
-
-	drm_crtc_vblank_reset(crtc);
-}
-
 static struct drm_crtc_state *
 tegra_crtc_atomic_duplicate_state(struct drm_crtc *crtc)
 {
@@ -1198,6 +1179,17 @@ static void tegra_crtc_atomic_destroy_state(struct drm_crtc *crtc,
 	kfree(state);
 }
 
+static void tegra_crtc_reset(struct drm_crtc *crtc)

drivers/gpu/drm/tegra/dc.c static void tegra_crtc_atomic_destroy_state(struct drm_crtc *crtc, · line 1192

Quoted 10 lines
drivers/gpu/drm/tegra/dc.c +10 -0
+{
+	struct tegra_dc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
+
+	if (crtc->state)
+		tegra_crtc_atomic_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &state->base);
+	drm_crtc_vblank_reset(crtc);
+}
+

I would preferred a predeclaration of tegra_crtc_atomic_destroy_state() in this case because the implementations are in the same order as their use in tegra_crtc_funcs, but I think I can live with it, so either way:

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author maintainer
#26 lore raw

PATCH 15/17 drm/vc4: Convert to using __drm_atomic_helper_crtc_reset() for reset.

In reply to Maarten Lankhorst

Convert vc4 to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

---
 drivers/gpu/drm/vc4/vc4_crtc.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/vc4/vc4_crtc.c +5 -4
index e7c04a9eb219..fdf21594b050 100644
@@ -1041,12 +1041,13 @@ static void vc4_crtc_destroy_state(struct drm_crtc *crtc,
 static void
 vc4_crtc_reset(struct drm_crtc *crtc)
 {
-	if (crtc->state)
-		vc4_crtc_destroy_state(crtc->state);
+	struct vc4_crtc_state *crtc_state =
+		kzalloc(sizeof(*crtc_state), GFP_KERNEL);
 
-	crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL);
 	if (crtc->state)
-		crtc->state->crtc = crtc;
+		vc4_crtc_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &crtc_state->base);
 }
 
 static const struct drm_crtc_funcs vc4_crtc_funcs = {
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#27 lore raw

Re: [PATCH 15/17] drm/vc4: Convert to using __drm_atomic_helper_crtc_reset() for reset.

Quoted 19 lines · Maarten Lankhorst

Convert vc4 to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

---
 drivers/gpu/drm/vc4/vc4_crtc.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/vc4/vc4_crtc.c +0 -1
index e7c04a9eb219..fdf21594b050 100644
@@ -1041,12 +1041,13 @@ static void vc4_crtc_destroy_state(struct drm_crtc *crtc,
 static void
 vc4_crtc_reset(struct drm_crtc *crtc)
 {
-	if (crtc->state)

drivers/gpu/drm/vc4/vc4_crtc.c static void vc4_crtc_destroy_state(struct drm_crtc *crtc, · line 1050

Quoted 10 lines
drivers/gpu/drm/vc4/vc4_crtc.c +5 -3
-		vc4_crtc_destroy_state(crtc->state);
+	struct vc4_crtc_state *crtc_state =
+		kzalloc(sizeof(*crtc_state), GFP_KERNEL);
 
-	crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL);
 	if (crtc->state)
-		crtc->state->crtc = crtc;
+		vc4_crtc_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &crtc_state->base);

Wouldn't it be much easier if __drm_atomic_helper_crtc_reset took in a new state and destroyed the old state for you? It seems like hardly a helper as is.

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author maintainer
#28 lore raw

Re: [PATCH 15/17] drm/vc4: Convert to using __drm_atomic_helper_crtc_reset() for reset.

Op 01-03-2019 om 23:47 schreef Eric Anholt:

Quoted 25 lines
Quoted 23 lines · Maarten Lankhorst

Convert vc4 to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

---
 drivers/gpu/drm/vc4/vc4_crtc.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/vc4/vc4_crtc.c +2 -2
index e7c04a9eb219..fdf21594b050 100644
@@ -1041,12 +1041,13 @@ static void vc4_crtc_destroy_state(struct drm_crtc *crtc,
 static void
 vc4_crtc_reset(struct drm_crtc *crtc)
 {
-	if (crtc->state)
-		vc4_crtc_destroy_state(crtc->state);
+	struct vc4_crtc_state *crtc_state =
+		kzalloc(sizeof(*crtc_state), GFP_KERNEL);
 
Quoted 9 lines

drivers/gpu/drm/vc4/vc4_crtc.c static void vc4_crtc_destroy_state(struct drm_crtc *crtc, · line 1050

Quoted 6 lines
drivers/gpu/drm/vc4/vc4_crtc.c +3 -2
-	crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL);
 	if (crtc->state)
-		crtc->state->crtc = crtc;
+		vc4_crtc_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &crtc_state->base);

Wouldn't it be much easier if __drm_atomic_helper_crtc_reset took in a new state and destroyed the old state for you? It seems like hardly a helper as is.

Yes it would, but the plane/connector reset is the same. If you want to convert them all it would be nice. :)

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#29 lore raw

PATCH 16/17 drm/vkms: Convert to using __drm_atomic_helper_crtc_reset() for reset.

In reply to Maarten Lankhorst

Convert vkms to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

Cc Rodrigo Siqueira <[email protected]>
Cc Haneen Mohammed <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/vkms/vkms_crtc.c | 33 +++++++++++++-------------------
 1 file changed, 13 insertions(+), 20 deletions(-)
drivers/gpu/drm/vkms/vkms_crtc.c +13 -20
index 8a9aeb0a9ea8..550888e72c96 100644
@@ -83,26 +83,6 @@ bool vkms_get_vblank_timestamp(struct drm_device *dev, unsigned int pipe,
 	return true;
 }
 
-static void vkms_atomic_crtc_reset(struct drm_crtc *crtc)
-{
-	struct vkms_crtc_state *vkms_state = NULL;
-
-	if (crtc->state) {
-		vkms_state = to_vkms_crtc_state(crtc->state);
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
-		kfree(vkms_state);
-		crtc->state = NULL;
-	}
-
-	vkms_state = kzalloc(sizeof(*vkms_state), GFP_KERNEL);
-	if (!vkms_state)
-		return;
-	INIT_WORK(&vkms_state->crc_work, vkms_crc_work_handle);
-
-	crtc->state = &vkms_state->base;
-	crtc->state->crtc = crtc;
-}
-
 static struct drm_crtc_state *
 vkms_atomic_crtc_duplicate_state(struct drm_crtc *crtc)
 {
@@ -135,6 +115,19 @@ static void vkms_atomic_crtc_destroy_state(struct drm_crtc *crtc,
 	}
 }
 
+static void vkms_atomic_crtc_reset(struct drm_crtc *crtc)
+{
+	struct vkms_crtc_state *vkms_state =
+		kzalloc(sizeof(*vkms_state), GFP_KERNEL);
+
+	if (crtc->state)
+		vkms_atomic_crtc_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &vkms_state->base);
+	if (vkms_state)
+		INIT_WORK(&vkms_state->crc_work, vkms_crc_work_handle);
+}
+
 static const struct drm_crtc_funcs vkms_crtc_funcs = {
 	.set_config             = drm_atomic_helper_set_config,
 	.destroy                = drm_crtc_cleanup,
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 16/17
#30 lore raw

Re: [PATCH 16/17] drm/vkms: Convert to using __drm_atomic_helper_crtc_reset() for reset.

Quoted 66 lines · Maarten Lankhorst

Convert vkms to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

Cc Rodrigo Siqueira <[email protected]>
Cc Haneen Mohammed <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/vkms/vkms_crtc.c | 33 +++++++++++++-------------------
 1 file changed, 13 insertions(+), 20 deletions(-)
drivers/gpu/drm/vkms/vkms_crtc.c +13 -20
index 8a9aeb0a9ea8..550888e72c96 100644
@@ -83,26 +83,6 @@ bool vkms_get_vblank_timestamp(struct drm_device *dev, unsigned int pipe,
 	return true;
 }
 
-static void vkms_atomic_crtc_reset(struct drm_crtc *crtc)
-{
-	struct vkms_crtc_state *vkms_state = NULL;
-
-	if (crtc->state) {
-		vkms_state = to_vkms_crtc_state(crtc->state);
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
-		kfree(vkms_state);
-		crtc->state = NULL;
-	}
-
-	vkms_state = kzalloc(sizeof(*vkms_state), GFP_KERNEL);
-	if (!vkms_state)
-		return;
-	INIT_WORK(&vkms_state->crc_work, vkms_crc_work_handle);
-
-	crtc->state = &vkms_state->base;
-	crtc->state->crtc = crtc;
-}
-
 static struct drm_crtc_state *
 vkms_atomic_crtc_duplicate_state(struct drm_crtc *crtc)
 {
@@ -135,6 +115,19 @@ static void vkms_atomic_crtc_destroy_state(struct drm_crtc *crtc,
 	}
 }
 
+static void vkms_atomic_crtc_reset(struct drm_crtc *crtc)
+{
+	struct vkms_crtc_state *vkms_state =
+		kzalloc(sizeof(*vkms_state), GFP_KERNEL);
+
+	if (crtc->state)
+		vkms_atomic_crtc_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &vkms_state->base);
+	if (vkms_state)
+		INIT_WORK(&vkms_state->crc_work, vkms_crc_work_handle);
+}
+
 static const struct drm_crtc_funcs vkms_crtc_funcs = {
 	.set_config             = drm_atomic_helper_set_config,
 	.destroy                = drm_crtc_cleanup,
Signature · 1 line
2.20.1

Hi Maarten,

First of all, thanks for the patch :)

I tested it on my VM with the IGT test, and everything looks fine.

Signature · 5 lines
Rodrigo Siqueira
https://siqueira.tech
Graduate Student
Department of Computer Science
University of São Paulo

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author maintainer
#31 lore raw

Re: [PATCH 16/17] drm/vkms: Convert to using __drm_atomic_helper_crtc_reset() for reset.

Op 06-03-2019 om 23:43 schreef Rodrigo Siqueira:

Quoted 69 lines · Maarten Lankhorst
Quoted 66 lines

Convert vkms to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

Cc Rodrigo Siqueira <[email protected]>
Cc Haneen Mohammed <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/vkms/vkms_crtc.c | 33 +++++++++++++-------------------
 1 file changed, 13 insertions(+), 20 deletions(-)
drivers/gpu/drm/vkms/vkms_crtc.c +13 -20
index 8a9aeb0a9ea8..550888e72c96 100644
@@ -83,26 +83,6 @@ bool vkms_get_vblank_timestamp(struct drm_device *dev, unsigned int pipe,
 	return true;
 }
 
-static void vkms_atomic_crtc_reset(struct drm_crtc *crtc)
-{
-	struct vkms_crtc_state *vkms_state = NULL;
-
-	if (crtc->state) {
-		vkms_state = to_vkms_crtc_state(crtc->state);
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
-		kfree(vkms_state);
-		crtc->state = NULL;
-	}
-
-	vkms_state = kzalloc(sizeof(*vkms_state), GFP_KERNEL);
-	if (!vkms_state)
-		return;
-	INIT_WORK(&vkms_state->crc_work, vkms_crc_work_handle);
-
-	crtc->state = &vkms_state->base;
-	crtc->state->crtc = crtc;
-}
-
 static struct drm_crtc_state *
 vkms_atomic_crtc_duplicate_state(struct drm_crtc *crtc)
 {
@@ -135,6 +115,19 @@ static void vkms_atomic_crtc_destroy_state(struct drm_crtc *crtc,
 	}
 }
 
+static void vkms_atomic_crtc_reset(struct drm_crtc *crtc)
+{
+	struct vkms_crtc_state *vkms_state =
+		kzalloc(sizeof(*vkms_state), GFP_KERNEL);
+
+	if (crtc->state)
+		vkms_atomic_crtc_destroy_state(crtc, crtc->state);
+
+	__drm_atomic_helper_crtc_reset(crtc, &vkms_state->base);
+	if (vkms_state)
+		INIT_WORK(&vkms_state->crc_work, vkms_crc_work_handle);
+}
+
 static const struct drm_crtc_funcs vkms_crtc_funcs = {
 	.set_config             = drm_atomic_helper_set_config,
 	.destroy                = drm_crtc_cleanup,
Signature · 1 line
2.20.1

Hi Maarten,

Quoted 6 lines

First of all, thanks for the patch :)

I tested it on my VM with the IGT test, and everything looks fine.

Thanks, pushed patches 1-3, and rockchip, tegra, msm, vkms, mali and i915 patches with reviews. :)

Will resend the rest of the series and address the feedback.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#32 lore raw

PATCH 17/17 drm/vmwgfx: Convert to using __drm_atomic_helper_crtc_reset() for reset.

In reply to Maarten Lankhorst

Convert vmwgfx to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state.

---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +4 -16
index ed2f67822f45..602f549f09f6 100644
@@ -611,24 +611,12 @@ vmw_du_crtc_duplicate_state(struct drm_crtc *crtc)
  */
 void vmw_du_crtc_reset(struct drm_crtc *crtc)
 {
-	struct vmw_crtc_state *vcs;
-
-
-	if (crtc->state) {
-		__drm_atomic_helper_crtc_destroy_state(crtc->state);
-
-		kfree(vmw_crtc_state_to_vcs(crtc->state));
-	}
+	struct vmw_crtc_state *vcs = kzalloc(sizeof(*vcs), GFP_KERNEL);
 
-	vcs = kzalloc(sizeof(*vcs), GFP_KERNEL);
-
-	if (!vcs) {
-		DRM_ERROR("Cannot allocate vmw_crtc_state\n");
-		return;
-	}
+	if (crtc->state)
+		vmw_du_crtc_destroy_state(crtc, crtc->state);
 
-	crtc->state = &vcs->base;
-	crtc->state->crtc = crtc;
+	__drm_atomic_helper_crtc_reset(crtc, &vcs->base);
 }
 
 
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#33 lore raw

✗ Fi.CI.CHECKPATCH: warning for drm: Start subclassing crtc_state.

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: drm: Start subclassing crtc_state.
URL : https://patchwork.freedesktop.org/series/57425/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
51d3cd4204fb drm/vc4: Fix memory leak during gpu reset.
fdfc56a108d3 drm/atomic: Create __drm_atomic_helper_crtc_reset() for subclassing crtc_state.
34f32bdeca76 drm/docs: Fix typo in __drm_atomic_helper_connector_reset
-:7: WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one

total: 0 errors, 1 warnings, 0 checks, 8 lines checked
f8574e1d416a drm/amd: Convert to using __drm_atomic_helper_crtc_reset() for reset. c3ddc7689a67 drm/mali: Convert to using __drm_atomic_helper_crtc_reset() for reset. 97817e87cd77 drm/atmel-hlcdc: Convert to using __drm_atomic_helper_crtc_reset() for reset. 9158964fdd37 drm/i915: Use the new __drm_atomic_helper_crtc_reset() helper. c9bf362dac3b drm/imx: Convert to using __drm_atomic_helper_crtc_reset() for reset. 70cc75e4022f drm/mediatek: Convert to using __drm_atomic_helper_crtc_reset() for reset. 3a057b72363e drm/msm: Convert to using __drm_atomic_helper_crtc_reset() for reset. d6083ed9c6f7 drm/omap: Convert to using __drm_atomic_helper_crtc_reset() for reset. 5412a63fabc8 drm/rcar-du: Convert to using __drm_atomic_helper_crtc_reset() for reset. 837ea0cf17aa drm/rockchip: Convert to using __drm_atomic_helper_crtc_reset() for reset. 725895026dd3 drm/tegra: Convert to using __drm_atomic_helper_crtc_reset() for reset. df9f94b77ae9 drm/vc4: Convert to using __drm_atomic_helper_crtc_reset() for reset. 21dea2d6f4e3 drm/vkms: Convert to using __drm_atomic_helper_crtc_reset() for reset. 58ec786d5c8e drm/vmwgfx: Convert to using __drm_atomic_helper_crtc_reset() for reset.

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#34 lore raw

✗ Fi.CI.SPARSE: warning for drm: Start subclassing crtc_state.

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: drm: Start subclassing crtc_state.
URL : https://patchwork.freedesktop.org/series/57425/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm/vc4: Fix memory leak during gpu reset.
Okay!

Commit: drm/atomic: Create __drm_atomic_helper_crtc_reset() for subclassing crtc_state. Okay!

Commit: drm/docs: Fix typo in __drm_atomic_helper_connector_reset Okay!

Commit: drm/amd: Convert to using __drm_atomic_helper_crtc_reset() for reset. -drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3586:6: warning: symbol 'dm_drm_plane_destroy_state' was not declared. Should it be static? -drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4453:27: warning: expression using sizeof(void) -drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4453:27: warning: expression using sizeof(void) -drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4457:27: warning: expression using sizeof(void) -drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4457:27: warning: expression using sizeof(void) -drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4600:17: warning: Using plain integer as NULL pointer +drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3580:6: warning: symbol 'dm_drm_plane_destroy_state' was not declared. Should it be static? +drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4447:27: warning: expression using sizeof(void) +drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4447:27: warning: expression using sizeof(void) +drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4451:27: warning: expression using sizeof(void) +drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4451:27: warning: expression using sizeof(void) +drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4594:17: warning: Using plain integer as NULL pointer

Commit: drm/mali: Convert to using __drm_atomic_helper_crtc_reset() for reset. Okay!

Commit: drm/atmel-hlcdc: Convert to using __drm_atomic_helper_crtc_reset() for reset. Okay!

Commit: drm/i915: Use the new __drm_atomic_helper_crtc_reset() helper. Okay!

Commit: drm/imx: Convert to using __drm_atomic_helper_crtc_reset() for reset. Okay!

Commit: drm/mediatek: Convert to using __drm_atomic_helper_crtc_reset() for reset. Okay!

Commit: drm/msm: Convert to using __drm_atomic_helper_crtc_reset() for reset. Okay!

Commit: drm/omap: Convert to using __drm_atomic_helper_crtc_reset() for reset. Okay!

Commit: drm/rcar-du: Convert to using __drm_atomic_helper_crtc_reset() for reset. Okay!

Commit: drm/rockchip: Convert to using __drm_atomic_helper_crtc_reset() for reset. Okay!

Commit: drm/tegra: Convert to using __drm_atomic_helper_crtc_reset() for reset. Okay!

Commit: drm/vc4: Convert to using __drm_atomic_helper_crtc_reset() for reset. Okay!

Commit: drm/vkms: Convert to using __drm_atomic_helper_crtc_reset() for reset. Okay!

Commit: drm/vmwgfx: Convert to using __drm_atomic_helper_crtc_reset() for reset. Okay!

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#35 lore raw

✓ Fi.CI.BAT: success for drm: Start subclassing crtc_state.

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: drm: Start subclassing crtc_state.
URL : https://patchwork.freedesktop.org/series/57425/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5676 -> Patchwork_12342
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/57425/revisions/1/mbox/

Known issues
------------

Here are the changes found in Patchwork_12342 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_cs_nop@fork-gfx0:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109315] +17

* igt@gem_exec_basic@readonly-bsd1:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109276] +7

* igt@gem_exec_basic@readonly-bsd2:
- fi-pnv-d510: NOTRUN -> SKIP [fdo#109271] +76

* igt@gem_exec_parse@basic-allowed:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109289] +1

* igt@i915_selftest@live_contexts:
- fi-icl-u2: NOTRUN -> DMESG-FAIL [fdo#108569]

* igt@kms_busy@basic-flip-c:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-pnv-d510: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_chamelium@dp-edid-read:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109316] +2

* igt@kms_chamelium@vga-hpd-fast:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109309] +1

* igt@kms_force_connector_basic@prune-stale-modes:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109285] +3

* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u2: NOTRUN -> FAIL [fdo#103167]

* igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +48

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS

* igt@i915_selftest@live_evict:
- fi-bsw-kefka: DMESG-WARN [fdo#107709] -> PASS

* igt@i915_selftest@live_execlists:
- fi-apl-guc: INCOMPLETE [fdo#103927] / [fdo#109720] -> PASS

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107709]: https://bugs.freedesktop.org/show_bug.cgi?id=107709
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109316]: https://bugs.freedesktop.org/show_bug.cgi?id=109316
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720

Participating hosts (44 -> 39)
------------------------------

Additional (2): fi-icl-u2 fi-pnv-d510
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-bwr-2160 fi-icl-y fi-byt-clapper

Build changes
-------------

* Linux: CI_DRM_5676 -> Patchwork_12342

CI_DRM_5676: 3911a5d7d3de6d8e491868bb0cd506346131d71b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4866: 189956af183c245eb237b3be4fa22953ec93bbe0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12342: 58ec786d5c8e797c5371b9dae2006c73ad007cd8 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

58ec786d5c8e drm/vmwgfx: Convert to using __drm_atomic_helper_crtc_reset() for reset. 21dea2d6f4e3 drm/vkms: Convert to using __drm_atomic_helper_crtc_reset() for reset. df9f94b77ae9 drm/vc4: Convert to using __drm_atomic_helper_crtc_reset() for reset. 725895026dd3 drm/tegra: Convert to using __drm_atomic_helper_crtc_reset() for reset. 837ea0cf17aa drm/rockchip: Convert to using __drm_atomic_helper_crtc_reset() for reset. 5412a63fabc8 drm/rcar-du: Convert to using __drm_atomic_helper_crtc_reset() for reset. d6083ed9c6f7 drm/omap: Convert to using __drm_atomic_helper_crtc_reset() for reset. 3a057b72363e drm/msm: Convert to using __drm_atomic_helper_crtc_reset() for reset. 70cc75e4022f drm/mediatek: Convert to using __drm_atomic_helper_crtc_reset() for reset. c9bf362dac3b drm/imx: Convert to using __drm_atomic_helper_crtc_reset() for reset. 9158964fdd37 drm/i915: Use the new __drm_atomic_helper_crtc_reset() helper. 97817e87cd77 drm/atmel-hlcdc: Convert to using __drm_atomic_helper_crtc_reset() for reset. c3ddc7689a67 drm/mali: Convert to using __drm_atomic_helper_crtc_reset() for reset. f8574e1d416a drm/amd: Convert to using __drm_atomic_helper_crtc_reset() for reset. 34f32bdeca76 drm/docs: Fix typo in __drm_atomic_helper_connector_reset fdfc56a108d3 drm/atomic: Create __drm_atomic_helper_crtc_reset() for subclassing crtc_state. 51d3cd4204fb drm/vc4: Fix memory leak during gpu reset.

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12342/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#36 lore raw

✓ Fi.CI.IGT: success for drm: Start subclassing crtc_state.

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: drm: Start subclassing crtc_state.
URL : https://patchwork.freedesktop.org/series/57425/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5676_full -> Patchwork_12342_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Known issues
------------

Here are the changes found in Patchwork_12342_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_busy@extended-parallel-bsd2:
- shard-iclb: NOTRUN -> SKIP [fdo#109276] +4

* igt@gem_busy@extended-semaphore-render:
- shard-iclb: NOTRUN -> SKIP [fdo#109275]

* igt@gem_eio@in-flight-suspend:
- shard-snb: PASS -> DMESG-WARN [fdo#102365]

* igt@gem_exec_flush@basic-batch-kernel-default-cmd:
- shard-snb: NOTRUN -> SKIP [fdo#109271] +50

* igt@gem_exec_params@no-bsd:
- shard-iclb: NOTRUN -> SKIP [fdo#109283]

* igt@gem_exec_store@pages-bsd1:
- shard-apl: NOTRUN -> SKIP [fdo#109271] +17

* igt@gem_mocs_settings@mocs-reset-ctx-dirty-render:
- shard-iclb: NOTRUN -> SKIP [fdo#109287]

* igt@gem_pread@stolen-display:
- shard-iclb: NOTRUN -> SKIP [fdo#109277]

* igt@i915_missed_irq:
- shard-iclb: NOTRUN -> SKIP [fdo#109503]

* igt@i915_pm_backlight@fade_with_suspend:
- shard-skl: NOTRUN -> FAIL [fdo#107847]

* igt@i915_pm_rpm@dpms-mode-unset-lpsp:
- shard-iclb: PASS -> INCOMPLETE [fdo#107713] / [fdo#108840]

* igt@i915_pm_rpm@gem-execbuf-stress-extra-wait:
- shard-iclb: PASS -> DMESG-WARN [fdo#107724] +3

* igt@i915_pm_rpm@legacy-planes:
- shard-skl: PASS -> INCOMPLETE [fdo#107807] +1

* igt@kms_atomic_transition@4x-modeset-transitions:
- shard-apl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_busy@extended-modeset-hang-newfb-render-f:
- shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3

* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-iclb: PASS -> DMESG-WARN [fdo#107956]
- shard-hsw: PASS -> DMESG-WARN [fdo#107956]

* igt@kms_busy@extended-modeset-hang-oldfb-render-d:
- shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +9

* igt@kms_busy@extended-pageflip-hang-oldfb-render-f:
- shard-hsw: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
- shard-hsw: NOTRUN -> DMESG-WARN [fdo#107956]

* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-f:
- shard-iclb: NOTRUN -> SKIP [fdo#109278]

* igt@kms_chamelium@vga-edid-read:
- shard-iclb: NOTRUN -> SKIP [fdo#109284] +1

* igt@kms_chv_cursor_fail@pipe-b-64x64-bottom-edge:
- shard-snb: PASS -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_color@pipe-b-legacy-gamma:
- shard-iclb: NOTRUN -> FAIL [fdo#104782]

* igt@kms_cursor_crc@cursor-256x256-random:
- shard-apl: PASS -> FAIL [fdo#103232] +2

* igt@kms_cursor_crc@cursor-64x21-onscreen:
- shard-iclb: NOTRUN -> FAIL [fdo#103232]

* igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy:
- shard-iclb: NOTRUN -> SKIP [fdo#109274] +3

* igt@kms_fbcon_fbt@psr:
- shard-skl: NOTRUN -> FAIL [fdo#103833]

* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
- shard-glk: PASS -> FAIL [fdo#105363]

* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-skl: PASS -> FAIL [fdo#105363]

* igt@kms_flip@plain-flip-ts-check-interruptible:
- shard-skl: PASS -> FAIL [fdo#100368]

* igt@kms_flip_tiling@flip-changes-tiling:
- shard-skl: PASS -> FAIL [fdo#108303]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-iclb: PASS -> FAIL [fdo#103167] +4

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-onoff:
- shard-apl: PASS -> FAIL [fdo#103167]

* igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-spr-indfb-draw-mmap-cpu:
- shard-iclb: NOTRUN -> SKIP [fdo#109280] +7

* igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-spr-indfb-draw-blt:
- shard-hsw: NOTRUN -> SKIP [fdo#109271] +19

* igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
- shard-skl: PASS -> FAIL [fdo#103191] / [fdo#107362]

* igt@kms_plane@pixel-format-pipe-b-planes-source-clamping:
- shard-skl: NOTRUN -> DMESG-WARN [fdo#106885]

* igt@kms_plane_alpha_blend@pipe-b-alpha-7efc:
- shard-apl: PASS -> FAIL [fdo#108145]

* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: PASS -> FAIL [fdo#107815]

* igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
- shard-skl: NOTRUN -> FAIL [fdo#108145] +1

* igt@kms_plane_multiple@atomic-pipe-b-tiling-none:
- shard-snb: PASS -> SKIP [fdo#109271]

* igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
- shard-apl: PASS -> FAIL [fdo#103166] +3

* igt@kms_plane_multiple@atomic-pipe-c-tiling-none:
- shard-glk: PASS -> FAIL [fdo#103166]
- shard-iclb: PASS -> FAIL [fdo#103166] +1

* igt@kms_psr@no_drrs:
- shard-iclb: PASS -> FAIL [fdo#108341]

* igt@kms_rotation_crc@multiplane-rotation:
- shard-kbl: PASS -> INCOMPLETE [fdo#103665]

* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-kbl: PASS -> DMESG-FAIL [fdo#105763]

* igt@kms_setmode@basic:
- shard-apl: PASS -> FAIL [fdo#99912]

* igt@kms_vblank@pipe-c-wait-busy:
- shard-apl: PASS -> INCOMPLETE [fdo#103927]

* igt@kms_vrr@flip-suspend:
- shard-skl: NOTRUN -> SKIP [fdo#109271] +53

* igt@prime_nv_api@nv_i915_reimport_twice_check_flink_name:
- shard-iclb: NOTRUN -> SKIP [fdo#109291]

#### Possible fixes ####

* igt@gem_eio@in-flight-suspend:
- shard-apl: INCOMPLETE [fdo#103927] -> PASS

* igt@gem_exec_suspend@basic-s3:
- shard-hsw: INCOMPLETE [fdo#103540] -> PASS

* igt@i915_pm_rpm@basic-pci-d3-state:
- shard-skl: INCOMPLETE [fdo#107807] -> PASS

* igt@i915_pm_rpm@basic-rte:
- shard-iclb: DMESG-WARN [fdo#107724] -> PASS +3

* igt@i915_pm_rpm@universal-planes:
- shard-iclb: DMESG-WARN [fdo#108654] -> PASS

* igt@kms_color@pipe-c-ctm-max:
- shard-skl: FAIL [fdo#108147] -> PASS

* igt@kms_cursor_crc@cursor-128x128-suspend:
- shard-skl: INCOMPLETE [fdo#104108] -> PASS
- shard-kbl: DMESG-WARN [fdo#108566] -> PASS

* igt@kms_cursor_crc@cursor-128x42-onscreen:
- shard-apl: FAIL [fdo#103232] -> PASS

* igt@kms_cursor_crc@cursor-256x256-onscreen:
- shard-skl: FAIL [fdo#103232] -> PASS

* igt@kms_cursor_crc@cursor-64x64-suspend:
- shard-apl: FAIL [fdo#103191] / [fdo#103232] -> PASS

* igt@kms_fbcon_fbt@fbc:
- shard-iclb: DMESG-WARN [fdo#109593] -> PASS

* igt@kms_flip@modeset-vs-vblank-race-interruptible:
- shard-kbl: FAIL [fdo#103060] -> PASS

* igt@kms_flip@plain-flip-fb-recreate:
- shard-skl: FAIL [fdo#100368] -> PASS

* igt@kms_frontbuffer_tracking@basic:
- shard-iclb: FAIL [fdo#103167] -> PASS

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-blt:
- shard-apl: FAIL [fdo#103167] -> PASS

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-glk: FAIL [fdo#103167] -> PASS +2

* igt@kms_plane@pixel-format-pipe-b-planes:
- shard-apl: FAIL [fdo#103166] -> PASS

* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: FAIL [fdo#107815] -> PASS

* igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
- shard-iclb: FAIL [fdo#103166] -> PASS

* igt@kms_setmode@basic:
- shard-hsw: FAIL [fdo#99912] -> PASS
- shard-kbl: FAIL [fdo#99912] -> PASS

* igt@kms_vblank@pipe-b-ts-continuation-suspend:
- shard-snb: INCOMPLETE [fdo#105411] -> PASS

#### Warnings ####

* igt@i915_pm_rpm@modeset-pc8-residency-stress:
- shard-skl: SKIP [fdo#109271] -> INCOMPLETE [fdo#107807]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
[fdo#102365]: https://bugs.freedesktop.org/show_bug.cgi?id=102365
[fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103833]: https://bugs.freedesktop.org/show_bug.cgi?id=103833
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#106885]: https://bugs.freedesktop.org/show_bug.cgi?id=106885
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#107815]: https://bugs.freedesktop.org/show_bug.cgi?id=107815
[fdo#107847]: https://bugs.freedesktop.org/show_bug.cgi?id=107847
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
[fdo#108303]: https://bugs.freedesktop.org/show_bug.cgi?id=108303
[fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108654]: https://bugs.freedesktop.org/show_bug.cgi?id=108654
[fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109275]: https://bugs.freedesktop.org/show_bug.cgi?id=109275
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109277]: https://bugs.freedesktop.org/show_bug.cgi?id=109277
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109287]: https://bugs.freedesktop.org/show_bug.cgi?id=109287
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109503]: https://bugs.freedesktop.org/show_bug.cgi?id=109503
[fdo#109593]: https://bugs.freedesktop.org/show_bug.cgi?id=109593
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (7 -> 7)
------------------------------

No changes in participating hosts

Build changes
-------------

* Linux: CI_DRM_5676 -> Patchwork_12342

CI_DRM_5676: 3911a5d7d3de6d8e491868bb0cd506346131d71b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4866: 189956af183c245eb237b3be4fa22953ec93bbe0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12342: 58ec786d5c8e797c5371b9dae2006c73ad007cd8 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12342/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx