mirror of https://gitee.com/openkylin/linux.git
drm/msm: Use drm_fb_helper_lastclose() and _poll_changed()
This driver can use drm_fb_helper_lastclose() as its .lastclose callback. It can also use drm_fb_helper_output_poll_changed() as its .output_poll_changed callback. Cc: Rob Clark <robdclark@gmail.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20171205182504.41923-7-noralf@tronnes.org
This commit is contained in:
parent
cdc13f6813
commit
4ccbc6e575
|
@ -37,16 +37,9 @@
|
||||||
#define MSM_VERSION_MINOR 3
|
#define MSM_VERSION_MINOR 3
|
||||||
#define MSM_VERSION_PATCHLEVEL 0
|
#define MSM_VERSION_PATCHLEVEL 0
|
||||||
|
|
||||||
static void msm_fb_output_poll_changed(struct drm_device *dev)
|
|
||||||
{
|
|
||||||
struct msm_drm_private *priv = dev->dev_private;
|
|
||||||
if (priv->fbdev)
|
|
||||||
drm_fb_helper_hotplug_event(priv->fbdev);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct drm_mode_config_funcs mode_config_funcs = {
|
static const struct drm_mode_config_funcs mode_config_funcs = {
|
||||||
.fb_create = msm_framebuffer_create,
|
.fb_create = msm_framebuffer_create,
|
||||||
.output_poll_changed = msm_fb_output_poll_changed,
|
.output_poll_changed = drm_fb_helper_output_poll_changed,
|
||||||
.atomic_check = drm_atomic_helper_check,
|
.atomic_check = drm_atomic_helper_check,
|
||||||
.atomic_commit = msm_atomic_commit,
|
.atomic_commit = msm_atomic_commit,
|
||||||
.atomic_state_alloc = msm_atomic_state_alloc,
|
.atomic_state_alloc = msm_atomic_state_alloc,
|
||||||
|
@ -551,13 +544,6 @@ static void msm_postclose(struct drm_device *dev, struct drm_file *file)
|
||||||
context_close(ctx);
|
context_close(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void msm_lastclose(struct drm_device *dev)
|
|
||||||
{
|
|
||||||
struct msm_drm_private *priv = dev->dev_private;
|
|
||||||
if (priv->fbdev)
|
|
||||||
drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
|
|
||||||
}
|
|
||||||
|
|
||||||
static irqreturn_t msm_irq(int irq, void *arg)
|
static irqreturn_t msm_irq(int irq, void *arg)
|
||||||
{
|
{
|
||||||
struct drm_device *dev = arg;
|
struct drm_device *dev = arg;
|
||||||
|
@ -866,7 +852,7 @@ static struct drm_driver msm_driver = {
|
||||||
DRIVER_MODESET,
|
DRIVER_MODESET,
|
||||||
.open = msm_open,
|
.open = msm_open,
|
||||||
.postclose = msm_postclose,
|
.postclose = msm_postclose,
|
||||||
.lastclose = msm_lastclose,
|
.lastclose = drm_fb_helper_lastclose,
|
||||||
.irq_handler = msm_irq,
|
.irq_handler = msm_irq,
|
||||||
.irq_preinstall = msm_irq_preinstall,
|
.irq_preinstall = msm_irq_preinstall,
|
||||||
.irq_postinstall = msm_irq_postinstall,
|
.irq_postinstall = msm_irq_postinstall,
|
||||||
|
|
Loading…
Reference in New Issue