All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Subject: [PATCH 2/3] drm/i915/glk: Load the degamma LUT even in legacy gamma mode
Date: Fri,  3 Feb 2017 15:11:14 +0200	[thread overview]
Message-ID: <20170203131115.2058-3-ander.conselvan.de.oliveira@intel.com> (raw)
In-Reply-To: <20170203131115.2058-1-ander.conselvan.de.oliveira@intel.com>

In Geminilake, the degamma table is enabled or disabled by the pipe CSC
enable bit, so its active even when running in the legacy gamma mode.
So always set sane values for that table, since the default value is all
zeroes.

This fixes blank screens after a suspend/resume cycle while legacy gamma
is in use.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
---
 drivers/gpu/drm/i915/intel_color.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c
index 82e1809..c221891 100644
--- a/drivers/gpu/drm/i915/intel_color.c
+++ b/drivers/gpu/drm/i915/intel_color.c
@@ -453,12 +453,13 @@ static void glk_load_luts(struct drm_crtc_state *state)
 	struct intel_crtc_state *intel_state = to_intel_crtc_state(state);
 	enum pipe pipe = to_intel_crtc(crtc)->pipe;
 
+	glk_load_degamma_lut(state);
+
 	if (crtc_state_is_legacy(state)) {
 		haswell_load_luts(state);
 		return;
 	}
 
-	glk_load_degamma_lut(state);
 	bdw_load_lut(state, 0, (struct drm_color_lut *) state->gamma_lut,
 		     INTEL_INFO(dev_priv)->color.gamma_lut_size, 0);
 
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-02-03 13:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-03 13:11 [PATCH v4 0/3] Geminilake pipe CSC Ander Conselvan de Oliveira
2017-02-03 13:11 ` [PATCH 1/3] drm/i915: Merge BDW pipe gamma and degamma table code Ander Conselvan de Oliveira
2017-02-09 14:47   ` Ville Syrjälä
2017-02-10 10:14     ` Ander Conselvan De Oliveira
2017-02-10 14:16       ` Ville Syrjälä
2017-02-03 13:11 ` Ander Conselvan de Oliveira [this message]
2017-02-09  8:29   ` [PATCH 2/3] drm/i915/glk: Load the degamma LUT even in legacy gamma mode Ander Conselvan De Oliveira
2017-02-09 14:47   ` Ville Syrjälä
2017-02-03 13:11 ` [PATCH 3/3] drm/i915/glk: Enable pipe CSC Ander Conselvan de Oliveira
2017-02-03 15:26 ` ✓ Fi.CI.BAT: success for Geminilake pipe CSC (rev3) Patchwork

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=20170203131115.2058-3-ander.conselvan.de.oliveira@intel.com \
    --to=ander.conselvan.de.oliveira@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.