OSDN Git Service

drm/i915/dg1: Compute MEM Bandwidth using MCHBAR
authorClint Taylor <clinton.a.taylor@intel.com>
Thu, 8 Jul 2021 17:52:26 +0000 (10:52 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 9 Jul 2021 19:47:41 +0000 (12:47 -0700)
commit4de062463a863f80004bc497707b56556e77f8fa
treec1c2b1d99edda388a6259b930c7394b0fb7efc04
parentedc2c4b9566872d30c14706b881345c131fb8b6b
drm/i915/dg1: Compute MEM Bandwidth using MCHBAR

The PUNIT FW is currently returning 0 for all memory bandwidth
parameters. Read the values directly from MCHBAR offsets 0x5918 and
0x4000(4).

v2 (Lucas): tidy up checking for ret slightly
v3 (Lucas):
  - Squash change to double the memory bandwidth based on
    MCHBAR Gear_type
  - Move ICL_GEAR_TYPE_MASK to the appropriate place and change prefix
    to DG1
  - Move register definitions to i915_reg.h
  - Make the MCHBAR path permanent for DG1
  - Convert to REG_BIT()/REG_GENMASK()
v4: Drop unneeded initializations

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Jani Saarinen <jani.saarinen@intel.com>
Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210708175226.2451260-1-lucas.demarchi@intel.com
drivers/gpu/drm/i915/display/intel_bw.c
drivers/gpu/drm/i915/i915_reg.h