From patchwork Tue Sep 8 15:25:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 264226 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AD08C433E2 for ; Tue, 8 Sep 2020 18:41:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15DF22080C for ; Tue, 8 Sep 2020 18:41:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599590481; bh=/IvZsneCXeaOhikdorhW99mg/h1pdfob0kUSatt8uFU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=OFGzFvmUENj5zUabY9CD8YAa8p3GAKxwGmGltmpp84RcjGrpI1aP8aOHzTr77mhqV v/bDlOOZeXP23YUC4bu/zqkyxT8F2lfai8k27uiGKazby7GDRGc7xVnTeQ0ednvz+b cP927coH/QiUL5/UH+HCOM/veRwsYGCly1C2oklg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728443AbgIHSlU (ORCPT ); Tue, 8 Sep 2020 14:41:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:53536 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731290AbgIHQIC (ORCPT ); Tue, 8 Sep 2020 12:08:02 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 078B123EF2; Tue, 8 Sep 2020 15:47:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599580062; bh=/IvZsneCXeaOhikdorhW99mg/h1pdfob0kUSatt8uFU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WbOdr5nKF6S5cRJE6S2z6jvw+C2YkPQHkxlc4llJVmRow6be8B963ytMYNXgO8BhY 76/0f7HBWJCYwST7+xpaBGiKOG/Sfl8sJGaxGEE2T41HVg2K60xlWw/j1S7XIiyH2c THR+DQq0jB7PISAMVG0qvRf5D8t8JB4mQzROm9GM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krishna Manikandan , Rob Clark , Sasha Levin Subject: [PATCH 4.19 07/88] drm/msm: add shutdown support for display platform_driver Date: Tue, 8 Sep 2020 17:25:08 +0200 Message-Id: <20200908152221.460370773@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152221.082184905@linuxfoundation.org> References: <20200908152221.082184905@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Krishna Manikandan [ Upstream commit 9d5cbf5fe46e350715389d89d0c350d83289a102 ] Define shutdown callback for display drm driver, so as to disable all the CRTCS when shutdown notification is received by the driver. This change will turn off the timing engine so that no display transactions are requested while mmu translations are getting disabled during reboot sequence. Signed-off-by: Krishna Manikandan Changes in v2: - Remove NULL check from msm_pdev_shutdown (Stephen Boyd) - Change commit text to reflect when this issue was uncovered (Sai Prakash Ranjan) Signed-off-by: Rob Clark Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/msm_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 6f81de85fb860..7f45486b6650b 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -1358,6 +1358,13 @@ static int msm_pdev_remove(struct platform_device *pdev) return 0; } +static void msm_pdev_shutdown(struct platform_device *pdev) +{ + struct drm_device *drm = platform_get_drvdata(pdev); + + drm_atomic_helper_shutdown(drm); +} + static const struct of_device_id dt_match[] = { { .compatible = "qcom,mdp4", .data = (void *)KMS_MDP4 }, { .compatible = "qcom,mdss", .data = (void *)KMS_MDP5 }, @@ -1369,6 +1376,7 @@ MODULE_DEVICE_TABLE(of, dt_match); static struct platform_driver msm_platform_driver = { .probe = msm_pdev_probe, .remove = msm_pdev_remove, + .shutdown = msm_pdev_shutdown, .driver = { .name = "msm", .of_match_table = dt_match,