Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5459a2ad authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Daniel Vetter
Browse files

drm/tegra: Use __drm_atomic_helper_reset_connector for subclassing connector state, v2.



Changes since v1:
- Do not reset if state allocation fails.

Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Thierry Reding <treding@nvidia.com> #irc
Link: http://patchwork.freedesktop.org/patch/msgid/1451908400-25147-3-git-send-email-maarten.lankhorst@linux.intel.com


Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 4cd39917
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -745,14 +745,13 @@ static void tegra_dsi_soft_reset(struct tegra_dsi *dsi)

static void tegra_dsi_connector_reset(struct drm_connector *connector)
{
	struct tegra_dsi_state *state;
	struct tegra_dsi_state *state =
		kzalloc(sizeof(*state), GFP_KERNEL);

	if (state) {
		kfree(connector->state);
	connector->state = NULL;

	state = kzalloc(sizeof(*state), GFP_KERNEL);
	if (state)
		connector->state = &state->base;
		__drm_atomic_helper_connector_reset(connector, &state->base);
	}
}

static struct drm_connector_state *