HDMI Resolutions testing


#106

I tried your last patch. It does work!!! All resolutions work with “full list HDMI” patch!
Only 800x480 has a bug. It does not work on full screen. I got this trouble after first VESA patch. You probably remember it.

It look like 720x576… What do you think about?
1111


#107

Please provide the logcat for me.

adb shell logcat -s SystemControl

#108

It is realy 720, but 720x480, not 720x576!!!

My log:

10-12 15:38:40.045 4093 7156 I SystemControl: [ubootenv] update_bootenv_varible name [ubootenv.var.is.bestmode]: value [false]
10-12 15:38:40.247 4093 4211 I SystemControl: hdcp_tx 2.2 & 1.4 stop hdcp pwr
10-12 15:38:40.291 4093 4211 I SystemControl: hdcp_tx pthread exit id = 533324624976, (null) done
10-12 15:38:40.291 4093 4211 I SystemControl: get color attr from ubootenv.var.800x480p60hz_deepcolor When is not best mode
10-12 15:38:40.312 4093 4211 I SystemControl: get hdmi color attribute : [444,8bit], outputmode is: [800x480p60hz] , and support color list is: [rgb,8bit]
10-12 15:38:40.312 4093 4211 I SystemControl: set DeepcolorAttr value is different from attr sysfs value
10-12 15:38:40.399 4093 4211 I SystemControl: setMboxOutputMode colorAttribute = 444,8bit
10-12 15:38:40.399 4093 4211 I SystemControl: [ubootenv] update_bootenv_varible name [ubootenv.var.800x480p60hz_deepcolor]: value [444,8bit]
10-12 15:38:40.399 4093 4211 I SystemControl: [ubootenv] update_bootenv_varible name [ubootenv.var.colorattribute]: value [444,8bit]
10-12 15:38:40.402 4093 4211 I SystemControl: [ubootenv] Save ubootenv to /dev/block/env succeed!
10-12 15:38:40.716 4093 4211 I SystemControl: setMboxOutputMode cvbsMode = 0
10-12 15:38:40.852 4093 7157 I SystemControl: hdcp_tx thread loop entry
10-12 15:38:40.852 4093 4211 I SystemControl: hdcp_tx, create hdcp thread id = 533324624976 done
10-12 15:38:40.853 4093 7157 I SystemControl: hdcp_tx key:00
10-12 15:38:40.876 4093 4211 I SystemControl: set osd mouse x:0 y:0 w:720 h:480
10-12 15:38:40.910 4093 4211 I SystemControl: [ubootenv] update_bootenv_varible name [ubootenv.var.800x480p60hz_x]: value [0]
10-12 15:38:40.910 4093 4211 I SystemControl: [ubootenv] update_bootenv_varible name [ubootenv.var.800x480p60hz_y]: value [0]
10-12 15:38:40.910 4093 4211 I SystemControl: [ubootenv] update_bootenv_varible name [ubootenv.var.800x480p60hz_w]: value [720]
10-12 15:38:40.910 4093 4211 I SystemControl: [ubootenv] update_bootenv_varible name [ubootenv.var.800x480p60hz_h]: value [480]
10-12 15:38:40.910 4093 4211 I SystemControl: [ubootenv] update_bootenv_varible name [ubootenv.var.outputmode]: value [800x480p60hz]
10-12 15:38:40.912 4093 4211 I SystemControl: [ubootenv] Save ubootenv to /dev/block/env succeed!
10-12 15:38:40.912 4093 4211 I SystemControl: [ubootenv] update_bootenv_varible name [ubootenv.var.hdmimode]: value [800x480p60hz]
10-12 15:38:40.914 4093 4211 I SystemControl: [ubootenv] Save ubootenv to /dev/block/env succeed!
10-12 15:38:40.914 4093 4211 I SystemControl: set output mode:800x480p60hz done

Full log with all resolutions I sent on your email.


#109

I think you forgot to modify the file vendor/amlogic/frameworks/services/systemcontrol/DisplayMode.cpp

diff --git a/services/systemcontrol/DisplayMode.cpp b/services/systemcontrol/DisplayMode.cpp
index 8c3ca24..a416859 100644
--- a/services/systemcontrol/DisplayMode.cpp
+++ b/services/systemcontrol/DisplayMode.cpp
@@ -1416,7 +1457,7 @@ void DisplayMode::setOsdMouse(int x, int y, int w, int h) {
         pSysWrite->writeSysfs(DISPLAY_FB1_SCALE, "0");
     }
 
-    if (strstr(cur_mode, "480")) {
+    if (!strncmp(cur_mode, "480", 3)) {
         strcpy(keyValue, strstr(cur_mode, MODE_480P_PREFIX) ? MODE_480P_PREFIX : MODE_480I_PREFIX);
     } else if (strstr(cur_mode, "576")) {
         strcpy(keyValue, strstr(cur_mode, MODE_576P_PREFIX) ? MODE_576P_PREFIX : MODE_576I_PREFIX);
@@ -1473,7 +1514,7 @@ void DisplayMode::getPosition(const char* curMode, int *position) {
     char ubootvar[100] = {0};
     int defaultWidth = 0;
     int defaultHeight = 0;
-    if (strstr(curMode, "480")) {
+    if (!strncmp(curMode, "480", 3)) {
         strcpy(keyValue, strstr(curMode, MODE_480P_PREFIX) ? MODE_480P_PREFIX : MODE_480I_PREFIX);
         defaultWidth = FULL_WIDTH_480;
         defaultHeight = FULL_HEIGHT_480;
@@ -1580,7 +1621,7 @@ void DisplayMode::setPosition(int left, int top, int width, int height) {
 
     char keyValue[20] = {0};
     char ubootvar[100] = {0};
-    if (strstr(curMode, "480")) {
+    if (!strncmp(curMode, "480", 3)) {
         strcpy(keyValue, strstr(curMode, MODE_480P_PREFIX) ? MODE_480P_PREFIX : MODE_480I_PREFIX);
     } else if (strstr(curMode, "576")) {
         strcpy(keyValue, strstr(curMode, MODE_576P_PREFIX) ? MODE_576P_PREFIX : MODE_576I_PREFIX);

#111

I checked it. I did this modifications.
But my source code (VIM1) still have:

if (strstr(mDefaultUI, “480”)) {

I modif it:

if (!strncmp(mDefaultUI, “480”, 3))

And it does work!!!

Thank you, terry!!!
We have naitive resolutions now!!! It is cool!!!

We need VESA patch for VIM2. Please give it.


#112

I still don’t test it on VIM2. I will check it in few days. Maybe something such as config of PLL register need to be fixuped by amlogic. We need more time to push it.
Thanks.


#113

I have a TV with 720p resolution. After I plug my Khadas VIM2 in ths TV it don’t accept more the PS3 resolution. Help-me.


#114

I don’t understand what you mean. Can you kindly explain more?


#115

Of course (but first sorry my bad english, I am a brazilian guy with poor english). So, I connect the Khadas VIM2 in my 720P television with success at 1080P (I don’t know how). After this I power up my PS3 at the same or other HDMI connector of this TV and the image of PS3 (that was OK before) can’t be appear in the TV. When I ask the TV resolution it show me 1080P (remember that the TV resolution its only 720P) so I think that the old HDMI controller of TV plus the HDMI controller of PS3 has a mistake configuration after the Kadhas 1080P connection. I try other Android Tablet with 720P HDMI out and it is OK, but the PS3 don’t show any image anymore. The actual PS3 image in this TV it is a full green screen or trash rainbon only. My question is: Is possible change the Khadas VIM2 (64GB) to 1280 x 720 pixels native TV resolution ?


#116

The VIM can be changed to the native resolution output. But I still don’t test it on VIM2.
Of course, I will check it in few days.
Now you can try to modify the file /system/etc/mesondisplay.cfg with WI-FI adb command.

# adb connect IP_ADDR
# adb root
# adb remount
# adb shell
# vi /system/etc/mesondisplay.cfg 

// modify file 
---    MBOX meson8m2 1080p
+++    MBOX meson8m2 720p

# adb sync
# adb reboot

#117

This configuration set the resolution to 1280x720 pixels or 720x480 pixels ?
Is possible change the width and heigth configuration at the same time or this parameter follow any padronization ?
Thanks for while.


#118

It set the resolution to 1280x720 pixels.

I didn’t quite understand what you mean. what do you want to do?


#119

Hi, terry!

Please give us the VESA patch for VIM2.

PS: VESA resolutions work perfect on VIM1! Thank you!


#120

Yes, I need more time. :grinning:


#121

Nougat VIM1 + VESA 1280x800 + volume & media buttons = work perfect! :slight_smile:


#122

Hi, terry!
What is new on VIM2_Nougat_V171028?
And How to get VESA path for VIM2?


#123

Terry, Do you forgot us?


#124

Do you need to use native UI resolution? The VIM2 also work on VESA mode with 1080p UI resolution.


#125

Yes, we need native UI resolution on VIM2, like on VIM1.


#126

Hello!

I try to use Khadas Vim (android) with HDMI to VGA adapter. In list of HDMI resolutions I see only 1080p-60Hz and 720p-60Hz, but actually I need 480p-60Hz. How to make it possible to choose the resolution directly, and not from the list of possible?