sun4i/drm: sun8i: use mode_set engine callback
authorJernej Skrabec <jernej.skrabec@gmail.com>
Sun, 24 Apr 2022 16:26:26 +0000 (11:26 -0500)
committerMaxime Ripard <maxime@cerno.tech>
Tue, 26 Apr 2022 12:24:47 +0000 (14:24 +0200)
commit1f8a21af2171909d02257e715a47fda4cb000d81
tree4d9fde428cb9b3506ff488660d0df8c7fe44d95b
parentb5fc1c2a8bbdeaed65ac79338bcb70b2a852a2b3
sun4i/drm: sun8i: use mode_set engine callback

Newly introduced mode_set callback in engine structure is a much better
place for setting mixer output size and interlace mode for the following
reasons:
1. Aforementioned properties change only when mode changes, so it's
   enough to be set only once per mode set. Currently it's done whenever
   properties of primary plane are changed.
2. It's assumed that primary plane will always cover whole screen. While
   this is true most of the time, it's not always. DE2/3 planes are
   universal and mostly equal in functionality. There is no reason to
   add artificial limitation to primary planes.
3. The current code only works for UI layers, but some mixers do not
   have any UI layers.

Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
[Samuel: update commit message]
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220424162633.12369-9-samuel@sholland.org
drivers/gpu/drm/sun4i/sun8i_mixer.c
drivers/gpu/drm/sun4i/sun8i_ui_layer.c