drm/i915: Keep plane watermarks enabled more aggressively
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 12 Mar 2019 20:58:41 +0000 (22:58 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 20 Mar 2019 15:16:16 +0000 (17:16 +0200)
commita301cb0fca2d4c5a615d5dac1a3d80baa99518ac
tree88cd842ee5cb1eb9d85593822f538c09b8fa953d
parent10a7e07b68b9ecf9251f78043fb7b342bf9b04e8
drm/i915: Keep plane watermarks enabled more aggressively

Currently we disable all the watermarks above the selected max
level for every plane. That would mean that the cursor's watermarks
may also get modified when another plane causes the selected
max watermark level to change. That is not so great as we would
like to keep the cursor as indepenedent as possible to avoid
having to throttle it in resposne to other plane activity.

To avoid that let's keep the watermarks enabled even for levels
above the max selected watermark level, iff the plane has enough
ddb for that particular level. This way the cursor's enabled
watermarks only depend on the cursor itself. This is safe because
the hardware will never choose to use a watermark level unless
all enabled planes have also enabled that level.

Cc: Neel Desai <neel.desai@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190312205844.6339-7-ville.syrjala@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/i915/intel_pm.c