This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Building from Source
#2
Yes, I also would like to have the whole source code. Hopefully Asus will publish soon.
But to change hdmi resolution it is not needed the android source code. I spent a lot of the last days to go through the rockchip hdmi kernel driver source code. The default resolution the driver uses, can be modified in drivers/video/rockchip/hdmi/rockchip-hdmi-lcdc.c. Yesterday I found the right timings for my 1280x800 7" display, that is connected via a M.NT68676 hdmi adapter board:
Code:
    {
        .mode = {
            .name = "1280x800p@60hz",
            .refresh = 60,
            .xres = 1280,
            .yres = 800,
            .pixclock = 85000000,
            .left_margin = 200,
            .right_margin = 72,
            .upper_margin = 22,
            .lower_margin = 3,
            .hsync_len = 128,
            .vsync_len = 6,
            .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
            .vmode = 0,
            .flag = 0,
        },
        .vic = HDMI_VIDEO_DMT | 11,  //512 | 11 = 523
        .vic_2nd = 0,
        .pixelrepeat = 1,
        .interface = OUT_P888,
    },

And in rockchip-hdmi.h can be set the default mode.
Code:
Edit:
#define HDMI_AUTO_CONFIG        false

/* HDMI default vide mode */
#define HDMI_VIDEO_DEFAULT_MODE            523 //1280x800

But this is not everything. The android window manager always uses the resolution 1920x1080. This works, but is not nice! Letters and symbols are very small. Don't work 'wm size 1280x800'. This produces misalignment of the touch panel area, for example in the center the touch is o.k. but the wider to the edge the bigger the misalignment. Or the 'wm density' causes cut symbols. The trick is, how to make the window manager use the physical resolution of your lcd display. First I thought it is inside the android code, but it is not. To find this, cost me several days.
In the device tree, in section rk_screen also is needed to definethe correct timings (rk3288-miniarm.dts):
Code:
/*Use own rk_screen config
#include "lcd-asus.dtsi"*/
.
.
.
&rk_screen {
    display-timings = <&disp_timings>;
    disp_timings: display-timings {
        native-mode = <&timing2>;
        timing0: timing0 {
            screen-type = <SCREEN_MIPI>;
            out-face  = <OUT_P888>;
            clock-frequency = <28488600>;
            hactive = <800>;
            vactive = <480>;
            hback-porch = <26>;
            hfront-porch = <85>;
            vback-porch = <21>;
            vfront-porch = <7>;
            hsync-len = <20>;
            vsync-len = <2>;
            hsync-active = <0>;
            vsync-active = <0>;
            de-active = <0>;
            pixelclk-active = <0>;
            swap-rb = <0>;
            swap-rg = <0>;
            swap-gb = <0>;
        };
        timing1: timing1 {
            screen-type = <SCREEN_RGB>;
            out-face    = <OUT_P888>;
            color-mode = <COLOR_YCBCR>;
            clock-frequency = <74250000>;
            hactive = <1024>;
            vactive = <600>;
            hback-porch = <160>;
            hfront-porch = <24>;
            vback-porch = <29>;
            vfront-porch = <3>;
            hsync-len = <136>;
            vsync-len = <6>;
            hsync-active = <1>;
            vsync-active = <1>;
            de-active = <0>;
            pixelclk-active = <0>;
            swap-rb = <0>;
            swap-rg = <0>;
            swap-gb = <0>;
        };
        timing2: timing2 {
            screen-type = <SCREEN_RGB>;
            out-face    = <OUT_P888>;
            color-mode = <COLOR_YCBCR>;
            clock-frequency = <83500000>;
            hactive = <1280>;
            vactive = <800>;
            hback-porch = <200>;
            hfront-porch = <72>;
            vback-porch = <22>;
            vfront-porch = <3>;
            hsync-len = <128>;
            vsync-len = <6>;
            hsync-active = <1>;
            vsync-active = <1>;
            de-active = <0>;
            pixelclk-active = <0>;
            swap-rb = <0>;
            swap-rg = <0>;
            swap-gb = <0>;
        };
        timing3: timing3 {
            screen-type = <SCREEN_RGB>;
            out-face    = <OUT_P888>;
            color-mode = <COLOR_YCBCR>;
            clock-frequency = <148500000>;
            hactive = <1920>;
            vactive = <1080>;
            hback-porch = <148>;
            hfront-porch = <88>;
            vback-porch = <36>;
            vfront-porch = <4>;
            hsync-len = <44>;
            vsync-len = <5>;
            hsync-active = <1>;
            vsync-active = <1>;
            de-active = <0>;
            pixelclk-active = <0>;
            swap-rb = <0>;
            swap-rg = <0>;
            swap-gb = <0>;
        };
    };
};


With this setting, the native-mode points to the 1280x800 timing, the framebuffer is initialized to this resolution. And this makes the window manager also use this resolution as physical resolution. Finally I changed the density from 240 to 180.
Reply


Messages In This Thread
Building from Source - by lostangel556 - 10-03-2017, 11:06 PM
RE: Building from Source - by lobo - 10-04-2017, 07:15 PM
RE: Building from Source - by Locke - 10-05-2017, 06:19 AM
RE: Building from Source - by lostangel556 - 10-14-2017, 03:11 PM
RE: Building from Source - by Locke - 11-03-2017, 12:33 PM
RE: Building from Source - by jmgirven - 01-15-2019, 04:37 PM
RE: Building from Source - by lobo - 10-05-2017, 09:49 AM
RE: Building from Source - by Locke - 10-06-2017, 08:53 AM
RE: Building from Source - by Locke - 10-08-2017, 01:56 PM
RE: Building from Source - by lobo - 10-09-2017, 10:06 AM
RE: Building from Source - by lostangel556 - 10-09-2017, 11:51 AM
RE: Building from Source - by lobo - 10-09-2017, 03:18 PM
RE: Building from Source - by lostangel556 - 10-09-2017, 03:23 PM
RE: Building from Source - by lobo - 10-09-2017, 03:29 PM
RE: Building from Source - by Locke - 10-09-2017, 04:15 PM
RE: Building from Source - by lobo - 10-09-2017, 05:11 PM
RE: Building from Source - by Locke - 10-12-2017, 07:05 AM
RE: Building from Source - by lobo - 10-12-2017, 05:05 PM
RE: Building from Source - by lobo - 10-15-2017, 08:25 AM
RE: Building from Source - by lobo - 11-04-2017, 06:16 PM
RE: Building from Source - by Locke - 11-05-2017, 09:39 AM
RE: Building from Source - by lobo - 11-05-2017, 01:04 PM
RE: Building from Source - by Locke - 11-07-2017, 11:01 AM
RE: Building from Source - by lobo - 11-07-2017, 12:00 PM
RE: Building from Source - by Locke - 11-07-2017, 03:42 PM
RE: Building from Source - by lobo - 11-07-2017, 05:49 PM
RE: Building from Source - by Locke - 11-07-2017, 06:28 PM
RE: Building from Source - by Locke - 11-09-2017, 12:58 PM
RE: Building from Source - by lobo - 11-09-2017, 06:54 PM
RE: Building from Source - by Locke - 11-09-2017, 07:05 PM
RE: Building from Source - by Locke - 11-10-2017, 07:31 AM
RE: Building from Source - by lobo - 11-10-2017, 09:01 AM
RE: Building from Source - by Locke - 11-10-2017, 10:22 AM
RE: Building from Source - by lobo - 11-10-2017, 06:44 PM
RE: Building from Source - by Locke - 11-10-2017, 07:23 PM
RE: Building from Source - by Locke - 11-11-2017, 08:48 AM
RE: Building from Source - by lobo - 11-11-2017, 02:23 PM
RE: Building from Source - by Locke - 11-11-2017, 05:32 PM
RE: Building from Source - by lobo - 11-11-2017, 07:30 PM
RE: Building from Source - by lobo - 11-12-2017, 09:33 AM
RE: Building from Source - by Locke - 11-12-2017, 01:12 PM
RE: Building from Source - by Locke - 11-11-2017, 08:39 PM
RE: Building from Source - by lobo - 11-12-2017, 05:51 PM
RE: Building from Source - by Locke - 11-12-2017, 06:06 PM
RE: Building from Source - by Locke - 11-13-2017, 10:50 AM
RE: Building from Source - by lobo - 11-13-2017, 05:19 PM
RE: Building from Source - by vintm - 06-13-2018, 07:38 PM
RE: Building from Source - by TW_Lyle - 06-14-2018, 03:49 AM
RE: Building from Source - by vintm - 06-14-2018, 09:17 PM
RE: Building from Source - by vintm - 06-15-2018, 03:03 PM
RE: Building from Source - by vintm - 06-17-2018, 06:03 PM
RE: Building from Source - by lobo - 01-16-2019, 10:51 AM
RE: Building from Source - by jmgirven - 01-17-2019, 08:59 AM
RE: Building from Source - by lobo - 01-17-2019, 07:49 PM
RE: Building from Source - by dave_myplayer - 09-30-2020, 01:33 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)