drm/i915: Nuke intel_atomic_crtc_state_for_each_plane_state() from skl+ wm code
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 6 Nov 2020 17:30:38 +0000 (19:30 +0200)
committerManasi Navare <manasi.d.navare@intel.com>
Mon, 16 Nov 2020 06:08:57 +0000 (22:08 -0800)
commitdbf71381d73390d1e2cedd84eb04ea9b32fd96b3
tree7cf249e1c0173da3190eaa6e603d3106d958cebf
parentffc90033dfc1f5a857ac96ca648d1250b3fcccf9
drm/i915: Nuke intel_atomic_crtc_state_for_each_plane_state() from skl+ wm code

intel_atomic_crtc_state_for_each_plane_state() peeks at the
plane's current state without holding the plane's mutex, trusting
that the crtc's mutex will protect it. In practice that does work
since our planes can't move between pipes, but it sets a bad
example. intel_atomic_crtc_state_for_each_plane_state() also
relies on crtc_state.uapi.plane_mask which may be full of lies
when it comes to the bigjoiner stuff, so soon we can't use it as
is anyway. So best to just get rid of it entirely. Which we can
easily do by switching to the g4x/vlv "raw" watermark approach.

Later on we should even be able to move the "raw" watermark
computation into the normal .plane_check() code, leaving only
the merging/clamping of the final watermarks to the later
stages. But that will require adjusting the ilk+ wm code
similarly as well.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201106173042.7534-3-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/intel_pm.c