]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Read actual GPU frequency from MEMSTAT_ILK on ILK
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 21 Oct 2020 13:14:40 +0000 (16:14 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 21 Oct 2020 20:19:36 +0000 (23:19 +0300)
commit993fa8a33c8262efacf55e7a7c666c455a164f21
treeb9ef6a96ccab0795159508cdd29855aa641b38f8
parentf49cb9f53e11f1a05b254ef6102117210c143557
drm/i915: Read actual GPU frequency from MEMSTAT_ILK on ILK

There is no GEN6_RPSTAT1 on ILK. Instead of reading that let's
try to get the same information from MEMSTAT_ILK. At least it
seems to track MEMSWCTL frequency request perfectly on my ILK.
It needs the same invert trick as the request value.

We don't want to put the invert thing into intel_gpu_freq()
and intel_freq_opcode() because that would incorrectly invert
the min/max/etc frequencies also.

One day someone might want to reverse engineer the formula for
converting these numbers to Hz, but for now we'll just report
them raw.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201021131443.25616-2-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/gt/intel_rps.c