diff options
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_drv.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_drv.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 35889ca255e9..58820ebd3558 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include "exynos_drm_drv.h" | 34 | #include "exynos_drm_drv.h" |
35 | #include "exynos_drm_crtc.h" | 35 | #include "exynos_drm_crtc.h" |
36 | #include "exynos_drm_encoder.h" | ||
36 | #include "exynos_drm_fbdev.h" | 37 | #include "exynos_drm_fbdev.h" |
37 | #include "exynos_drm_fb.h" | 38 | #include "exynos_drm_fb.h" |
38 | #include "exynos_drm_gem.h" | 39 | #include "exynos_drm_gem.h" |
@@ -99,6 +100,9 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) | |||
99 | if (ret) | 100 | if (ret) |
100 | goto err_vblank; | 101 | goto err_vblank; |
101 | 102 | ||
103 | /* setup possible_clones. */ | ||
104 | exynos_drm_encoder_setup(dev); | ||
105 | |||
102 | /* | 106 | /* |
103 | * create and configure fb helper and also exynos specific | 107 | * create and configure fb helper and also exynos specific |
104 | * fbdev object. | 108 | * fbdev object. |
@@ -141,16 +145,21 @@ static int exynos_drm_unload(struct drm_device *dev) | |||
141 | } | 145 | } |
142 | 146 | ||
143 | static void exynos_drm_preclose(struct drm_device *dev, | 147 | static void exynos_drm_preclose(struct drm_device *dev, |
144 | struct drm_file *file_priv) | 148 | struct drm_file *file) |
145 | { | 149 | { |
146 | struct exynos_drm_private *dev_priv = dev->dev_private; | 150 | DRM_DEBUG_DRIVER("%s\n", __FILE__); |
147 | 151 | ||
148 | /* | 152 | } |
149 | * drm framework frees all events at release time, | 153 | |
150 | * so private event list should be cleared. | 154 | static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file) |
151 | */ | 155 | { |
152 | if (!list_empty(&dev_priv->pageflip_event_list)) | 156 | DRM_DEBUG_DRIVER("%s\n", __FILE__); |
153 | INIT_LIST_HEAD(&dev_priv->pageflip_event_list); | 157 | |
158 | if (!file->driver_priv) | ||
159 | return; | ||
160 | |||
161 | kfree(file->driver_priv); | ||
162 | file->driver_priv = NULL; | ||
154 | } | 163 | } |
155 | 164 | ||
156 | static void exynos_drm_lastclose(struct drm_device *dev) | 165 | static void exynos_drm_lastclose(struct drm_device *dev) |
@@ -195,6 +204,7 @@ static struct drm_driver exynos_drm_driver = { | |||
195 | .unload = exynos_drm_unload, | 204 | .unload = exynos_drm_unload, |
196 | .preclose = exynos_drm_preclose, | 205 | .preclose = exynos_drm_preclose, |
197 | .lastclose = exynos_drm_lastclose, | 206 | .lastclose = exynos_drm_lastclose, |
207 | .postclose = exynos_drm_postclose, | ||
198 | .get_vblank_counter = drm_vblank_count, | 208 | .get_vblank_counter = drm_vblank_count, |
199 | .enable_vblank = exynos_drm_crtc_enable_vblank, | 209 | .enable_vblank = exynos_drm_crtc_enable_vblank, |
200 | .disable_vblank = exynos_drm_crtc_disable_vblank, | 210 | .disable_vblank = exynos_drm_crtc_disable_vblank, |