Le 07/10/2025 à 07:45, Suraj Kandpal a écrit :
Some drivers cannot work with the current design where the connector is embedded within the drm_writeback_connector such as Intel and some drivers that can get it working end up adding a lot of checks all around the code to check if it's a writeback conenctor or not, this is due to the limitation of inheritance in C. To solve this move the drm_writeback_connector within the drm_connector and remove the drm_connector base which was in drm_writeback_connector. Make this drm_writeback_connector a union with hdmi connector to save memory and since a connector can never be both writeback and hdmi it should serve us well. Do all other required modifications that come with these changes along with addition of new function which returns the drm_connector when drm_writeback_connector is present. Modify drivers using the drm_writeback_connector to allow them to use this connector without breaking them. The drivers modified here are amd, komeda, mali, vc4, vkms, rcar_du, msm Signed-off-by: Suraj Kandpal <[email protected]> --- V1 -> V2: Use &connector->writeback, make commit message imperative (Dmitry) ---
[...]
drivers/gpu/drm/vkms/vkms_composer.c | 2 +- drivers/gpu/drm/vkms/vkms_drv.h | 2 +- drivers/gpu/drm/vkms/vkms_writeback.c | 13 ++--
For the VKMS part: Reviewed-by: Louis Chauvet <[email protected]> Thanks, Louis Chauvet -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
