nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

[FEATURE] Configurable video resolution RPi4B

Open linguini1 opened this issue 1 month ago • 5 comments

Is your feature request related to a problem? Please describe.

Right now, the frame buffer implementation picks a static 1920x1080 resolution for video output. The Pi is capable of different resolutions though.

Describe the solution you'd like

There should be a way to negotiate this size, either through:

  • Picking the maximum that the monitor is capable of
  • Letting the user select a static value in Kconfig
  • Implementing some kind of API in NuttX that allows changing the resolution (I am not sure if this is currently something NuttX's graphics APIs support)

Describe alternatives you've considered

The alternatives are the three listed above. One or a combination could be implemented.

Verification

  • [x] I have verified before submitting the report.

linguini1 avatar Nov 09 '25 16:11 linguini1

@linguini1 besides Kconfig static configuration, the EDID protocol from HDMI could be used: https://en.wikipedia.org/wiki/Extended_Display_Identification_Data https://thehometheaterdiy.com/hdmi-edid/

But I don't know if we can change the LVGL resolution dynamically

acassis avatar Nov 10 '25 20:11 acassis

Apparently we can: see here.

void lv_display_set_resolution(lv_display_t *disp, int32_t hor_res, int32_t ver_res)

TimJTi avatar Nov 10 '25 20:11 TimJTi

I believe I don't have direct access to the EDID stuff in the Pi (?) since all the HDMI trickery is handled by the VideoCore. I know what I can do is 'test' if the screen is capable of a desired resolution through the video core, and then request the change to that resolution.

I would prefer the dynamic option to choosing it statically through Kconfig. I'd have to look at how I can implement the function that Tim mentioned in a way that works with the NuttX framebuffer lower-half. I didn't see an IOCTL for changing the framebuffer resolution, but then again, I didn't look beyond the Pinephone implementation which has a fixed screen on the device. Might do that in a bit!

linguini1 avatar Nov 10 '25 20:11 linguini1

Searching it on google it shows how to get this information on Linux:

Image

So, there some way to get the EDID from the VideoCore

acassis avatar Nov 10 '25 20:11 acassis

Hmmm, does that work for the RPi-OS though? I haven't seen a method documented anywhere but this might require looking at Linux code again

linguini1 avatar Nov 10 '25 21:11 linguini1