FASTSHIFT opened a new pull request, #21870:
URL: https://github.com/apache/nuttx/pull/21870

   ## Summary
   
   `FBIOGET_PLANEINFO` and `FBIOGET_OVERLAYINFO` return `yoffset = 0` for
   almost every lower half, so user space cannot tell which buffer of a
   multi-buffer framebuffer is on screen.
   
   The head of the pan queue is the frame being scanned out (drivers peek it
   to display, and `fb_remove_paninfo()` drops it once a newer frame is
   queued). Fill `yoffset` from it in `fb_get_planeinfo()` and in a new
   `fb_get_overlayinfo()`. If the queue is empty, the value from the lower
   half is kept.
   
   ## Impact
   
   - Only `drivers/video/fb.c`.
   - `yoffset` returned by `FBIOGET_PLANEINFO` / `FBIOGET_OVERLAYINFO`, and
     therefore `fb_var_screeninfo.yoffset` from `FBIOGET_VSCREENINFO`, now
     reflects the displayed buffer for drivers that use the pan queue
     (`fb_peek_paninfo()` / `fb_remove_paninfo()`). Other drivers are
     unchanged.
   - No Kconfig, API, or documentation changes.
   
   ## Testing
   
   - Host: Ubuntu 22.04 x86_64, gcc 13.1.0
   - Base: apache/nuttx `066314c6373`
   - Config: `sim:nsh` plus `CONFIG_DRIVERS_VIDEO`, `CONFIG_VIDEO_FB`,
     `CONFIG_SIM_X11FB` (2 buffers). Clean build: no warnings. `fb.c` also
     compiles without warnings with `CONFIG_FB_OVERLAY` and `CONFIG_FB_SYNC`
     (syntax check only; sim has no overlay).
   - Test app: pans to yoffset 240, 0, 240, waits 300 ms after each, and
     reads `FBIOGET_PLANEINFO`.
   
   ```
   master:                          patched:
   yres=240 yres_virtual=480        yres=240 yres_virtual=480
   pan to yoffset=240 ret=0         pan to yoffset=240 ret=0
     PLANEINFO yoffset=0              PLANEINFO yoffset=240
   pan to yoffset=0 ret=0           pan to yoffset=0 ret=0
     PLANEINFO yoffset=0              PLANEINFO yoffset=0
   pan to yoffset=240 ret=0         pan to yoffset=240 ret=0
     PLANEINFO yoffset=0              PLANEINFO yoffset=240
   ```
   
   `checkpatch.sh -c -u -m -g` on the commit: pass. The overlay path was not
   run.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to