diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2011-12-08 01:05:19 -0500 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2011-12-21 01:14:17 -0500 |
commit | a794d57da8031a45fed4e4cb71a999694ba02f7e (patch) | |
tree | 6ff01ad2d4488434a7038060ff765125c3b37f7c /drivers/gpu/drm/exynos/exynos_drm_fbdev.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_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 f79f768a56ca..c8b278447c4f 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, | |||
126 | struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper); | 126 | struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper); |
127 | struct drm_device *dev = helper->dev; | 127 | struct drm_device *dev = helper->dev; |
128 | struct fb_info *fbi; | 128 | struct fb_info *fbi; |
129 | struct drm_mode_fb_cmd mode_cmd = { 0 }; | 129 | struct drm_mode_fb_cmd2 mode_cmd = { 0 }; |
130 | struct platform_device *pdev = dev->platformdev; | 130 | struct platform_device *pdev = dev->platformdev; |
131 | int ret; | 131 | int ret; |
132 | 132 | ||
@@ -138,8 +138,9 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, | |||
138 | 138 | ||
139 | mode_cmd.width = sizes->surface_width; | 139 | mode_cmd.width = sizes->surface_width; |
140 | mode_cmd.height = sizes->surface_height; | 140 | mode_cmd.height = sizes->surface_height; |
141 | mode_cmd.bpp = sizes->surface_bpp; | 141 | mode_cmd.pitches[0] = sizes->surface_width * (sizes->surface_bpp >> 3); |
142 | mode_cmd.depth = sizes->surface_depth; | 142 | mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, |
143 | sizes->surface_depth); | ||
143 | 144 | ||
144 | mutex_lock(&dev->struct_mutex); | 145 | mutex_lock(&dev->struct_mutex); |
145 | 146 | ||
@@ -206,7 +207,7 @@ static int exynos_drm_fbdev_recreate(struct drm_fb_helper *helper, | |||
206 | struct drm_device *dev = helper->dev; | 207 | struct drm_device *dev = helper->dev; |
207 | struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper); | 208 | struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper); |
208 | struct drm_framebuffer *fb = exynos_fbdev->fb; | 209 | struct drm_framebuffer *fb = exynos_fbdev->fb; |
209 | struct drm_mode_fb_cmd mode_cmd = { 0 }; | 210 | struct drm_mode_fb_cmd2 mode_cmd = { 0 }; |
210 | 211 | ||
211 | DRM_DEBUG_KMS("%s\n", __FILE__); | 212 | DRM_DEBUG_KMS("%s\n", __FILE__); |
212 | 213 | ||
@@ -220,8 +221,9 @@ static int exynos_drm_fbdev_recreate(struct drm_fb_helper *helper, | |||
220 | 221 | ||
221 | mode_cmd.width = sizes->surface_width; | 222 | mode_cmd.width = sizes->surface_width; |
222 | mode_cmd.height = sizes->surface_height; | 223 | mode_cmd.height = sizes->surface_height; |
223 | mode_cmd.bpp = sizes->surface_bpp; | 224 | mode_cmd.pitches[0] = sizes->surface_width * (sizes->surface_bpp >> 3); |
224 | mode_cmd.depth = sizes->surface_depth; | 225 | mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, |
226 | sizes->surface_depth); | ||
225 | 227 | ||
226 | if (fb->funcs->destroy) | 228 | if (fb->funcs->destroy) |
227 | fb->funcs->destroy(fb); | 229 | fb->funcs->destroy(fb); |