intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@linux.intel.com, Dave Airlie <airlied@redhat.com>
Subject: [Intel-gfx] [PATCH 09/25] drm/i915/display: move drrs into display struct
Date: Tue,  7 Sep 2021 17:25:33 +1000	[thread overview]
Message-ID: <20210907072549.2962226-10-airlied@gmail.com> (raw)
In-Reply-To: <20210907072549.2962226-1-airlied@gmail.com>

From: Dave Airlie <airlied@redhat.com>

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 .../drm/i915/display/intel_display_debugfs.c  |  2 +-
 drivers/gpu/drm/i915/display/intel_drrs.c     | 32 +++++++++----------
 drivers/gpu/drm/i915/display/intel_psr.c      |  2 +-
 drivers/gpu/drm/i915/i915_drv.h               |  2 +-
 4 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index be0601606aa1..472cd21fc788 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -1234,7 +1234,7 @@ static void drrs_status_per_crtc(struct seq_file *m,
 				 struct intel_crtc *crtc)
 {
 	struct drm_i915_private *dev_priv = to_i915(dev);
-	struct i915_drrs *drrs = &dev_priv->drrs;
+	struct i915_drrs *drrs = &dev_priv->display->drrs;
 	int vrefresh = 0;
 	struct drm_connector *connector;
 	struct drm_connector_list_iter conn_iter;
diff --git a/drivers/gpu/drm/i915/display/intel_drrs.c b/drivers/gpu/drm/i915/display/intel_drrs.c
index 670bcd50a56f..1de93b1654ee 100644
--- a/drivers/gpu/drm/i915/display/intel_drrs.c
+++ b/drivers/gpu/drm/i915/display/intel_drrs.c
@@ -69,7 +69,7 @@ intel_drrs_compute_config(struct intel_dp *intel_dp,
 		return;
 
 	if (!intel_connector->panel.downclock_mode ||
-	    dev_priv->drrs.type != SEAMLESS_DRRS_SUPPORT)
+	    dev_priv->display->drrs.type != SEAMLESS_DRRS_SUPPORT)
 		return;
 
 	pipe_config->has_drrs = true;
@@ -91,7 +91,7 @@ static void intel_drrs_set_state(struct drm_i915_private *dev_priv,
 				 const struct intel_crtc_state *crtc_state,
 				 int refresh_rate)
 {
-	struct intel_dp *intel_dp = dev_priv->drrs.dp;
+	struct intel_dp *intel_dp = dev_priv->display->drrs.dp;
 	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
 	enum drrs_refresh_rate_type index = DRRS_HIGH_RR;
 
@@ -112,7 +112,7 @@ static void intel_drrs_set_state(struct drm_i915_private *dev_priv,
 		return;
 	}
 
-	if (dev_priv->drrs.type < SEAMLESS_DRRS_SUPPORT) {
+	if (dev_priv->display->drrs.type < SEAMLESS_DRRS_SUPPORT) {
 		drm_dbg_kms(&dev_priv->drm, "Only Seamless DRRS supported.\n");
 		return;
 	}
@@ -121,7 +121,7 @@ static void intel_drrs_set_state(struct drm_i915_private *dev_priv,
 			refresh_rate)
 		index = DRRS_LOW_RR;
 
-	if (index == dev_priv->drrs.refresh_rate_type) {
+	if (index == dev_priv->display->drrs.refresh_rate_type) {
 		drm_dbg_kms(&dev_priv->drm,
 			    "DRRS requested for previously set RR...ignoring\n");
 		return;
@@ -165,7 +165,7 @@ static void intel_drrs_set_state(struct drm_i915_private *dev_priv,
 		intel_de_write(dev_priv, reg, val);
 	}
 
-	dev_priv->drrs.refresh_rate_type = index;
+	dev_priv->display->drrs.refresh_rate_type = index;
 
 	drm_dbg_kms(&dev_priv->drm, "eDP Refresh Rate set to : %dHz\n",
 		    refresh_rate);
@@ -176,8 +176,8 @@ intel_drrs_enable_locked(struct intel_dp *intel_dp)
 {
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
 
-	dev_priv->drrs.busy_frontbuffer_bits = 0;
-	dev_priv->drrs.dp = intel_dp;
+	dev_priv->display->drrs.busy_frontbuffer_bits = 0;
+	dev_priv->display->drrs.dp = intel_dp;
 }
 
 /**
@@ -191,7 +191,7 @@ void intel_drrs_enable(struct intel_dp *intel_dp,
 		       const struct intel_crtc_state *crtc_state)
 {
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
-	struct i915_drrs *drrs = &dev_priv->drrs;
+	struct i915_drrs *drrs = &dev_priv->display->drrs;
 
 	if (!crtc_state->has_drrs)
 		return;
@@ -216,7 +216,7 @@ intel_drrs_disable_locked(struct intel_dp *intel_dp,
 			  const struct intel_crtc_state *crtc_state)
 {
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
-	struct i915_drrs *drrs = &dev_priv->drrs;
+	struct i915_drrs *drrs = &dev_priv->display->drrs;
 
 	if (drrs->refresh_rate_type == DRRS_LOW_RR) {
 		int refresh;
@@ -238,7 +238,7 @@ void intel_drrs_disable(struct intel_dp *intel_dp,
 			const struct intel_crtc_state *old_crtc_state)
 {
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
-	struct i915_drrs *drrs = &dev_priv->drrs;
+	struct i915_drrs *drrs = &dev_priv->display->drrs;
 
 	if (!old_crtc_state->has_drrs)
 		return;
@@ -269,7 +269,7 @@ intel_drrs_update(struct intel_dp *intel_dp,
 		  const struct intel_crtc_state *crtc_state)
 {
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
-	struct i915_drrs *drrs = &dev_priv->drrs;
+	struct i915_drrs *drrs = &dev_priv->display->drrs;
 
 	if (drrs->type != SEAMLESS_DRRS_SUPPORT)
 		return;
@@ -292,8 +292,8 @@ intel_drrs_update(struct intel_dp *intel_dp,
 static void intel_drrs_downclock_work(struct work_struct *work)
 {
 	struct drm_i915_private *dev_priv =
-		container_of(work, typeof(*dev_priv), drrs.work.work);
-	struct i915_drrs *drrs = &dev_priv->drrs;
+		container_of(work, typeof(*dev_priv), _display.drrs.work.work);
+	struct i915_drrs *drrs = &dev_priv->display->drrs;
 	struct intel_dp *intel_dp;
 
 	mutex_lock(&drrs->mutex);
@@ -335,7 +335,7 @@ static void intel_drrs_downclock_work(struct work_struct *work)
 void intel_drrs_invalidate(struct drm_i915_private *dev_priv,
 			   unsigned int frontbuffer_bits)
 {
-	struct i915_drrs *drrs = &dev_priv->drrs;
+	struct i915_drrs *drrs = &dev_priv->display->drrs;
 	struct intel_dp *intel_dp;
 	struct drm_crtc *crtc;
 	enum pipe pipe;
@@ -382,7 +382,7 @@ void intel_drrs_invalidate(struct drm_i915_private *dev_priv,
 void intel_drrs_flush(struct drm_i915_private *dev_priv,
 		      unsigned int frontbuffer_bits)
 {
-	struct i915_drrs *drrs = &dev_priv->drrs;
+	struct i915_drrs *drrs = &dev_priv->display->drrs;
 	struct intel_dp *intel_dp;
 	struct drm_crtc *crtc;
 	enum pipe pipe;
@@ -439,7 +439,7 @@ intel_drrs_init(struct intel_connector *connector,
 		struct drm_display_mode *fixed_mode)
 {
 	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
-	struct i915_drrs *drrs = &dev_priv->drrs;
+	struct i915_drrs *drrs = &dev_priv->display->drrs;
 	struct drm_display_mode *downclock_mode = NULL;
 
 	INIT_DELAYED_WORK(&drrs->work, intel_drrs_downclock_work);
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index e07b7ee169bd..2be2e83d636c 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1225,7 +1225,7 @@ void intel_psr_enable(struct intel_dp *intel_dp,
 	if (!crtc_state->has_psr)
 		return;
 
-	drm_WARN_ON(&dev_priv->drm, dev_priv->drrs.dp);
+	drm_WARN_ON(&dev_priv->drm, dev_priv->display->drrs.dp);
 
 	mutex_lock(&intel_dp->psr.lock);
 	intel_psr_enable_locked(intel_dp, crtc_state, conn_state);
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 738bb87b1fb8..8daa5a24782f 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -867,6 +867,7 @@ struct drm_i915_display {
 	wait_queue_head_t gmbus_wait_queue;
 
 	struct intel_dmc dmc;
+	struct i915_drrs drrs;
 };
 
 struct drm_i915_private {
@@ -942,7 +943,6 @@ struct drm_i915_private {
 
 	struct i915_hotplug hotplug;
 	struct intel_fbc fbc;
-	struct i915_drrs drrs;
 	struct intel_opregion opregion;
 	struct intel_vbt_data vbt;
 
-- 
2.31.1


  parent reply	other threads:[~2021-09-07  7:26 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07  7:25 [Intel-gfx] [RFC PATCH 00/25] refactor display struct Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 01/25] drm/i915: move display funcs into a display struct. (v3) Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 02/25] drm/i915/display: move cdclk info into display Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 03/25] drm/i915: move more pll/clocks into display struct Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 04/25] drm/i915/display: move gmbus " Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 05/25] drm/i915/display: move intel_dmc " Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 06/25] drm/i915/display: move mipi_mmio_base to " Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 07/25] drm/i915/display: move pps_mmio_base " Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 08/25] drm/i915/drrs: just use some local vars to simplify drrs code Dave Airlie
2021-09-07  7:25 ` Dave Airlie [this message]
2021-09-07  7:25 ` [Intel-gfx] [PATCH 10/25] drm/i915/display: move fbc into display struct Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 11/25] drm/i915/display: move pipe/plane mappings to " Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 12/25] drm/i915/display: move properties into " Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 13/25] drm/i915/display: move audio related members " Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 14/25] drm/i915/display: move HDCP related items " Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 15/25] drm/i915/display: move hotplug struct to " Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 16/25] drm/i915/display: move overlay into " Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 17/25] drm/i915/display: move fbdev info to " Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 18/25] drm/i915/display: move fb_tracking " Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 19/25] drm/i915/display: move delay and pch values " Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 20/25] drm/intel/display: move atomic related things to display Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 21/25] drm/i915/display: move a bunch of platform misc regs " Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 22/25] drm/i915/display: move dpll struct into display Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 23/25] drm/i915/display: move fdi_rx_config into display struct Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 24/25] drm/i915/display: move workqueues to " Dave Airlie
2021-09-07  7:25 ` [Intel-gfx] [PATCH 25/25] drm/i915/display: move pps/backlight mutexes into display Dave Airlie
2021-09-07  7:57 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for refactor display struct Patchwork
2021-09-07  8:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-09-07 10:19 ` [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=20210907072549.2962226-10-airlied@gmail.com \
    --to=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.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;
as well as URLs for NNTP newsgroup(s).