From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 06/10] drm/i915: Eliminate crtc->config usage from CRT code
Date: Tue, 31 Oct 2017 22:51:19 +0200 [thread overview]
Message-ID: <20171031205123.13123-7-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20171031205123.13123-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Replace crtc->config usage with the passed down crtc state.
Also take the opportunity for some s/pipe_config/crtc_state/ while at it.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_crt.c | 44 +++++++++++++++++-----------------------
1 file changed, 19 insertions(+), 25 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index 9c000ac612da..9f31aea51dff 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -219,11 +219,9 @@ static void hsw_disable_crt(struct intel_encoder *encoder,
const struct intel_crtc_state *old_crtc_state,
const struct drm_connector_state *old_conn_state)
{
- struct drm_crtc *crtc = old_crtc_state->base.crtc;
- struct drm_i915_private *dev_priv = to_i915(crtc->dev);
- struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+ struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
- WARN_ON(!intel_crtc->config->has_pch_encoder);
+ WARN_ON(!old_crtc_state->has_pch_encoder);
intel_set_pch_fifo_underrun_reporting(dev_priv, PIPE_A, false);
}
@@ -247,46 +245,42 @@ static void hsw_post_disable_crt(struct intel_encoder *encoder,
}
static void hsw_pre_pll_enable_crt(struct intel_encoder *encoder,
- const struct intel_crtc_state *pipe_config,
+ const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state)
{
- struct drm_crtc *crtc = pipe_config->base.crtc;
- struct drm_i915_private *dev_priv = to_i915(crtc->dev);
- struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+ struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
- WARN_ON(!intel_crtc->config->has_pch_encoder);
+ WARN_ON(!crtc_state->has_pch_encoder);
intel_set_pch_fifo_underrun_reporting(dev_priv, PIPE_A, false);
}
static void hsw_pre_enable_crt(struct intel_encoder *encoder,
- const struct intel_crtc_state *pipe_config,
+ const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state)
{
- struct drm_crtc *crtc = pipe_config->base.crtc;
- struct drm_i915_private *dev_priv = to_i915(crtc->dev);
- struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
- int pipe = intel_crtc->pipe;
+ struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+ struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
+ enum pipe pipe = crtc->pipe;
- WARN_ON(!intel_crtc->config->has_pch_encoder);
+ WARN_ON(!crtc_state->has_pch_encoder);
intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false);
- dev_priv->display.fdi_link_train(intel_crtc, pipe_config);
+ dev_priv->display.fdi_link_train(crtc, crtc_state);
}
static void hsw_enable_crt(struct intel_encoder *encoder,
- const struct intel_crtc_state *pipe_config,
+ const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state)
{
- struct drm_crtc *crtc = pipe_config->base.crtc;
- struct drm_i915_private *dev_priv = to_i915(crtc->dev);
- struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
- int pipe = intel_crtc->pipe;
+ struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+ struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
+ enum pipe pipe = crtc->pipe;
- WARN_ON(!intel_crtc->config->has_pch_encoder);
+ WARN_ON(!crtc_state->has_pch_encoder);
- intel_crt_set_dpms(encoder, pipe_config, DRM_MODE_DPMS_ON);
+ intel_crt_set_dpms(encoder, crtc_state, DRM_MODE_DPMS_ON);
intel_wait_for_vblank(dev_priv, pipe);
intel_wait_for_vblank(dev_priv, pipe);
@@ -295,10 +289,10 @@ static void hsw_enable_crt(struct intel_encoder *encoder,
}
static void intel_enable_crt(struct intel_encoder *encoder,
- const struct intel_crtc_state *pipe_config,
+ const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state)
{
- intel_crt_set_dpms(encoder, pipe_config, DRM_MODE_DPMS_ON);
+ intel_crt_set_dpms(encoder, crtc_state, DRM_MODE_DPMS_ON);
}
static enum drm_mode_status
--
2.13.6
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-31 20:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-31 20:51 [PATCH 00/10] drm/i915: Nuke dig_port->port and assorted cleanups Ville Syrjala
2017-10-31 20:51 ` [PATCH 01/10] drm/i915: Eliminate some encoder->crtc usage from DP code Ville Syrjala
2017-11-09 1:35 ` Pandiyan, Dhinakaran
2017-11-09 14:36 ` Ville Syrjälä
2017-10-31 20:51 ` [PATCH 02/10] drm/i915: Eliminate some encoder->crtc usage from DSI code Ville Syrjala
2017-11-09 1:36 ` Pandiyan, Dhinakaran
2017-11-09 14:43 ` Ville Syrjälä
2017-10-31 20:51 ` [PATCH 03/10] drm/i915: Eliminate some encoder->crtc usage from SDVO code Ville Syrjala
2017-10-31 20:51 ` [PATCH 04/10] drm/i915: Eliminate some encoder->crtc usage from TV code Ville Syrjala
2017-10-31 20:51 ` [PATCH 05/10] drm/i915: Pass crtc state to DPIO PHY functions Ville Syrjala
2017-10-31 20:51 ` Ville Syrjala [this message]
2017-10-31 20:51 ` [PATCH 07/10] drm/i915: Replace dig_port->port with encoder port for BXT DPLL selection Ville Syrjala
2017-10-31 20:51 ` [PATCH 08/10] drm/i915: Nuke intel_digital_port->port Ville Syrjala
2017-11-09 1:37 ` Pandiyan, Dhinakaran
2017-11-09 13:50 ` Ville Syrjälä
2017-11-09 15:24 ` [PATCH v2 " Ville Syrjala
2017-10-31 20:51 ` [PATCH 09/10] drm/i915: Clean up PPS code calling conventions Ville Syrjala
2017-10-31 20:51 ` [PATCH 10/10] drm/i915: Clean up DP code local variables and " Ville Syrjala
2017-11-09 3:01 ` Pandiyan, Dhinakaran
2017-11-09 15:27 ` Ville Syrjälä
2017-11-09 15:27 ` [PATCH v2 " Ville Syrjala
2017-10-31 22:31 ` ✗ Fi.CI.BAT: warning for drm/i915: Nuke dig_port->port and assorted cleanups Patchwork
2017-11-01 9:55 ` [PATCH 00/10] " Jani Nikula
2017-11-09 3:08 ` Pandiyan, Dhinakaran
2017-11-09 18:26 ` Ville Syrjälä
2017-11-09 16:01 ` ✓ Fi.CI.BAT: success for drm/i915: Nuke dig_port->port and assorted cleanups (rev3) Patchwork
2017-11-09 16:59 ` ✓ 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=20171031205123.13123-7-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.