drm/i915/gem: consolidate 2big error checking for object sizes
authorMatthew Auld <matthew.auld@intel.com>
Fri, 22 Jan 2021 18:15:14 +0000 (18:15 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 24 Mar 2021 18:30:35 +0000 (19:30 +0100)
commitae2fb480f32f657d896d78b6214c2efebfa61993
tree3cade1e3299a328624902c3ea49903898465e52a
parentf63f452ea6846867b7e775dcc0542b94fb9b1369
drm/i915/gem: consolidate 2big error checking for object sizes

Throw it into a simple helper, and throw a warning if we encounter an
object which has been initialised with an object size that exceeds our
limit of INT_MAX pages.

Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matthew Auld <matthew.auld@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/20210122181514.541436-2-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
drivers/gpu/drm/i915/gem/i915_gem_object.h
drivers/gpu/drm/i915/gem/i915_gem_region.c
drivers/gpu/drm/i915/gem/i915_gem_userptr.c