Commit f2f8653e authored by Zhihui Chen's avatar Zhihui Chen Committed by Xinliang Liu

drm/hisilicon/hibmc: fix 'xset dpms force off' fail

both crtc_state->adjusted_mode.hdisplay and
crtc_state->adjusted_mode.vdisplay are 0 when switch dpms off,
return -EINVAL cause switch dpms off fail.
Signed-off-by: default avatarZhihui Chen <chenzhihui4@huawei.com>
Signed-off-by: default avatarXinliang Liu <xinliang.liu@linaro.org>
Acked-by: default avatarXinliang Liu <xinliang.liu@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191220023004.2658-1-chenzhihui4@huawei.com
parent 997bac69
......@@ -80,6 +80,9 @@ static int hibmc_plane_atomic_check(struct drm_plane *plane,
return -EINVAL;
}
if (!crtc_state->enable)
return 0;
if (state->crtc_x + state->crtc_w >
crtc_state->adjusted_mode.hdisplay ||
state->crtc_y + state->crtc_h >
......
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