HDMI Resolutions testing

Hi, Folks:
We are working for more HDMI output resolutions supporting, but we need monitors for the testing. So if you happen to own a thus monitor and willing the assistant us for the testing, please provide following information:

  • The resolution of your monitor
  • Is it HDMI supported?
  • The model of your monitor
  • Which OS do you prefer for the testing? Ubuntu or Android?

@davemf @EcoChav


Hi, Gouwa.

I have N070ICG-LD1 with 1280x800 pix and at070tn90 with 800x480pix (not work now).
My fiends has HV070WSA with 1024x600 and n101bcg-l21 with 1366x768.
This display has hdmi.

We use android system only on our carpc.

I am willing to test, i have aoc I2269VWM, 1920x1080 is the max resolution, it supports HDMI, i would like to test Ubuntu.

Hi, Gouwa.

  • 800x480
  • HDMI
  • 6.5 inch INNOLUX AT065TN14
  • Android

Hi Gouwa:

Viewsonic VX 2778-SMHD. Native resolution 2560x1440. HDMI. Android preferred.

Hi, following are the test instructions for Ubuntu(Terry will provide Android ROM):

  1. Upgrade to latest Ubuntu ROM V170220

  2. Download the ramdisk images for specified HDMI resolutions.

  3. Follow the U-Boot usage guidance to upgrade the new ramdisk:

kvim# usb_update ramdisk ramdisk_1366x768p60hz.img
  1. Reboot and check the HDMI output resolution(System --> Preferences --> Hardware --> Displays):

Any testing feedback are welcome!


We need source, not ROM.

Yes, Terry will provide the source code then.

1 Like

Hi Gouwa,

  • 1440x900
  • HDMI -> DVI
  • 19 inch Dell E198WFP
  • Android

I thought you will give us new rom version, i went back to Nougat on eMMC, i don’t want to erase Android once again, i’ll wait for Ubuntu SD card installation, so i give up.

Speaking for myself, I need an Android rom, not source.

Same here, need ROM.

You can follow below steps to add support for custom(800x480,1024x768,1280x800) defaultUI
This is only for android mmallow
1). Download the patch

The file add-support-for-custom-defaultUI.patch is android patch
The file hdmi_custom_resolution.patch is kernel patch

2). Apply the patch

$ cp add-support-for-custom-defaultUI.patch <path-to-your-project>/vendor/amlogic/frameworks
$ cd  <path-to-your-project>/vendor/amlogic/frameworks
$ git apply add-support-for-custom-defaultUI.patch
$ cp hdmi_custom_resolution.patch  <path-to-your-project>/common
$ cd <path-to-your-project>/common
$ git apply hdmi_custom_resolution.patch

3). Modify the file ‘device/khadas/kvim/files/mesondisplay.cfg’

  • 1024x768 UI
--   MBOX meson8m2 1080p
++   MBOX meson8m2 1024x768
  • 1280x800 UI
--   MBOX meson8m2 1080p
++   MBOX meson8m2 1280x800
  • 800x480 UI
--   MBOX meson8m2 1080p
++   MBOX meson8m2 800x480

4). Rebuild your Rom

$ make installclean -j8
$ make otapackage -j8

Hi, terry!
I rebuilt my firmware, and checked new resolutions (1280800 and 800480).

shell@Vim:/ $ su
root@Vim:/ # wm size
Physical size: 1280x800
root@Vim:/ # dumpsys display | grep mBaseDisplayInfo
mBaseDisplayInfo=DisplayInfo{“Встроенный экран”, uniqueId “local:0”, app 128 0 x 800, real 1280 x 800, largest app 1280 x 800, smallest app 1280 x 800, mode 1, defaultMode 1, modes [{id=1, width=1280, height=800, fps=60.000004}], colorTr ansformId 1, defaultColorTransformId 1, supportedColorTransforms [{id=1, colorTr ansform=-22}], rotation 0, density 240 (160.157 x 160.0) dpi, layerStack 0, appV syncOff -5500000, presDeadline 17666666, type BUILT_IN, state ON, FLAG_SECURE, F LAG_SUPPORTS_PROTECTED_BUFFERS}
root@Vim:/ # dumpsys display | grep mBaseDisplayInfo
root@Vim:/ #
shell@Vim:/ $ su
root@Vim:/ # wm size
Physical size: 800x480
root@Vim:/ # dumpsys display | grep mBaseDisplayInfo
mBaseDisplayInfo=DisplayInfo{“Встроенный экран”, uniqueId “local:0”, app 800 x 480, real 800 x 480, largest app 800 x 480, smallest app 800 x 480, mode 1, defaultMode 1, modes [{id=1, width=800, height=480, fps=60.000004}], colorTransformId 1, defaultColorTransformId 1, supportedColorTransforms [{id=1, colorTransform=-22}], rotation 0, density 240 (160.0 x 160.421) dpi, layerStack 0, appVsyncOff -5500000, presDeadline 17666666, type BUILT_IN, state ON, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}
root@Vim:/ #

Kernel work is fine!
But Android does not have the new resolution in the setting.

The video driver generates the correct resolution, but the android gives you selected resolution in the settings. Thus, we get that the resolution of the android (19201080 or 1280720) scale in the resolution of the video driver (1280*800).
Display shows the resolution that gives Android, not the kernel.
In order to obtain real resolution it is necessary that the android was given the required resolution too.

Hi, terry.
The new resolutions does not appear in my old project on geekbox too. After I started using the VIC from 1280x720x50 and 1920x1080x50 for new resolutions, new resolutions immediately appeared in Android settings.

It is necessary to set PLL CLK and other CLK when select the custom resolution HDMI output. I put the question to amlogic because I don’t understand the register of CLK, but need to wait for it.
I list the question in this post and hope some people can give me some advices.

##The question list:

##1. How to add the configuration for custom resolution ?

##2. How to set the P_HHI_HDMI_PLL_CNTL register ?

##3. Is it necessary to reset the P_HHI_HDMI_PLL_CNTL3 register for custom resolution ?


Will there be the new resolutions in Android, if the new resolution to add this file “hw_clk.c”? Will that be enough?

This is the most basic for custom resolution hdmi output.

It is not enough and need to modify the other source code.
If you want to try to add the custom resolution . You can follow below steps
1).Apply above patch(hdmi_custom_resolution.patch)
2).Add the clk settings for custom resolution by yourself
3).Flash the new Rom
4).select the custom resolution hdmi ouput

$ adb shell
$ adb root
$ cd /sys/class/display
$ echo custom-resolution > mode

640x480p60hz ,800x480p60hz , 800x600p60hz, 1024x768p60hz , 1024x600p60hz 1280x800p60hz , 1280x1024p60hz, 1360x768p60hz, 1366x768p60hz, 1440x900p60hz, 1600x900p60hz, 1680x1050p60hz, 1920x1200p60hz, 2560x1440p60hz, 2560x1600p60hz, 2560x1080p60hz

I think you need to add these in the CLK, not create a new CLK:
1.static struct hw_enc_clk_val_group setting_enc_clk_va

static struct hw_enc_clk_val_group setting_enc_clk_val = {
4320000, 4, 4, 1, VID_PLL_DIV_5, 1, 2, -1, 2},
4320000, 4, 4, 1, VID_PLL_DIV_5, 1, 2, 1, -1},
2970000, 4, 1, 1, VID_PLL_DIV_5, 1, 2, 1, -1},
2970000, 4, 1, 1, VID_PLL_DIV_5, 1, 2, 1, -1},
2970000, 1, 2, 2, VID_PLL_DIV_5, 1, 1, 1, -1},

2 don’t touch “static void set_gxl_hpll_clk_out”

3 static void set_hpll_sspll

static void set_hpll_sspll(enum hdmi_vic vic)
switch (get_cpu_type()) {
switch (vic) {
case HDMI_1920x1080p60_16x9:
case HDMI_1920x1080p50_16x9:
hd_write_reg(P_HHI_HDMI_PLL_CNTL3, 0x868b48c4);
case HDMI_1280x720p60_16x9:
case HDMI_1280x720p50_16x9:
case HDMIV_1024x768p60hz,
case HDMIV_1280x800p60hz,
case HDMI_1920x1080i60_16x9:
case HDMI_1920x1080i50_16x9:
hd_write_reg(P_HHI_HDMI_PLL_CNTL3, 0x864348c4);

I did it yesterday. “mesondisplay.cfg” works is fine.

I’ll try it.

But, How to add new resolutions on android settings?