[PATCH 08/18] drm/sysfb: Merge connector functions

Javier Martinez Canillas javierm at redhat.com
Sun Mar 23 10:57:49 UTC 2025


Thomas Zimmermann <tzimmermann at suse.de> writes:

> Merge the connector functions of ofdrm and simpledrm. Replace the
> code in each driver with the shared helpers. Set up callbacks with
> initializer macros.
>
> No effective code changes. The sysfb connector only returns the
> preconfigured display mode.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
> ---

...

> +#define DRM_SYSFB_CONNECTOR_FUNCS \
> +	.reset = drm_atomic_helper_connector_reset, \
> +	.fill_modes = drm_helper_probe_single_connector_modes, \
> +	.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, \
> +	.atomic_destroy_state = drm_atomic_helper_connector_destroy_state
> +
>  /*

...

>  static const struct drm_connector_funcs ofdrm_connector_funcs = {
> -	.reset = drm_atomic_helper_connector_reset,
> -	.fill_modes = drm_helper_probe_single_connector_modes,
> +	DRM_SYSFB_CONNECTOR_FUNCS,
>  	.destroy = drm_connector_cleanup,

Why not include the .destroy callback in DRM_SYSFB_CONNECTOR_FUNCS ?

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat



More information about the dri-devel mailing list