Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp448192pxb; Thu, 9 Sep 2021 04:50:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYbzdkg4rjbiMvJLsAFKK9Wq5h+GKgKVdp0Hg92WX3+7qJqo0FBHtkl7EQ4Skm9ExvZw4h X-Received: by 2002:a17:906:5855:: with SMTP id h21mr2951405ejs.230.1631188209738; Thu, 09 Sep 2021 04:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631188209; cv=none; d=google.com; s=arc-20160816; b=TFf+V5I+Bsmo8gLj+cyOPyOgbJpcdj56vtDG0oWHm/PUM7/wUDoOOprdjp4Lnvp1tm sqc4MOXfCdgexL0MUYCNuiFRCLnHRcr+iMenNiK7SVb4bghLocqeBRCUO1icljjcsONr +QO234rQiENPRyRb69VXREKhB9eJfXz8BUZwIOa9JnWCH3b7/qUV7gedTyev/MZ/NSpn HrzduLc4bh/0QSyqI8y9dIH/UnrRdH9mojP99EKsS4Khaxs4NmSL94aRlMP9IzSTe52+ ewL0qhttzF58GkPQP7VrjuySkKMYV7jD5HqAvQRNWEj+k/sMlN+onnoV46fyiZ2rIh0f etiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oqcvz34/aOFkQWtOBnJZR6rmJIU4bU7Dnu0u/bk7yWo=; b=bmifLbhzAm/CiALjvS6ImoHp/xXeD5lI0aNRO3KqFeojkzljrNm8WxrNO2Y75P1my9 gcYFNHWV2KeXA44zvBZSMUHE4Bm5SpyUYWy8oDa0nnqXnPPg9u8t8F9dgkcvDRWXDBgj /+iI0+LQBXCZ1VlBsZtWWrEqcJlhcg7+Tlq9nQhKM3w9u8GP3B+xyVc9D/OnUcFvpSv+ 2XfRDl8zPFxz3zNdMCqw9mXOlKJp6dQtEBiZRjZDzMhydUzf3PCKmNjJ3l5Ynn6WBbky BXdn1SahwWiGaSPI1xb6k1iLR3sbfHG/sTQ+zVKSbgBmcytzcNQ0wmGeTFeTmbUDLt5o WARA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AntwiYDa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w22si1618510edc.482.2021.09.09.04.49.45; Thu, 09 Sep 2021 04:50:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AntwiYDa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243120AbhIILte (ORCPT + 99 others); Thu, 9 Sep 2021 07:49:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:46516 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240829AbhIILqb (ORCPT ); Thu, 9 Sep 2021 07:46:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 313C06124D; Thu, 9 Sep 2021 11:42:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187780; bh=JCUyILyV+6ACnUJ0rjVdIkqYyZqashxOxCmyeCo/XRk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AntwiYDacIqm8tgjvmMtijk0hFSM91A5fwSDR3tmGsUcpPPKBPDAKMjq470YBxkIU 52UemGmQ3/OoAuwdZJEqhK+osES+dTCldmfNIsIId1+TAea2GkkFJtG4OxmTpzgD65 Ke8WAH065j3hZD4kB/3SaHSOkw4/sQr43hPNnO91H9AcvbQwA2c0SY8zqOrfQI+evE RrF/qFTQiJdEwqVZ50vOQru2m8kyM8OCPB/ZFwrYsb//RDDNGuiB+z1htHs4rARJ9K yUhS8ffr2WINrIlMKbM2qTiVOMqlk38LpIWNlCRswafud5S3rkNtPF2QvHEaU7HpSB zF96JRd8MpEZg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Laurent Pinchart , Kieran Bingham , Sasha Levin , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH AUTOSEL 5.14 089/252] drm: rcar-du: Shutdown the display on system shutdown Date: Thu, 9 Sep 2021 07:38:23 -0400 Message-Id: <20210909114106.141462-89-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Laurent Pinchart [ Upstream commit 015f2ebb93767d40c442e749642fffaf10316d78 ] When the system shuts down or warm reboots, the display may be active, with the hardware accessing system memory. Upon reboot, the DDR will not be accessible, which may cause issues. Implement the platform_driver .shutdown() operation and shut down the display to fix this. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Sasha Levin --- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c index bfbff90588cb..43de3d8686e8 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c @@ -561,6 +561,13 @@ static int rcar_du_remove(struct platform_device *pdev) return 0; } +static void rcar_du_shutdown(struct platform_device *pdev) +{ + struct rcar_du_device *rcdu = platform_get_drvdata(pdev); + + drm_atomic_helper_shutdown(&rcdu->ddev); +} + static int rcar_du_probe(struct platform_device *pdev) { struct rcar_du_device *rcdu; @@ -617,6 +624,7 @@ static int rcar_du_probe(struct platform_device *pdev) static struct platform_driver rcar_du_platform_driver = { .probe = rcar_du_probe, .remove = rcar_du_remove, + .shutdown = rcar_du_shutdown, .driver = { .name = "rcar-du", .pm = &rcar_du_pm_ops, -- 2.30.2