Commit f6b98252 authored by Inki Dae's avatar Inki Dae Committed by Dave Airlie

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: default avatarInki Dae <inki.dae@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 601b44e3
...@@ -279,6 +279,12 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc, ...@@ -279,6 +279,12 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
goto out; goto out;
} }
/*
* the values related to a buffer of the drm framebuffer
* to be applied should be set at here. because these values
* first, is set to shadow registers and then to
* real registers at vsync front porch period.
*/
exynos_drm_crtc_apply(crtc); exynos_drm_crtc_apply(crtc);
dev_priv->pageflip_event = true; dev_priv->pageflip_event = true;
......
...@@ -82,7 +82,6 @@ struct exynos_drm_overlay_ops { ...@@ -82,7 +82,6 @@ struct exynos_drm_overlay_ops {
* @paddr: bus(accessed by dma) physical memory address to this overlay * @paddr: bus(accessed by dma) physical memory address to this overlay
* and this is physically continuous. * and this is physically continuous.
* @vaddr: virtual memory addresss to this overlay. * @vaddr: virtual memory addresss to this overlay.
* @buf_off: start offset of framebuffer to be displayed.
* @default_win: a window to be enabled. * @default_win: a window to be enabled.
* @color_key: color key on or off. * @color_key: color key on or off.
* @index_color: if using color key feature then this value would be used * @index_color: if using color key feature then this value would be used
...@@ -111,7 +110,6 @@ struct exynos_drm_overlay { ...@@ -111,7 +110,6 @@ struct exynos_drm_overlay {
unsigned int pitch; unsigned int pitch;
dma_addr_t paddr; dma_addr_t paddr;
void __iomem *vaddr; void __iomem *vaddr;
unsigned int buf_off;
bool default_win; bool default_win;
bool color_key; bool color_key;
......
...@@ -393,6 +393,10 @@ int exynos_drm_fbdev_reinit(struct drm_device *dev) ...@@ -393,6 +393,10 @@ int exynos_drm_fbdev_reinit(struct drm_device *dev)
if (!private) if (!private)
return -EINVAL; return -EINVAL;
/*
* if all sub drivers were unloaded then num_connector is 0
* so at this time, the framebuffers also should be destroyed.
*/
if (!dev->mode_config.num_connector) { if (!dev->mode_config.num_connector) {
exynos_drm_fbdev_fini(dev); exynos_drm_fbdev_fini(dev);
return 0; return 0;
...@@ -429,7 +433,7 @@ int exynos_drm_fbdev_reinit(struct drm_device *dev) ...@@ -429,7 +433,7 @@ int exynos_drm_fbdev_reinit(struct drm_device *dev)
* re-configure the fb helper. it means that this function * re-configure the fb helper. it means that this function
* has been called by the specific drivers. * has been called by the specific drivers.
*/ */
return exynos_drm_fbdev_init(dev); ret = exynos_drm_fbdev_init(dev);
} }
return ret; return ret;
......
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