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_fbdev.c | |
parent | ac2bdf73143f05ffcd08376ff9ff6a66f835d72d (diff) | |
download | op-kernel-dev-a794d57da8031a45fed4e4cb71a999694ba02f7e.zip op-kernel-dev-a794d57da8031a45fed4e4cb71a999694ba02f7e.tar.gz |
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_fbdev.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index f79f768..c8b2784 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c @@ -126,7 +126,7 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper); struct drm_device *dev = helper->dev; struct fb_info *fbi; - struct drm_mode_fb_cmd mode_cmd = { 0 }; + struct drm_mode_fb_cmd2 mode_cmd = { 0 }; struct platform_device *pdev = dev->platformdev; int ret; @@ -138,8 +138,9 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, mode_cmd.width = sizes->surface_width; mode_cmd.height = sizes->surface_height; - mode_cmd.bpp = sizes->surface_bpp; - mode_cmd.depth = sizes->surface_depth; + mode_cmd.pitches[0] = sizes->surface_width * (sizes->surface_bpp >> 3); + mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, + sizes->surface_depth); mutex_lock(&dev->struct_mutex); @@ -206,7 +207,7 @@ static int exynos_drm_fbdev_recreate(struct drm_fb_helper *helper, struct drm_device *dev = helper->dev; struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper); struct drm_framebuffer *fb = exynos_fbdev->fb; - struct drm_mode_fb_cmd mode_cmd = { 0 }; + struct drm_mode_fb_cmd2 mode_cmd = { 0 }; DRM_DEBUG_KMS("%s\n", __FILE__); @@ -220,8 +221,9 @@ static int exynos_drm_fbdev_recreate(struct drm_fb_helper *helper, mode_cmd.width = sizes->surface_width; mode_cmd.height = sizes->surface_height; - mode_cmd.bpp = sizes->surface_bpp; - mode_cmd.depth = sizes->surface_depth; + mode_cmd.pitches[0] = sizes->surface_width * (sizes->surface_bpp >> 3); + mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, + sizes->surface_depth); if (fb->funcs->destroy) fb->funcs->destroy(fb); |