openwrtv3/target/linux/brcm2708/patches-4.9/950-0178-drm-vc4-Add-DRM_DEBUG_ATOMIC-for-the-insides-of-fkms.patch
Rafał Miłecki fce21ae4cc brcm2708: rename all patches from raspberrypi git tree to use 950 prefix
Right now all brcm2708 patches are extracted from the non-mainline
raspberrypi/linux git tree. Many of them are hacks and/or are unneeded
in LEDE. Raspberry Pi is getting better and better mainline support so
it would be nice to finally start maintaining patches in a cleaner way:
1) Backport patches accepted in upstream tree
2) Start using upstream drivers
3) Pick only these patches that are needed for more complete support

Handling above tasks requires grouping patches - ideally using the same
prefixes as generic ones. It means we should rename existing patches to
use some high prefix. This will allow e.g. use 0xx for backported code.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-03-24 08:06:35 +01:00

69 lines
2.2 KiB
Diff

From ac45ecdcbc38c6ec6b477980d0cd0760267f6057 Mon Sep 17 00:00:00 2001
From: Eric Anholt <eric@anholt.net>
Date: Wed, 1 Feb 2017 17:10:09 -0800
Subject: [PATCH] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of fkms.
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>
---
drivers/gpu/drm/vc4/vc4_firmware_kms.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
@@ -102,6 +102,11 @@ static int vc4_plane_set_primary_blank(s
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));
@@ -149,6 +154,16 @@ static void vc4_primary_plane_atomic_upd
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);
@@ -178,6 +193,15 @@ static void vc4_cursor_plane_atomic_upda
WARN_ON_ONCE(fb->pitches[0] != state->crtc_w * 4);
WARN_ON_ONCE(fb->bits_per_pixel != 32);
+ 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,
@@ -200,6 +224,8 @@ static void vc4_cursor_plane_atomic_disa
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,