From 19226502bf6393706defe7f049c587b32c9b4f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 31 Jul 2019 18:23:26 +0200 Subject: brcm2708: update to latest patches from the RPi foundation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Álvaro Fernández Rojas --- ...ng-fkms-into-line-with-kms-in-blocking-do.patch | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 target/linux/brcm2708/patches-4.19/950-0607-drm-vc4-Bring-fkms-into-line-with-kms-in-blocking-do.patch (limited to 'target/linux/brcm2708/patches-4.19/950-0607-drm-vc4-Bring-fkms-into-line-with-kms-in-blocking-do.patch') diff --git a/target/linux/brcm2708/patches-4.19/950-0607-drm-vc4-Bring-fkms-into-line-with-kms-in-blocking-do.patch b/target/linux/brcm2708/patches-4.19/950-0607-drm-vc4-Bring-fkms-into-line-with-kms-in-blocking-do.patch new file mode 100644 index 0000000000..ec76ebe9d9 --- /dev/null +++ b/target/linux/brcm2708/patches-4.19/950-0607-drm-vc4-Bring-fkms-into-line-with-kms-in-blocking-do.patch @@ -0,0 +1,47 @@ +From fc819de185dd2a0c7ff1846ee3ec64668f9163cc Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Wed, 10 Apr 2019 17:43:57 +0100 +Subject: [PATCH 607/725] drm: vc4: Bring fkms into line with kms in blocking + doublescan modes + +Implement vc4_crtc_mode_valid so that it blocks doublescan modes + +Signed-off-by: Dave Stevenson +--- + drivers/gpu/drm/vc4/vc4_firmware_kms.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +@@ -625,7 +625,17 @@ static void vc4_crtc_enable(struct drm_c + vc4_plane_set_blank(plane, plane->state->visible); + } + ++static enum drm_mode_status ++vc4_crtc_mode_valid(struct drm_crtc *crtc, const struct drm_display_mode *mode) ++{ ++ /* Do not allow doublescan modes from user space */ ++ if (mode->flags & DRM_MODE_FLAG_DBLSCAN) { ++ DRM_DEBUG_KMS("[CRTC:%d] Doublescan mode rejected.\n", ++ crtc->base.id); ++ return MODE_NO_DBLESCAN; ++ } + ++ return MODE_OK; + } + + static int vc4_crtc_atomic_check(struct drm_crtc *crtc, +@@ -735,10 +745,11 @@ static const struct drm_crtc_funcs vc4_c + + static const struct drm_crtc_helper_funcs vc4_crtc_helper_funcs = { + .mode_set_nofb = vc4_crtc_mode_set_nofb, +- .atomic_disable = vc4_crtc_disable, +- .atomic_enable = vc4_crtc_enable, ++ .mode_valid = vc4_crtc_mode_valid, + .atomic_check = vc4_crtc_atomic_check, + .atomic_flush = vc4_crtc_atomic_flush, ++ .atomic_enable = vc4_crtc_enable, ++ .atomic_disable = vc4_crtc_disable, + }; + + static const struct of_device_id vc4_firmware_kms_dt_match[] = { -- cgit v1.2.3