Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 04/10] drm/i915: Clean up intel_color_init_hooks()
Date: Thu, 29 Sep 2022 10:15:15 +0300	[thread overview]
Message-ID: <20220929071521.26612-5-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20220929071521.26612-1-ville.syrjala@linux.intel.com>

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

Remove a bunch of pointless curly brackets and do
the s/dev_priv/i915/ while at it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_color.c | 43 +++++++++++-----------
 1 file changed, 21 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
index ce8a4be9b292..96687ec30b19 100644
--- a/drivers/gpu/drm/i915/display/intel_color.c
+++ b/drivers/gpu/drm/i915/display/intel_color.c
@@ -2219,30 +2219,29 @@ void intel_crtc_color_init(struct intel_crtc *crtc)
 				   INTEL_INFO(dev_priv)->display.color.gamma_lut_size);
 }
 
-void intel_color_init_hooks(struct drm_i915_private *dev_priv)
+void intel_color_init_hooks(struct drm_i915_private *i915)
 {
-	if (HAS_GMCH(dev_priv)) {
-		if (IS_CHERRYVIEW(dev_priv)) {
-			dev_priv->display.funcs.color = &chv_color_funcs;
-		} else if (DISPLAY_VER(dev_priv) >= 4) {
-			dev_priv->display.funcs.color = &i965_color_funcs;
-		} else {
-			dev_priv->display.funcs.color = &i9xx_color_funcs;
-		}
+	if (HAS_GMCH(i915)) {
+		if (IS_CHERRYVIEW(i915))
+			i915->display.funcs.color = &chv_color_funcs;
+		else if (DISPLAY_VER(i915) >= 4)
+			i915->display.funcs.color = &i965_color_funcs;
+		else
+			i915->display.funcs.color = &i9xx_color_funcs;
 	} else {
-		if (DISPLAY_VER(dev_priv) >= 11)
-			dev_priv->display.funcs.color = &icl_color_funcs;
-		else if (DISPLAY_VER(dev_priv) == 10)
-			dev_priv->display.funcs.color = &glk_color_funcs;
-		else if (DISPLAY_VER(dev_priv) == 9)
-			dev_priv->display.funcs.color = &skl_color_funcs;
-		else if (DISPLAY_VER(dev_priv) == 8)
-			dev_priv->display.funcs.color = &bdw_color_funcs;
-		else if (IS_HASWELL(dev_priv))
-			dev_priv->display.funcs.color = &hsw_color_funcs;
-		else if (DISPLAY_VER(dev_priv) == 7)
-			dev_priv->display.funcs.color = &ivb_color_funcs;
+		if (DISPLAY_VER(i915) >= 11)
+			i915->display.funcs.color = &icl_color_funcs;
+		else if (DISPLAY_VER(i915) == 10)
+			i915->display.funcs.color = &glk_color_funcs;
+		else if (DISPLAY_VER(i915) == 9)
+			i915->display.funcs.color = &skl_color_funcs;
+		else if (DISPLAY_VER(i915) == 8)
+			i915->display.funcs.color = &bdw_color_funcs;
+		else if (IS_HASWELL(i915))
+			i915->display.funcs.color = &hsw_color_funcs;
+		else if (DISPLAY_VER(i915) == 7)
+			i915->display.funcs.color = &ivb_color_funcs;
 		else
-			dev_priv->display.funcs.color = &ilk_color_funcs;
+			i915->display.funcs.color = &ilk_color_funcs;
 	}
 }
-- 
2.35.1


  parent reply	other threads:[~2022-09-29  7:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29  7:15 [Intel-gfx] [PATCH 00/10] drm/i915: Prep work for finishing (de)gamma readout Ville Syrjala
2022-09-29  7:15 ` [Intel-gfx] [PATCH 01/10] drm/i915: Remove PLL asserts from .load_luts() Ville Syrjala
2022-09-29 11:54   ` Jani Nikula
2022-09-29  7:15 ` [Intel-gfx] [PATCH 02/10] drm/i915: Split up intel_color_init() Ville Syrjala
2022-09-29 10:41   ` Jani Nikula
2022-09-29 11:55     ` Jani Nikula
2022-09-29  7:15 ` [Intel-gfx] [PATCH 03/10] drm/i915: Simplify the intel_color_init_hooks() if ladder Ville Syrjala
2022-09-29 11:56   ` Jani Nikula
2022-09-29  7:15 ` Ville Syrjala [this message]
2022-09-29 11:57   ` [Intel-gfx] [PATCH 04/10] drm/i915: Clean up intel_color_init_hooks() Jani Nikula
2022-09-29  7:15 ` [Intel-gfx] [PATCH 05/10] drm/i915: Change glk_load_degamma_lut() calling convention Ville Syrjala
2022-09-29 11:58   ` Jani Nikula
2022-09-29  7:15 ` [Intel-gfx] [PATCH 06/10] drm/i915: Make ilk_load_luts() deal with degamma Ville Syrjala
2022-09-29  7:15 ` [Intel-gfx] [PATCH 07/10] drm/i915: Introduce crtc_state->{pre, post}_csc_lut Ville Syrjala
2022-10-19  7:06   ` Shankar, Uma
2022-09-29  7:15 ` [Intel-gfx] [PATCH 08/10] drm/i915: Assert {pre, post}_csc_lut were assigned sensibly Ville Syrjala
2022-10-19  7:09   ` Shankar, Uma
2022-09-29  7:15 ` [Intel-gfx] [PATCH 09/10] drm/i915: Get rid of glk_load_degamma_lut_linear() Ville Syrjala
2022-10-19  7:20   ` Shankar, Uma
2022-10-19  7:29     ` Ville Syrjälä
2022-10-19  7:49       ` Shankar, Uma
2022-09-29  7:15 ` [Intel-gfx] [PATCH 10/10] drm/i915: Stop loading linear degammma LUT on glk needlessly Ville Syrjala
2022-10-19  7:24   ` Shankar, Uma
2022-09-29  9:19 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Prep work for finishing (de)gamma readout Patchwork
2022-09-29  9:40 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-09-30  6:35 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=20220929071521.26612-5-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox