Thomas Zimmermann <[email protected]> writes: > Some configurations of sysfb outputs require format conversion from > framebuffer to scanout buffer. It is a driver bug if the conversion > helper is missing, yet it might happen on odd scanout formats. The old > code, based on drm_fb_blit(), only detects this situation during the > commit's hardware update, which is too late to abort the update. > > Lookup the correct blit helper as part of the check phase. Then store > it in the sysfb plane state. Allows for detection of a missing helper > before the commit ihas started. Also avoids drm_fb_blit()'s large switch
"commit has" > statement on each updated scanline. Only a single lookup has to be done. > > The lookup is in drm_sysfb_get_blit_func(), which only tracks formats > supported by sysfb drivers. > > The lookup happens in sysfb's begin_fb_access helper instead of its > atomic_check helper. This allows vesadrm, and possibly other drivers, > to implement their own atomic_check without interfering with blit > lookups. Vesadrm implements XRGB8888 on top of R8 formats with the > help of the atomic_check. Doing the blit lookup in begin_fb_access then > always uses the correct CRTC format on all drivers. > > Signed-off-by: Thomas Zimmermann <[email protected]> > --- Reviewed-by: Javier Martinez Canillas <[email protected]> -- Best regards, Javier Martinez Canillas Core Platforms Red Hat
