mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 06:57:57 +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 bc76ab2e772242d0d92d38b2a5648485ee1a1b44 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Michael=20B=C3=BCchler?= <michael.buechler@posteo.net>
|
|
Date: Sun, 19 Nov 2023 01:22:20 +0100
|
|
Subject: [PATCH] drm/vc4: Set TV margins on the composite connector state
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
The Raspberry Pi bootloader can pass a set of margin values to the
|
|
kernel cmdline as part of the video= option. These should result in
|
|
black borders on the output to compensate for TVs where the visible area
|
|
on the screen is smaller than the full extents of the video image.
|
|
|
|
With the VC4 driver this currently works on an HDMI connector, but not
|
|
on a composite video connector.
|
|
|
|
The TV margins from the kernel cmdline are available in the
|
|
drm_cmdline_mode structure of the composite video connector. Apply them
|
|
to the connector state in the connector reset function. This is how it
|
|
is implemented for the VC4 HDMI connector.
|
|
|
|
Signed-off-by: Michael Büchler <michael.buechler@posteo.net>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_vec.c | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_vec.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_vec.c
|
|
@@ -436,6 +436,9 @@ static void vc4_vec_connector_reset(stru
|
|
/* preserve TV standard */
|
|
if (connector->state)
|
|
connector->state->tv.mode = vc4_vec_get_default_mode(connector);
|
|
+
|
|
+ /* apply TV margins from the cmdline_mode */
|
|
+ drm_atomic_helper_connector_tv_reset(connector);
|
|
}
|
|
|
|
static int vc4_vec_connector_atomic_check(struct drm_connector *conn,
|
|
@@ -483,6 +486,8 @@ static int vc4_vec_connector_init(struct
|
|
|
|
drm_connector_helper_add(connector, &vc4_vec_connector_helper_funcs);
|
|
|
|
+ drm_connector_attach_tv_margin_properties(connector);
|
|
+
|
|
drm_object_attach_property(&connector->base,
|
|
dev->mode_config.tv_mode_property,
|
|
vc4_vec_get_default_mode(connector));
|