[PATCH v2 18/27] drm/rockchip: inno_hdmi: Subclass connector state
Maxime Ripard
mripard at kernel.org
Mon Dec 18 01:02:25 PST 2023
Hi,
Thanks for working on that, it's much better now.
On Sat, Dec 16, 2023 at 05:26:29PM +0100, Alex Bee wrote:
> +static struct drm_connector_state *
> +inno_hdmi_connector_duplicate_state(struct drm_connector *connector)
> +{
> + struct inno_hdmi_connector_state *inno_conn_state;
> +
> + if (WARN_ON(!connector->state))
> + return NULL;
> +
> + inno_conn_state = kmemdup(to_inno_hdmi_conn_state(connector->state),
> + sizeof(*inno_conn_state), GFP_KERNEL);
> +
> + if (!inno_conn_state)
> + return NULL;
> +
> + __drm_atomic_helper_connector_duplicate_state(connector,
> + &inno_conn_state->base);
> +
> + return &inno_conn_state->base;
> +}
> +
> static const struct drm_connector_funcs inno_hdmi_connector_funcs = {
> .fill_modes = inno_hdmi_probe_single_connector_modes,
> .detect = inno_hdmi_connector_detect,
> .destroy = inno_hdmi_connector_destroy,
> .reset = drm_atomic_helper_connector_reset,
> - .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
> + .atomic_duplicate_state = inno_hdmi_connector_duplicate_state,
> .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
> };
You also need a custom reset and atomic_destroy_state implementations
Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20231218/5975f336/attachment.sig>
More information about the Linux-rockchip
mailing list