OSDN Git Service

drm/i915/lmem: Enable lmem for platforms with Flat CCS
authorAbdiel Janulgue <abdiel.janulgue@linux.intel.com>
Fri, 18 Feb 2022 18:47:51 +0000 (00:17 +0530)
committerLucas De Marchi <lucas.demarchi@intel.com>
Sun, 20 Feb 2022 06:42:07 +0000 (22:42 -0800)
commit4b31b8e34460af9b2eff0d389a6caefcb694a1bc
tree48e05ba87dc7ada5b15bec5dfde465b0fce08d3b
parent5e3094cfd9fb313be3b8fbf9f91e92a30483bc28
drm/i915/lmem: Enable lmem for platforms with Flat CCS

A portion of device memory is reserved for Flat CCS so usable
device memory will be reduced by size of Flat CCS. Size of
Flat CCS is specified in “XEHPSDV_FLAT_CCS_BASE_ADDR”.
So to get effective device memory we need to subtract
total device memory by Flat CCS memory size.

v2:
  Addressed the small bar related issue [Matt]
  Removed a reduntant check [Matt]
v3:
  removed a variable
  s/DRM_ERROR/drm_err [Lucas]

Cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220218184752.7524-15-ramalingam.c@intel.com
drivers/gpu/drm/i915/gt/intel_gt.c
drivers/gpu/drm/i915/gt/intel_gt.h
drivers/gpu/drm/i915/gt/intel_region_lmem.c
drivers/gpu/drm/i915/i915_reg.h