Merge branch 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld into drm-fixes
3 hdlcd fixes/cleanups * 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld: drm/arm: Replace instances of drm_dev_unref with drm_dev_put. drm: Fix checkpatch issue: "WARNING: braces {} are not necessary for single statement blocks." drm: hdlcd: Update PM code to save/restore console.
This commit is contained in:
commit
a42ea78f5b
|
@ -317,9 +317,8 @@ static struct drm_plane *hdlcd_plane_init(struct drm_device *drm)
|
||||||
formats, ARRAY_SIZE(formats),
|
formats, ARRAY_SIZE(formats),
|
||||||
NULL,
|
NULL,
|
||||||
DRM_PLANE_TYPE_PRIMARY, NULL);
|
DRM_PLANE_TYPE_PRIMARY, NULL);
|
||||||
if (ret) {
|
if (ret)
|
||||||
return ERR_PTR(ret);
|
return ERR_PTR(ret);
|
||||||
}
|
|
||||||
|
|
||||||
drm_plane_helper_add(plane, &hdlcd_plane_helper_funcs);
|
drm_plane_helper_add(plane, &hdlcd_plane_helper_funcs);
|
||||||
hdlcd->plane = plane;
|
hdlcd->plane = plane;
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include <linux/spinlock.h>
|
#include <linux/spinlock.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/component.h>
|
#include <linux/component.h>
|
||||||
|
#include <linux/console.h>
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
#include <linux/of_graph.h>
|
#include <linux/of_graph.h>
|
||||||
#include <linux/of_reserved_mem.h>
|
#include <linux/of_reserved_mem.h>
|
||||||
|
@ -354,7 +355,7 @@ err_unload:
|
||||||
err_free:
|
err_free:
|
||||||
drm_mode_config_cleanup(drm);
|
drm_mode_config_cleanup(drm);
|
||||||
dev_set_drvdata(dev, NULL);
|
dev_set_drvdata(dev, NULL);
|
||||||
drm_dev_unref(drm);
|
drm_dev_put(drm);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -379,7 +380,7 @@ static void hdlcd_drm_unbind(struct device *dev)
|
||||||
pm_runtime_disable(drm->dev);
|
pm_runtime_disable(drm->dev);
|
||||||
of_reserved_mem_device_release(drm->dev);
|
of_reserved_mem_device_release(drm->dev);
|
||||||
drm_mode_config_cleanup(drm);
|
drm_mode_config_cleanup(drm);
|
||||||
drm_dev_unref(drm);
|
drm_dev_put(drm);
|
||||||
drm->dev_private = NULL;
|
drm->dev_private = NULL;
|
||||||
dev_set_drvdata(dev, NULL);
|
dev_set_drvdata(dev, NULL);
|
||||||
}
|
}
|
||||||
|
@ -432,9 +433,11 @@ static int __maybe_unused hdlcd_pm_suspend(struct device *dev)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
drm_kms_helper_poll_disable(drm);
|
drm_kms_helper_poll_disable(drm);
|
||||||
|
drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 1);
|
||||||
|
|
||||||
hdlcd->state = drm_atomic_helper_suspend(drm);
|
hdlcd->state = drm_atomic_helper_suspend(drm);
|
||||||
if (IS_ERR(hdlcd->state)) {
|
if (IS_ERR(hdlcd->state)) {
|
||||||
|
drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0);
|
||||||
drm_kms_helper_poll_enable(drm);
|
drm_kms_helper_poll_enable(drm);
|
||||||
return PTR_ERR(hdlcd->state);
|
return PTR_ERR(hdlcd->state);
|
||||||
}
|
}
|
||||||
|
@ -451,8 +454,8 @@ static int __maybe_unused hdlcd_pm_resume(struct device *dev)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
drm_atomic_helper_resume(drm, hdlcd->state);
|
drm_atomic_helper_resume(drm, hdlcd->state);
|
||||||
|
drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0);
|
||||||
drm_kms_helper_poll_enable(drm);
|
drm_kms_helper_poll_enable(drm);
|
||||||
pm_runtime_set_active(dev);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue