mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 07:22:33 +00:00
62b7f5931c
bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G
bcm2710: boot tested on RPi 3B v1.2
bcm2711: boot tested on RPi 4B v1.1 4G
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commit f07e572f64
)
63 lines
2.2 KiB
Diff
63 lines
2.2 KiB
Diff
From 11a567f1e76ca017f1963027655454b56ab81875 Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
|
Date: Fri, 24 May 2019 17:59:01 +0100
|
|
Subject: [PATCH] drm/vc4: Support the VEC in FKMS
|
|
|
|
Extends the DPI/DSI support to also report the VEC output
|
|
which supports interlacing too.
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_firmware_kms.c | 16 +++++++++++++++-
|
|
1 file changed, 15 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
|
|
@@ -128,6 +128,7 @@ struct set_timings {
|
|
#define TIMINGS_FLAGS_H_SYNC_NEG 0
|
|
#define TIMINGS_FLAGS_V_SYNC_POS BIT(1)
|
|
#define TIMINGS_FLAGS_V_SYNC_NEG 0
|
|
+#define TIMINGS_FLAGS_INTERLACE BIT(2)
|
|
|
|
#define TIMINGS_FLAGS_ASPECT_MASK GENMASK(7, 4)
|
|
#define TIMINGS_FLAGS_ASPECT_NONE (0 << 4)
|
|
@@ -1043,6 +1044,12 @@ static int vc4_fkms_lcd_connector_get_mo
|
|
fw_mode.flags |= DRM_MODE_FLAG_PVSYNC;
|
|
else
|
|
fw_mode.flags |= DRM_MODE_FLAG_NVSYNC;
|
|
+ if (mb.timings.flags & TIMINGS_FLAGS_V_SYNC_POS)
|
|
+ fw_mode.flags |= DRM_MODE_FLAG_PVSYNC;
|
|
+ else
|
|
+ fw_mode.flags |= DRM_MODE_FLAG_NVSYNC;
|
|
+ if (mb.timings.flags & TIMINGS_FLAGS_INTERLACE)
|
|
+ fw_mode.flags |= DRM_MODE_FLAG_INTERLACE;
|
|
|
|
mode = drm_mode_duplicate(connector->dev,
|
|
&fw_mode);
|
|
@@ -1127,17 +1134,24 @@ vc4_fkms_connector_init(struct drm_devic
|
|
DRM_MODE_CONNECTOR_DSI);
|
|
drm_connector_helper_add(connector,
|
|
&vc4_fkms_lcd_conn_helper_funcs);
|
|
+ connector->interlace_allowed = 0;
|
|
+ } else if (fkms_connector->display_type == DRM_MODE_ENCODER_TVDAC) {
|
|
+ drm_connector_init(dev, connector, &vc4_fkms_connector_funcs,
|
|
+ DRM_MODE_CONNECTOR_Composite);
|
|
+ drm_connector_helper_add(connector,
|
|
+ &vc4_fkms_lcd_conn_helper_funcs);
|
|
+ connector->interlace_allowed = 1;
|
|
} else {
|
|
drm_connector_init(dev, connector, &vc4_fkms_connector_funcs,
|
|
DRM_MODE_CONNECTOR_HDMIA);
|
|
drm_connector_helper_add(connector,
|
|
&vc4_fkms_connector_helper_funcs);
|
|
+ connector->interlace_allowed = 0;
|
|
}
|
|
|
|
connector->polled = (DRM_CONNECTOR_POLL_CONNECT |
|
|
DRM_CONNECTOR_POLL_DISCONNECT);
|
|
|
|
- connector->interlace_allowed = 0;
|
|
connector->doublescan_allowed = 0;
|
|
|
|
drm_connector_attach_encoder(connector, encoder);
|