The jared mcneill quartz64_uefi code does not work with my 720x720 diisplay on the Radxa 3W on FreeBSD

Hello.

I’m working on the creation of a FreeBSD based smartphone.

I’ve installed FreeBSD 14.3-Stable on my Radxa-3W. It works well on my HDMI big monitor that I keep at 1920x1080 of resolution,but it goes round and round like a carousel on my 720x720 display (to show you I have attached a small recorded video :

WhatsApp Video 2025-05-16 at 23.11.57.mp4

drive.google.com drive.google.com

this one :

https://www.waveshare.com/4inch-hdmi-lcd-c.htm

I’ve grabbed two log files that I have attached.

The log called “log-big-monitor” comes from the monitor that I’m using right now at 1920x1080 resolution connected to the RadXA 3w via HDMI.

The log called “log-720 x 720-display” comes from the 4x4 inches display that I’ve bought to use with the smartphone that I want to create.

You will see that it thinks that the display is 1280x720 (720p) and that is wrong and will likely cause the display to not understand what it gets delivered…

I’ve asked to the FreeBSD forums ,here :

to gather the necessary informations needed to produce a fix or whatever and some nice programmer gave some useful indications about where the problem is in the code :

user A)

your problem is probably here :

https://github.com/jaredmcneill/quartz64_uefi/blob/main/edk2-rockchip/Silicon/Rockchip/Rk356x/Drivers/DisplayDxe/DwHdmi.c :

 /*
     * Driver doesn't know how to drive all modes yet. Restrict to known modes.
     */
    switch (PixelClock * 10) {
    case 594000:
    case 297000:
    case 148500:
    case 74250:
        break;
    default:
        DEBUG ((DEBUG_WARN, "HDMI: Unsupported pixel clock %u kHz for %ux%u mode.\n",
                PixelClock * 10,
                Data[2] | ((Data[4] & 0xF0) << 4),
                Data[5] | ((Data[7] & 0xF0) << 4)));
        return FALSE;
    }

you may try a debug build or activate debug and see if you get this message

user B)

but the horizontal and vertical display timings are defined in DisplayDxe.c

https://raw.githubusercontent.com/jaredmcneill/quartz64_uefi/refs/heads/main/edk2-rockchip/Silicon/Rockchip/Rk356x/Drivers/DisplayDxe/DisplayDxe.c

/* Fallback to 720p when DDC fails */
STATIC HDMI_DISPLAY_TIMING mDefaultTimings = {
    .Vic = 4,
    .FrequencyKHz = 74250,
    .HDisplay = 1280, .HSyncStart = 1390, .HSyncEnd = 1430, .HTotal = 1650, .HSyncPol = TRUE,
    .VDisplay = 720,  .VSyncStart = 725,  .VSyncEnd = 730,  .VTotal = 750,  .VSyncPol = TRUE,
};

vide .HDisplay = 1280 .vDisplay = 720I’

user C)

you could start by calculating the 720x720 timings and add it to the driver code :

Video Timings Calculator

The timings_calculator also provides pixel clock frequencies.

You could ask someone at a C programming forum.

Does anyone want to get this job ? I’m a total newbie in C programming.

Please help me.