Skip to content

Commit

Permalink
drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of fkms.
Browse files Browse the repository at this point in the history
Trying to debug weston on fkms involved figuring out what calls I was
making to the firmware.

Signed-off-by: Eric Anholt <eric@anholt.net>
  • Loading branch information
anholt authored and popcornmix committed Feb 9, 2018
1 parent ccce01b commit 9ac4821
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions drivers/gpu/drm/vc4/vc4_firmware_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ static int vc4_plane_set_primary_blank(struct drm_plane *plane, bool blank)
struct vc4_dev *vc4 = to_vc4_dev(plane->dev);

u32 packet = blank;

DRM_DEBUG_ATOMIC("[PLANE:%d:%s] primary plane %s",
plane->base.id, plane->name,
blank ? "blank" : "unblank");

return rpi_firmware_property(vc4->firmware,
RPI_FIRMWARE_FRAMEBUFFER_BLANK,
&packet, sizeof(packet));
Expand Down Expand Up @@ -148,6 +153,16 @@ static void vc4_primary_plane_atomic_update(struct drm_plane *plane,
WARN_ON_ONCE(vc4_plane->pitch != fb->pitches[0]);
}

DRM_DEBUG_ATOMIC("[PLANE:%d:%s] primary update %dx%d@%d +%d,%d 0x%08x/%d\n",
plane->base.id, plane->name,
state->crtc_w,
state->crtc_h,
bpp,
state->crtc_x,
state->crtc_y,
bo->paddr + fb->offsets[0],
fb->pitches[0]);

ret = rpi_firmware_transaction(vc4->firmware,
RPI_FIRMWARE_CHAN_FB,
vc4_plane->fbinfo_bus_addr);
Expand Down Expand Up @@ -176,6 +191,15 @@ static void vc4_cursor_plane_atomic_update(struct drm_plane *plane,
0, 0, /* hotx, hoty */};
WARN_ON_ONCE(fb->pitches[0] != state->crtc_w * 4);

DRM_DEBUG_ATOMIC("[PLANE:%d:%s] update %dx%d cursor at %d,%d (0x%08x/%d)",
plane->base.id, plane->name,
state->crtc_w,
state->crtc_h,
state->crtc_x,
state->crtc_y,
bo->paddr + fb->offsets[0],
fb->pitches[0]);

ret = rpi_firmware_property(vc4->firmware,
RPI_FIRMWARE_SET_CURSOR_STATE,
&packet_state,
Expand All @@ -198,6 +222,8 @@ static void vc4_cursor_plane_atomic_disable(struct drm_plane *plane,
u32 packet_state[] = { false, 0, 0, 0 };
int ret;

DRM_DEBUG_ATOMIC("[PLANE:%d:%s] disabling cursor", plane->base.id, plane->name);

ret = rpi_firmware_property(vc4->firmware,
RPI_FIRMWARE_SET_CURSOR_STATE,
&packet_state,
Expand Down

0 comments on commit 9ac4821

Please sign in to comment.