aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2011-10-14 00:29:50 -0400
committerDave Airlie <airlied@redhat.com>2011-10-18 05:01:18 -0400
commitf6b98252946496de86bd4e89a8b7ef12ec48d97c (patch)
tree8d844012052b7aee0293779b0ec5723b81c4a923
parent601b44e3db833d28af66d4d6eaf5d353430914d0 (diff)
drm/exynos: added comments and code clean.
this patch adds the following comments and code clean. - add comment of exynos_drm_crtc_apply() call at page flip time. - add comment that when exynos_drm_fbdev_reinit() is called, why num_connector is 0 and also the framebuffers should be destroyed. - remove buf_off member from struct exynos_drm_overlay because this member isn't used anymore. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_crtc.c6
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.h2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fbdev.c6
3 files changed, 11 insertions, 3 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index 0587b52a18bf..8cd9d8eec46e 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -279,6 +279,12 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
279 goto out; 279 goto out;
280 } 280 }
281 281
282 /*
283 * the values related to a buffer of the drm framebuffer
284 * to be applied should be set at here. because these values
285 * first, is set to shadow registers and then to
286 * real registers at vsync front porch period.
287 */
282 exynos_drm_crtc_apply(crtc); 288 exynos_drm_crtc_apply(crtc);
283 289
284 dev_priv->pageflip_event = true; 290 dev_priv->pageflip_event = true;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index 002f2925106a..63c1422403d8 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -82,7 +82,6 @@ struct exynos_drm_overlay_ops {
82 * @paddr: bus(accessed by dma) physical memory address to this overlay 82 * @paddr: bus(accessed by dma) physical memory address to this overlay
83 * and this is physically continuous. 83 * and this is physically continuous.
84 * @vaddr: virtual memory addresss to this overlay. 84 * @vaddr: virtual memory addresss to this overlay.
85 * @buf_off: start offset of framebuffer to be displayed.
86 * @default_win: a window to be enabled. 85 * @default_win: a window to be enabled.
87 * @color_key: color key on or off. 86 * @color_key: color key on or off.
88 * @index_color: if using color key feature then this value would be used 87 * @index_color: if using color key feature then this value would be used
@@ -111,7 +110,6 @@ struct exynos_drm_overlay {
111 unsigned int pitch; 110 unsigned int pitch;
112 dma_addr_t paddr; 111 dma_addr_t paddr;
113 void __iomem *vaddr; 112 void __iomem *vaddr;
114 unsigned int buf_off;
115 113
116 bool default_win; 114 bool default_win;
117 bool color_key; 115 bool color_key;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index 4366dc5032ef..1f4b3d1a7713 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -393,6 +393,10 @@ int exynos_drm_fbdev_reinit(struct drm_device *dev)
393 if (!private) 393 if (!private)
394 return -EINVAL; 394 return -EINVAL;
395 395
396 /*
397 * if all sub drivers were unloaded then num_connector is 0
398 * so at this time, the framebuffers also should be destroyed.
399 */
396 if (!dev->mode_config.num_connector) { 400 if (!dev->mode_config.num_connector) {
397 exynos_drm_fbdev_fini(dev); 401 exynos_drm_fbdev_fini(dev);
398 return 0; 402 return 0;
@@ -429,7 +433,7 @@ int exynos_drm_fbdev_reinit(struct drm_device *dev)
429 * re-configure the fb helper. it means that this function 433 * re-configure the fb helper. it means that this function
430 * has been called by the specific drivers. 434 * has been called by the specific drivers.
431 */ 435 */
432 return exynos_drm_fbdev_init(dev); 436 ret = exynos_drm_fbdev_init(dev);
433 } 437 }
434 438
435 return ret; 439 return ret;