Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3058237imu; Mon, 19 Nov 2018 10:00:58 -0800 (PST) X-Google-Smtp-Source: AJdET5cZPx8rS6pAoD27XuIeP/9dpvZc45mr0lbG7fAHlRAlUG6J4z4WSOoe46ZTO2kDMaNr3EDr X-Received: by 2002:a63:5e43:: with SMTP id s64mr21149347pgb.101.1542650458399; Mon, 19 Nov 2018 10:00:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542650458; cv=none; d=google.com; s=arc-20160816; b=IfpjsndEM23jetzXs6jzkxTUrUASTQaX3ZJ/sYsek+6/vGUtfVeABHAsa9gRIC8xJv sn5SuhNkwJCk35cC++E9c8DxGfcJYVPQn0TjCaSwCZudbTygpWAcFhRitSaRRHsRGSSc bajPKAV0sE2J7Jdve3S/gmfLd8Uc6sf1Sw+YDcYNgs5+RIh3zqKw6EUKN7sa+f3vQxxk ok8yW2/2Yh7+wYqQFYMuj9V6yne4dKBHcw/mRE5DORcXIg9v5KlULZH9LntxmTW2T0qU lj+srIyTErYqUOQMgpmqCl+m30lBBuxf181Ui6A8bw6NuCbC1ay/C3ON3+xNE6GT801F VXYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VZPqlUnTquRIxt+qoxFyaIXOXNVu3mOf7pwpnq99QmY=; b=TkmIjkr9gqotguCeblEYHADzXnwNP7L7CsC+Cq2x47nw6MruXKyIMnqjpW/V8SoXl8 J4xLRDKky09gFUTDNT7Q0TG+POfNr2Aopl369ihCZOKW1ZpC1xFqjME/xcpsp1abVICW NQlD6JkE/D/rY8U+EFul9A8hH8EmLP0EEGRofUGewtZfcoBBc6pWPaVwfrpnx9oWfQCv EpfaMracOysrMXEMPwpHp5VSSgmtQVtzyrOtokssn32tYBLRbTaRECt6X8f7CdboKAg9 7o5dsPLQ8SxXU9xDs5nVCPaP99ksq1aQsV8VRqUb8c1C8CC9cocvKYLjoEOMKthDHRXO uskg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0OFsKbYT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7-v6si8110348plp.130.2018.11.19.10.00.43; Mon, 19 Nov 2018 10:00:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0OFsKbYT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732310AbeKTDCA (ORCPT + 99 others); Mon, 19 Nov 2018 22:02:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:34108 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730719AbeKTDB6 (ORCPT ); Mon, 19 Nov 2018 22:01:58 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7543F2147D; Mon, 19 Nov 2018 16:37:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645470; bh=2+nvyawONrROMz4zJNn3TyuLcKqtJftwv5R+3XhNQdc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0OFsKbYTqMACVgV19HTpPv+tReb2Yj+rqgBBk6x9e8VdqTK4wt2vsbvzlNtbnMPts ervAsheT56vvH8kiZr8dm7rjhmNtwdyuB99RufevLQfCDmhoX8o1QAChGoIB8vShyy qB9B295BsnVq4JQjbnvXiEFAhBxOeYuWIkiddjWk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marc Zyngier , Vicente Bergas , Heiko Stuebner Subject: [PATCH 4.19 173/205] drm/rockchip: Allow driver to be shutdown on reboot/kexec Date: Mon, 19 Nov 2018 17:28:00 +0100 Message-Id: <20181119162640.634190091@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162616.586062722@linuxfoundation.org> References: <20181119162616.586062722@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Marc Zyngier commit 7f3ef5dedb146e3d5063b6845781ad1bb59b92b5 upstream. Leaving the DRM driver enabled on reboot or kexec has the annoying effect of leaving the display generating transactions whilst the IOMMU has been shut down. In turn, the IOMMU driver (which shares its interrupt line with the VOP) starts warning either on shutdown or when entering the secondary kernel in the kexec case (nothing is expected on that front). A cheap way of ensuring that things are nicely shut down is to register a shutdown callback in the platform driver. Signed-off-by: Marc Zyngier Tested-by: Vicente Bergas Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180805124807.18169-1-marc.zyngier@arm.com Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -442,6 +442,11 @@ static int rockchip_drm_platform_remove( return 0; } +static void rockchip_drm_platform_shutdown(struct platform_device *pdev) +{ + rockchip_drm_platform_remove(pdev); +} + static const struct of_device_id rockchip_drm_dt_ids[] = { { .compatible = "rockchip,display-subsystem", }, { /* sentinel */ }, @@ -451,6 +456,7 @@ MODULE_DEVICE_TABLE(of, rockchip_drm_dt_ static struct platform_driver rockchip_drm_platform_driver = { .probe = rockchip_drm_platform_probe, .remove = rockchip_drm_platform_remove, + .shutdown = rockchip_drm_platform_shutdown, .driver = { .name = "rockchip-drm", .of_match_table = rockchip_drm_dt_ids,