diff mbox

[v2,7/9] drm/rockchip: Force disable all crtc when unload

Message ID 1491046529-4310-8-git-send-email-jeffy.chen@rock-chips.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jeffy Chen April 1, 2017, 11:35 a.m. UTC
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

Changes in v2: None

 drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Daniel Vetter April 3, 2017, 7:58 a.m. UTC | #1
On Sat, Apr 1, 2017 at 1:35 PM, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> index a5d83cb..5dbf011 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> @@ -246,6 +246,7 @@ static void rockchip_drm_unbind(struct device *dev)
>         rockchip_drm_fbdev_fini(drm_dev);
>         drm_kms_helper_poll_fini(drm_dev);
>
> +       drm_crtc_force_disable_all(drm_dev);

This will result in a WARN_ON in latest drm-next because rockchip is
atomic, and this helper is for legacy kms drivers. You want to use
drm_atomic_helper_shutdown here.
-Daniel
Jeffy Chen April 5, 2017, 10:25 a.m. UTC | #2
Hi Daniel,

On 04/03/2017 03:58 PM, Daniel Vetter wrote:
> On Sat, Apr 1, 2017 at 1:35 PM, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> index a5d83cb..5dbf011 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> @@ -246,6 +246,7 @@ static void rockchip_drm_unbind(struct device *dev)
>>          rockchip_drm_fbdev_fini(drm_dev);
>>          drm_kms_helper_poll_fini(drm_dev);
>>
>> +       drm_crtc_force_disable_all(drm_dev);
>
> This will result in a WARN_ON in latest drm-next because rockchip is
> atomic, and this helper is for legacy kms drivers. You want to use
> drm_atomic_helper_shutdown here.
> -Daniel
>
oops, thanx for the notice.
diff mbox

Patch

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index a5d83cb..5dbf011 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -246,6 +246,7 @@  static void rockchip_drm_unbind(struct device *dev)
 	rockchip_drm_fbdev_fini(drm_dev);
 	drm_kms_helper_poll_fini(drm_dev);
 
+	drm_crtc_force_disable_all(drm_dev);
 	drm_vblank_cleanup(drm_dev);
 	component_unbind_all(dev, drm_dev);
 	drm_mode_config_cleanup(drm_dev);