drm: writeback: Create an helper for drm_writeback_connector initialization
authorLouis Chauvet <louis.chauvet@bootlin.com>
Thu, 16 Jan 2025 17:47:17 +0000 (18:47 +0100)
committerLouis Chauvet <louis.chauvet@bootlin.com>
Tue, 21 Jan 2025 09:32:32 +0000 (10:32 +0100)
commit135d8fc7af44c52083e18ccb24d56383d301f741
tree4a08ef526091ec7a9392d7303ac7bc95369ab745
parent8dd92e6eee590179818ba155cf02dc172e0c88c9
drm: writeback: Create an helper for drm_writeback_connector initialization

As the old drm and the new drmm variants of drm_writeback_connector
requires almost the same initialization, create an internal helper to do
most of the initialization work.

Currently there is no cleanup function for writeback connectors. To allows
implementation of drmm variant of writeback connector, create a cleanup
function that can be used to properly remove all the writeback-specific
properties and allocations.

This also introduce an helper to cleanup only the drm_writeback_connector
properties, so it can be used during initialization to cleanup in case of
failure.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20250116-google-vkms-managed-v9-5-3e4ae1bd05a0@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
drivers/gpu/drm/drm_writeback.c