diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2011-12-08 15:05:19 +0900 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2011-12-21 15:14:17 +0900 |
commit | a794d57da8031a45fed4e4cb71a999694ba02f7e (patch) | |
tree | 6ff01ad2d4488434a7038060ff765125c3b37f7c /drivers/gpu/drm/exynos/exynos_drm_fb.c | |
parent | ac2bdf73143f05ffcd08376ff9ff6a66f835d72d (diff) |
drm/exynos: Use struct drm_mode_fb_cmd2
The exynos drm also should use struct drm_mode_fb_cmd2 by changes of
308e5bcbdb10452e8aba31aa21432fb67ee46d72 commit(drm: add an fb creation
ioctl that takes a pixel format v5).
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_fb.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fb.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c index 5bf4a1ac7f82..df5eec6c1aba 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fb.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c @@ -104,7 +104,7 @@ static struct drm_framebuffer_funcs exynos_drm_fb_funcs = { static struct drm_framebuffer * exynos_drm_fb_init(struct drm_file *file_priv, struct drm_device *dev, - struct drm_mode_fb_cmd *mode_cmd) + struct drm_mode_fb_cmd2 *mode_cmd) { struct exynos_drm_fb *exynos_fb; struct drm_framebuffer *fb; @@ -115,9 +115,6 @@ exynos_drm_fb_init(struct drm_file *file_priv, struct drm_device *dev, DRM_DEBUG_KMS("%s\n", __FILE__); - mode_cmd->pitch = max(mode_cmd->pitch, - mode_cmd->width * (mode_cmd->bpp >> 3)); - DRM_LOG_KMS("drm fb create(%dx%d)\n", mode_cmd->width, mode_cmd->height); @@ -136,14 +133,14 @@ exynos_drm_fb_init(struct drm_file *file_priv, struct drm_device *dev, DRM_LOG_KMS("create: fb id: %d\n", fb->base.id); - size = mode_cmd->pitch * mode_cmd->height; + size = mode_cmd->pitches[0] * mode_cmd->height; /* - * mode_cmd->handle could be NULL at booting time or + * mode_cmd->handles[0] could be NULL at booting time or * with user request. if NULL, a new buffer or a gem object * would be allocated. */ - if (!mode_cmd->handle) { + if (!mode_cmd->handles[0]) { if (!file_priv) { struct exynos_drm_gem_buf *buffer; @@ -166,7 +163,7 @@ exynos_drm_fb_init(struct drm_file *file_priv, struct drm_device *dev, goto out; } else { exynos_gem_obj = exynos_drm_gem_create(dev, file_priv, - &mode_cmd->handle, + &mode_cmd->handles[0], size); if (IS_ERR(exynos_gem_obj)) { ret = PTR_ERR(exynos_gem_obj); @@ -174,7 +171,8 @@ exynos_drm_fb_init(struct drm_file *file_priv, struct drm_device *dev, } } } else { - obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handle); + obj = drm_gem_object_lookup(dev, file_priv, + mode_cmd->handles[0]); if (!obj) { DRM_ERROR("failed to lookup gem object.\n"); goto err_buffer; @@ -214,8 +212,8 @@ err_init: } struct drm_framebuffer *exynos_drm_fb_create(struct drm_device *dev, - struct drm_file *file_priv, - struct drm_mode_fb_cmd *mode_cmd) + struct drm_file *file_priv, + struct drm_mode_fb_cmd2 *mode_cmd) { DRM_DEBUG_KMS("%s\n", __FILE__); |