mirror of https://gitee.com/openkylin/linux.git
drm/i915: Reject mixing MST and SST/HDMI on the same digital port
We can't mix MST with SST/HDMI on the same physical port, so we'll need to reject such configurations in check_digital_port_conflicts(). Nothing else will prevent this as MST has its fake encoders and its own connectors so the cloning checks won't catch this. The same digital port can be used multiple times, but only if all the encoders involved are MST encoders, so we only want to check MST vs. SST/HDMI, not MST vs. MST. And SST/HDMI vs. SST/HDMI we already check. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1469717448-4297-5-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
64ee2fd25c
commit
477321e013
|
@ -12300,6 +12300,7 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)
|
||||||
struct drm_device *dev = state->dev;
|
struct drm_device *dev = state->dev;
|
||||||
struct drm_connector *connector;
|
struct drm_connector *connector;
|
||||||
unsigned int used_ports = 0;
|
unsigned int used_ports = 0;
|
||||||
|
unsigned int used_mst_ports = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Walk the connector list instead of the encoder
|
* Walk the connector list instead of the encoder
|
||||||
|
@ -12336,11 +12337,20 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
used_ports |= port_mask;
|
used_ports |= port_mask;
|
||||||
|
break;
|
||||||
|
case INTEL_OUTPUT_DP_MST:
|
||||||
|
used_mst_ports |=
|
||||||
|
1 << enc_to_mst(&encoder->base)->primary->port;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* can't mix MST and SST/HDMI on the same port */
|
||||||
|
if (used_ports & used_mst_ports)
|
||||||
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue