drm/i915: Remove connectors_active from sanitization, v2.
connectors_active will be removed, so just calculate this instead. Changes since v1: - Look for the right pointer in intel_sanitize_encoder. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
4d688a2a15
commit
873ffe69a9
|
@ -14938,8 +14938,10 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc)
|
||||||
/* Adjust the state of the output pipe according to whether we
|
/* Adjust the state of the output pipe according to whether we
|
||||||
* have active connectors/encoders. */
|
* have active connectors/encoders. */
|
||||||
enable = false;
|
enable = false;
|
||||||
for_each_encoder_on_crtc(dev, &crtc->base, encoder)
|
for_each_encoder_on_crtc(dev, &crtc->base, encoder) {
|
||||||
enable |= encoder->connectors_active;
|
enable = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (!enable)
|
if (!enable)
|
||||||
intel_crtc_disable_noatomic(&crtc->base);
|
intel_crtc_disable_noatomic(&crtc->base);
|
||||||
|
@ -14995,6 +14997,7 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder)
|
||||||
{
|
{
|
||||||
struct intel_connector *connector;
|
struct intel_connector *connector;
|
||||||
struct drm_device *dev = encoder->base.dev;
|
struct drm_device *dev = encoder->base.dev;
|
||||||
|
bool active = false;
|
||||||
|
|
||||||
/* We need to check both for a crtc link (meaning that the
|
/* We need to check both for a crtc link (meaning that the
|
||||||
* encoder is active and trying to read from a pipe) and the
|
* encoder is active and trying to read from a pipe) and the
|
||||||
|
@ -15002,7 +15005,15 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder)
|
||||||
bool has_active_crtc = encoder->base.crtc &&
|
bool has_active_crtc = encoder->base.crtc &&
|
||||||
to_intel_crtc(encoder->base.crtc)->active;
|
to_intel_crtc(encoder->base.crtc)->active;
|
||||||
|
|
||||||
if (encoder->connectors_active && !has_active_crtc) {
|
for_each_intel_connector(dev, connector) {
|
||||||
|
if (connector->base.encoder != &encoder->base)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
active = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (active && !has_active_crtc) {
|
||||||
DRM_DEBUG_KMS("[ENCODER:%d:%s] has active connectors but no active pipe!\n",
|
DRM_DEBUG_KMS("[ENCODER:%d:%s] has active connectors but no active pipe!\n",
|
||||||
encoder->base.base.id,
|
encoder->base.base.id,
|
||||||
encoder->base.name);
|
encoder->base.name);
|
||||||
|
|
Loading…
Reference in New Issue