From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 6/7] drm/i915: Kill off intel_crtc_active.
Date: Mon, 7 Aug 2017 12:48:27 +0200 [thread overview]
Message-ID: <20170807104828.21046-7-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <20170807104828.21046-1-maarten.lankhorst@linux.intel.com>
Use crtc->active directly instead. This is still not completely
optimal and needs fixing, but it's about as good as using
intel_crtc_active.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 19 -------------------
drivers/gpu/drm/i915/intel_drv.h | 1 -
drivers/gpu/drm/i915/intel_fbc.c | 2 +-
drivers/gpu/drm/i915/intel_pm.c | 6 +++---
4 files changed, 4 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 234b94cafc7d..0fa83895b8c4 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -944,25 +944,6 @@ bool bxt_find_best_dpll(struct intel_crtc_state *crtc_state, int target_clock,
target_clock, refclk, NULL, best_clock);
}
-bool intel_crtc_active(struct intel_crtc *crtc)
-{
- /* Be paranoid as we can arrive here with only partial
- * state retrieved from the hardware during setup.
- *
- * We can ditch the adjusted_mode.crtc_clock check as soon
- * as Haswell has gained clock readout/fastboot support.
- *
- * We can ditch the crtc->primary->fb check as soon as we can
- * properly reconstruct framebuffers.
- *
- * FIXME: The intel_crtc->active here should be switched to
- * crtc->state->active once we have proper CRTC states wired up
- * for atomic.
- */
- return crtc->active && crtc->base.primary->state->fb &&
- crtc->config->base.adjusted_mode.crtc_clock;
-}
-
enum transcoder intel_pipe_to_cpu_transcoder(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index d0f1704e1a17..1a70939c69c5 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1464,7 +1464,6 @@ bool bxt_find_best_dpll(struct intel_crtc_state *crtc_state, int target_clock,
struct dpll *best_clock);
int chv_calc_dpll_params(int refclk, struct dpll *pll_clock);
-bool intel_crtc_active(struct intel_crtc *crtc);
void hsw_enable_ips(struct intel_crtc *crtc);
void hsw_disable_ips(struct intel_crtc *crtc);
enum intel_display_power_domain intel_port_to_power_domain(enum port port);
diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index 860b8c26d29b..da83629fc38f 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -1277,7 +1277,7 @@ void intel_fbc_init_pipe_state(struct drm_i915_private *dev_priv)
return;
for_each_intel_crtc(&dev_priv->drm, crtc)
- if (intel_crtc_active(crtc) &&
+ if (crtc->base.state->active &&
crtc->base.primary->state->visible)
dev_priv->fbc.visible_pipes_mask |= (1 << crtc->pipe);
}
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 3484ce40f2b0..3afaa6933c4b 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -820,7 +820,7 @@ static struct intel_crtc *single_enabled_crtc(struct drm_i915_private *dev_priv)
struct intel_crtc *crtc, *enabled = NULL;
for_each_intel_crtc(&dev_priv->drm, crtc) {
- if (intel_crtc_active(crtc)) {
+ if (crtc->active) {
if (enabled)
return NULL;
enabled = crtc;
@@ -2484,11 +2484,11 @@ static void i9xx_program_watermarks(struct drm_i915_private *dev_priv)
crtc = intel_get_crtc_for_plane(dev_priv, 0);
planea_wm = crtc->wm.active.i9xx.plane_wm;
- if (intel_crtc_active(crtc))
+ if (crtc->active)
enabled = crtc;
crtc = intel_get_crtc_for_plane(dev_priv, 1);
- if (intel_crtc_active(crtc)) {
+ if (crtc->active) {
if (enabled == NULL)
enabled = crtc;
else
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-08-07 10:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 10:48 [PATCH 0/7] drm/i915: Convert gen4- watermarks to atomic Maarten Lankhorst
2017-08-07 10:48 ` [PATCH 1/7] drm/i915: Calculate gen3- watermarks semi-atomically Maarten Lankhorst
2017-08-08 11:00 ` [PATCH] drm/i915: Calculate gen3- watermarks semi-atomically, v2 Maarten Lankhorst
2017-08-08 12:51 ` [PATCH 1/7] drm/i915: Calculate gen3- watermarks semi-atomically Mahesh Kumar
2017-09-07 12:39 ` Maarten Lankhorst
2017-08-07 10:48 ` [PATCH 2/7] drm/i915: Program gen3- watermarks atomically Maarten Lankhorst
2017-08-07 10:48 ` [PATCH 3/7] drm/i915: Convert pineview watermarks to atomic, v2 Maarten Lankhorst
2017-08-07 10:48 ` [PATCH 4/7] drm/i915: Calculate gen4 watermarks semiatomically Maarten Lankhorst
2017-08-07 10:48 ` [PATCH 5/7] drm/i915: Program gen4 watermarks atomically Maarten Lankhorst
2017-08-07 10:48 ` Maarten Lankhorst [this message]
2017-08-07 10:48 ` [PATCH 7/7] drm/i915: Rip out legacy watermark infrastructure Maarten Lankhorst
2017-08-07 12:17 ` ✗ Fi.CI.BAT: failure for drm/i915: Convert gen4- watermarks to atomic. (rev2) Patchwork
2017-08-08 9:26 ` Maarten Lankhorst
2017-08-08 11:19 ` ✗ Fi.CI.BAT: failure for drm/i915: Convert gen4- watermarks to atomic. (rev3) 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=20170807104828.21046-7-maarten.lankhorst@linux.intel.com \
--to=maarten.lankhorst@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