Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4141473pxk; Tue, 8 Sep 2020 11:42:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrZyfuWGn0k9ikEtxFEpTfb9HrXSMIf5YHj6cgXdyJkZ+Xqr7/+BrifSuCEbu+FCQ/ZEZ6 X-Received: by 2002:a50:8e17:: with SMTP id 23mr340014edw.31.1599590546782; Tue, 08 Sep 2020 11:42:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599590546; cv=none; d=google.com; s=arc-20160816; b=QWBs3EQBuQAi9xw9v0xwxpQMhp1EddxQ8j8eTO2Ow+GBVAR4kQc4E8EfSX7DcRINce C8LYS7k6vO+PQ8+F2buk0Rdb+3q9xGQ+Lp05Vt9yei/M7jlPh2Zo8O3lHyM8SSMSbKOJ JigSVpTFUTCymG/98+F3qH1QkUaCT1e+cDNXpqIqWU5Do57QlN+8bDKPM8rFAOAoI3Cy Dl9cRUBjgyfgSYrRmrRAqGnrnc284begIjBdPmVL4l1n/uz1XVlmEvwUqJrejvZ47viw 86fPyQ79Ph+LCkX8BrA3nhX6ywFMrMfXGphm+c4bpPu2NhCzZYLfl5Yqnb4sGF0mlcSi hEqw== 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=V4n6jn1Q9VWG3SaNKhnfnvB6HIEKjO14BEHpH81hJhA=; b=sRXPRvyvehWlFVau5Mv0rToEUIeXiBBi27IOG0dN+5k9c1JQkvNXHkmPY5bLVpuL8S ZBQVp4+1f6n4kXkSfS9M6GY+HaUrJncVHSioD6z+sOhIf3dmr2AzP3jFhe5Abp+/h2VA ZRkscaN9XPSkCTKIy/cqSOnV4SFoQ9fC8noUqSErqwA5+JolVLM0sDynPP5DwNizqCap 5Kv3mXSNX1ggc7CDwYRsuE0Nu5KXtSaSOL87MC3XyVTxSFTM0S3EOLmQpJQQfaTO9I1/ tr61xIt95r9sSME79tAcQk3RXILITIMoqN83b7xzR3GHbM0kFko8AySeUMT6yBQkoqnI Ka9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WbOdr5nK; 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=fail (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 m26si13958371edp.47.2020.09.08.11.42.04; Tue, 08 Sep 2020 11:42:26 -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=default header.b=WbOdr5nK; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726484AbgIHSl2 (ORCPT + 99 others); Tue, 8 Sep 2020 14:41:28 -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 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 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, -- 2.25.1