From: Kevin Strasser <kevin.strasser@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v2] drm/i915/hsw: keep gamma and CSC enabled for primary plane disable
Date: Wed, 14 Oct 2015 15:51:39 -0700 [thread overview]
Message-ID: <1444863099-23106-1-git-send-email-kevin.strasser@linux.intel.com> (raw)
In-Reply-To: <1444771481-5625-1-git-send-email-kevin.strasser@linux.intel.com>
On HSW the crc differs between black and disabled primary planes, causing an
assert to fail in the kms_universal_plane test. It seems that gamma correction
and color space conversion are causing the black primary plane case to result in
a brighter color than the disabled primary plane case.
Keep gamma and CSC bits enabled for plane disable path on HSW.
v2: Avoid use of RMW
Keep path unchanged for non-HSW users
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89331
Testcase: igt/kms_universal_plane/universal-plane-pipe-A-functional
Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index d37b7a1..4a04e8b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2798,8 +2798,17 @@ static void ironlake_update_primary_plane(struct drm_crtc *crtc,
u32 reg = DSPCNTR(plane);
int pixel_size;
+ dspcntr = DISPPLANE_GAMMA_ENABLE;
+
+ if (IS_HASWELL(dev) || IS_BROADWELL(dev))
+ dspcntr |= DISPPLANE_PIPE_CSC_ENABLE;
+
if (!visible || !fb) {
- I915_WRITE(reg, 0);
+ if (IS_HASWELL(dev)) {
+ I915_WRITE(reg, dspcntr);
+ } else {
+ I915_WRITE(reg, 0);
+ }
I915_WRITE(DSPSURF(plane), 0);
POSTING_READ(reg);
return;
@@ -2811,13 +2820,8 @@ static void ironlake_update_primary_plane(struct drm_crtc *crtc,
pixel_size = drm_format_plane_cpp(fb->pixel_format, 0);
- dspcntr = DISPPLANE_GAMMA_ENABLE;
-
dspcntr |= DISPLAY_PLANE_ENABLE;
- if (IS_HASWELL(dev) || IS_BROADWELL(dev))
- dspcntr |= DISPPLANE_PIPE_CSC_ENABLE;
-
switch (fb->pixel_format) {
case DRM_FORMAT_C8:
dspcntr |= DISPPLANE_8BPP;
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-10-14 22:50 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 21:24 [PATCH] drm/i915: respect previous reg values on primary plane disable Kevin Strasser
2015-10-13 23:02 ` Jesse Barnes
2015-10-14 7:58 ` Jani Nikula
2015-10-14 7:59 ` Jani Nikula
2015-10-14 18:44 ` Kevin Strasser
2015-10-14 19:01 ` Daniel Vetter
2015-10-14 12:07 ` Ville Syrjälä
2015-10-14 12:12 ` Chris Wilson
2015-10-14 12:22 ` Ville Syrjälä
2015-10-14 18:59 ` Kevin Strasser
2015-10-14 19:48 ` Ville Syrjälä
2015-10-14 20:33 ` Kevin Strasser
2015-10-15 8:20 ` Ville Syrjälä
2015-10-15 23:00 ` Kevin Strasser
2015-10-16 0:14 ` Ville Syrjälä
2015-10-14 13:04 ` Daniel Vetter
2015-10-14 13:09 ` Ville Syrjälä
2015-10-14 22:51 ` Kevin Strasser [this message]
2015-10-15 12:31 ` [PATCH v2] drm/i915/hsw: keep gamma and CSC enabled for " Daniel Vetter
2015-10-15 12:41 ` Ville Syrjälä
2015-10-16 22:53 ` Bob Paauwe
2015-10-19 10:15 ` Daniel Vetter
2015-10-19 17:13 ` Kevin Strasser
2015-10-20 15:48 ` Bob Paauwe
2015-10-20 16:13 ` Ville Syrjälä
2015-10-20 17:00 ` Bob Paauwe
2015-10-21 6:31 ` Daniel Vetter
2015-10-20 15:49 ` Bob Paauwe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444863099-23106-1-git-send-email-kevin.strasser@linux.intel.com \
--to=kevin.strasser@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox