1080 x 1920 LCD 해상도 설정 문의

Post Reply
freebird1999
Posts: 5
Joined: Fri Sep 04, 2020 3:24 pm
languages_spoken: korean
ODROIDs: xu4
Has thanked: 0
Been thanked: 0
Contact:

1080 x 1920 LCD 해상도 설정 문의

Post by freebird1999 »

Odroid c4에서 HDMI 출력으로 1080 * 1920 LCD를 동작시키려고 합니다.
LCD는 mipi 변환보드를 통해 아래 구조 처럼 연결되는데요.

Odoird C4 ---HDMI---> HDMI to MiPi converter Driver board --->MiPi---> 1080*1920 LCD

display_autodetect "false" 상태로 설정 한 후 해상도 설정하고 동작 시키면 LCD에서 화면은 나오지만 검정 화면이 표시되지 않고 있습니다.
(LCD화면은 해상도에 맞게 나오지만 노이즈가 들어간 것처럼 깨끗하게 표현되지 않아 보입니다)

이러한 문제를 해결하기 위한 방법으로 어떻게 하면 좋을지 문의드립니다.

참고로 boot.ini 설정 코드는 아래와 같습니다.


Code: Select all

ODROIDC4-UBOOT-CONFIG
 
# Default Console Device Setting
setenv condev "console=ttyS0,115200n8"   # on both
 
# Auto Detection of Monitor settings based on your Screen information
setenv display_autodetect "false"

# HDMI Mode
# Resolution Configuration
#    Symbol             | Resolution
# ----------------------+-------------
#    "480x272p60hz"     | 480x272 Progressive 60Hz
#    "480x320p60hz"     | 480x320 Progressive 60Hz
#    "480p60hz"         | 720x480 Progressive 60Hz
#    "576p50hz"         | 720x576 Progressive 50Hz
#    "720p60hz"         | 1280x720 Progressive 60Hz
#    "720p50hz"         | 1280x720 Progressive 50Hz
#    "1080p60hz"        | 1920x1080 Progressive 60Hz
#    "1080p50hz"        | 1920x1080 Progressive 50Hz
#    "1080p30hz"        | 1920x1080 Progressive 30Hz
#    "1080p24hz"        | 1920x1080 Progressive 24Hz
#    "1080i60hz"        | 1920x1080 Interlaced 60Hz
#    "1080i50hz"        | 1920x1080 Interlaced 50Hz
#    "2160p60hz"        | 3840x2160 Progressive 60Hz
#    "2160p50hz"        | 3840x2160 Progressive 50Hz
#    "2160p30hz"        | 3840x2160 Progressive 30Hz
#    "2160p25hz"        | 3840x2160 Progressive 25Hz
#    "2160p24hz"        | 3840x2160 Progressive 24Hz
#    "smpte24hz"        | 3840x2160 Progressive 24Hz SMPTE
#    "2160p60hz420"     | 3840x2160 Progressive 60Hz YCbCr 4:2:0
#    "2160p50hz420"     | 3840x2160 Progressive 50Hz YCbCr 4:2:0
#    "640x480p60hz"     | 640x480 Progressive 60Hz
#    "800x480p60hz"     | 800x480 Progressive 60Hz
#    "800x600p60hz"     | 800x600 Progressive 60Hz
#    "1024x600p60hz"    | 1024x600 Progressive 60Hz
#    "1024x768p60hz"    | 1024x768 Progressive 60Hz
#    "1280x800p60hz"    | 1280x800 Progressive 60Hz
#    "1280x1024p60hz"   | 1280x1024 Progressive 60Hz
#    "1360x768p60hz"    | 1360x768 Progressive 60Hz
#    "1440x900p60hz"    | 1440x900 Progressive 60Hz
#    "1600x900p60hz"    | 1600x900 Progressive 60Hz
#    "1600x1200p60hz"   | 1600x1200 Progressive 60Hz
#    "1680x1050p60hz"   | 1680x1050 Progressive 60Hz
#    "1920x1200p60hz"   | 1920x1200 Progressive 60Hz
#    "2560x1080p60hz"   | 2560x1080 Progressive 60Hz
#    "2560x1440p60hz"   | 2560x1440 Progressive 60Hz
#    "2560x1600p60hz"   | 2560x1600 Progressive 60Hz
#    "3440x1440p60hz"   | 3440x1440 Progressive 60Hz

setenv hdmimode "1080p50hz"
 
# Monitor output
# Controls if HDMI PHY should output anything to the monitor
setenv monitor_onoff "false" # true or false
 
# Overscan percentage
# This value scales down the actual screen size by the percentage below
# valid range is 80 to 100
setenv overscan "100"
 
### voutmode : hdmi or dvi
setenv voutmode "hdmi"
# setenv voutmode "dvi"
 
# HPD enable/disable option
setenv disablehpd "false"
 
# Hardkernel ODROID-VU7 support
# By default VU7 support is disabled
setenv disable_vu7 "true"
# setenv disable_vu7 "false"
 
# max cpu frequency for little core, A55 in MHz unit
# setenv max_freq_a55 "2100"  # 2.100 GHz (overclock)
# setenv max_freq_a55 "2016"  # 2.016 GHz (overclock)
setenv max_freq_a55 "1908"  # 1.908 GHz, default value
# setenv max_freq_a55 "1800"  # 1.800 GHz
 
# max cpu-cores
# Note:
# CPU's 0 and 1 are the A55 (small cores)
setenv maxcpus "4"
 
### Normal HDMI Monitors
if test "${display_autodetect}" = "true"; then hdmitx edid; fi
if test "${hdmimode}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi
 
# VU7 Settings
if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef:0x0005:0x0004"; fi
 
# Boot Args
setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a55=${max_freq_a55} maxcpus=${maxcpus} voutmode=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan} ${hid_quirks} monitor_onoff=${monitor_onoff} usb-xhci.tablesize=2 logo=osd0,loaded"
 
# Set load addresses
setenv dtb_loadaddr "0x1000000"
setenv k_addr "0x1100000"
setenv loadaddr "0x1B00000"
setenv initrd_loadaddr "0x3700000"
 
# Load kernel, dtb and initrd
fatload mmc ${devno}:1 ${k_addr} Image.gz
fatload mmc ${devno}:1 ${dtb_loadaddr} meson64_odroidc4.dtb
fatload mmc ${devno}:1 ${initrd_loadaddr} uInitrd
fdt addr ${dtb_loadaddr}
# unzip the kernel
unzip ${k_addr} ${loadaddr}
 
# boot
booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}

User avatar
odroid
Site Admin
Posts: 37281
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1747 times
Been thanked: 1127 times
Contact:

Re: 1080 x 1920 LCD 해상도 설정 문의

Post by odroid »

사진을 찍어서 올려주시면 어떤 상황인지 이해하기 쉬을듯 합니다.
그런데 LCD의 고유 해상도는 1080x1920(Portrait type)인데, 'HDMI to MiPi converter Driver board'라는 것이 1920x1080(Landscape type)으로 변경해주나요?

만약 최종 해상도가 여전히 1080x1920이라면 최신 안드로이드 이미지로 테스트 해보시길 바랍니다.
viewtopic.php?f=205&t=41359

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 179 times
Been thanked: 210 times
Contact:

Re: 1080 x 1920 LCD 해상도 설정 문의

Post by joy »

안녕하세요.

N2/C4 우분투 이미지에서 몇몇 세로 모드에서 화면이 흔들리고 전체적으로 노이즈가 끼는 문제가 있습니다.
우선 1080x1920 모드에서는 아래의 workaround로 화면이 정상적으로 나오니 적용하여 테스트해 보시기 바랍니다.

참고로, 안드로이드 이미지에서는 수정없이 display_autodetect=true 옵션으로 화면이 정상적으로 나옵니다.

viewtopic.php?p=325680#p325680

1. modeline 타이밍 수정
최신 우분투 이미지의 BOOT 파티션에 있는 config.ini 파일의 display_autodetect와 hdmimode을 수정하고
modeline 부분을 추가해 주세요.

Code: Select all

; Auto Detection of Monitor settings based on your Screen information
display_autodetect=false

hdmimode=custombuilt

modeline=1080,1920,154000,116148,60,1080,1112,1144,1325,1920,1928,1932,1936,0,0,1
이후 시스템을 재부팅하시기 바랍니다.

2. osd 문제 관련 커널 패치 적용
C4 커널 빌드가 가능하신 환경이라면 아래의 커널 패치를 적용 후에 테스트해 보시기 바랍니다.
해당 commit은 HK Github에 추후 merge될 것이고 새로운 커널 패키지 배포시에 포함될 것입니다.

Code: Select all

From 999a027ee1f4c030b58765d4f6e0a198e2bed53f Mon Sep 17 00:00:00 2001
From: Joy Cho <joy.cho@hardkernel.com>
Date: Tue, 02 Mar 2021 16:49:38 +0900
Subject: [PATCH] ODROID-COMMON: osd: Update osd for portrait modes

Change-Id: Ibc0ba560d9db8875e9d676dee8511fc29cd09a51
---

diff --git a/drivers/amlogic/media/osd/osd_fb.c b/drivers/amlogic/media/osd/osd_fb.c
index 850090f..e9fba58 100644
--- a/drivers/amlogic/media/osd/osd_fb.c
+++ b/drivers/amlogic/media/osd/osd_fb.c
@@ -665,7 +665,8 @@
 		    var->transp.length, var->transp.offset);
 	fix->visual = color_format_pt->color_type;
 	/* adjust memory length. */
-	fix->line_length = var->xres_virtual * var->bits_per_pixel / 8;
+	fix->line_length =
+		CANVAS_ALIGNED(var->xres_virtual * var->bits_per_pixel / 8);
 	osd_log_dbg(MODULE_BASE, "xvirtual=%d, bpp:%d, line_length=%d\n",
 		var->xres_virtual, var->bits_per_pixel, fix->line_length);
 
@@ -4473,7 +4474,7 @@
 				(fbdev->color->color_index > 16 ?
 				(fbdev->color->color_index > 24 ?
 				 4 : 3) : 2) : 1);
-		fix->line_length = var->xres_virtual * bpp;
+		fix->line_length = CANVAS_ALIGNED(var->xres_virtual * bpp);
 		fix->smem_start = fbdev->fb_mem_paddr;
 		fix->smem_len = fbdev->fb_len;
 		if (fb_alloc_cmap(&fbi->cmap, 16, 0) != 0) {
diff --git a/drivers/amlogic/media/osd/osd_hw.c b/drivers/amlogic/media/osd/osd_hw.c
index 88c53af..0c58173 100644
--- a/drivers/amlogic/media/osd/osd_hw.c
+++ b/drivers/amlogic/media/osd/osd_hw.c
@@ -585,7 +585,6 @@
 s64 timestamp[VIU_COUNT];
 
 static unsigned int osd_h_filter_mode = 1;
-#define CANVAS_ALIGNED(x)	(((x) + 31) & ~31)
 #define BYTE_32_ALIGNED(x)	(((x) + 31) & ~31)
 #define BYTE_16_ALIGNED(x)	(((x) + 15) & ~15)
 #define BYTE_8_ALIGNED(x)	(((x) + 7) & ~7)
@@ -2892,7 +2891,7 @@
 		else {
 			canvas_config(osd_hw.fb_gem[index].canvas_idx,
 				osd_hw.fb_gem[index].addr,
-				osd_hw.fb_gem[index].width,
+				CANVAS_ALIGNED(osd_hw.fb_gem[index].width),
 				osd_hw.fb_gem[index].height,
 				CANVAS_ADDR_NOWRAP, CANVAS_BLKMODE_LINEAR);
 		}
@@ -4330,7 +4329,7 @@
 	if (!osd_hw.osd_afbcd[index].enable) {
 		canvas_config(osd_hw.fb_gem[index].canvas_idx,
 			ext_addr,
-			fence_map->byte_stride,
+			CANVAS_ALIGNED(fence_map->byte_stride),
 			fence_map->height,
 			CANVAS_ADDR_NOWRAP, CANVAS_BLKMODE_LINEAR);
 		osd_hw.screen_base[index] = ext_addr;
@@ -4683,7 +4682,8 @@
 
 				canvas_config(osd_hw.fb_gem[index].canvas_idx,
 					osd_hw.fb_gem[index].addr,
-					osd_hw.fb_gem[index].width,
+					CANVAS_ALIGNED(
+						osd_hw.fb_gem[index].width),
 					osd_hw.fb_gem[index].height,
 					CANVAS_ADDR_NOWRAP,
 					CANVAS_BLKMODE_LINEAR);
@@ -8796,7 +8796,7 @@
 	if (!osd_hw.osd_afbcd[index].enable)
 		canvas_config(osd_hw.fb_gem[index].canvas_idx,
 			osd_hw.fb_gem[index].addr,
-			osd_hw.fb_gem[index].width,
+			CANVAS_ALIGNED(osd_hw.fb_gem[index].width),
 			osd_hw.fb_gem[index].height,
 			CANVAS_ADDR_NOWRAP,
 			CANVAS_BLKMODE_LINEAR);
@@ -8838,7 +8838,7 @@
 	if (!osd_hw.osd_afbcd[index].enable)
 		canvas_config(osd_hw.fb_gem[index].canvas_idx,
 			osd_hw.fb_gem[index].addr,
-			osd_hw.fb_gem[index].width,
+			CANVAS_ALIGNED(osd_hw.fb_gem[index].width),
 			osd_hw.fb_gem[index].height,
 			CANVAS_ADDR_NOWRAP,
 			CANVAS_BLKMODE_LINEAR);
@@ -10323,7 +10323,7 @@
 		for (i = 0; i < osd_hw.osd_meson_dev.osd_count; i++)
 		canvas_config(osd_hw.fb_gem[i].canvas_idx,
 			osd_hw.fb_gem[i].addr,
-			osd_hw.fb_gem[i].width,
+			CANVAS_ALIGNED(osd_hw.fb_gem[i].width),
 			osd_hw.fb_gem[i].height,
 			CANVAS_ADDR_NOWRAP, CANVAS_BLKMODE_LINEAR);
 	}
@@ -10665,7 +10665,7 @@
 	} else {
 		canvas_config(osd_hw.fb_gem[index].canvas_idx,
 			phy_addr,
-			plane_map->byte_stride,
+			CANVAS_ALIGNED(plane_map->byte_stride),
 			plane_map->src_h,
 			CANVAS_ADDR_NOWRAP, CANVAS_BLKMODE_LINEAR);
 	}
@@ -10914,7 +10914,7 @@
 		plane_map->byte_stride * plane_map->src_h;
 	canvas_config(osd_hw.fb_gem[index].canvas_idx,
 		phy_addr,
-		plane_map->byte_stride,
+		CANVAS_ALIGNED(plane_map->byte_stride),
 		plane_map->src_h,
 		CANVAS_ADDR_NOWRAP, CANVAS_BLKMODE_LINEAR);
 
diff --git a/drivers/amlogic/media/osd/osd_hw.h b/drivers/amlogic/media/osd/osd_hw.h
index b043cef..d4ec6a0 100644
--- a/drivers/amlogic/media/osd/osd_hw.h
+++ b/drivers/amlogic/media/osd/osd_hw.h
@@ -23,6 +23,7 @@
 #include "osd_sync.h"
 #include "osd_drm.h"
 
+#define CANVAS_ALIGNED(x) (((x) + 63) & ~63)
 #define MAX_HOLD_LINE     0x1f
 #define MIN_HOLD_LINE     0x04
 #define VIU1_DEFAULT_HOLD_LINE  0x08
테스트 해보시고 필요한 부분 있으시면 말씀해 주세요.
Attachments
0001_odroidg12_fix_osd_noise_for_portraitmode.diff.zip
(1.54 KiB) Downloaded 3 times

Post Reply

Return to “C4/HC4”

Who is online

Users browsing this forum: No registered users and 1 guest