diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-18 18:04:33 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-18 23:42:32 +0100 |
commit | f07e572f6447465d8938679533d604e402b0f066 (patch) | |
tree | cb333bd2a67e59e7c07659514850a0fd55fc825e /target/linux/bcm27xx/patches-5.4/950-0228-drm-vc4-Fix-vblank-timestamping-for-firmwarekms.patch | |
parent | 5d3a6fd970619dfc55f8259035c3027d7613a2a6 (diff) | |
download | upstream-f07e572f6447465d8938679533d604e402b0f066.tar.gz upstream-f07e572f6447465d8938679533d604e402b0f066.tar.bz2 upstream-f07e572f6447465d8938679533d604e402b0f066.zip |
bcm27xx: import latest patches from the RPi foundation
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>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-0228-drm-vc4-Fix-vblank-timestamping-for-firmwarekms.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.4/950-0228-drm-vc4-Fix-vblank-timestamping-for-firmwarekms.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0228-drm-vc4-Fix-vblank-timestamping-for-firmwarekms.patch b/target/linux/bcm27xx/patches-5.4/950-0228-drm-vc4-Fix-vblank-timestamping-for-firmwarekms.patch new file mode 100644 index 0000000000..3b03c98088 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0228-drm-vc4-Fix-vblank-timestamping-for-firmwarekms.patch @@ -0,0 +1,53 @@ +From c71f09dafd82a37a488029f33552a45a99d0a9a6 Mon Sep 17 00:00:00 2001 +From: Eric Anholt <eric@anholt.net> +Date: Tue, 2 Apr 2019 13:29:00 -0700 +Subject: [PATCH] drm/vc4: Fix vblank timestamping for firmwarekms. + +The core doesn't expect a false return from the scanoutpos function in +normal usage, so we were doing the precise vblank timestamping path +and thus "immediate" vblank disables (even though firmwarekms can't +actually disable vblanks interrupts, sigh), and the kernel would get +confused when getting timestamp info when also turning vblanks back +on. + +Signed-off-by: Eric Anholt <eric@anholt.net> +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 3 --- + drivers/gpu/drm/vc4/vc4_firmware_kms.c | 7 +++++++ + 2 files changed, 7 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -97,9 +97,6 @@ bool vc4_crtc_get_scanoutpos(struct drm_ + int vblank_lines; + bool ret = false; + +- if (vc4->firmware_kms) +- return 0; +- + /* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */ + + /* Get optional system timestamp before query. */ +--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +@@ -20,6 +20,7 @@ + #include "drm/drm_crtc_helper.h" + #include "drm/drm_fourcc.h" + #include "drm/drm_probe_helper.h" ++#include "drm/drm_drv.h" + #include "linux/clk.h" + #include "linux/debugfs.h" + #include "drm/drm_fb_cma_helper.h" +@@ -673,6 +674,12 @@ static int vc4_fkms_bind(struct device * + + vc4->firmware_kms = true; + ++ /* firmware kms doesn't have precise a scanoutpos implementation, so ++ * we can't do the precise vblank timestamp mode. ++ */ ++ drm->driver->get_scanout_position = NULL; ++ drm->driver->get_vblank_timestamp = NULL; ++ + vc4_crtc = devm_kzalloc(dev, sizeof(*vc4_crtc), GFP_KERNEL); + if (!vc4_crtc) + return -ENOMEM; |