Commit 7db3eba6 authored by Seung-Woo Kim's avatar Seung-Woo Kim Committed by Inki Dae

drm/exynos: added kms poll for handling hpd event

this patch adds kms poll infrastructure to handle hotplug detection event
Signed-off-by: default avatarSeung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
parent d53dab3a
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "drmP.h" #include "drmP.h"
#include "drm.h" #include "drm.h"
#include "drm_crtc_helper.h"
#include <drm/exynos_drm.h> #include <drm/exynos_drm.h>
...@@ -61,6 +62,9 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) ...@@ -61,6 +62,9 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
drm_mode_config_init(dev); drm_mode_config_init(dev);
/* init kms poll for handling hpd */
drm_kms_helper_poll_init(dev);
exynos_drm_mode_config_init(dev); exynos_drm_mode_config_init(dev);
/* /*
...@@ -116,6 +120,7 @@ static int exynos_drm_unload(struct drm_device *dev) ...@@ -116,6 +120,7 @@ static int exynos_drm_unload(struct drm_device *dev)
exynos_drm_fbdev_fini(dev); exynos_drm_fbdev_fini(dev);
exynos_drm_device_unregister(dev); exynos_drm_device_unregister(dev);
drm_vblank_cleanup(dev); drm_vblank_cleanup(dev);
drm_kms_helper_poll_fini(dev);
drm_mode_config_cleanup(dev); drm_mode_config_cleanup(dev);
kfree(dev->dev_private); kfree(dev->dev_private);
......
...@@ -29,7 +29,9 @@ ...@@ -29,7 +29,9 @@
#include "drmP.h" #include "drmP.h"
#include "drm_crtc.h" #include "drm_crtc.h"
#include "drm_crtc_helper.h" #include "drm_crtc_helper.h"
#include "drm_fb_helper.h"
#include "exynos_drm_drv.h"
#include "exynos_drm_fb.h" #include "exynos_drm_fb.h"
#include "exynos_drm_buf.h" #include "exynos_drm_buf.h"
#include "exynos_drm_gem.h" #include "exynos_drm_gem.h"
...@@ -238,8 +240,18 @@ struct exynos_drm_buf_entry *exynos_drm_fb_get_buf(struct drm_framebuffer *fb) ...@@ -238,8 +240,18 @@ struct exynos_drm_buf_entry *exynos_drm_fb_get_buf(struct drm_framebuffer *fb)
return entry; return entry;
} }
static void exynos_drm_output_poll_changed(struct drm_device *dev)
{
struct exynos_drm_private *private = dev->dev_private;
struct drm_fb_helper *fb_helper = private->fb_helper;
if (fb_helper)
drm_fb_helper_hotplug_event(fb_helper);
}
static struct drm_mode_config_funcs exynos_drm_mode_config_funcs = { static struct drm_mode_config_funcs exynos_drm_mode_config_funcs = {
.fb_create = exynos_drm_fb_create, .fb_create = exynos_drm_fb_create,
.output_poll_changed = exynos_drm_output_poll_changed,
}; };
void exynos_drm_mode_config_init(struct drm_device *dev) void exynos_drm_mode_config_init(struct drm_device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment