mirror of
https://github.com/Fishwaldo/build.git
synced 2025-07-24 05:48:41 +00:00
* patch: kernel: rockchip-dev: Handle more resolutions with HDMI (β) The added patch add more PLL configurations, in order to satisfy more HDMI frequencies requirements. This should allow users to benefit from more resolutions. However, this is fairly untested. I only tested it on my 1080p screen and, yeah, it works but so does the kernel without this patch. Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr> * patch: kernel: rockchip-dev: Handle more resolutions with HDMI (β) Now with proper patches names. Anyway : The added patch add more PLL configurations, in order to satisfy more HDMI frequencies requirements. This should allow users to benefit from more resolutions. However, this is fairly untested. I only tested it on my 1080p screen and, yeah, it works but it also does without this patch. So could anyone test this with the following configurations ? * [ ] A HDMI 4K screen * [ ] A HDMI 1366x768 screen resolution * [ ] A VGA screen with a VGA to HDMI adapter * [ ] A DVI screen with a DVI to HDMI adapter Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr> * Using the patches provided by @Kwiboo for HDMI This provides me way more resolutions, including interlaced modes. I don't see 4K modes, though the screen attached can't do it, so I still don't know if that can help provided 4K modes on mainline kernels. Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr> * Support for 4K screens Using fixes provided by @czak Tested and approved by @czak too ! Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
From 5b99ce41a35e7ddd0d4681990613ec9195a5acc0 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?=C5=81ukasz?= <lukasz@czak.pl>
|
|
Date: Thu, 7 May 2020 11:54:26 +0200
|
|
Subject: [PATCH 2/3] Use 340000 as fallback max_tmds_clock
|
|
|
|
If connector->display_info->max_tmds_clock is 0, fall back to 340000.
|
|
|
|
If it is > 0 though, shouldn't it take priority, and instead of max be
|
|
`min(info->max_tmds_clock, 165000)`?
|
|
---
|
|
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 7 +++++--
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
|
index 955fc3cf4..f95cdc53a 100644
|
|
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
|
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
|
@@ -220,14 +220,17 @@ dw_hdmi_rockchip_mode_valid(struct drm_connector *connector,
|
|
const struct drm_display_mode *mode)
|
|
{
|
|
struct drm_display_info *info = &connector->display_info;
|
|
- int max_tmds_clock = max(info->max_tmds_clock, 165000);
|
|
+ int max_tmds_clock = info->max_tmds_clock > 0 ?
|
|
+ max(info->max_tmds_clock, 165000) :
|
|
+ 340000;
|
|
+
|
|
int clock = mode->clock;
|
|
|
|
if (connector->ycbcr_420_allowed && drm_mode_is_420(info, mode) &&
|
|
(info->color_formats & DRM_COLOR_FORMAT_YCRCB420))
|
|
clock /= 2;
|
|
|
|
- if (clock > max_tmds_clock || clock > 340000)
|
|
+ if (clock > max_tmds_clock)
|
|
return MODE_CLOCK_HIGH;
|
|
|
|
return MODE_OK;
|
|
--
|
|
2.26.2
|
|
|