diff options
author | Maarten Lankhorst | 2016-01-28 15:04:58 +0100 |
---|---|---|
committer | Daniel Vetter | 2016-02-09 11:21:06 +0100 |
commit | e87a52b38943608531ff63ea397b1ae5dd48e341 (patch) | |
tree | 4e012a5f9f526aa22600e523d58ad0964a6537ef /drivers/gpu/drm/i915 | |
parent | drm/atomic: Do not unset crtc when an encoder is stolen (diff) | |
download | kernel-qcow2-linux-e87a52b38943608531ff63ea397b1ae5dd48e341.tar.gz kernel-qcow2-linux-e87a52b38943608531ff63ea397b1ae5dd48e341.tar.xz kernel-qcow2-linux-e87a52b38943608531ff63ea397b1ae5dd48e341.zip |
drm/atomic: Add encoder_mask to crtc_state, v3.
This allows iteration over encoders without requiring connection_mutex.
Changes since v1:
- Add a set_best_encoder helper function and update encoder_mask inside
it.
Changes since v2:
- Relax the WARN_ON(!crtc), with explanation.
- Call set_best_encoder when connector is moved between crtc's.
- Add some paranoia to steal_encoder to prevent accidentally setting
best_encoder to NULL.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/56AA200A.6070501@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 0ea5a4e08b49..e1e7cdee3bbd 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -15591,6 +15591,7 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc) crtc->base.state->active = crtc->active; crtc->base.enabled = crtc->active; crtc->base.state->connector_mask = 0; + crtc->base.state->encoder_mask = 0; /* Because we only establish the connector -> encoder -> * crtc links if something is active, this means the @@ -15830,6 +15831,8 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) */ encoder->base.crtc->state->connector_mask |= 1 << drm_connector_index(&connector->base); + encoder->base.crtc->state->encoder_mask |= + 1 << drm_encoder_index(&encoder->base); } } else { |