]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Deal with machines that expose less than three QGV points
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 6 Jun 2019 12:42:10 +0000 (15:42 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 3 Jul 2019 18:30:20 +0000 (21:30 +0300)
commitfe0351fcead6332f2b928f9be3acb0dc385abc06
tree2880a4a4672cdc260dd4989626ce8a821bffed40
parent9f88d25a82a1527bdb19557cc91f1f9ce0caf96f
drm/i915: Deal with machines that expose less than three QGV points

When SAGV is forced to disabled/min/med/max in the BIOS pcode will
only hand us a single QGV point instead of the normal three. Fix
the code to deal with that instead declaring the bandwidth limit
to be 0 MB/s (and thus preventing any planes from being enabled).

Also shrink the max_bw sturct a bit while at it, and change the
deratedbw type to unsigned since the code returns the bw as
an unsigned int.

Since we now keep track of how many qgv points we got from pcode
we can drop the earlier check added for the "pcode doesn't
support the memory subsystem query" case.

Cc: felix.j.degrood@intel.com
Cc: Mark Janes <mark.a.janes@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Clint Taylor <Clinton.A.Taylor@intel.com>
Fixes: 602212db5b97 ("drm/i915: Make sure we have enough memory bandwidth on ICL")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110838
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190606124210.3482-1-ville.syrjala@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/i915/display/intel_bw.c
drivers/gpu/drm/i915/i915_drv.h