• Thomas Zimmermann's avatar
    drm/format-helper: Pass format-conversion state to helpers · 4cd24d4b
    Thomas Zimmermann authored
    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: default avatarThomas Zimmermann <tzimmermann@suse.de>
    Reviewed-by: default avatarJavier 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
    4cd24d4b
drm_format_helper.c 44.4 KB