drm/i915: Update size upon return from GEM_CREATE
authorMichał Winiarski <michal.winiarski@intel.com>
Tue, 26 Mar 2019 17:02:18 +0000 (18:02 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 26 Mar 2019 20:24:44 +0000 (20:24 +0000)
commite163484afa8d6b1775cd35201fe7d523a45e0409
tree14ad80b57d6095a39b2e2e1043acd31ad0acb2c1
parentbaba6e572b38ecd399048cb5b03db88e67069902
drm/i915: Update size upon return from GEM_CREATE

Since GEM_CREATE is trying to outsmart the user by rounding up unaligned
objects, we used to update the size returned to userspace.
This update seems to have been lost throughout the history.

v2: Use round_up(), reorder locals (Chris)

References: ff72145badb8 ("drm: dumb scanout create/mmap for intel/radeon (v3)")
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Janusz Krzysztofik <janusz.krzysztofik@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190326170218.13255-1-michal.winiarski@intel.com
drivers/gpu/drm/i915/i915_gem.c