* Pi's firmware display stack.
*/
+#include <linux/module.h>
+
#include "drm/drm_atomic_helper.h"
#include "drm/drm_gem_framebuffer_helper.h"
#include "drm/drm_plane_helper.h"
#include "vc_image_types.h"
#include <soc/bcm2835/raspberrypi-firmware.h>
+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
};
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