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

   ## Summary
   
   Two small fixes for the goldfish framebuffer drivers:
   
   1. `video/goldfish: add empty updatearea for CONFIG_FB_UPDATE`
   
      With `CONFIG_FB_UPDATE` enabled, `FBIO_UPDATE` fails on `goldfish_fb`
      and `goldfish_gpu_fb` because neither provides `updatearea`. Add an
      empty implementation to both, so callers such as LVGL no longer get
      an error. `goldfish_gpu_fb.c` also gets
      `#include <nuttx/config.h>` so the `CONFIG_FB_UPDATE` guard works.
   
   2. `drivers/video/goldfish_gpu_fb: Cast stride to size_t before 
multiplication`
   
      `planeinfo.stride * videoinfo.yres` is computed in `int` (both are
      16-bit) and may overflow before conversion to the `size_t` size
      argument of `goldfish_gpu_fb_update_colorbuffer()`. Cast `stride` to
      `size_t`. Reported by Coverity (sign extension).
   
   ## Impact
   
   - Only the goldfish fb drivers are affected (emulator targets).
   - No change when `CONFIG_FB_UPDATE` is disabled, apart from the cast.
   - No Kconfig, API, or documentation changes.
   
   ## Testing
   
   - Host: `<OS / toolchain>`
   - Target: `<goldfish/qemu config>`
   - Build with `CONFIG_FB_UPDATE=y` and `CONFIG_FB_UPDATE=n`; confirm no
     warnings.
   - Run an app that calls `FBIO_UPDATE` (e.g. `fb`) and confirm the ioctl
     returns 0.


-- 
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]

  • [PR] drivers/video/goldfish: ... FASTSHIFT (via GitHub) via commits

Reply via email to