drm/format-helper: Pass format-conversion state to helpers
Pass an instance of struct drm_format_conv_state to DRM's format conversion helpers. Update all callers. Most drivers can use the format-conversion state from their shadow- plane state. The shadow plane's destroy function releases the allocated buffer. Drivers will later be able to allocate a buffer of appropriate size in their plane's atomic_check code. The gud driver uses a separate thread for committing updates. For now, the update worker contains its own format-conversion state. Images in the format-helper tests are small. The tests preallocate a static page for the temporary buffer. Unloading the module releases the memory. v6: * update patch for ssd132x support v5: * avoid using unusupported shadow-plane state in repaper (Noralf) * fix documentation (Noralf, kernel test robot) v3: * store buffer in shadow-plane state (Javier, Maxime) * replace ARRAY_SIZE() with sizeof() (Jani) Signed-off-by:Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by:
Javier Martinez Canillas <javierm@redhat.com> Tested-by: Javier Martinez Canillas <javierm@redhat.com> # ssd130x Cc: Noralf Trønnes <noralf@tronnes.org> Cc: Javier Martinez Canillas <javierm@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: David Lechner <david@lechnology.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231009141018.11291-4-tzimmermann@suse.de
Showing
- drivers/gpu/drm/drm_format_helper.c 68 additions, 55 deletionsdrivers/gpu/drm/drm_format_helper.c
- drivers/gpu/drm/drm_mipi_dbi.c 12 additions, 7 deletionsdrivers/gpu/drm/drm_mipi_dbi.c
- drivers/gpu/drm/gud/gud_pipe.c 18 additions, 12 deletionsdrivers/gpu/drm/gud/gud_pipe.c
- drivers/gpu/drm/solomon/ssd130x.c 10 additions, 6 deletionsdrivers/gpu/drm/solomon/ssd130x.c
- drivers/gpu/drm/tests/drm_format_helper_test.c 44 additions, 28 deletionsdrivers/gpu/drm/tests/drm_format_helper_test.c
- drivers/gpu/drm/tiny/cirrus.c 2 additions, 1 deletiondrivers/gpu/drm/tiny/cirrus.c
- drivers/gpu/drm/tiny/ili9225.c 6 additions, 4 deletionsdrivers/gpu/drm/tiny/ili9225.c
- drivers/gpu/drm/tiny/ofdrm.c 1 addition, 1 deletiondrivers/gpu/drm/tiny/ofdrm.c
- drivers/gpu/drm/tiny/repaper.c 7 additions, 3 deletionsdrivers/gpu/drm/tiny/repaper.c
- drivers/gpu/drm/tiny/simpledrm.c 1 addition, 1 deletiondrivers/gpu/drm/tiny/simpledrm.c
- drivers/gpu/drm/tiny/st7586.c 11 additions, 8 deletionsdrivers/gpu/drm/tiny/st7586.c
- include/drm/drm_format_helper.h 17 additions, 13 deletionsinclude/drm/drm_format_helper.h
- include/drm/drm_mipi_dbi.h 3 additions, 1 deletioninclude/drm/drm_mipi_dbi.h
Loading
Please register or sign in to comment