summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorCooper Yuan <cooperyuan@gmail.com>2012-06-29 11:49:45 +0900
committerInki Dae <inki.dae@samsung.com>2012-07-27 11:13:55 +0900
commit3fd6b69474efa77c386ac1c658d79dce5cfe1d19 (patch)
treeb03d88de57c47d34e671570e422bbf2afaa44b98 /drivers/gpu
parent0dd3b72cc66117e5c6dc638f55e4f2e5cc60ed70 (diff)
downloadlinux-3fd6b69474efa77c386ac1c658d79dce5cfe1d19.tar.gz
linux-3fd6b69474efa77c386ac1c658d79dce5cfe1d19.tar.bz2
linux-3fd6b69474efa77c386ac1c658d79dce5cfe1d19.zip
drm/exynos: fix buffer pitch calculation
Signed-off-by: Cooper Yuan <cooperyuan@gmail.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c
index 5c8b683029ea..acb9f424eb60 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gem.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c
@@ -668,7 +668,7 @@ int exynos_drm_gem_dumb_create(struct drm_file *file_priv,
* with DRM_IOCTL_MODE_CREATE_DUMB command.
*/
- args->pitch = args->width * args->bpp >> 3;
+ args->pitch = args->width * ((args->bpp + 7) / 8);
args->size = PAGE_ALIGN(args->pitch * args->height);
exynos_gem_obj = exynos_drm_gem_create(dev, args->flags, args->size);