Job offering for hacking a C code that should be able to support my 720x720 display.
Mario Marietto <[email protected]> Sun, 18 May 2025 21:03:19 +0200
| Newsgroups | gmane.os.freebsd.jobs |
|---|---|
| Message-ID | <CA+1FSijG_k-hhkSHUGvgZzSz59b1RPLp-upwOEFZ7N8g3_zvLA@mail.gmail.com> |
--00000000000056307206356dad78
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
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
<https://drive.google.com/file/d/1sjMkbNTcOIT582rkWiVPJBJv7iSuZi5k/view?usp=
=3Dsharing>
[image: 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=E2=80=A6
I've asked to the FreeBSD forums 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/Silic=
on/Rockchip/Rk356x/Drivers/DisplayDxe/DwHdmi.c
:
Code:
/*
* Driver doesn't know how to drive all modes yet. Restrict to known mo=
des.
*/
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/ma=
in/edk2-rockchip/Silicon/Rockchip/Rk356x/Drivers/DisplayDxe/DisplayDxe.c>
https://raw.githubusercontent.com/jaredmcneill/quartz64_uefi/refs/heads/mai=
n/edk2-rockchip/Silicon/Rockchip/Rk356x/Drivers/DisplayDxe/DisplayDxe.c
Code:
/* Fallback to 720p when DDC fails */
STATIC HDMI_DISPLAY_TIMING mDefaultTimings =3D {
.Vic =3D 4,
.FrequencyKHz =3D 74250,
.HDisplay =3D 1280, .HSyncStart =3D 1390, .HSyncEnd =3D 1430, .HTotal =
=3D
1650, .HSyncPol =3D TRUE,
.VDisplay =3D 720, .VSyncStart =3D 725, .VSyncEnd =3D 730, .VTotal =
=3D
750, .VSyncPol =3D TRUE,
};
vide .HDisplay =3D 1280 .vDisplay =3D 720I'
user C) you could start by calculating the 720x720 timings and add it to
the driver code :
<https://tomverbeure.github.io/video_timings_calculator>
Video Timings Calculator
<https://tomverbeure.github.io/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.
--=20
Mario.
--00000000000056307206356dad78
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Hello.</div><div><br></div><div>I'm working on th=
e creation of a FreeBSD based smartphone.<br>
<br>
I've installed FreeBSD 14.3-Stable on my Radxa-3W. It works well on my=
=20
HDMI big monitor that I keep at 1920x1080 of resolution,but it goes=20
round and round like a carousel on my 720x720 display (to show you I=20
have attached a small recorded video : <br>
<br>
=09
<div class=3D"gmail-bbCodeBlock gmail-bbCodeBlock--unfurl gmail-js-unfurl =
gmail-fauxBlockLink" style=3D"font-size:16px;line-height:22.4px">
<div class=3D"gmail-contentRow" style=3D"font-size:16px;line-height:22.4p=
x">
=09
<div class=3D"gmail-contentRow-main" style=3D"font-size:16px;line-height=
:22.4px">
<h3 class=3D"gmail-contentRow-header gmail-js-unfurl-title" style=3D"fo=
nt-size:16px;line-height:22.4px">
<a href=3D"https://drive.google.com/file/d/1sjMkbNTcOIT582rkWiVPJBJv7i=
SuZi5k/view?usp=3Dsharing" class=3D"gmail-link gmail-link--external gmail-f=
auxBlockLink-blockLink" target=3D"_blank" rel=3D"nofollow ugc noopener" sty=
le=3D"font-size:16px;line-height:22.4px">
WhatsApp Video 2025-05-16 at 23.11.57.mp4
</a>
</h3>
=09
<div class=3D"gmail-contentRow-minor gmail-contentRow-minor--hideLinks"=
style=3D"font-size:12px;line-height:16.8px">
<span class=3D"gmail-js-unfurl-favicon" style=3D"font-size:12px">
=09
<img src=3D"https://ssl.gstatic.com/images/branding/product/1x/drive=
_2020q4_32dp.png" alt=3D"drive.google.com" class=3D"gmail-bbCodeBlockUnfurl=
-icon">
=09
</span>
<a href=3D"http://drive.google.com">drive.google.com</a>
</div>
</div>
</div>
</div>
<br>
this one :<br>
<br>
<a href=3D"https://www.waveshare.com/4inch-hdmi-lcd-c.htm" target=3D"_blank=
" class=3D"gmail-link gmail-link--external" rel=3D"nofollow ugc noopener" s=
tyle=3D"font-size:16px;line-height:22.4px">https://www.waveshare.com/4inch-=
hdmi-lcd-c.htm</a><br>
<br>
<br>
I've grabbed two log files that I have attached.<br>
<br>
<br>
The log called "log-big-monitor" comes from the monitor that I=
9;m using=20
right now at 1920x1080 resolution connected to the RadXA 3w via HDMI.<br>
<br>
<br>
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.<br>
<br>
<br>
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=20
gets delivered=E2=80=A6</div><div><br></div><div><div id=3D"m_-772511536770=
6674757m_-5210187823840442263gmail-:wn" aria-label=3D"Message Body" role=3D=
"textbox" aria-multiline=3D"true" style=3D"direction:ltr;min-height:85px" a=
ria-controls=3D":yz" aria-expanded=3D"false"><div>I've asked to the Fre=
eBSD forums 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 :</div><div><br></div><div>user A) your problem=
is probably here :</div><div><br></div>
=09
<div style=3D"font-size:16px;line-height:22.4px">
<div style=3D"font-size:16px;line-height:22.4px">
=09
<div style=3D"font-size:16px"><a href=3D"https://github.com/jaredmcneil=
l/quartz64_uefi/blob/main/edk2-rockchip/Silicon/Rockchip/Rk356x/Drivers/Dis=
playDxe/DwHdmi.c" target=3D"_blank">https://github.com/jaredmcneill/quartz6=
4_uefi/blob/main/edk2-rockchip/Silicon/Rockchip/Rk356x/Drivers/DisplayDxe/D=
wHdmi.c</a> :</div></div></div><br><div style=3D"font-size:16px;line-height=
:22.4px">
<div style=3D"font-size:13px;line-height:18.2px">
Code:
</div>
<div dir=3D"ltr" style=3D"font-size:16px;line-height:22.4px">
<pre dir=3D"ltr" style=3D"font-size:13px;line-height:18.2px"><code style=
=3D"font-size:13px;line-height:18.2px"> /*
* Driver doesn't know how to drive all modes yet. Restrict to know=
n 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;
}</code></pre>
</div>
</div>you may try a debug build or activate debug and see if you get this m=
essage<div><br></div><div></div><div>user B) but the horizontal and vertica=
l display timings are defined in DisplayDxe.c<br>
<div style=3D"font-size:16px;line-height:22.4px"><br>
<a href=3D"https://raw.githubusercontent.com/jaredmcneill/quartz64_uefi/r=
efs/heads/main/edk2-rockchip/Silicon/Rockchip/Rk356x/Drivers/DisplayDxe/Dis=
playDxe.c" rel=3D"nofollow ugc noopener" style=3D"font-size:16px;line-heigh=
t:22.4px" target=3D"_blank">
=09
</a></div><div style=3D"font-size:16px;line-height:22.4px"><a href=3D"https=
://raw.githubusercontent.com/jaredmcneill/quartz64_uefi/refs/heads/main/edk=
2-rockchip/Silicon/Rockchip/Rk356x/Drivers/DisplayDxe/DisplayDxe.c" rel=3D"=
nofollow ugc noopener" style=3D"font-size:16px;line-height:22.4px" target=
=3D"_blank">https://raw.githubusercontent.com/jaredmcneill/quartz64_uefi/re=
fs/heads/main/edk2-rockchip/Silicon/Rockchip/Rk356x/Drivers/DisplayDxe/Disp=
layDxe.c
</a>
</div>
<br>
=09
=09
<div style=3D"font-size:16px;line-height:22.4px">
<div style=3D"font-size:13px;line-height:18.2px">
Code:
</div>
<div dir=3D"ltr" style=3D"font-size:16px;line-height:22.4px">
<pre dir=3D"ltr" style=3D"font-size:13px;line-height:18.2px"><code style=
=3D"font-size:13px;line-height:18.2px">/* Fallback to 720p when DDC fails *=
/
STATIC HDMI_DISPLAY_TIMING mDefaultTimings =3D {
.Vic =3D 4,
.FrequencyKHz =3D 74250,
.HDisplay =3D 1280, .HSyncStart =3D 1390, .HSyncEnd =3D 1430, .HTotal =
=3D 1650, .HSyncPol =3D TRUE,
.VDisplay =3D 720, .VSyncStart =3D 725, .VSyncEnd =3D 730, .VTotal =
=3D 750, .VSyncPol =3D TRUE,
};</code></pre>
</div>
</div><br>
vide .HDisplay =3D 1280 .vDisplay =3D 720I'</div></div></div><div><br><=
/div><div>user C) you could start by calculating the 720x720 timings and ad=
d it to the driver code :
<div style=3D"font-size:16px;line-height:22.4px"><br>
<a href=3D"https://tomverbeure.github.io/video_timings_calculator" class=
=3D"gmail-link gmail-link--external" target=3D"_blank" rel=3D"nofollow ugc =
noopener" style=3D"font-size:16px;line-height:22.4px">
</a></div><div style=3D"font-size:16px;line-height:22.4px"><a href=3D"ht=
tps://tomverbeure.github.io/video_timings_calculator" class=3D"gmail-link g=
mail-link--external" target=3D"_blank" rel=3D"nofollow ugc noopener" style=
=3D"font-size:16px;line-height:22.4px">Video Timings Calculator
</a>
</div>
</div><div><br></div><div>The timings_calculator also provides pixel clock =
frequencies.</div><div><br></div><div>
You could ask someone at a C programming forum.</div><div><br></div><div>Do=
es anyone want to get this job ? I'm a total newbie in C programming. <=
br></div><div>Please help me.</div><div><br></div><span class=3D"gmail_sign=
ature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature" data=
-smartmail=3D"gmail_signature">Mario.<br></div></div>
--00000000000056307206356dad78--