Commit ed0291fd authored by Chris Wilson's avatar Chris Wilson

drm/i915: Fix computation of pitch for dumb bo creator

Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent e281fcaa
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment