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 --- ...e-FKMS-max-refresh-rate-a-module-paramete.patch | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 target/linux/bcm27xx/patches-5.4/950-0859-drm-vc4-Make-FKMS-max-refresh-rate-a-module-paramete.patch (limited to 'target/linux/bcm27xx/patches-5.4/950-0859-drm-vc4-Make-FKMS-max-refresh-rate-a-module-paramete.patch') diff --git a/target/linux/bcm27xx/patches-5.4/950-0859-drm-vc4-Make-FKMS-max-refresh-rate-a-module-paramete.patch b/target/linux/bcm27xx/patches-5.4/950-0859-drm-vc4-Make-FKMS-max-refresh-rate-a-module-paramete.patch new file mode 100644 index 0000000000..bf27d7aa53 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0859-drm-vc4-Make-FKMS-max-refresh-rate-a-module-paramete.patch @@ -0,0 +1,55 @@ +From ff882e312a746a4a794a089e912e5e56baa8b5b4 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 3 Jul 2020 14:11:55 +0100 +Subject: [PATCH] drm/vc4: Make FKMS max refresh rate a module + parameter + +Some people want to use the high refresh rate modes for 1080p100 +and 1080p120, but they're currently filtered out as generally +they don't add anything. + +Make the filter threshold a module parameter so that it can be +adjusted. + +https://github.com/raspberrypi/linux/issues/3677 + +Signed-off-by: Dave Stevenson +--- + drivers/gpu/drm/vc4/vc4_firmware_kms.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +@@ -14,6 +14,8 @@ + * Pi's firmware display stack. + */ + ++#include ++ + #include "drm/drm_atomic_helper.h" + #include "drm/drm_gem_framebuffer_helper.h" + #include "drm/drm_plane_helper.h" +@@ -32,6 +34,10 @@ + #include "vc_image_types.h" + #include + ++int fkms_max_refresh_rate = 85; ++module_param(fkms_max_refresh_rate, int, 0644); ++MODULE_PARM_DESC(fkms_max_refresh_rate, "Max supported refresh rate"); ++ + struct get_display_cfg { + u32 max_pixel_clock[2]; //Max pixel clock for each display + }; +@@ -1069,8 +1075,10 @@ vc4_crtc_mode_valid(struct drm_crtc *crt + return MODE_NO_DBLESCAN; + } + +- /* Disable refresh rates > 85Hz as limited gain from them */ +- if (drm_mode_vrefresh(mode) > 85) ++ /* Disable refresh rates > defined threshold (default 85Hz) as limited ++ * gain from them ++ */ ++ if (drm_mode_vrefresh(mode) > fkms_max_refresh_rate) + return MODE_BAD_VVALUE; + + /* Limit the pixel clock based on the HDMI clock limits from the -- cgit v1.2.3