From: Andrzej Hajda <a.hajda@samsung.com>
To: Inki Dae <inki.dae@samsung.com>
Cc: "moderated list:ARM/S5P EXYNOS AR..."
<linux-samsung-soc@vger.kernel.org>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
open list <linux-kernel@vger.kernel.org>,
dri-devel@lists.freedesktop.org,
Andrzej Hajda <a.hajda@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: [PATCH 2/9] drm/exynos: fix drm driver de-initialization order
Date: Tue, 09 Sep 2014 15:16:06 +0200 [thread overview]
Message-ID: <1410268573-2297-3-git-send-email-a.hajda@samsung.com> (raw)
In-Reply-To: <1410268573-2297-1-git-send-email-a.hajda@samsung.com>
Since components have their own cleanup routines calling
drm_mode_config_cleanup before component_unbind_all causes errors
due to double free of KMS objects. The patch fixes it by changing
de-initialization order. Now it is exactly opposite to init order.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
drivers/gpu/drm/exynos/exynos_drm_drv.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index e11c4d6..b2c710a 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -136,14 +136,14 @@ static int exynos_drm_unload(struct drm_device *dev)
exynos_drm_device_subdrv_remove(dev);
exynos_drm_fbdev_fini(dev);
- drm_vblank_cleanup(dev);
drm_kms_helper_poll_fini(dev);
- drm_mode_config_cleanup(dev);
+ component_unbind_all(dev->dev, dev);
+ drm_vblank_cleanup(dev);
+ drm_mode_config_cleanup(dev);
drm_release_iommu_mapping(dev);
- kfree(dev->dev_private);
- component_unbind_all(dev->dev, dev);
+ kfree(dev->dev_private);
dev->dev_private = NULL;
return 0;
--
1.9.1
next prev parent reply other threads:[~2014-09-09 13:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-09 13:16 [PATCH 0/9] drm/exynos: initialization/deinitialization fixes Andrzej Hajda
2014-09-09 13:16 ` [PATCH 1/9] drm/exynos/ipp: traverse ipp drivers list safely Andrzej Hajda
2014-09-09 13:16 ` Andrzej Hajda [this message]
2014-09-09 13:16 ` [PATCH 3/9] drm/exynos/fbdev: fix fbdev gem object cleanup Andrzej Hajda
2014-09-09 13:16 ` [PATCH 4/9] drm/exynos/fb: free exynos framebuffer on error Andrzej Hajda
2014-09-09 13:16 ` [PATCH 5/9] drm/exynos/crtc: fix framebuffer reference sequence Andrzej Hajda
2014-09-12 8:34 ` Inki Dae
2014-09-12 8:57 ` Daniel Vetter
2014-09-12 9:21 ` Inki Dae
2014-09-12 9:27 ` Andrzej Hajda
2014-09-12 10:45 ` Inki Dae
2014-09-12 11:04 ` Andrzej Hajda
2014-09-12 11:24 ` Inki Dae
2014-09-12 14:03 ` Daniel Vetter
2014-09-09 13:16 ` [PATCH 6/9] drm/exynos/dsi: unregister connector on removal Andrzej Hajda
2014-09-09 13:16 ` [PATCH 7/9] drm/exynos/dpi: unregister connector and panel " Andrzej Hajda
2014-09-09 13:16 ` [PATCH 8/9] drm/exynos/dp: unregister connector " Andrzej Hajda
2014-09-09 13:16 ` [PATCH 9/9] drm/exynos/hdmi: " Andrzej Hajda
2014-09-17 11:44 ` [PATCH 0/9] drm/exynos: initialization/deinitialization fixes Inki Dae
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1410268573-2297-3-git-send-email-a.hajda@samsung.com \
--to=a.hajda@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=inki.dae@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=sw0312.kim@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).