mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
e281fcaa28
commit
ed0291fd16
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue