Skip to contentSkip to conversation

drm/i915/icl: Disable pipe CSC and gamma in cursor plane

PATCH In review José Roberto de Souza 3 participants 6 messages May 18, 2018 – May 21, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/icl: Disable pipe CSC and gamma in cursor plane

'Pipe CSC enable' bit is more than just deprecated in ICL+, it was disabled in 077ef1f09c25 'drm/i915/icl: Don't set pipe CSC/Gamma in PLANE_COLOR_CTL' for primary and sprite planes as it was causing those planes to be rendered as always black but it was not disabled in cursor plane, also causing it to be rendered as black.

As mentioned in the commit referenced above, this is a workaround too and the CSC and gamma per plane values needs to be setup before enable CSC and gamma again.

BSpec: 4278 and 7635

---
 drivers/gpu/drm/i915/intel_display.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_display.c +6 -4
index c9ec88acad9c..93157d0ec870 100644
@@ -9673,12 +9673,14 @@ static u32 i9xx_cursor_ctl(const struct intel_crtc_state *crtc_state,
 	struct drm_i915_private *dev_priv =
 		to_i915(plane_state->base.plane->dev);
 	struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
-	u32 cntl;
+	u32 cntl = 0;
 
-	cntl = MCURSOR_GAMMA_ENABLE;
+	if (INTEL_GEN(dev_priv) < 11) {
+		cntl |= MCURSOR_GAMMA_ENABLE;
 
-	if (HAS_DDI(dev_priv))
-		cntl |= CURSOR_PIPE_CSC_ENABLE;
+		if (HAS_DDI(dev_priv))
+			cntl |= CURSOR_PIPE_CSC_ENABLE;
+	}
 
 	if (INTEL_GEN(dev_priv) < 5 && !IS_G4X(dev_priv))
 		cntl |= MCURSOR_PIPE_SELECT(crtc->pipe);
Signature · 6 lines
2.17.0

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

✗ Fi.CI.CHECKPATCH: warning for drm/i915/icl: Disable pipe CSC and gamma in cursor plane

== Series Details ==

== Series Details ==

Series: drm/i915/icl: Disable pipe CSC and gamma in cursor plane
URL : https://patchwork.freedesktop.org/series/43443/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
9052b8404e85 drm/i915/icl: Disable pipe CSC and gamma in cursor plane
-:10: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 077ef1f09c25 ("drm/i915/icl: Don't set pipe CSC/Gamma in PLANE_COLOR_CTL")'
#10: 
disabled in 077ef1f09c25 'drm/i915/icl: Don't set pipe CSC/Gamma in

total: 1 errors, 0 warnings, 0 checks, 18 lines checked

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

#2 lore raw

✓ Fi.CI.BAT: success for drm/i915/icl: Disable pipe CSC and gamma in cursor plane

In reply to José Roberto de Souza
== Series Details ==

== Series Details ==

Series: drm/i915/icl: Disable pipe CSC and gamma in cursor plane
URL : https://patchwork.freedesktop.org/series/43443/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4209 -> Patchwork_9059 =

== Summary - SUCCESS ==

No regressions found.

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

== Known issues ==

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

=== IGT changes ===

    ==== Possible fixes ====

    igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
      fi-hsw-4200u:       FAIL (fdo#103481) -> PASS

fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481

== Participating hosts (43 -> 39) ==

Missing (4): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-skl-6700hq

== Build changes ==

* Linux: CI_DRM_4209 -> Patchwork_9059

CI_DRM_4209: eecb2c1e793ed98c39876c92fc64cd18a7fe6412 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4487: eccae1360d6d01e73c6af2bd97122cef708207ef @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9059: 9052b8404e85606f7e250f7ca93ae8f7e58f4f9a @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4487: 6ab75f7eb5e1dccbb773e1739beeb2d7cbd6ad0d @ git://anongit.freedesktop.org/piglit

== Linux commits ==

9052b8404e85 drm/i915/icl: Disable pipe CSC and gamma in cursor plane

== Logs ==

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

#3 lore raw

✓ Fi.CI.IGT: success for drm/i915/icl: Disable pipe CSC and gamma in cursor plane

In reply to José Roberto de Souza
== Series Details ==

== Series Details ==

Series: drm/i915/icl: Disable pipe CSC and gamma in cursor plane
URL : https://patchwork.freedesktop.org/series/43443/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4209_full -> Patchwork_9059_full =

== Summary - WARNING ==

Minor unknown changes coming with Patchwork_9059_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_9059_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

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

== Possible new issues ==

Here are the unknown changes that may have been introduced in Patchwork_9059_full:

=== IGT changes ===

    ==== Warnings ====

    igt@gem_exec_schedule@deep-bsd2:
      shard-kbl:          SKIP -> PASS +2

    igt@gem_exec_schedule@deep-vebox:
      shard-kbl:          PASS -> SKIP +2

    igt@kms_plane_lowres@pipe-c-tiling-x:
      shard-apl:          SKIP -> PASS

    igt@kms_vblank@pipe-a-wait-busy:
      shard-snb:          PASS -> SKIP

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@kms_atomic_transition@1x-modeset-transitions-nonblocking:
      shard-glk:          PASS -> FAIL (fdo#105703)

    igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
      shard-glk:          PASS -> FAIL (fdo#104873)

    igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible:
      shard-hsw:          PASS -> FAIL (fdo#100368)

    igt@kms_flip@2x-flip-vs-wf_vblank:
      shard-glk:          PASS -> FAIL (fdo#100368)

    igt@kms_flip@blocking-wf_vblank:
      shard-hsw:          PASS -> FAIL (fdo#103928)

    igt@kms_flip_tiling@flip-x-tiled:
      shard-glk:          PASS -> FAIL (fdo#103822, fdo#104724)

    igt@perf@blocking:
      shard-hsw:          PASS -> FAIL (fdo#102252)

    
    ==== Possible fixes ====

    igt@kms_flip@2x-plain-flip-fb-recreate-interruptible:
      shard-glk:          FAIL (fdo#100368) -> PASS

    igt@kms_flip_tiling@flip-to-y-tiled:
      shard-glk:          FAIL (fdo#104724) -> PASS

    igt@kms_flip_tiling@flip-y-tiled:
      shard-glk:          FAIL (fdo#103822, fdo#104724) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-gtt:
      shard-apl:          DMESG-FAIL (fdo#105602, fdo#103558) -> PASS

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-wc:
      shard-glk:          FAIL (fdo#103167, fdo#104724) -> PASS +2

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
      shard-apl:          DMESG-WARN (fdo#105602, fdo#103558) -> PASS +9

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#104873 https://bugs.freedesktop.org/show_bug.cgi?id=104873
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703

== Participating hosts (9 -> 9) ==

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_4209 -> Patchwork_9059

CI_DRM_4209: eecb2c1e793ed98c39876c92fc64cd18a7fe6412 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4487: eccae1360d6d01e73c6af2bd97122cef708207ef @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9059: 9052b8404e85606f7e250f7ca93ae8f7e58f4f9a @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4487: 6ab75f7eb5e1dccbb773e1739beeb2d7cbd6ad0d @ git://anongit.freedesktop.org/piglit

== Logs ==

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

Reviewed-by on v1 1/1
#4 lore raw
In reply to José Roberto de Souza

Em Sex, 2018-05-18 às 13:15 -0700, José Roberto de Souza escreveu:

Quoted 25 lines

'Pipe CSC enable' bit is more than just deprecated in ICL+, it was disabled in 077ef1f09c25 'drm/i915/icl: Don't set pipe CSC/Gamma in PLANE_COLOR_CTL' for primary and sprite planes as it was causing those planes to be rendered as always black but it was not disabled in cursor plane, also causing it to be rendered as black.

As mentioned in the commit referenced above, this is a workaround too and the CSC and gamma per plane values needs to be setup before enable CSC and gamma again.

BSpec: 4278 and 7635

---
 drivers/gpu/drm/i915/intel_display.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index c9ec88acad9c..93157d0ec870 100644

drivers/gpu/drm/i915/intel_display.c static u32 i9xx_cursor_ctl(const struct · line 9680

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +2 -2
@@ -9673,12 +9673,14 @@ static u32 i9xx_cursor_ctl(const struct
 intel_crtc_state *crtc_state,
 	struct drm_i915_private *dev_priv =
 		to_i915(plane_state->base.plane->dev);
 	struct intel_crtc *crtc = to_intel_crtc(crtc_state-
 >base.crtc);
-	u32 cntl;
+	u32 cntl = 0;
 
-	cntl = MCURSOR_GAMMA_ENABLE;
+	if (INTEL_GEN(dev_priv) < 11) {

Bikeshedding: I know the commit you're based on has the same style as this one, but generally we prefer "inclusive" checks, so here we'd be checking for "<= 10" in order to run the gen10-and-older code. I can change this and the checkpatch issue while applying.

drivers/gpu/drm/i915/intel_display.c static u32 i9xx_cursor_ctl(const struct intel_crtc_state *crtc_state, · line 9686

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +4 -2
+		cntl |= MCURSOR_GAMMA_ENABLE;
 
-	if (HAS_DDI(dev_priv))
-		cntl |= CURSOR_PIPE_CSC_ENABLE;
+		if (HAS_DDI(dev_priv))
+			cntl |= CURSOR_PIPE_CSC_ENABLE;
+	}
 
drivers/gpu/drm/i915/intel_display.c +0 -0
 	if (INTEL_GEN(dev_priv) < 5 && !IS_G4X(dev_priv))
 		cntl |= MCURSOR_PIPE_SELECT(crtc->pipe);

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

#5 lore raw
Quoted 35 lines · Paulo Zanoni

Em Sex, 2018-05-18 às 13:15 -0700, José Roberto de Souza escreveu:

Quoted 34 lines

'Pipe CSC enable' bit is more than just deprecated in ICL+, it was disabled in 077ef1f09c25 'drm/i915/icl: Don't set pipe CSC/Gamma in PLANE_COLOR_CTL' for primary and sprite planes as it was causing those planes to be rendered as always black but it was not disabled in cursor plane, also causing it to be rendered as black.

As mentioned in the commit referenced above, this is a workaround too and the CSC and gamma per plane values needs to be setup before enable CSC and gamma again.

BSpec: 4278 and 7635

---
 drivers/gpu/drm/i915/intel_display.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index c9ec88acad9c..93157d0ec870 100644
@@ -9673,12 +9673,14 @@ static u32 i9xx_cursor_ctl(const struct
 intel_crtc_state *crtc_state,
 	struct drm_i915_private *dev_priv =
 		to_i915(plane_state->base.plane->dev);
 	struct intel_crtc *crtc = to_intel_crtc(crtc_state-
 > base.crtc);
 
-	u32 cntl;
+	u32 cntl = 0;
 
Quoted 7 lines

drivers/gpu/drm/i915/intel_display.c static u32 i9xx_cursor_ctl(const struct intel_crtc_state *crtc_state, · line 9678

Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +1 -1
-	cntl = MCURSOR_GAMMA_ENABLE;
+	if (INTEL_GEN(dev_priv) < 11) {

Bikeshedding: I know the commit you're based on has the same style as this one, but generally we prefer "inclusive" checks, so here we'd be checking for "<= 10" in order to run the gen10-and-older code. I can change this and the checkpatch issue while applying.

Sounds good, thanks

Quoted 5 lines
Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +1 -0
+		cntl |= MCURSOR_GAMMA_ENABLE;
 
Quoted 8 lines

drivers/gpu/drm/i915/intel_display.c static u32 i9xx_cursor_ctl(const struct intel_crtc_state *crtc_state, · line 9686

Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +3 -2
-	if (HAS_DDI(dev_priv))
-		cntl |= CURSOR_PIPE_CSC_ENABLE;
+		if (HAS_DDI(dev_priv))
+			cntl |= CURSOR_PIPE_CSC_ENABLE;
+	}
drivers/gpu/drm/i915/intel_display.c +0 -0
 	if (INTEL_GEN(dev_priv) < 5 && !IS_G4X(dev_priv))
 		cntl |= MCURSOR_PIPE_SELECT(crtc->pipe);

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