mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 16:31:13 +00:00
2e715fb4fc
Add support for BCM2712 (Raspberry Pi 5).
3bb5880ab3
Patches were generated from the diff between linux kernel branch linux-6.1.y
and rpi-6.1.y from raspberry pi kernel source:
- git format-patch linux-6.1.y...rpi-6.1.y
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Remove applied and reverted patches, squash patches and config commits]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
48 lines
1.8 KiB
Diff
48 lines
1.8 KiB
Diff
From f3c6acc345113c57011f2b1c8421e6cf78f0bc30 Mon Sep 17 00:00:00 2001
|
|
From: Maxime Ripard <maxime@cerno.tech>
|
|
Date: Fri, 17 Feb 2023 13:39:13 +0100
|
|
Subject: [PATCH] drm/vc4: crtc: Move assigned_channel to a variable
|
|
|
|
We access multiple times the vc4_crtc_state->assigned_channel variable
|
|
in the vc4_crtc_get_scanout_position() function, so let's store it in a
|
|
local variable.
|
|
|
|
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_crtc.c | 7 ++++---
|
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_crtc.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_crtc.c
|
|
@@ -104,6 +104,7 @@ static bool vc4_crtc_get_scanout_positio
|
|
struct vc4_hvs *hvs = vc4->hvs;
|
|
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
|
|
struct vc4_crtc_state *vc4_crtc_state = to_vc4_crtc_state(crtc->state);
|
|
+ unsigned int channel = vc4_crtc_state->assigned_channel;
|
|
unsigned int cob_size;
|
|
u32 val;
|
|
int fifo_lines;
|
|
@@ -120,7 +121,7 @@ static bool vc4_crtc_get_scanout_positio
|
|
* Read vertical scanline which is currently composed for our
|
|
* pixelvalve by the HVS, and also the scaler status.
|
|
*/
|
|
- val = HVS_READ(SCALER_DISPSTATX(vc4_crtc_state->assigned_channel));
|
|
+ val = HVS_READ(SCALER_DISPSTATX(channel));
|
|
|
|
/* Get optional system timestamp after query. */
|
|
if (etime)
|
|
@@ -136,11 +137,11 @@ static bool vc4_crtc_get_scanout_positio
|
|
*vpos /= 2;
|
|
|
|
/* Use hpos to correct for field offset in interlaced mode. */
|
|
- if (vc4_hvs_get_fifo_frame_count(hvs, vc4_crtc_state->assigned_channel) % 2)
|
|
+ if (vc4_hvs_get_fifo_frame_count(hvs, channel) % 2)
|
|
*hpos += mode->crtc_htotal / 2;
|
|
}
|
|
|
|
- cob_size = vc4_crtc_get_cob_allocation(vc4, vc4_crtc_state->assigned_channel);
|
|
+ cob_size = vc4_crtc_get_cob_allocation(vc4, channel);
|
|
/* This is the offset we need for translating hvs -> pv scanout pos. */
|
|
fifo_lines = cob_size / mode->crtc_hdisplay;
|
|
|