a51e6de5ff3df288a43a9f7a039a118c5e423d51
[openwrt/staging/lynxis.git] /
1 From 96cc7b60fd02f38207da4f88b47a5aef10da9a70 Mon Sep 17 00:00:00 2001
2 From: Eric Anholt <eric@anholt.net>
3 Date: Wed, 1 Feb 2017 17:10:09 -0800
4 Subject: [PATCH 113/782] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of
5 fkms.
6
7 Trying to debug weston on fkms involved figuring out what calls I was
8 making to the firmware.
9
10 Signed-off-by: Eric Anholt <eric@anholt.net>
11 ---
12 drivers/gpu/drm/vc4/vc4_firmware_kms.c | 26 ++++++++++++++++++++++++++
13 1 file changed, 26 insertions(+)
14
15 --- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
16 +++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
17 @@ -101,6 +101,11 @@ static int vc4_plane_set_primary_blank(s
18 struct vc4_dev *vc4 = to_vc4_dev(plane->dev);
19
20 u32 packet = blank;
21 +
22 + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] primary plane %s",
23 + plane->base.id, plane->name,
24 + blank ? "blank" : "unblank");
25 +
26 return rpi_firmware_property(vc4->firmware,
27 RPI_FIRMWARE_FRAMEBUFFER_BLANK,
28 &packet, sizeof(packet));
29 @@ -148,6 +153,16 @@ static void vc4_primary_plane_atomic_upd
30 WARN_ON_ONCE(vc4_plane->pitch != fb->pitches[0]);
31 }
32
33 + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] primary update %dx%d@%d +%d,%d 0x%08x/%d\n",
34 + plane->base.id, plane->name,
35 + state->crtc_w,
36 + state->crtc_h,
37 + bpp,
38 + state->crtc_x,
39 + state->crtc_y,
40 + bo->paddr + fb->offsets[0],
41 + fb->pitches[0]);
42 +
43 ret = rpi_firmware_transaction(vc4->firmware,
44 RPI_FIRMWARE_CHAN_FB,
45 vc4_plane->fbinfo_bus_addr);
46 @@ -176,6 +191,15 @@ static void vc4_cursor_plane_atomic_upda
47 0, 0, /* hotx, hoty */};
48 WARN_ON_ONCE(fb->pitches[0] != state->crtc_w * 4);
49
50 + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] update %dx%d cursor at %d,%d (0x%08x/%d)",
51 + plane->base.id, plane->name,
52 + state->crtc_w,
53 + state->crtc_h,
54 + state->crtc_x,
55 + state->crtc_y,
56 + bo->paddr + fb->offsets[0],
57 + fb->pitches[0]);
58 +
59 ret = rpi_firmware_property(vc4->firmware,
60 RPI_FIRMWARE_SET_CURSOR_STATE,
61 &packet_state,
62 @@ -198,6 +222,8 @@ static void vc4_cursor_plane_atomic_disa
63 u32 packet_state[] = { false, 0, 0, 0 };
64 int ret;
65
66 + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] disabling cursor", plane->base.id, plane->name);
67 +
68 ret = rpi_firmware_property(vc4->firmware,
69 RPI_FIRMWARE_SET_CURSOR_STATE,
70 &packet_state,