[Intel-gfx] [PATCH 73/81] drm/i915: Use new_crtc when checking if CRTC is in use
ville.syrjala at linux.intel.com
ville.syrjala at linux.intel.com
Wed Dec 12 17:16:40 CET 2012
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
The atomic check() hook is interested in the staged new configuration,
so it must use the intel_encoder::new_crtc pointer when checking if
a CRTC is in use or not.
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/i915/intel_atomic.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
index 3f093d6..ec79354 100644
--- a/drivers/gpu/drm/i915/intel_atomic.c
+++ b/drivers/gpu/drm/i915/intel_atomic.c
@@ -150,6 +150,18 @@ static void update_encoders_bitmask(struct intel_crtc *intel_crtc,
}
}
+static bool intel_crtc_in_use(struct intel_crtc *intel_crtc)
+{
+ struct drm_device *dev = intel_crtc->base.dev;
+ struct intel_encoder *intel_encoder;
+
+ list_for_each_entry(intel_encoder, &dev->mode_config.encoder_list, base.head)
+ if (intel_encoder->new_crtc == intel_crtc)
+ return true;
+
+ return false;
+}
+
static bool intel_encoder_in_use(struct intel_encoder *intel_encoder)
{
struct drm_device *dev = intel_encoder->base.dev;
@@ -1246,12 +1258,12 @@ static int check_crtc(struct intel_crtc_state *s)
if (crtc->enabled) {
if (!fb)
return -EINVAL;
- if (!drm_helper_crtc_in_use(crtc))
+ if (!intel_crtc_in_use(intel_crtc))
return -EINVAL;
} else {
if (fb)
return -EINVAL;
- if (drm_helper_crtc_in_use(crtc))
+ if (intel_crtc_in_use(intel_crtc))
return -EINVAL;
}
--
1.7.8.6
More information about the Intel-gfx
mailing list