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