Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1953371pxb; Thu, 16 Sep 2021 21:24:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVtAHH1BnFvCdRvtKJdAjgj31lLZemt9CA4g9dDPVr0X46/jTShn7OrmmIHjpiwu46Dr1r X-Received: by 2002:a05:6e02:dcf:: with SMTP id l15mr6742074ilj.167.1631852664783; Thu, 16 Sep 2021 21:24:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631852664; cv=none; d=google.com; s=arc-20160816; b=q6a9G0XTjy6IX8qwf2KbtzG8HkA2ualb0ADSgyXrta2NA0SRPJy4DKrbDu52jnFU4y 8H5qaDAFT4YrCDTT4lm1IZpWrNCxhkSIixrOUuCVRfGk63l78h9MCM0Cm89xhv/u4prX aownWQ0sYfCdjCTp5SKLu6jpq9GOFUb09H4G5KTV52FO5GM2v/LyDU/ZeoBP8jQO95tj h0UfPexTX5e3agAc3W5lqjd0D5XJcrJJUYW7BKiSTZzvqzFlemFZKkvZngPL6f0tssd2 jSmOep0Xg6gbqkDCIuUvHEVJhQFFuYJBRxs8muJPtgTtED5KYJm2PflGacRJHKHC0Ws4 d6Ag== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DZ5lTNKHEHkCDQmSvUsmwaOoJpgi0P8a7QyRb3dsrc4=; b=h7npNheuMrianCh11ZGXY4MRUTqv4bNo2izuI6jWoJ7VtWUgQMkWqBrbV7AnErV9t6 lrwDezsXRTBWZ/9oxAWKcblGnUfhV/2EBb9vutRl0/VE0xuK56IR04rj8KGCZEs1meYI 3EccUx6lrVASPl+YGCxevjmhZG7zgsI5DlPA6oVzJUzqOARjryPhn+YVI8HnAsVYNN9C 1chC1yLfmTKyCmWPkYt0egMXfW4jA7LUHzgOgx1dIqlP0La0lvCRk4XnD2sdQTkD5zhE Bkju1u2hunHSsyza38KIUB+aSQoJslt/Es6tUgeX/jxCdz/1SNaobFnMyo6Sa2oPZpnY hixQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0lN1rZtH; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i31si4778138jac.56.2021.09.16.21.24.12; Thu, 16 Sep 2021 21:24:24 -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=@linuxfoundation.org header.s=korg header.b=0lN1rZtH; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354188AbhIPRj3 (ORCPT + 99 others); Thu, 16 Sep 2021 13:39:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:50274 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353045AbhIPR3x (ORCPT ); Thu, 16 Sep 2021 13:29:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5C61263220; Thu, 16 Sep 2021 16:46:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810800; bh=TVNg8zjVBTknJKY0S5oiSuuLo65vTE87yCYMkTpBwpg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0lN1rZtHPjJPM7ShOmJcemGVUoz0dwddPWR1WEnRzp4RhOQLtZGyCjcB2gxj+NjY1 rM8dqr5lTHIgxcUQfo4p2ZaRroG9nP5i27FWFqAAy0JMYWkMRVP7QBkoS0yqC5GeYU GqK/5evO/MLLsBIPQI+uChfUyoyLk4D81REJW2eM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Laurent Pinchart , Kieran Bingham , Sasha Levin Subject: [PATCH 5.14 240/432] drm: rcar-du: Shutdown the display on system shutdown Date: Thu, 16 Sep 2021 17:59:49 +0200 Message-Id: <20210916155818.970320814@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 c22551c2facb..2a06ec1cbefb 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c @@ -559,6 +559,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; @@ -615,6 +622,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