mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 01:11:14 +00:00
67 lines
2.2 KiB
Diff
67 lines
2.2 KiB
Diff
|
From 0fc2455e0b6cf188c529915de2627bdfb3e5ff01 Mon Sep 17 00:00:00 2001
|
||
|
From: Maxime Ripard <maxime@cerno.tech>
|
||
|
Date: Fri, 4 Mar 2022 15:59:40 +0100
|
||
|
Subject: [PATCH] drm/vc4: kms: Improve logging
|
||
|
|
||
|
When debugging, finding out what muxing decisions were made and what the
|
||
|
actual core clock rate is is always useful, so let's add some more
|
||
|
messages.
|
||
|
|
||
|
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||
|
---
|
||
|
drivers/gpu/drm/vc4/vc4_kms.c | 20 +++++++++++++++++++-
|
||
|
1 file changed, 19 insertions(+), 1 deletion(-)
|
||
|
|
||
|
--- a/drivers/gpu/drm/vc4/vc4_kms.c
|
||
|
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
|
||
|
@@ -447,6 +447,9 @@ static void vc4_atomic_commit_tail(struc
|
||
|
|
||
|
/* And drop the temporary request */
|
||
|
clk_request_done(core_req);
|
||
|
+
|
||
|
+ drm_dbg(dev, "Core clock actual rate: %lu Hz\n",
|
||
|
+ clk_get_rate(hvs->core_clk));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@@ -827,9 +830,18 @@ static int vc4_pv_muxing_atomic_check(st
|
||
|
if (vc4->firmware_kms)
|
||
|
continue;
|
||
|
|
||
|
+ drm_dbg(dev, "%s: Trying to find a channel.\n", crtc->name);
|
||
|
+
|
||
|
/* Nothing to do here, let's skip it */
|
||
|
- if (old_crtc_state->enable == new_crtc_state->enable)
|
||
|
+ if (old_crtc_state->enable == new_crtc_state->enable) {
|
||
|
+ if (new_crtc_state->enable)
|
||
|
+ drm_dbg(dev, "%s: Already enabled, reusing channel %d.\n",
|
||
|
+ crtc->name, new_vc4_crtc_state->assigned_channel);
|
||
|
+ else
|
||
|
+ drm_dbg(dev, "%s: Disabled, ignoring.\n", crtc->name);
|
||
|
+
|
||
|
continue;
|
||
|
+ }
|
||
|
|
||
|
/* Muxing will need to be modified, mark it as such */
|
||
|
new_vc4_crtc_state->update_muxing = true;
|
||
|
@@ -837,6 +849,10 @@ static int vc4_pv_muxing_atomic_check(st
|
||
|
/* If we're disabling our CRTC, we put back our channel */
|
||
|
if (!new_crtc_state->enable) {
|
||
|
channel = old_vc4_crtc_state->assigned_channel;
|
||
|
+
|
||
|
+ drm_dbg(dev, "%s: Disabling, Freeing channel %d\n",
|
||
|
+ crtc->name, channel);
|
||
|
+
|
||
|
hvs_new_state->fifo_state[channel].in_use = false;
|
||
|
new_vc4_crtc_state->assigned_channel = VC4_HVS_CHANNEL_DISABLED;
|
||
|
continue;
|
||
|
@@ -871,6 +887,8 @@ static int vc4_pv_muxing_atomic_check(st
|
||
|
return -EINVAL;
|
||
|
|
||
|
channel = ffs(matching_channels) - 1;
|
||
|
+
|
||
|
+ drm_dbg(dev, "Assigned HVS channel %d to CRTC %s\n", channel, crtc->name);
|
||
|
new_vc4_crtc_state->assigned_channel = channel;
|
||
|
unassigned_channels &= ~BIT(channel);
|
||
|
hvs_new_state->fifo_state[channel].in_use = true;
|