Skip to content

Commit

Permalink
drm/tegra: Use __drm_atomic_helper_reset_connector for subclassing co…
Browse files Browse the repository at this point in the history
…nnector state, v2.

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

Signed-off-by: Maarten Lankhorst <[email protected]>
Acked-by: Thierry Reding <[email protected]> #irc
Link: http://patchwork.freedesktop.org/patch/msgid/1451908400-25147-3-git-send-email-maarten.lankhorst@linux.intel.com
Signed-off-by: Daniel Vetter <[email protected]>
  • Loading branch information
mlankhorst authored and danvet committed Jan 5, 2016
1 parent 4cd3991 commit 5459a2a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions drivers/gpu/drm/tegra/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

kfree(connector->state);
connector->state = NULL;
struct tegra_dsi_state *state =
kzalloc(sizeof(*state), GFP_KERNEL);

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

static struct drm_connector_state *
Expand Down

0 comments on commit 5459a2a

Please sign in to comment.