OSDN Git Service

drm/i915: Simplify up vlv watermark sanitation
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 22 Jun 2022 15:54:47 +0000 (18:54 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 26 Sep 2022 14:19:38 +0000 (17:19 +0300)
commit59f13af3b645e647247de14cc06f0d04c5cc24ae
treee72dc762b8635e65cc4405949be130a87470cc83
parent6340120014e8a82263f38c724ea8f3611cc0d074
drm/i915: Simplify up vlv watermark sanitation

We can simplify the vlv watermark sanitation by reusing the
second half of vlv_compute_pipe_wm() to convert the sanitized
raw watermarks into the proper form to be used as the
optimal/intermediate watermarks.

Also to be consistent with normal watermark computation the sanitized
watermarks should be all 0 for any disabled plane. Previously we
zeroed out the watermarks only up to the level (ie. PM2/5/DVDFS)
that was enabled.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220622155452.32587-5-ville.syrjala@linux.intel.com
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
drivers/gpu/drm/i915/intel_pm.c