diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2016-01-04 06:53:17 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-01-05 03:43:26 -0500 |
commit | 5459a2ad9da0c93161f31cfda5d39e23b64d50f8 (patch) | |
tree | 45c2cdc685e55d09d969d8af1623b0b71484a63c | |
parent | 4cd39917ddb2fb5691e05b13b13f1f2398343b3e (diff) |
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: Maarten 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: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/tegra/dsi.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c index 50d46ae3786b..44e102799195 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c | |||
@@ -745,14 +745,13 @@ static void tegra_dsi_soft_reset(struct tegra_dsi *dsi) | |||
745 | 745 | ||
746 | static void tegra_dsi_connector_reset(struct drm_connector *connector) | 746 | static void tegra_dsi_connector_reset(struct drm_connector *connector) |
747 | { | 747 | { |
748 | struct tegra_dsi_state *state; | 748 | struct tegra_dsi_state *state = |
749 | 749 | kzalloc(sizeof(*state), GFP_KERNEL); | |
750 | kfree(connector->state); | ||
751 | connector->state = NULL; | ||
752 | 750 | ||
753 | state = kzalloc(sizeof(*state), GFP_KERNEL); | 751 | if (state) { |
754 | if (state) | 752 | kfree(connector->state); |
755 | connector->state = &state->base; | 753 | __drm_atomic_helper_connector_reset(connector, &state->base); |
754 | } | ||
756 | } | 755 | } |
757 | 756 | ||
758 | static struct drm_connector_state * | 757 | static struct drm_connector_state * |