mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
drm/rockchip: update rockchip_drm_platform_shutdown
The reason to implement shutdown is for the fake shutdown on the box product. but after implement this function, panel will still display overlay plane for about two second when power off. so we directly close crtc instead of rockchip_drm_sys_suspend() when shutdown. Change-Id: I60ed3e541e022ad828fd535828fe264aabd40ecb Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This commit is contained in:
@@ -1264,7 +1264,6 @@ static void rockchip_drm_set_property_default(struct drm_device *drm)
|
||||
state = drm_atomic_helper_duplicate_state(drm, conf->acquire_ctx);
|
||||
if (!state) {
|
||||
DRM_ERROR("failed to alloc atomic state\n");
|
||||
ret = -ENOMEM;
|
||||
goto err_unlock;
|
||||
}
|
||||
state->acquire_ctx = conf->acquire_ctx;
|
||||
@@ -1680,6 +1679,7 @@ static struct drm_driver rockchip_drm_driver = {
|
||||
.minor = DRIVER_MINOR,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static void rockchip_drm_fb_suspend(struct drm_device *drm)
|
||||
{
|
||||
struct rockchip_drm_private *priv = drm->dev_private;
|
||||
@@ -1723,7 +1723,6 @@ static int rockchip_drm_sys_suspend(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int rockchip_drm_sys_resume(struct device *dev)
|
||||
{
|
||||
struct drm_device *drm = dev_get_drvdata(dev);
|
||||
@@ -1866,8 +1865,24 @@ static int rockchip_drm_platform_remove(struct platform_device *pdev)
|
||||
static void rockchip_drm_platform_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_device *drm;
|
||||
struct rockchip_drm_private *priv;
|
||||
|
||||
rockchip_drm_sys_suspend(dev);
|
||||
drm = dev_get_drvdata(dev);
|
||||
if (!drm) {
|
||||
DRM_ERROR("%s: Failed to get drm device!\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
priv = drm->dev_private;
|
||||
drm_for_each_crtc(crtc, drm) {
|
||||
int pipe = drm_crtc_index(crtc);
|
||||
|
||||
if (priv->crtc_funcs[pipe] &&
|
||||
priv->crtc_funcs[pipe]->crtc_close)
|
||||
priv->crtc_funcs[pipe]->crtc_close(crtc);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct of_device_id rockchip_drm_dt_ids[] = {
|
||||
|
||||
Reference in New Issue
Block a user