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.
6 Trying to debug weston on fkms involved figuring out what calls I was
7 making to the firmware.
9 Signed-off-by: Eric Anholt <eric@anholt.net>
11 drivers/gpu/drm/vc4/vc4_firmware_kms.c | 26 ++++++++++++++++++++++++++
12 1 file changed, 26 insertions(+)
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);
21 + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] primary plane %s",
22 + plane->base.id, plane->name,
23 + blank ? "blank" : "unblank");
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]);
32 + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] primary update %dx%d@%d +%d,%d 0x%08x/%d\n",
33 + plane->base.id, plane->name,
39 + bo->paddr + fb->offsets[0],
42 ret = rpi_firmware_transaction(vc4->firmware,
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);
49 + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] update %dx%d cursor at %d,%d (0x%08x/%d)",
50 + plane->base.id, plane->name,
55 + bo->paddr + fb->offsets[0],
58 ret = rpi_firmware_property(vc4->firmware,
59 RPI_FIRMWARE_SET_CURSOR_STATE,
61 @@ -200,6 +224,8 @@ static void vc4_cursor_plane_atomic_disa
62 u32 packet_state[] = { false, 0, 0, 0 };
65 + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] disabling cursor", plane->base.id, plane->name);
67 ret = rpi_firmware_property(vc4->firmware,
68 RPI_FIRMWARE_SET_CURSOR_STATE,