aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.19/950-0570-drm-vc4-Support-the-VEC-in-FKMS.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2019-12-23 13:42:55 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2019-12-24 18:49:44 +0100
commit67dcc43f3a22dc3a7ac07a7065971b426feeb043 (patch)
tree0b647356dce45d2c79fd46cf201daa5089cc0934 /target/linux/brcm2708/patches-4.19/950-0570-drm-vc4-Support-the-VEC-in-FKMS.patch
parent47a93a810f78adce5a130d287f82b28e9b54313c (diff)
downloadupstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.tar.gz
upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.tar.bz2
upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.zip
brcm2708: organize kernel patches
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0570-drm-vc4-Support-the-VEC-in-FKMS.patch')
-rw-r--r--target/linux/brcm2708/patches-4.19/950-0570-drm-vc4-Support-the-VEC-in-FKMS.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0570-drm-vc4-Support-the-VEC-in-FKMS.patch b/target/linux/brcm2708/patches-4.19/950-0570-drm-vc4-Support-the-VEC-in-FKMS.patch
new file mode 100644
index 0000000000..29db708769
--- /dev/null
+++ b/target/linux/brcm2708/patches-4.19/950-0570-drm-vc4-Support-the-VEC-in-FKMS.patch
@@ -0,0 +1,62 @@
+From 82ef7a95f5ae86df811253d58d93ca4fb2cbd45a 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
+@@ -125,6 +125,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)
+@@ -1047,6 +1048,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;
+
+ fw_mode.base.type = DRM_MODE_OBJECT_MODE;
+
+@@ -1133,17 +1140,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);