From: Chris Wilson Date: Tue, 5 Jun 2018 13:57:46 +0000 (+0100) Subject: drm/i915: Swap magics and use SZ_1M X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=420980ca79bcac50cab5bfd20c3d7e5425b1f3d6;p=openwrt%2Fstaging%2Fblogic.git drm/i915: Swap magics and use SZ_1M Since the kernel provides SZ_1M, use it in preference of 1 << 20. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20180605135746.8020-1-chris@chris-wilson.co.uk --- diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index c41997595183..23374f3dd79d 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1999,7 +1999,7 @@ compute_partial_view(struct drm_i915_gem_object *obj, */ int i915_gem_fault(struct vm_fault *vmf) { -#define MIN_CHUNK_PAGES ((1 << 20) >> PAGE_SHIFT) /* 1 MiB */ +#define MIN_CHUNK_PAGES (SZ_1M >> PAGE_SHIFT) struct vm_area_struct *area = vmf->vma; struct drm_i915_gem_object *obj = to_intel_bo(area->vm_private_data); struct drm_device *dev = obj->base.dev;