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: 9040991 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 03D699F372 for ; Mon, 9 May 2016 02:24:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3DFB32010E for ; Mon, 9 May 2016 02:24:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 72C58200EC for ; Mon, 9 May 2016 02:24:24 +0000 (UTC) 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" X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-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 = {