Simona Vetter <simona.vet...@ffwll.ch> writes: > On Wed, Dec 11, 2024 at 10:06:28AM +0100, Thomas Zimmermann wrote: >> DMA areas are not necessarily backed by struct page, so we cannot >> rely on it for deferred I/O. Allocate a shadow buffer for drivers >> that require deferred I/O and use it as framebuffer memory. >> >> Fixes driver errors about being "Unable to handle kernel NULL pointer >> dereference at virtual address" or "Unable to handle kernel paging >> request at virtual address". >> >> The patch splits drm_fbdev_dma_driver_fbdev_probe() in an initial >> allocation, which creates the DMA-backed buffer object, and a tail >> that sets up the fbdev data structures. There is a tail function for >> direct memory mappings and a tail function for deferred I/O with >> the shadow buffer. >> >> It is no longer possible to use deferred I/O without shadow buffer. >> It can be re-added if there exists a reliably test for usable struct >> page in the allocated DMA-backed buffer object. >> >> Signed-off-by: Thomas Zimmermann <tzimmerm...@suse.de> >> Reported-by: Nuno Gonçalves <nuno...@gmail.com> >> CLoses: >> https://lore.kernel.org/dri-devel/caexmxlr55dziambv_+2hmleh-jp96pmit6nhs6sib22cpqf...@mail.gmail.com/ >> Tested-by: Nuno Gonçalves <nuno...@gmail.com> >> Fixes: 5ab91447aa13 ("drm/tiny/ili9225: Use fbdev-dma") >> Cc: Thomas Zimmermann <tzimmerm...@suse.de> >> Cc: <sta...@vger.kernel.org> # v6.11+ > > fbdev code scares me, but I at least tried to check a few things and looks > all good. > > Reviewed-by: Simona Vetter <simona.vet...@ffwll.ch> >
Same here, is always scary to review fbdev code but the patch looks good to me. Reviewed-by: Javier Martinez Canillas <javi...@redhat.com> -- Best regards, Javier Martinez Canillas Core Platforms Red Hat