mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 12:43:55 +08:00
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)
|
struct drm_mode_create_dumb *args)
|
||||||
{
|
{
|
||||||
/* have to work out size/pitch and return them */
|
/* 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;
|
args->size = args->pitch * args->height;
|
||||||
return i915_gem_create(file, dev,
|
return i915_gem_create(file, dev,
|
||||||
args->size, &args->handle);
|
args->size, &args->handle);
|
||||||
|
Loading…
Reference in New Issue
Block a user