drm/i915/skl+: Use plane size for relative data rate calculation
authorKumar, Mahesh <mahesh1.kumar@intel.com>
Wed, 6 Apr 2016 15:26:39 +0000 (08:26 -0700)
committerJani Nikula <jani.nikula@intel.com>
Mon, 18 Apr 2016 09:35:48 +0000 (12:35 +0300)
commit9aec6a08f1163fb24c23f9036891e1d5bab3f1be
treec1ebff664bb13f50f74f6046c7cfcb6afe1476c5
parentc3b46c73264b03000d1e18b22f5caf63332547c9
drm/i915/skl+: Use plane size for relative data rate calculation

Use plane size for relative data rate calculation. don't always use
pipe source width & height.
adjust height & width according to rotation.
use plane size for watermark calculations also.

v2: Address Matt's comments.
    Use intel_plane_state->visible to avoid divide-by-zero error.
    Where FB was present but not visible so causing total data rate to
    be zero, hence divide-by-zero.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93917
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94044
Cc: drm-intel-fixes@lists.freedesktop.org
Signed-off-by: Kumar, Mahesh <mahesh1.kumar@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1459956399-1296-1-git-send-email-matthew.d.roper@intel.com
(cherry picked from commit a280f7dd9f1a85eed242d0f62498bfc11520a1a3)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_pm.c