drm/i915/stolen: don't treat small BAR as an error
authorAkeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tue, 15 Mar 2022 18:14:20 +0000 (18:14 +0000)
committerMatthew Auld <matthew.auld@intel.com>
Wed, 16 Mar 2022 17:50:31 +0000 (17:50 +0000)
commitb8ca8fef58d4656859a46a9d0e84821d3b6551b1
treedccbb9cd131584bfca6ca9f2200a0abe2a66a8b6
parent56eda725c929da5d0a0141a923151d418856b364
drm/i915/stolen: don't treat small BAR as an error

On client platforms with reduced LMEM BAR, we should be able to continue
with driver load with reduced io_size. Instead of using the BAR size to
determine the how large stolen should be, we should instead use the
ADDR_RANGE register to figure this out(at least on platforms like DG2).
For simplicity we don't attempt to support partially mappable stolen.

v2: rearrange the io_mapping_init_wc slightly, since the stolen setup
might result in reduced io_size.

Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Co-developed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220315181425.576828-2-matthew.auld@intel.com
drivers/gpu/drm/i915/gem/i915_gem_stolen.c
drivers/gpu/drm/i915/i915_reg.h