]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/sun4i: vi_scaler: Find mixer from crtc
authorJernej Skrabec <jernej.skrabec@gmail.com>
Tue, 4 Nov 2025 18:09:41 +0000 (19:09 +0100)
committerChen-Yu Tsai <wens@kernel.org>
Wed, 12 Nov 2025 09:18:25 +0000 (17:18 +0800)
With "floating" planes in DE33, mixer can't be stored in layer structure
anymore. Find mixer using currently bound crtc.

Reviewed-by: Chen-Yu Tsai <wens@kernel.org>
Tested-by: Ryan Walklin <ryan@testtoast.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://patch.msgid.link/20251104180942.61538-30-jernej.skrabec@gmail.com
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
drivers/gpu/drm/sun4i/sun8i_vi_layer.c

index 5f91011425bf4a9329b63020e4053138ed0b5daa..da0d9167d328130ac1040d601674fc7d816771c4 100644 (file)
@@ -14,6 +14,7 @@
 #include <drm/drm_print.h>
 #include <drm/drm_probe_helper.h>
 
+#include "sun4i_crtc.h"
 #include "sun8i_csc.h"
 #include "sun8i_mixer.h"
 #include "sun8i_vi_layer.h"
@@ -63,8 +64,9 @@ static void sun8i_vi_layer_update_coord(struct sun8i_layer *layer,
                                        struct drm_plane *plane)
 {
        struct drm_plane_state *state = plane->state;
+       struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(state->crtc);
+       struct sun8i_mixer *mixer = engine_to_sun8i_mixer(scrtc->engine);
        const struct drm_format_info *format = state->fb->format;
-       struct sun8i_mixer *mixer = layer->mixer;
        u32 src_w, src_h, dst_w, dst_h;
        u32 outsize, insize;
        u32 hphase, vphase;