Merge pull request #2944 from fewtarius/dev

Work on fixing up native rotation.
This commit is contained in:
fewtarius 2024-02-29 20:13:48 -05:00 committed by GitHub
commit 4db6e2097f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 54 additions and 95 deletions

View file

@ -66,13 +66,14 @@ This document describes all available systems emulators and cores available for
|Nintendo|Game &amp; Watch (gameandwatch)|1980|`gameandwatch`|.mgw .zip .7z|**retroarch:** gw<br>**retroarch:** mame<br>|
|Nintendo|Game Boy (gb)|1989|`gb`|.gb .gbc .zip .7z|**retroarch:** gambatte (default)<br>**retroarch:** sameboy<br>**retroarch:** gearboy<br>**retroarch:** tgbdual<br>**retroarch:** mgba<br>**retroarch:** vbam<br>|
|Nintendo|Game Boy (Hacks) (gbh)|1989|`gbh`|.gb .zip .7z|**retroarch:** gambatte (default)<br>**retroarch:** sameboy<br>**retroarch:** gearboy<br>**retroarch:** tgbdual<br>**retroarch:** mgba<br>**retroarch:** vbam<br>|
|Nintendo|Game Boy Advance (gba)|2001|`gba`|.gba .zip .7z|**retroarch:** mgba (default)<br>**retroarch:** gbsp<br>**retroarch:** vbam<br>**retroarch:** vba_next<br>**retroarch:** beetle_gba<br>|
|Nintendo|Game Boy Advance (gba)|2001|`gba`|.gba .zip .7z|**retroarch:** mgba (default)<br>**retroarch:** gbsp<br>**retroarch:** vbam<br>**retroarch:** vba_next<br>**retroarch:** beetle_gba<br>**retroarch:** gpsp<br>**nanoboyadvance:** nanoboyadvance-sa<br>|
|Nintendo|Game Boy Advance (Hacks) (gbah)|2001|`gbah`|.gba .zip .7z|**retroarch:** mgba (default)<br>**retroarch:** gbsp<br>**retroarch:** vbam<br>**retroarch:** vba_next<br>**retroarch:** beetle_gba<br>|
|Nintendo|Game Boy Color (gbc)|1998|`gbc`|.gb .gbc .zip .7z|**retroarch:** gambatte (default)<br>**retroarch:** sameboy<br>**retroarch:** gearboy<br>**retroarch:** tgbdual<br>**retroarch:** mgba<br>**retroarch:** vbam<br>|
|Nintendo|Game Boy Color (Hacks) (gbch)|1998|`gbch`|.gb .gbc .zip .7z|**retroarch:** gambatte (default)<br>**retroarch:** sameboy<br>**retroarch:** gearboy<br>**retroarch:** tgbdual<br>**retroarch:** mgba<br>**retroarch:** vbam<br>|
|Nintendo|GameCube (gamecube)|2001|`gamecube`|.gcm .iso .gcz .ciso .wbfs .rvz .dol|**dolphin:** dolphin-sa-gc (default)<br>**retroarch:** dolphin<br>|
|Nintendo|NES (Hacks) (nesh)|1985|`nesh`|.nes .unif .unf .zip .7z|**retroarch:** nestopia (default)<br>**retroarch:** fceumm<br>**retroarch:** quicknes<br>**retroarch:** mesen<br>|
|Nintendo|Nintendo 64 (n64)|1996|`n64`|.z64 .n64 .v64 .zip .7z|**retroarch:** mupen64plus_next (default)<br>**retroarch:** mupen64plus<br>**retroarch:** parallel_n64<br>**mupen64plus:** mupen64plus-sa<br>|
|Nintendo|Nintendo DS (nds)|2005|`nds`|.nds .zip .7z|**drastic:** drastic-sa (default)<br>**retroarch:** melonds<br>**retroarch:** desmume<br>|
|Nintendo|Nintendo DS (nds)|2005|`nds`|.nds .zip .7z|**drastic:** drastic-sa<br>**retroarch:** melonds (default)<br>**melonds:** melonds-sa<br>**retroarch:** desmume<br>|
|Nintendo|Nintendo Entertainment System (nes)|1985|`nes`|.nes .unif .unf .zip .7z|**retroarch:** nestopia (default)<br>**retroarch:** fceumm<br>**retroarch:** quicknes<br>**retroarch:** mesen<br>|
|Nintendo|Pokémon Mini (pokemini)|2001|`pokemini`|.min .zip .7z|**retroarch:** pokemini (default)<br>|
|Nintendo|Satellaview (satellaview)|1995|`satellaview`|.smc .fig .bs .sfc .bsx .swc .zip .7z|**retroarch:** snes9x (default)<br>**retroarch:** snes9x2010<br>**retroarch:** snes9x2002<br>**retroarch:** snes9x2005_plus<br>|
@ -81,6 +82,7 @@ This document describes all available systems emulators and cores available for
|Nintendo|Super Nintendo (Hacks) (snesh)|1991|`snesh`|.smc .fig .sfc .swc .zip .7z|**retroarch:** snes9x (default)<br>**retroarch:** snes9x2010<br>**retroarch:** snes9x2002<br>**retroarch:** snes9x2005_plus<br>**retroarch:** beetle_supafaust<br>**retroarch:** bsnes_mercury_performance<br>**retroarch:** bsnes<br>**retroarch:** bsnes_hd_beta<br>|
|Nintendo|Super Nintendo (snes)|1991|`snes`|.smc .fig .sfc .swc .zip .7z|**retroarch:** snes9x (default)<br>**retroarch:** snes9x2010<br>**retroarch:** snes9x2002<br>**retroarch:** snes9x2005_plus<br>**retroarch:** beetle_supafaust<br>**retroarch:** bsnes_mercury_performance<br>**retroarch:** bsnes<br>**retroarch:** bsnes_hd_beta<br>|
|Nintendo|Virtual Boy (virtualboy)|1995|`virtualboy`|.vb .zip .7z|**retroarch:** beetle_vb (default)<br>|
|Nintendo|Wii (wii)|2006|`wii`|.gcm .iso .gcz .ciso .wbfs .rvz .dol .wad|**dolphin:** dolphin-sa-wii (default)<br>**retroarch:** dolphin<br>|
|Panasonic|3DO (3do)|1993|`3do`|.iso .bin .chd .cue|**retroarch:** opera (default)<br>|
|Philips|CD-i (cdi)|1991|`cdi`|.chd .cue .iso|**retroarch:** same_cdi (default)<br>|
|Philips|VideoPac (videopac)|1978|`videopac`|.bin .zip .7z|**retroarch:** o2em (default)<br>|
@ -109,7 +111,8 @@ This document describes all available systems emulators and cores available for
|SNK|Neo Geo CD (neocd)|1994|`neocd`|.cue .iso .chd|**retroarch:** neocd (default)<br>**retroarch:** fbneo<br>|
|SNK|Neo Geo Pocket (ngp)|1998|`ngp`|.ngc .ngp .zip .7z|**retroarch:** beetle_ngp (default)<br>**retroarch:** race<br>|
|SNK|Neo Geo Pocket Color (ngpc)|1999|`ngpc`|.ngc .zip .7z|**retroarch:** beetle_ngp (default)<br>**retroarch:** race<br>|
|Sony|PlayStation (psx)|1994|`psx`|.bin .cue .img .mdf .pbp .toc .cbn .m3u .ccd .chd .iso|**retroarch:** duckstation<br>**retroarch:** swanstation<br>|
|Sony|PlayStation (psx)|1994|`psx`|.bin .cue .img .mdf .pbp .toc .cbn .m3u .ccd .chd .iso|**retroarch:** pcsx_rearmed32 (default)<br>**retroarch:** pcsx_rearmed<br>**retroarch:** beetle_psx<br>**duckstation:** duckstation-sa<br>**retroarch:** duckstation<br>**retroarch:** swanstation<br>|
|Sony|PlayStation 2 (ps2)|2000|`ps2`|.iso .mdf .nrg .bin .img .dump .gz .cso .chd|**aethersx2:** aethersx2-sa (default)<br>|
|Sony|PlayStation Portable (psp)|2004|`psp`|.iso .cso .pbp .chd|**ppsspp:** ppsspp-sa (default)<br>|
|Sony|PSP Minis (pspminis)|2004|`pspminis`|.iso .cso .pbp|**ppsspp:** ppsspp-sa (default)<br>**retroarch:** ppsspp<br>|
|Sun Microsystems|J2ME (j2me)|2002|`j2me`|.jar|**retroarch:** freej2me (default)<br>|

View file

@ -1,26 +0,0 @@
[core]
idle-time=0
backend=drm-backend.so
shell=kiosk-shell.so
modules=systemd-notify.so,kiosk-shell-dpms.so
xwayland=true
[output]
name=DSI-1
mode=1080x1920@60.0
transform=rotate-270
[xwayland]
path=/usr/bin/Xwayland
[terminal]
font-size=@WESTONFONTSIZE@
[shell]
background-color=0x00000000
clock-format=minutes-24h
locking=false
[autolaunch]
path=@STARTUP@
watch=true

View file

@ -1,24 +0,0 @@
[core]
idle-time=0
backend=drm-backend.so
xwayland=true
[output]
name=DSI-1
mode=1080x1920@60.0
transform=rotate-270
[xwayland]
path=/usr/bin/Xwayland
[terminal]
font-size=@WESTONFONTSIZE@
[shell]
background-color=0x00000000
clock-format=minutes-24h
locking=false
[launcher]
path=/usr/bin/weston-terminal
icon=/usr/share/weston/terminal.png

View file

@ -59,12 +59,7 @@ post_makeinstall_target() {
cp ${PKG_DIR}/scripts/weston-config ${INSTALL}/usr/lib/weston
mkdir -p ${INSTALL}/usr/share/weston
if [ ${DEVICE} = "RK3588-ACE" ]; then
cp ${PKG_DIR}/config/weston.ini.ace ${INSTALL}/usr/share/weston/weston.ini
cp ${PKG_DIR}/config/kiosk.ini.ace ${INSTALL}/usr/share/weston/kiosk.ini
else
cp ${PKG_DIR}/config/*ini ${INSTALL}/usr/share/weston
fi
safe_remove ${INSTALL}/usr/share/wayland-sessions

View file

@ -5014,7 +5014,7 @@ CONFIG_DVB_SP2=m
# Graphics support
#
CONFIG_DRM=y
CONFIG_DRM_EDID=y
# CONFIG_DRM_EDID is not set
CONFIG_DRM_IGNORE_IOTCL_PERMIT=y
CONFIG_DRM_MIPI_DSI=y
# CONFIG_DRM_DEBUG_MM is not set
@ -5024,7 +5024,7 @@ CONFIG_DRM_KMS_HELPER=y
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_DRM_FBDEV_OVERALLOC=200
# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set
CONFIG_DRM_LOAD_EDID_FIRMWARE=y
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
CONFIG_DRM_DP=y
CONFIG_DRM_DISPLAY_HELPER=y
CONFIG_DRM_DISPLAY_DP_HELPER=y
@ -5049,7 +5049,7 @@ CONFIG_DRM_SCHED=y
# ARM devices
#
# CONFIG_DRM_HDLCD is not set
# CONFIG_DRM_MALI_DISPLAY is not set
CONFIG_DRM_MALI_DISPLAY=y
# CONFIG_DRM_KOMEDA is not set
# end of ARM devices
@ -5059,7 +5059,7 @@ CONFIG_DRM_SCHED=y
# CONFIG_DRM_VGEM is not set
# CONFIG_DRM_VKMS is not set
CONFIG_DRM_ROCKCHIP=y
# CONFIG_ROCKCHIP_DRM_DEBUG is not set
CONFIG_ROCKCHIP_DRM_DEBUG=y
# CONFIG_ROCKCHIP_DRM_DIRECT_SHOW is not set
CONFIG_ROCKCHIP_VOP=y
CONFIG_ROCKCHIP_VOP2=y
@ -5104,7 +5104,7 @@ CONFIG_DRM_PANEL_SIMPLE=y
# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set
# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set
# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set
CONFIG_DRM_PANEL_HIMAX_HX8394=y
# CONFIG_DRM_PANEL_HIMAX_HX8394 is not set
# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set
@ -5195,7 +5195,7 @@ CONFIG_DRM_DISPLAY_CONNECTOR=y
# CONFIG_DRM_RK1000_TVE is not set
# CONFIG_DRM_ROHM_BU18XL82 is not set
# CONFIG_DRM_SIL_SII8620 is not set
CONFIG_DRM_SII902X=y
# CONFIG_DRM_SII902X is not set
# CONFIG_DRM_SII9234 is not set
# CONFIG_DRM_SIMPLE_BRIDGE is not set
# CONFIG_DRM_THINE_THC63LVD1024 is not set
@ -5211,7 +5211,7 @@ CONFIG_DRM_SII902X=y
# CONFIG_DRM_TI_TPD12S015 is not set
# CONFIG_DRM_ANALOGIX_ANX6345 is not set
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
CONFIG_DRM_ANALOGIX_DP=y
# CONFIG_DRM_ANALOGIX_DP is not set
# CONFIG_DRM_ANALOGIX_ANX7625 is not set
# CONFIG_DRM_I2C_ADV7511 is not set
# CONFIG_DRM_CDNS_MHDP8546 is not set
@ -5231,7 +5231,7 @@ CONFIG_DRM_DW_MIPI_DSI=y
# CONFIG_DRM_BOCHS is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_GM12U320 is not set
# CONFIG_DRM_PANEL_MIPI_DBI is not set
CONFIG_DRM_PANEL_MIPI_DBI=y
# CONFIG_DRM_SIMPLEDRM is not set
# CONFIG_TINYDRM_HX8357D is not set
# CONFIG_TINYDRM_ILI9163 is not set
@ -5250,8 +5250,8 @@ CONFIG_DRM_PANFROST=y
# CONFIG_DRM_SSD130X is not set
# CONFIG_DRM_LEGACY is not set
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
CONFIG_DRM_NOMODESET=y
CONFIG_MALI400=y
# CONFIG_DRM_NOMODESET is not set
# CONFIG_MALI400 is not set
CONFIG_MALI450=y
# CONFIG_MALI470 is not set
# CONFIG_MALI400_DEBUG is not set
@ -5335,6 +5335,8 @@ CONFIG_MALI_PRFCNT_SET_PRIMARY=y
# Frame buffer Devices
#
CONFIG_FB_CMDLINE=y
CONFIG_FB_CORE=y
CONFIG_FB_DEVICE=y
CONFIG_FB_NOTIFY=y
CONFIG_FB=y
# CONFIG_FIRMWARE_EDID is not set
@ -5348,7 +5350,7 @@ CONFIG_FB_SYS_IMAGEBLIT=y
CONFIG_FB_SYS_FOPS=y
CONFIG_FB_DEFERRED_IO=y
CONFIG_FB_BACKLIGHT=y
# CONFIG_FB_MODE_HELPERS is not set
CONFIG_FB_MODE_HELPERS=y
# CONFIG_FB_TILEBLITTING is not set
#

View file

@ -74,7 +74,7 @@
WINDOWMANAGER="weston"
# kernel serial console
EXTRA_CMDLINE="rootwait quiet systemd.debug_shell=ttyFIQ0 earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 console=tty0 fbcon=rotate:1 coherent_pool=2M"
EXTRA_CMDLINE="rootwait quiet systemd.debug_shell=ttyFIQ0 earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 console=tty0 coherent_pool=2M fbcon=rotate:1"
# additional packages to install
# ADDITIONAL_PACKAGES=""

View file

@ -12,7 +12,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/Makefile linux/arch/arm64/boo
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/lcd-hx8399c_mipi.dtsi linux/arch/arm64/boot/dts/rockchip/lcd-hx8399c_mipi.dtsi
--- linux.orig/arch/arm64/boot/dts/rockchip/lcd-hx8399c_mipi.dtsi 1970-01-01 00:00:00.000000000 +0000
+++ linux/arch/arm64/boot/dts/rockchip/lcd-hx8399c_mipi.dtsi 2024-02-28 20:29:01.089808951 +0000
@@ -0,0 +1,136 @@
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
+ *
@ -56,7 +56,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/lcd-hx8399c_mipi.dtsi linux/a
+ */
+
+&dsi0 {
+ status = "okay";
+ status = "disabled";
+ //rockchip,lane-rate = <1000>;
+ dsi0_panel: panel@0 {
+ status = "okay";
@ -69,13 +69,14 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/lcd-hx8399c_mipi.dtsi linux/a
+ stbyb-delay-ms = <120>;
+ prepare-delay-ms = <120>;
+ unprepare-delay-ms = <120>;
+ rotation = <90>;
+ disable-delay-ms = <120>;
+ dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
+ MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_EOT_PACKET)>;
+ dsi,format = <MIPI_DSI_FMT_RGB888>;
+ dsi,lanes = <4>;
+ width-mm = <68>;
+ height-mm = <120>;
+ //width-mm = <68>;
+ //height-mm = <120>;
+ panel-init-sequence = [
+ 39 00 04 B9 FF 83 99
+ 15 00 02 D2 77
@ -111,7 +112,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/lcd-hx8399c_mipi.dtsi linux/a
+ hactive = <1080>;
+ vactive = <1920>;
+ hfront-porch = <32>;
+ hsync-len = <8>;
+ hsync-len = <2>;
+ hback-porch = <32>;
+ vfront-porch = <16>;
+ vsync-len = <2>;

View file

@ -1,19 +1,21 @@
diff -rupN linux.orig/Makefile linux/Makefile
--- linux.orig/Makefile 2024-02-20 15:29:33.987442662 +0000
+++ linux/Makefile 2024-02-20 16:30:19.099604354 +0000
@@ -568,7 +568,7 @@ LINUXINCLUDE := \
diff --git a/Makefile b/Makefile
index 7a238e4b489..c6fb4486752 100644
--- a/Makefile
+++ b/Makefile
@@ -518,7 +518,7 @@ LINUXINCLUDE := \
KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
- -Werror=implicit-function-declaration -Werror=implicit-int \
+ -Werror=implicit-int \
-Werror=return-type -Wno-format-security \
-std=gnu11
-std=gnu89
KBUILD_CPPFLAGS := -D__KERNEL__
diff -rupN linux.orig/drivers/gpu/drm/panel/Kconfig linux/drivers/gpu/drm/panel/Kconfig
--- linux.orig/drivers/gpu/drm/panel/Kconfig 2024-02-20 15:29:34.639464011 +0000
+++ linux/drivers/gpu/drm/panel/Kconfig 2024-02-20 16:20:00.804814361 +0000
@@ -154,6 +154,15 @@ config DRM_PANEL_FEIYANG_FY07024DI26A30D
diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
index b9ecfffd9b0..62a52ccfe48 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -97,6 +97,15 @@ config DRM_PANEL_FEIYANG_FY07024DI26A30D
Say Y if you want to enable support for panels based on the
Feiyang FY07024DI26A30-D MIPI-DSI interface.
@ -29,21 +31,24 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/Kconfig linux/drivers/gpu/drm/panel/
config DRM_PANEL_ILITEK_IL9322
tristate "Ilitek ILI9322 320x240 QVGA panels"
depends on OF && SPI
diff -rupN linux.orig/drivers/gpu/drm/panel/Makefile linux/drivers/gpu/drm/panel/Makefile
--- linux.orig/drivers/gpu/drm/panel/Makefile 2024-02-20 15:29:34.639464011 +0000
+++ linux/drivers/gpu/drm/panel/Makefile 2024-02-20 16:16:03.525879814 +0000
@@ -13,6 +13,7 @@ obj-$(CONFIG_DRM_PANEL_EBBG_FT8719) += p
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
index 833f3b52a9c..124445aba3f 100644
--- a/drivers/gpu/drm/panel/Makefile
+++ b/drivers/gpu/drm/panel/Makefile
@@ -8,6 +8,7 @@ obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o
obj-$(CONFIG_DRM_PANEL_ELIDA_KD35T133) += panel-elida-kd35t133.o
obj-$(CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02) += panel-feixin-k101-im2ba02.o
obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) += panel-feiyang-fy07024di26a30d.o
+obj-$(CONFIG_DRM_PANEL_HIMAX_HX8394) += panel-himax-hx8394.o
obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o
obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9341) += panel-ilitek-ili9341.o
obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o
diff -rupN linux.orig/drivers/gpu/drm/panel/panel-himax-hx8394.c linux/drivers/gpu/drm/panel/panel-himax-hx8394.c
--- linux.orig/drivers/gpu/drm/panel/panel-himax-hx8394.c 1970-01-01 00:00:00.000000000 +0000
+++ linux/drivers/gpu/drm/panel/panel-himax-hx8394.c 2024-02-20 16:14:26.146716456 +0000
@@ -0,0 +1,697 @@
obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o
diff --git a/drivers/gpu/drm/panel/panel-himax-hx8394.c b/drivers/gpu/drm/panel/panel-himax-hx8394.c
new file mode 100644
index 00000000000..f2ec6200484
--- /dev/null
+++ b/drivers/gpu/drm/panel/panel-himax-hx8394.c
@@ -0,0 +1,700 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Driver for panels based on Himax HX8394 controller, such as:
@ -117,6 +122,7 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-himax-hx8394.c linux/drivers/g
+ struct gpio_desc *reset_gpio;
+ struct regulator *vcc;
+ struct regulator *iovcc;
+
+ enum drm_panel_orientation orientation;
+
+ const struct hx8394_panel_desc *desc;
@ -610,6 +616,9 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-himax-hx8394.c linux/drivers/g
+ struct hx8394 *ctx = panel_to_hx8394(panel);
+ struct drm_display_mode *mode;
+
+ connector->display_info.width_mm = mode->width_mm;
+ connector->display_info.height_mm = mode->height_mm;
+
+ mode = drm_mode_duplicate(connector->dev, ctx->desc->mode);
+ if (!mode) {
+ dev_err(ctx->dev, "Failed to add mode %ux%u@%u\n",
@ -621,8 +630,7 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-himax-hx8394.c linux/drivers/g
+ drm_mode_set_name(mode);
+
+ mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
+ connector->display_info.width_mm = mode->width_mm;
+ connector->display_info.height_mm = mode->height_mm;
+
+ drm_mode_probed_add(connector, mode);
+
+ return 1;