summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos/exynos_drm_fb.c
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2011-10-14 08:29:46 +0400
committerDave Airlie <airlied@redhat.com>2011-10-18 13:01:17 +0400
commit19c8b8343d9cb9674fa47103bf2a4abb43757e65 (patch)
tree5a8e495b34cc6f035f95971216ee03e90de21402 /drivers/gpu/drm/exynos/exynos_drm_fb.c
parent6fcbef7a50b2f618376b65845a92cde3efc4a131 (diff)
downloadlinux-19c8b8343d9cb9674fa47103bf2a4abb43757e65.tar.xz
drm/exynos: fixed overlay data updating.
this patch adds common members to overlay structure and makes each driver such as fimd or hdmi driver set them to its own structure. 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>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_fb.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fb.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c
index 4505d90d657a..48d29cfd5240 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fb.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c
@@ -220,28 +220,22 @@ struct drm_framebuffer *exynos_drm_fb_create(struct drm_device *dev,
return exynos_drm_fb_init(file_priv, dev, mode_cmd);
}
-void exynos_drm_fb_update_buf_off(struct drm_framebuffer *fb,
- unsigned int x, unsigned int y,
- struct exynos_drm_buffer_info *info)
+struct exynos_drm_buf_entry *exynos_drm_fb_get_buf(struct drm_framebuffer *fb)
{
struct exynos_drm_fb *exynos_fb = to_exynos_fb(fb);
struct exynos_drm_buf_entry *entry;
- unsigned long offset;
DRM_DEBUG_KMS("%s\n", __FILE__);
- offset = x * (fb->bits_per_pixel >> 3);
- offset += y * fb->pitch;
-
entry = exynos_fb->entry;
+ if (!entry)
+ return NULL;
- info->base_addr = entry->paddr;
- info->vaddr = entry->vaddr + offset;
- info->paddr = entry->paddr + offset;
+ DRM_DEBUG_KMS("vaddr = 0x%lx, paddr = 0x%lx\n",
+ (unsigned long)entry->vaddr,
+ (unsigned long)entry->paddr);
- DRM_DEBUG_KMS("updated vaddr = 0x%lx, paddr = 0x%lx, offset = 0x%x\n",
- (unsigned long)info->vaddr, (unsigned long)info->paddr,
- (unsigned int)offset);
+ return entry;
}
static struct drm_mode_config_funcs exynos_drm_mode_config_funcs = {