OSDN Git Service

drm/i915: Fix TGL+ plane SAGV watermark programming
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 26 Feb 2021 15:31:58 +0000 (17:31 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 3 Mar 2021 12:23:22 +0000 (14:23 +0200)
commit2871b2fde449c2567a2d46a3635356cbc97c9740
treed15a9edb657c31aadf19027289875ae2c9a6aee2
parent899f9d7bbc01bacefe3b124d4655678ad299177d
drm/i915: Fix TGL+ plane SAGV watermark programming

When we switch between SAGV on vs. off we need to reprogram all
plane wateramrks accordingly. Currently skl_wm_add_affected_planes()
totally ignores the SAGV watermark and just assumes we will use
the normal WM0.

Fix this by utilizing skl_plane_wm_level() which picks the
correct watermark based on use_sagv_wm. Thus we will force
an update on all the planes whose watermark registers need
to be reprogrammed.

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