mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
drm/rockchip: dw_dp: Set output_type in dw_dp_encoder_mode_valid()
The output_type may changed after DP encoder bound to CRTC. For example, when performing modeset, calling vop2_crtc_atomic_disable() will clear the output_type to zero. When drm_mode_getconnector() is called again, since the encoder has already been bound to the CRTC, the output_type will not be set and will remain zero. It can lead to the vop2_crtc_mode_valid() being unable to retrieve the correct output_type. This patch set output_type in dw_dp_encoder_mode_valid(), regardless of whether encoder is already bound to a CRTC. Change-Id: I1888d4cc44604072bbf0cbe67a0d21fa8303b7b0 Signed-off-by: chaoyi.chen <chaoyi.chen@rock-chips.com>
This commit is contained in:
@@ -3060,7 +3060,10 @@ static enum drm_mode_status dw_dp_encoder_mode_valid(struct drm_encoder *encoder
|
||||
struct drm_device *dev = encoder->dev;
|
||||
struct rockchip_crtc_state *s;
|
||||
|
||||
if (!crtc) {
|
||||
if (crtc) {
|
||||
s = to_rockchip_crtc_state(crtc->state);
|
||||
s->output_type = DRM_MODE_CONNECTOR_DisplayPort;
|
||||
} else {
|
||||
drm_for_each_crtc(crtc, dev) {
|
||||
if (!drm_encoder_crtc_ok(encoder, crtc))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user