aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/tegra/dsi.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-05-19 06:48:29 +1000
committerDave Airlie <airlied@redhat.com>2016-05-19 06:48:29 +1000
commit24e04d72eb43d36d28fa7908f9f8d506d1cb06e7 (patch)
treedfcf3735129272f37d2a39ce3e38cccdf6ad8a34 /drivers/gpu/drm/tegra/dsi.c
parentMerge branch 'drm-uapi-extern-c-fixes' of https://github.com/evelikov/linux into drm-next (diff)
parentdrm: remove unused dev variables (diff)
downloadwireguard-linux-24e04d72eb43d36d28fa7908f9f8d506d1cb06e7.tar.xz
wireguard-linux-24e04d72eb43d36d28fa7908f9f8d506d1cb06e7.zip
Merge tag 'topic/drm-misc-2016-05-18' of git://anongit.freedesktop.org/drm-intel into drm-next
Update drm-misc pull with a few more fixes included, plus the two from Arnd for the fallout from the drm_gem_object_lookup() refactor that I failed to spot :( * tag 'topic/drm-misc-2016-05-18' of git://anongit.freedesktop.org/drm-intel: drm: remove unused dev variables drm: mediatek: fixup drm_gem_object_lookup API change drm/tegra: Fix crash caused by reference count imbalance drm: Fix error handling in drm_connector_register drm: Avoid connector reference imbalance on error path drm/fb_helper: Fix references to dev->mode_config.num_connector drm/i915/fbdev: Fix num_connector references in intel_fb_initial_config() qxl: catch qxlfb_create_pinned_object failures drm/exynos/hdmi: add a missing tab drm/fb-cma-helper: Add function drm_fb_cma_create_with_funcs() drm/fb-cma-helper: Use const for drm_framebuffer_funcs argument drm: Drop connector argument from __drm_atomic_helper_connector_destroy_state drm: Drop plane argument from __drm_atomic_helper_plane_destroy_state drm: Drop crtc argument from __drm_atomic_helper_crtc_destroy_state drm: Remove unused drm_device from drm_gem_object_lookup()
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/tegra/dsi.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
index 44e102799195..d1239ebc190f 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -745,13 +745,17 @@ 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 =
- kzalloc(sizeof(*state), GFP_KERNEL);
+ struct tegra_dsi_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
- if (state) {
+ if (!state)
+ return;
+
+ if (connector->state) {
+ __drm_atomic_helper_connector_destroy_state(connector->state);
kfree(connector->state);
- __drm_atomic_helper_connector_reset(connector, &state->base);
}
+
+ __drm_atomic_helper_connector_reset(connector, &state->base);
}
static struct drm_connector_state *
@@ -764,6 +768,9 @@ tegra_dsi_connector_duplicate_state(struct drm_connector *connector)
if (!copy)
return NULL;
+ __drm_atomic_helper_connector_duplicate_state(connector,
+ &copy->base);
+
return &copy->base;
}