summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-03-19 08:21:45 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-03-23 09:17:00 +0000
commited0291fd16f6349ef43d3f25a4626c2f7baf568b (patch)
tree32dbecdab028bc324513ef5eb423a3115fbd6573 /drivers/gpu
parente281fcaa287fb39ce26d9aa33a716c2a7bb8484e (diff)
downloadop-kernel-dev-ed0291fd16f6349ef43d3f25a4626c2f7baf568b.zip
op-kernel-dev-ed0291fd16f6349ef43d3f25a4626c2f7baf568b.tar.gz
drm/i915: Fix computation of pitch for dumb bo creator
Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index c5dfb59..0b99c30 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -224,7 +224,7 @@ i915_gem_dumb_create(struct drm_file *file,
struct drm_mode_create_dumb *args)
{
/* have to work out size/pitch and return them */
- args->pitch = ALIGN(args->width & ((args->bpp + 1) / 8), 64);
+ args->pitch = ALIGN(args->width * ((args->bpp + 7) / 8), 64);
args->size = args->pitch * args->height;
return i915_gem_create(file, dev,
args->size, &args->handle);
OpenPOWER on IntegriCloud