public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Swati Sharma <swati2.sharma@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [v6][PATCH 09/12] drm/i915: Extract bdw_read_luts()
Date: Tue, 14 May 2019 15:13:27 +0530	[thread overview]
Message-ID: <1557827010-24239-10-git-send-email-swati2.sharma@intel.com> (raw)
In-Reply-To: <1557827010-24239-1-git-send-email-swati2.sharma@intel.com>

In this patch, gamma and degamma hw blobs are created for BDW.

v4: -No need to initialize *blob [Jani]
    -Removed right shifts [Jani]
    -Dropped dev local var [Jani]
v5: -Returned blob instead of assigning it internally within the
     function [Ville]
    -Renamed bdw_get_color_config() to bdw_read_luts() [Ville]

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 drivers/gpu/drm/i915/intel_color.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c
index 400ec94..f3df351 100644
--- a/drivers/gpu/drm/i915/intel_color.c
+++ b/drivers/gpu/drm/i915/intel_color.c
@@ -1524,6 +1524,16 @@ static void glk_read_luts(struct intel_crtc_state *crtc_state)
 		crtc_state->base.gamma_lut = bdw_read_lut_10(crtc_state, PAL_PREC_INDEX_VALUE(0));
 }
 
+static void bdw_read_luts(struct intel_crtc_state *crtc_state)
+{
+	if (crtc_state->gamma_mode == GAMMA_MODE_MODE_8BIT)
+		crtc_state->base.gamma_lut = i9xx_read_lut_8(crtc_state);
+	else if (crtc_state->gamma_mode == GAMMA_MODE_MODE_SPLIT)
+		crtc_state->base.gamma_lut = bdw_read_lut_10(crtc_state, PAL_PREC_INDEX_VALUE(512));
+	else
+		crtc_state->base.gamma_lut = bdw_read_lut_10(crtc_state, PAL_PREC_INDEX_VALUE(0));
+}
+
 void intel_color_init(struct intel_crtc *crtc)
 {
 	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
@@ -1571,9 +1581,10 @@ void intel_color_init(struct intel_crtc *crtc)
 		} else if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)) {
 			dev_priv->display.load_luts = glk_load_luts;
 			dev_priv->display.read_luts = glk_read_luts;
-		}
-		else if (INTEL_GEN(dev_priv) >= 8)
+		} else if (INTEL_GEN(dev_priv) >= 8) {
 			dev_priv->display.load_luts = bdw_load_luts;
+			dev_priv->display.read_luts = bdw_read_luts;
+		}
 		else if (INTEL_GEN(dev_priv) >= 7)
 			dev_priv->display.load_luts = ivb_load_luts;
 		else
-- 
1.9.1

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

  parent reply	other threads:[~2019-05-14  9:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-14  9:43 [PATCH 00/12] drm/i915: adding state checker for gamma lut values Swati Sharma
2019-05-14  9:43 ` [v6][PATCH 01/12] drm/i915: Introduce vfunc read_luts() to create hw lut Swati Sharma
2019-05-14 15:23   ` Ville Syrjälä
2019-05-15  7:45     ` Jani Nikula
2019-05-14  9:43 ` [v6][PATCH 02/12] drm/i915: Enable intel_color_get_config() Swati Sharma
2019-05-14  9:43 ` [v6][PATCH 03/12] drm/i915: Add intel_color_lut_equal() to compare hw and sw gamma/degamma lut values Swati Sharma
2019-05-14 16:10   ` Ville Syrjälä
2019-05-21 13:42     ` Sharma, Swati2
2019-05-24 15:25       ` Ville Syrjälä
2019-05-14  9:43 ` [v6][PATCH 04/12] drm/i915: Extract i9xx_read_luts() Swati Sharma
2019-05-14  9:43 ` [v6][PATCH 05/12] drm/i915: Extract chv_read_luts() Swati Sharma
2019-05-14  9:43 ` [v6][PATCH 06/12] drm/i915: Extract i965_read_luts() Swati Sharma
2019-05-14  9:43 ` [v6][PATCH 07/12] drm/i915: Extract icl_read_luts() Swati Sharma
2019-05-14  9:43 ` [v6][PATCH 08/12] drm/i915: Extract glk_read_luts() Swati Sharma
2019-05-14  9:43 ` Swati Sharma [this message]
2019-05-14  9:43 ` [v6][PATCH 10/12] drm/i915: Extract ivb_read_luts() Swati Sharma
2019-05-14  9:43 ` [v6][PATCH 11/12] drm/i915: Extract ilk_read_luts() Swati Sharma
2019-05-14  9:43 ` [v6][PATCH 12/12] FOR_TESTING_ONLY: Print rgb values of hw and sw blobs Swati Sharma
2019-05-14 10:36 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: adding state checker for gamma lut values (rev8) Patchwork
2019-05-14 10:42 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-05-14 10:58 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-14 14:17 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-05-14 14:27 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: adding state checker for gamma lut values (rev9) Patchwork
2019-05-14 14:33 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-05-14 15:17 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-14 22:14 ` ✗ Fi.CI.IGT: failure " 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=1557827010-24239-10-git-send-email-swati2.sharma@intel.com \
    --to=swati2.sharma@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /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