From patchwork Sun Aug 4 20:37:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11076205 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 89A2B14E5 for ; Mon, 5 Aug 2019 07:35:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E46A287C0 for ; Mon, 5 Aug 2019 07:35:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62BFE287D3; Mon, 5 Aug 2019 07:35:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1A19B287CB for ; Mon, 5 Aug 2019 07:35:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4555D89F6B; Mon, 5 Aug 2019 07:34:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id 55C8A89E15 for ; Sun, 4 Aug 2019 20:37:56 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id f17so71071262wme.2 for ; Sun, 04 Aug 2019 13:37:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=614oQfNECnBl76zZMuP6DD7lsJ4uFIehr7gg2GuUSuc=; b=AS5xn4YSp9UrKN+Ij3YZ8vkrQaQX0WbE1hZdE2JjpxJEjx2fmNIdXl+u3FFkJY8bBs S4DgowpmukcFKBKByDgVZrhIaRnVfR17Klh0XDr9kNnAE60ej3y4QZFZ2lnm6bj7nioE NE02/KwOTdgc2RiH56WSfilTvAPNwSjUWudzSdqUbFbXoGb76u6yHxH/xqa8sSJVw86y /A9VCQ7GIcrMwY9I/Igz/q0PZpcWcN6LQJFCDPxtqvwZbdOBb0cj80UsbV5XQfuQ/lmL Idql3vLfCZJI2bZv5u4mvriryft3sXVS/VY9uQ06zr3NK4qUI5UUBC7/EBhr1PTYAXSH MH3w== X-Gm-Message-State: APjAAAX9oxo5fssYDxc4e79s6Wk5s9rIPu3RU3p1NMB69Du8MblbDGwX PLg496DVCd3hpaF1m9Co6d8= X-Google-Smtp-Source: APXvYqxWQqaUp9OfLwLuDJf120aVTFuhjtTQ9WayyTg2GRXAT9S11eHNFLdnTlvX3jYer7/a2+NswA== X-Received: by 2002:a05:600c:2146:: with SMTP id v6mr14194434wml.59.1564951074997; Sun, 04 Aug 2019 13:37:54 -0700 (PDT) Received: from localhost.localdomain (ppp91-78-220-99.pppoe.mtu-net.ru. [91.78.220.99]) by smtp.gmail.com with ESMTPSA id v16sm75542601wrn.28.2019.08.04.13.37.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Aug 2019 13:37:54 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding Subject: [PATCH v1] drm/tegra: dc: Turn off and reset hardware across suspend-resume Date: Sun, 4 Aug 2019 23:37:02 +0300 Message-Id: <20190804203702.16073-1-digetx@gmail.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 05 Aug 2019 07:34:45 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=614oQfNECnBl76zZMuP6DD7lsJ4uFIehr7gg2GuUSuc=; b=udRZwvBy56EHj8w5FiQd5HmvHtoeIayI3x/yvR6sDJ+Ewn7z6yi6mu6NWlwcZAmS8D WtiBRgG2YRRcKwLv9ELIX1/WwhbIuGA3JDAmeEeDqydM0Qigb41mROG+XqaZs6JgDKeG aZiHbcZzbbtS3Wdmk4sivf6kI0cuBaeOc/0YiFZYn2QEy71YOfDiE0YTlvXUHcoKXwga yqY9MZsRA5iUHQvgvqyw31kKMRL5MRmOT8Ub3f3s79jEmAj0QJagrIvlYSpnyA6irJRo tY+ILDpiR09VHgcAF5dmquq+hnRhMYccvKffAcSmQB+ZW+z04xOzeor4jZU8bKwMAdFP vauw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The drivers core bumps runtime PM refcount during of entering into suspend to workaround some problem where parent device may become turned off before its children. For now CRTCs are only getting disabled on suspend and in order to actually suspend the display controllers hardware, the runtime PM needed to be "forced" into suspend mode. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/dc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 4a75d149e368..6c8f5222d558 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -2572,6 +2572,8 @@ static int tegra_dc_resume(struct device *dev) static const struct dev_pm_ops tegra_dc_pm_ops = { SET_RUNTIME_PM_OPS(tegra_dc_suspend, tegra_dc_resume, NULL) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) }; struct platform_driver tegra_dc_driver = {