Commit de3b67af authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Maarten Lankhorst

drm/i915: Prepare the connector/encoder mask readout for hw vs. uapi state split

Prepare the connector/encoder mask readout for the uapi vs. hw
state split. We'll want to do all readout into the hw state.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190927131432.15978-2-ville.syrjala@linux.intel.com
parent 4078c983
...@@ -16757,24 +16757,28 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) ...@@ -16757,24 +16757,28 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
drm_connector_list_iter_begin(dev, &conn_iter); drm_connector_list_iter_begin(dev, &conn_iter);
for_each_intel_connector_iter(connector, &conn_iter) { for_each_intel_connector_iter(connector, &conn_iter) {
if (connector->get_hw_state(connector)) { if (connector->get_hw_state(connector)) {
struct intel_crtc_state *crtc_state;
struct intel_crtc *crtc;
connector->base.dpms = DRM_MODE_DPMS_ON; connector->base.dpms = DRM_MODE_DPMS_ON;
encoder = connector->encoder; encoder = connector->encoder;
connector->base.encoder = &encoder->base; connector->base.encoder = &encoder->base;
if (encoder->base.crtc && crtc = to_intel_crtc(encoder->base.crtc);
encoder->base.crtc->state->active) { crtc_state = crtc ? to_intel_crtc_state(crtc->base.state) : NULL;
if (crtc_state && crtc_state->base.active) {
/* /*
* This has to be done during hardware readout * This has to be done during hardware readout
* because anything calling .crtc_disable may * because anything calling .crtc_disable may
* rely on the connector_mask being accurate. * rely on the connector_mask being accurate.
*/ */
encoder->base.crtc->state->connector_mask |= crtc_state->base.connector_mask |=
drm_connector_mask(&connector->base); drm_connector_mask(&connector->base);
encoder->base.crtc->state->encoder_mask |= crtc_state->base.encoder_mask |=
drm_encoder_mask(&encoder->base); drm_encoder_mask(&encoder->base);
} }
} else { } else {
connector->base.dpms = DRM_MODE_DPMS_OFF; connector->base.dpms = DRM_MODE_DPMS_OFF;
connector->base.encoder = NULL; connector->base.encoder = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment