blob: ea0f761c106a863f383a69d1110611119f2602a5 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From 65a61a6258ff75ab1e47bbf25973cc8a5f879180 Mon Sep 17 00:00:00 2001
2From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3Date: Tue, 19 Feb 2019 15:06:31 +0000
4Subject: [PATCH] gpu:vc4-fkms: Update driver to not use plane->crtc.
5
6Following on from
7commit 2f958af7fc248 ("drm/vc4: Stop updating plane->fb/crtc")
8do the same in the firmwarekms driver and look at plane_state->crtc
9instead.
10
11Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
12---
13 drivers/gpu/drm/vc4/vc4_firmware_kms.c | 4 +---
14 1 file changed, 1 insertion(+), 3 deletions(-)
15
16--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
17+++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
18@@ -194,8 +194,8 @@ static void vc4_cursor_plane_atomic_upda
19 struct drm_plane_state *old_state)
20 {
21 struct vc4_dev *vc4 = to_vc4_dev(plane->dev);
22- struct vc4_crtc *vc4_crtc = to_vc4_crtc(plane->crtc);
23 struct drm_plane_state *state = plane->state;
24+ struct vc4_crtc *vc4_crtc = to_vc4_crtc(state->crtc);
25 struct drm_framebuffer *fb = state->fb;
26 struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0);
27 int ret;
28@@ -681,8 +681,6 @@ static int vc4_fkms_bind(struct device *
29 drm_crtc_init_with_planes(drm, crtc, primary_plane, cursor_plane,
30 &vc4_crtc_funcs, NULL);
31 drm_crtc_helper_add(crtc, &vc4_crtc_helper_funcs);
32- primary_plane->crtc = crtc;
33- cursor_plane->crtc = crtc;
34
35 vc4_encoder = devm_kzalloc(dev, sizeof(*vc4_encoder), GFP_KERNEL);
36 if (!vc4_encoder)