Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1051830pxk; Mon, 31 Aug 2020 08:31:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7GGiwM1FiCwjuchLXC244WGPNXDsblvfF6Ad7EXrrQ2pQDKn06ScdmiaSzd8G7aPTjMie X-Received: by 2002:a05:6402:31ba:: with SMTP id dj26mr1726091edb.181.1598887887074; Mon, 31 Aug 2020 08:31:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598887887; cv=none; d=google.com; s=arc-20160816; b=KBssBO8xNgenWNLU9m/LHqrQemGZf1ftQFkvZXZ1nRBmFlzxTiJd0rc83gbbUSlkN2 OLpoPETfUdJTadzSWWoqZIXXF/JJUg5sMrkD3jMbYoSZDWc/IgQm5ECTRVeJ6X3z4hNF ZOsz6shBhCnbV0oveCBPWCh4S7AFR6AbwjBlzpUPgHwfuphDpiDuxbt8KBPbCVfR+lxW MrW7ziTPn0uyrLBZy2ccQlL79ysWVpYj1WoDptkFQ5pDG7W0Z4kGsK0v6EHAYPt4f49o M99+OSXXNm1IfGV25KaIkOrXUQ17XxD4m/u3GFF/EGn4On2qZEdTwlIYWsEP/US6Q00u smow== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eDDE177j0UlU6kZ6hKxf7xEC/y/l/XFaeZ8lGzYVvoE=; b=KaXMP0nkami6N0of7nmUuYC92ddiUyQlCE48Ji3je3C/ZYBBfAvh47n2uzgORLiB/N AuTO2ug0aWyNJy81Pjl9jTsOocYZAoLSY0Ia5iEMunQxUlAgUH2t6joYUVOqlU2UFSC5 P1+CGfBtUUBzjf9TPd9b0HpIpeECNj80BTtz/5LFa64M91cyv7GUKYjRr6y4o4gVLeIF lQFLWDsrbvb+9Cm90uArdNnCYxVtDAa2tQsr270fq1PAM+rvzw5C6ztxnx0uKXTZ5SDE zrwPUe36o0foqXOIdFeGIa7v+fNs0dECoB4wEYuMQVYGIXzipUhOsSYkSWMEJP/KMW2r X11Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IcUH9tXP; 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 e7si6392115ejm.580.2020.08.31.08.31.04; Mon, 31 Aug 2020 08:31:27 -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=IcUH9tXP; 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 S1728535AbgHaPaH (ORCPT + 99 others); Mon, 31 Aug 2020 11:30:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:38656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728454AbgHaP3u (ORCPT ); Mon, 31 Aug 2020 11:29:50 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 276F220767; Mon, 31 Aug 2020 15:29:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598887790; bh=igUA3ysCtvbQZlZxzdgP/arDzUKvL7VVNXaZw/amLFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IcUH9tXPhQYDf7AKDqKwFWhGQywl4yYnEP9UsKnJpS+ClPq64CHQ2I8+MpCr/Hs8F kc8P8vHdY9ACCOHUu+h6MOEBru5cU0FD/2IZAiqW9oNjL5s4bFxHcmg/qS8j3y/Gb/ bJCWwyEzkgNYeqwd6Qzb/4WUAJS78PjsZJUJvN28= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Krishna Manikandan , Rob Clark , Sasha Levin , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.8 09/42] drm/msm: add shutdown support for display platform_driver Date: Mon, 31 Aug 2020 11:29:01 -0400 Message-Id: <20200831152934.1023912-9-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831152934.1023912-1-sashal@kernel.org> References: <20200831152934.1023912-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 f6ce40bf36998..b4d61af7a104e 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -1328,6 +1328,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 }, @@ -1340,6 +1347,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