]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/hisilicon/hibmc: fix 'xset dpms force off' fail
authorZhihui Chen <chenzhihui4@huawei.com>
Fri, 20 Dec 2019 02:30:04 +0000 (10:30 +0800)
committerXinliang Liu <xinliang.liu@linaro.org>
Thu, 13 Feb 2020 09:52:40 +0000 (09:52 +0000)
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: Zhihui Chen <chenzhihui4@huawei.com>
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Acked-by: Xinliang Liu <xinliang.liu@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191220023004.2658-1-chenzhihui4@huawei.com
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c

index 7fa7d4933f6031b2210aaabe06fd19dd40344313..9baeabd136d2dff3e5ba619eac987ff5ffa265cd 100644 (file)
@@ -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 >