From patchwork Mon May 9 02:32:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinliang Liu X-Patchwork-Id: 67334 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1373768qge; Sun, 8 May 2016 19:24:24 -0700 (PDT) X-Received: by 10.98.104.133 with SMTP id d127mr46889619pfc.112.1462760664497; Sun, 08 May 2016 19:24:24 -0700 (PDT) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id v8si34514698pfa.181.2016.05.08.19.24.24; Sun, 08 May 2016 19:24:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 196D66E0A0; Mon, 9 May 2016 02:24:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x22e.google.com (mail-pf0-x22e.google.com [IPv6:2607:f8b0:400e:c00::22e]) by gabe.freedesktop.org (Postfix) with ESMTPS id C809B6E09C for ; Mon, 9 May 2016 02:24:20 +0000 (UTC) Received: by mail-pf0-x22e.google.com with SMTP id c189so72240053pfb.3 for ; Sun, 08 May 2016 19:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8zRk8xiQUWRw2z8CDBb/bb8oj6D+H1Y0AOh5dKOhtIU=; b=TbMfC1VLlQDMcV9I2yP+Wzb5iSC5653oZyyTyeqkWvOUFLZOhKwmh7DC6BFM+uWRrm j7WrE2eSJ+dfCLwFxp8lyX5oh84HV9T8GithLg+0sESYfyuJ9Hf/nXMm6URz5KynJAtt QG01ZhheLIqHyDGJa4nn4AOrUSOul3jRSlCdI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8zRk8xiQUWRw2z8CDBb/bb8oj6D+H1Y0AOh5dKOhtIU=; b=kQ81Utec/1wQNbGS7/MPmK2137Hx40NYWCFOy8fDZKZfFxR4vl8UyT0NAhSLUUrGML MKBUlV9VvLCmG1ttRzThgPouSnYP5kAlyccPB2AUPEXPi8BaThRikADDBqfUONwpRe5B 9C9PKkts312dd8u5dTvJkI4fn85ZV6G1SQnSHiDJf47IgTWNxCR9VyYT28faqU94Vslu e1zfnBqBFqh4pNYPwdQRvPy+helNWlWsPh+CPgKAZdX0rQlc83vik4dV1RxHu5dbhAa5 VQkthHuaUxVvY3wK25DPiS/+B5xvTk+h85YCDhBIUuflLHQhU65ujYkabvwR0RpRNiIO MmJA== X-Gm-Message-State: AOPr4FUKjsX850FcYA89MxpFj6hvin8X5/bgqlZrDifzVmKEgp08OU8iY1YxZG+c23ILHv89 X-Received: by 10.98.26.130 with SMTP id a124mr47527394pfa.39.1462760660276; Sun, 08 May 2016 19:24:20 -0700 (PDT) Received: from HTSAT-OPENLAB-SERVER.localdomain ([219.134.81.243]) by smtp.gmail.com with ESMTPSA id q70sm36066597pfj.81.2016.05.08.19.24.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 May 2016 19:24:19 -0700 (PDT) From: Xinliang Liu To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/3] drm/hisilicon: Make kirin_drm_unbind sufficient Date: Mon, 9 May 2016 10:32:07 +0800 Message-Id: <1462761128-106487-3-git-send-email-xinliang.liu@linaro.org> X-Mailer: git-send-email 2.8.2 In-Reply-To: <1462761128-106487-1-git-send-email-xinliang.liu@linaro.org> References: <1462761128-106487-1-git-send-email-xinliang.liu@linaro.org> Cc: daniel.vetter@ffwll.ch, juha_efku@dnainternet.net, daniel.vetter@intel.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Remove deprecated drm_put_dev. Clean up everything needed in unbind. Thanks to Daniel Vetter, this issue is reported by him. Signed-off-by: Xinliang Liu Reported-by: Daniel Vetter --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c index bc410ee584b7..3f94785fbcca 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c @@ -244,7 +244,12 @@ err_drm_dev_unref: static void kirin_drm_unbind(struct device *dev) { - drm_put_dev(dev_get_drvdata(dev)); + struct drm_device *drm_dev = dev_get_drvdata(dev); + + drm_connector_unregister_all(drm_dev); + drm_dev_unregister(drm_dev); + kirin_drm_kms_cleanup(drm_dev); + drm_dev_unref(drm_dev); } static const struct component_master_ops kirin_drm_ops = {