]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/gpu/drm/i915/intel_pm.c
drm/i915/gen9: Allow calculation of data rate for in-flight state (v2)
authorMatt Roper <matthew.d.roper@intel.com>
Thu, 12 May 2016 14:05:58 +0000 (07:05 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Fri, 13 May 2016 14:32:49 +0000 (07:32 -0700)
commit9c74d82621c553f0da1f41bd5d90f5eab5659fdb
tree3cb7024bcb3eeb26973c3722d77d60d4330d8403
parenta1de91e5f3039dfc32ac2b77ffb280a68646cbc7
drm/i915/gen9: Allow calculation of data rate for in-flight state (v2)

Our skl_get_total_relative_data_rate() function gets passed a crtc state
object to calculate the data rate for, but it currently always looks
up the committed plane states that correspond to that CRTC.  Let's
check whether the CRTC state is an in-flight state (meaning
cstate->state is non-NULL) and if so, use the corresponding in-flight
plane states.

We'll soon be using this function exclusively for in-flight states; at
that time we'll be able to simplify the function a bit, but for now we
allow it to be used in either mode.

v2:
 - Rebase on top of changes to cache plane data rates.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-5-git-send-email-matthew.d.roper@intel.com
drivers/gpu/drm/i915/intel_pm.c