All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/7] drm/i915: Readout and check csc_mode
Date: Mon, 18 Feb 2019 21:31:31 +0200	[thread overview]
Message-ID: <20190218193137.22914-2-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20190218193137.22914-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Add the missing readout and PIPE_CONF_CHECK() for csc_mode.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_color.c   | 4 ++--
 drivers/gpu/drm/i915/intel_display.c | 5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c
index da7a07d5ccea..d813b9d0f5c0 100644
--- a/drivers/gpu/drm/i915/intel_color.c
+++ b/drivers/gpu/drm/i915/intel_color.c
@@ -788,6 +788,8 @@ int intel_color_check(struct intel_crtc_state *crtc_state)
 	if (ret)
 		return ret;
 
+	crtc_state->csc_mode = 0;
+
 	/* Always allow legacy gamma LUT with no further checking. */
 	if (!crtc_state->gamma_enable ||
 	    crtc_state_is_legacy_gamma(crtc_state)) {
@@ -814,8 +816,6 @@ int intel_color_check(struct intel_crtc_state *crtc_state)
 	else
 		crtc_state->gamma_mode = GAMMA_MODE_MODE_8BIT;
 
-	crtc_state->csc_mode = 0;
-
 	if (INTEL_GEN(dev_priv) >= 11) {
 		if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 ||
 		    crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR444)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index afa21daaae51..2e4d33634e0c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9267,6 +9267,8 @@ static bool ironlake_get_pipe_config(struct intel_crtc *crtc,
 	pipe_config->gamma_mode = (tmp & PIPECONF_GAMMA_MODE_MASK_ILK) >>
 		PIPECONF_GAMMA_MODE_SHIFT;
 
+	pipe_config->csc_mode = I915_READ(PIPE_CSC_MODE(crtc->pipe));
+
 	i9xx_get_pipe_color_config(pipe_config);
 
 	if (I915_READ(PCH_TRANSCONF(crtc->pipe)) & TRANS_ENABLE) {
@@ -9903,6 +9905,8 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc,
 	pipe_config->gamma_mode =
 		I915_READ(GAMMA_MODE(crtc->pipe)) & GAMMA_MODE_MODE_MASK;
 
+	pipe_config->csc_mode = I915_READ(PIPE_CSC_MODE(crtc->pipe));
+
 	if (INTEL_GEN(dev_priv) >= 9) {
 		u32 tmp = I915_READ(SKL_BOTTOM_COLOR(crtc->pipe));
 
@@ -12146,6 +12150,7 @@ intel_pipe_config_compare(struct drm_i915_private *dev_priv,
 		PIPE_CONF_CHECK_CLOCK_FUZZY(pixel_rate);
 
 		PIPE_CONF_CHECK_X(gamma_mode);
+		PIPE_CONF_CHECK_X(csc_mode);
 		PIPE_CONF_CHECK_BOOL(gamma_enable);
 		PIPE_CONF_CHECK_BOOL(csc_enable);
 	}
-- 
2.19.2

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

  reply	other threads:[~2019-02-18 19:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18 19:31 [PATCH 0/7] drm/i915: Clean up ilk+ csc stuff Ville Syrjala
2019-02-18 19:31 ` Ville Syrjala [this message]
2019-03-13 14:59   ` [PATCH 1/7] drm/i915: Readout and check csc_mode Shankar, Uma
2019-02-18 19:31 ` [PATCH 2/7] drm/i915: Preocmpute/readout/check CHV CGM mode Ville Syrjala
2019-03-13 15:11   ` Shankar, Uma
2019-03-15 20:38     ` Ville Syrjälä
2019-02-18 19:31 ` [PATCH 3/7] drm/i915: Extract ilk_csc_limited_range() Ville Syrjala
2019-03-13 15:30   ` Shankar, Uma
2019-03-13 16:31     ` Ville Syrjälä
2019-03-14  8:12       ` Shankar, Uma
2019-02-18 19:31 ` [PATCH 4/7] drm/i915: Clean up ilk/icl pipe/output CSC programming Ville Syrjala
2019-03-13 16:38   ` Shankar, Uma
2019-03-13 19:51     ` Ville Syrjälä
2019-03-14 13:23       ` Shankar, Uma
2019-02-18 19:31 ` [PATCH 5/7] drm/i915: Extract ilk_csc_convert_ctm() Ville Syrjala
2019-03-13 16:55   ` Shankar, Uma
2019-02-18 19:31 ` [PATCH 6/7] drm/i915: Clean the csc limited range/identity programming Ville Syrjala
2019-03-13 17:07   ` Shankar, Uma
2019-02-18 19:31 ` [PATCH 7/7] drm/i915: Split ilk vs. icl csc matrix handling Ville Syrjala
2019-03-13 17:19   ` Shankar, Uma
2019-02-18 20:11 ` ✗ Fi.CI.SPARSE: warning for drm/i915: Clean up ilk+ csc stuff Patchwork
2019-02-18 20:35 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-03-14 13:41   ` Ville Syrjälä
2019-03-15 16:36 ` ✓ Fi.CI.BAT: success for drm/i915: Clean up ilk+ csc stuff (rev2) Patchwork
2019-03-15 18:19 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-03-15 19:58   ` Ville Syrjälä

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=20190218193137.22914-2-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@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 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.