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 2/6] drm/i915: Add a wrapper function around get_pipe_config
Date: Thu, 12 Nov 2020 21:17:14 +0200	[thread overview]
Message-ID: <20201112191718.16683-3-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20201112191718.16683-1-ville.syrjala@linux.intel.com>

From: Manasi Navare <manasi.d.navare@intel.com>

Create a new function intel_crtc_get_pipe_config()
that calls platform specific hooks for get_pipe_config()
No functional change here.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
[vsyrjala: Conform to modern i915 coding style, fix patch subject]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 110d08f2a5c5..a8287414937c 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -11407,6 +11407,14 @@ static bool hsw_get_pipe_config(struct intel_crtc *crtc,
 	return active;
 }
 
+static bool intel_crtc_get_pipe_config(struct intel_crtc_state *crtc_state)
+{
+	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+	struct drm_i915_private *i915 = to_i915(crtc->base.dev);
+
+	return i915->display.get_pipe_config(crtc, crtc_state);
+}
+
 static u32 intel_cursor_base(const struct intel_plane_state *plane_state)
 {
 	struct drm_i915_private *dev_priv =
@@ -12403,7 +12411,7 @@ intel_encoder_current_mode(struct intel_encoder *encoder)
 		return NULL;
 	}
 
-	if (!dev_priv->display.get_pipe_config(crtc, crtc_state)) {
+	if (!intel_crtc_get_pipe_config(crtc_state)) {
 		kfree(crtc_state);
 		kfree(mode);
 		return NULL;
@@ -14422,8 +14430,7 @@ verify_crtc_state(struct intel_crtc *crtc,
 
 	pipe_config->hw.enable = new_crtc_state->hw.enable;
 
-	pipe_config->hw.active =
-		dev_priv->display.get_pipe_config(crtc, pipe_config);
+	pipe_config->hw.active = intel_crtc_get_pipe_config(pipe_config);
 
 	/* we keep both pipes enabled on 830 */
 	if (IS_I830(dev_priv) && pipe_config->hw.active)
@@ -18736,7 +18743,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
 		intel_crtc_state_reset(crtc_state, crtc);
 
 		crtc_state->hw.active = crtc_state->hw.enable =
-			dev_priv->display.get_pipe_config(crtc, crtc_state);
+			intel_crtc_get_pipe_config(crtc_state);
 
 		crtc->base.enabled = crtc_state->hw.enable;
 		crtc->active = crtc_state->hw.active;
-- 
2.26.2

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

  parent reply	other threads:[~2020-11-12 19:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12 19:17 [Intel-gfx] [PATCH 0/6] drm/i915: Introduce crtc_state.hw.pipe_mode Ville Syrjala
2020-11-12 19:17 ` [Intel-gfx] [PATCH 1/6] drm/i915: Move encoder->get_config to a new function Ville Syrjala
2020-11-12 19:45   ` Navare, Manasi
2020-11-13  8:56     ` Manna, Animesh
2020-11-12 19:17 ` Ville Syrjala [this message]
2020-11-12 19:46   ` [Intel-gfx] [PATCH 2/6] drm/i915: Add a wrapper function around get_pipe_config Navare, Manasi
2020-11-13  8:58     ` Manna, Animesh
2020-11-12 19:17 ` [Intel-gfx] [PATCH 3/6] drm/i915: Move hw.active assignment into intel_crtc_get_pipe_config() Ville Syrjala
2020-11-12 19:48   ` Navare, Manasi
2020-11-13 14:27     ` Ville Syrjälä
2020-11-12 19:17 ` [Intel-gfx] [PATCH 4/6] drm/i915: s/intel_mode_from_pipe_config/intel_mode_from_crtc_timings/ Ville Syrjala
2020-11-12 19:49   ` Navare, Manasi
2020-11-12 19:17 ` [Intel-gfx] [PATCH 5/6] drm/i915: Introduce intel_crtc_readout_derived_state() Ville Syrjala
2020-11-12 19:49   ` Navare, Manasi
2020-11-12 19:17 ` [Intel-gfx] [PATCH 6/6] drm/i915: Add hw.pipe_mode to allow bigjoiner pipe/transcoder split Ville Syrjala
2020-11-12 23:45 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Introduce crtc_state.hw.pipe_mode Patchwork
2020-11-13  0:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-11-13  2:46 ` [Intel-gfx] ✗ 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=20201112191718.16683-3-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