mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
drm/malidp: Convert to atomic_create_state
The malidp writeback connector reset implementation creates a custom state subclass, but only initializes a pristine state without resetting any hardware. This is equivalent to what atomic_create_state expects. Convert to it. Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Link: https://lore.kernel.org/r/20261014-drm-no-more-connector-reset-v1-67-586c9c026823@kernel.org Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
parent
c81e4d88c3
commit
8b32d0652d
|
|
@ -64,18 +64,18 @@ static const struct drm_connector_helper_funcs malidp_mw_connector_helper_funcs
|
|||
.mode_valid = malidp_mw_connector_mode_valid,
|
||||
};
|
||||
|
||||
static void malidp_mw_connector_reset(struct drm_connector *connector)
|
||||
static struct drm_connector_state *
|
||||
malidp_mw_connector_create_state(struct drm_connector *connector)
|
||||
{
|
||||
struct malidp_mw_connector_state *mw_state = kzalloc_obj(*mw_state);
|
||||
struct malidp_mw_connector_state *mw_state;
|
||||
|
||||
if (connector->state)
|
||||
__drm_atomic_helper_connector_destroy_state(connector->state);
|
||||
mw_state = kzalloc_obj(*mw_state);
|
||||
if (!mw_state)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
kfree(connector->state);
|
||||
connector->state = NULL;
|
||||
__drm_atomic_helper_connector_state_init(&mw_state->base, connector);
|
||||
|
||||
if (mw_state)
|
||||
__drm_atomic_helper_connector_reset(connector, &mw_state->base);
|
||||
return &mw_state->base;
|
||||
}
|
||||
|
||||
static enum drm_connector_status
|
||||
|
|
@ -111,7 +111,7 @@ malidp_mw_connector_duplicate_state(struct drm_connector *connector)
|
|||
}
|
||||
|
||||
static const struct drm_connector_funcs malidp_mw_connector_funcs = {
|
||||
.reset = malidp_mw_connector_reset,
|
||||
.atomic_create_state = malidp_mw_connector_create_state,
|
||||
.detect = malidp_mw_connector_detect,
|
||||
.fill_modes = drm_helper_probe_single_connector_modes,
|
||||
.destroy = malidp_mw_connector_destroy,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user