From f07e572f6447465d8938679533d604e402b0f066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 18 Feb 2021 18:04:33 +0100 Subject: bcm27xx: import latest patches from the RPi foundation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- ...d-to-call-drm_crtc_vblank_-on-off-from-vc.patch | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 target/linux/bcm27xx/patches-5.4/950-0238-drm-vc4-Need-to-call-drm_crtc_vblank_-on-off-from-vc.patch (limited to 'target/linux/bcm27xx/patches-5.4/950-0238-drm-vc4-Need-to-call-drm_crtc_vblank_-on-off-from-vc.patch') diff --git a/target/linux/bcm27xx/patches-5.4/950-0238-drm-vc4-Need-to-call-drm_crtc_vblank_-on-off-from-vc.patch b/target/linux/bcm27xx/patches-5.4/950-0238-drm-vc4-Need-to-call-drm_crtc_vblank_-on-off-from-vc.patch new file mode 100644 index 0000000000..635340c082 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0238-drm-vc4-Need-to-call-drm_crtc_vblank_-on-off-from-vc.patch @@ -0,0 +1,54 @@ +From 236758b499086e0de280407396550125f1b6647a Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Tue, 9 Apr 2019 18:14:44 +0100 +Subject: [PATCH] from + vc4_crtc_[en|dis]able + +vblank needs to be enabled and disabled by the driver to avoid the +DRM framework complaining in the kernel log. + +vc4_fkms_disable_vblank needs to signal that we don't want vblank +callbacks too. + +Signed-off-by: Dave Stevenson +--- + drivers/gpu/drm/vc4/vc4_firmware_kms.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +@@ -21,6 +21,7 @@ + #include "drm/drm_fourcc.h" + #include "drm/drm_probe_helper.h" + #include "drm/drm_drv.h" ++#include "drm/drm_vblank.h" + #include "linux/clk.h" + #include "linux/debugfs.h" + #include "drm/drm_fb_cma_helper.h" +@@ -563,6 +564,8 @@ static void vc4_crtc_mode_set_nofb(struc + + static void vc4_crtc_disable(struct drm_crtc *crtc, struct drm_crtc_state *old_state) + { ++ drm_crtc_vblank_off(crtc); ++ + /* Always turn the planes off on CRTC disable. In DRM, planes + * are enabled/disabled through the update/disable hooks + * above, and the CRTC enable/disable independently controls +@@ -578,6 +581,7 @@ static void vc4_crtc_disable(struct drm_ + + static void vc4_crtc_enable(struct drm_crtc *crtc, struct drm_crtc_state *old_state) + { ++ drm_crtc_vblank_on(crtc); + /* Unblank the planes (if they're supposed to be displayed). */ + + if (crtc->primary->state->fb) +@@ -674,6 +678,9 @@ static int vc4_fkms_enable_vblank(struct + + static void vc4_fkms_disable_vblank(struct drm_crtc *crtc) + { ++ struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); ++ ++ vc4_crtc->vblank_enabled = false; + } + + static const struct drm_crtc_funcs vc4_crtc_funcs = { -- cgit v1.2.3