UPSTREAM: drm/rockchip: Disarm vop->is_enabled
authorMark Yao <mark.yao@rock-chips.com>
Tue, 2 Aug 2016 09:24:37 +0000 (17:24 +0800)
committerGerrit Code Review <gerrit@rock-chips.com>
Tue, 2 Aug 2016 12:08:59 +0000 (20:08 +0800)
With atomic helpers there's no need to track the enabled state of a pipe
any more, because atomic helpers track this accurately already.

Just disable the early returns, since the debug checks might be useful.

v2: Don't call drm_helper_disable_unused_functions, it blows up
without this check. At least explains why rockchip still needed this
old legacy-style state tracing - to work around issues from calling
other legacy style functions!

Change-Id: Ib63ad83b0212c5e2b0a44c1c5e2d188e7c876107
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: Mark yao <mark.yao@rock-chips.com>
Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-18-git-send-email-daniel.vetter@ffwll.ch
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
drivers/gpu/drm/rockchip/rockchip_drm_vop.c

index bab4cd18b6b08199955bf8fd921d9f46df4233f7..207e01de6e3214f47c1bcf509977b8d307ca64c0 100644 (file)
@@ -156,9 +156,6 @@ int rockchip_drm_fbdev_init(struct drm_device *dev)
                goto err_drm_fb_helper_fini;
        }
 
-       /* disable all the possible outputs/crtcs before entering KMS mode */
-       drm_helper_disable_unused_functions(dev);
-
        ret = drm_fb_helper_initial_config(helper, PREFERRED_BPP);
        if (ret < 0) {
                dev_err(dev->dev, "Failed to set initial hw config - %d.\n",
index fb8f829a8c0f125642f5b477d4b6dc9017779d40..39d0020d9e3c2d806484b27620fa8a09cb1c57d2 100644 (file)
@@ -490,9 +490,6 @@ static void vop_enable(struct drm_crtc *crtc)
        struct vop *vop = to_vop(crtc);
        int ret, i;
 
-       if (vop->is_enabled)
-               return;
-
        ret = clk_prepare_enable(vop->hclk);
        if (ret < 0) {
                dev_err(vop->dev, "failed to enable hclk - %d\n", ret);
@@ -569,9 +566,6 @@ static void vop_crtc_disable(struct drm_crtc *crtc)
        struct vop *vop = to_vop(crtc);
        int i;
 
-       if (!vop->is_enabled)
-               return;
-
        /*
         * We need to make sure that all windows are disabled before we
         * disable that crtc. Otherwise we might try to scan from a destroyed