mirror of
https://github.com/Fishwaldo/build.git
synced 2025-07-17 10:28:35 +00:00
Fix for 4k monitors to limit down screen resolution from auto detected 4k down to 2k since older Allwinner devices can't display it.
https://forum.armbian.com/index.php/topic/2864-h3-u-boot-hdmi-driver/?p=20981
This commit is contained in:
parent
b8b7fa15c1
commit
1bf75eda2d
1 changed files with 20 additions and 0 deletions
|
@ -0,0 +1,20 @@
|
|||
diff --git a/drivers/video/sunxi_display.c b/drivers/video/sunxi_display.c
|
||||
index 6f8ee01..7c12a66 100644
|
||||
--- a/drivers/video/sunxi_display.c
|
||||
+++ b/drivers/video/sunxi_display.c
|
||||
@@ -1406,8 +1406,12 @@ void *video_hw_init(void)
|
||||
ret = sunxi_hdmi_hpd_detect(hpd_delay);
|
||||
if (ret) {
|
||||
printf("HDMI connected: ");
|
||||
- if (edid && sunxi_hdmi_edid_get_mode(&custom) == 0)
|
||||
- mode = &custom;
|
||||
+ if (edid && sunxi_hdmi_edid_get_mode(&custom) == 0) {
|
||||
+ if((custom.xres <= 1920) && (custom.yres <= 1080))
|
||||
+ mode = &custom;
|
||||
+ else
|
||||
+ mode = &res_mode_init[RES_MODE_1920x1080];
|
||||
+ }
|
||||
} else if (hpd) {
|
||||
sunxi_hdmi_shutdown();
|
||||
sunxi_display.monitor = sunxi_get_default_mon(false);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue