Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4117137pxk; Tue, 8 Sep 2020 11:07:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzI6vsBZ2hZCt+Glt9Ul3Hi/esE5nO5tHY7JYMq21deBxdqlQHZv4fG9c7h8hMUhX3SdQ4U X-Received: by 2002:a17:906:4755:: with SMTP id j21mr27825550ejs.228.1599588456819; Tue, 08 Sep 2020 11:07:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599588456; cv=none; d=google.com; s=arc-20160816; b=YFRmDL78wcOjqSuvTzhIAA+LqCKgjlfTyoor07TUErq4sI9PtHatmAec3utYtGVhr0 l+Yo8H8mfedaTAC6MHq0Mnutqi+UYlVzSvs5CdkkyT2poaLzJk0HVZZzbAmGoiWZaZlJ QTyGdLr4543XVEr7LNM7THBOflachsetu3NwQa3MfmbApK+SxeAJBH0aIIjSO8VGTWdd OiTcR9h0+DLkNnmPXKmDNRMw8voXebjrl/67W3Q4eFsuVYeGRqJyO1Aa8QTGC5BQAhcz M3cRm8kCnILy2xDegsvl3Og3g6FIUdpSwrxWB15PIQVBjj9xYhvH7GaKI+4MgkSCGZU1 fZzg== 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=bm9fcTp5DGXLyA79Aw33g37Z8CZLfI9QuowrdTxZxbA=; b=JJbbPPMymnfWYx7nq/VHIzAE+Xp0nRNe+L80iRz79KIAnGywxAq21+7+pdc9gf2m80 G1F+INYtzhnO9qFelFlqvKspEABGFtfF1NdM+8gI5EgyatlrJJi7flRRKWRULNisO0xg smVHUV5HktWqmdMzABNw6Xd6iAn9ENat/3GQoQGWtPMe1sCSmE0xchC4I3gv12wbf5qn CWOxUqkflkY15nqZb4kQ3lE4ruqQh4a6PUfpjbnxgndBgRcctYQ491bN4MT8AGiKNzxP 74fZ4QxS2kXBrF3UmWb8zF0z00zEVpI6ZYQFvc6MV0WhuJzFtWEeIqYYeeeA7c1cApFv cSiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=th7dMz3k; 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 y24si12395284eju.401.2020.09.08.11.07.12; Tue, 08 Sep 2020 11:07:36 -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=th7dMz3k; 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 S1732004AbgIHSGb (ORCPT + 99 others); Tue, 8 Sep 2020 14:06:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:56078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731521AbgIHQMJ (ORCPT ); Tue, 8 Sep 2020 12:12:09 -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 215A3247C4; Tue, 8 Sep 2020 15:51:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599580286; bh=CyQWGRvj67cqowJfDn4vuv/txn4szGizTTVBdxHOyvM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=th7dMz3k+8IOuzYO4UfKrHwcC1mNucMnaoxwDr/2cz1xmGbz3xqd/+CMU1Mx2i4gm RrL+knsh7U7V6u1TJwZIQfmpeDYDO8HvJUIhOzrL9cGg33JCOyPVzKAOfgw4M0/mW5 dm7rhqNW415HPIR42eXlV/CJqAlpaIuutIB2CvsI= 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.14 04/65] drm/msm: add shutdown support for display platform_driver Date: Tue, 8 Sep 2020 17:25:49 +0200 Message-Id: <20200908152217.254848720@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152217.022816723@linuxfoundation.org> References: <20200908152217.022816723@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 d9c0687435a05..c59240b566d83 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -1134,6 +1134,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 *)4 }, /* MDP4 */ { .compatible = "qcom,mdss", .data = (void *)5 }, /* MDP5 MDSS */ @@ -1144,6 +1151,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