Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1293318imm; Tue, 5 Jun 2018 12:06:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJFz4qLcym/eblJn3nPAMpfMHlV11MhwxGvXf8a3KkKKC1Zn3pgqwaj9pl0XdQXHs+U8aGm X-Received: by 2002:a17:902:aa83:: with SMTP id d3-v6mr28617209plr.323.1528225563437; Tue, 05 Jun 2018 12:06:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528225563; cv=none; d=google.com; s=arc-20160816; b=fQeLgYAtSPNrEYacfFuyFVPJbNasK7+fps8UO0Knko7gjHLVY6CjNPhpIWKW5vtlEJ 98s4ogw+IMs8vPc1iHj7ALZCRv6GyO8i7n2YM7NoN/hEfxEi+Qb79+cOGG16B4Qu3upZ a/akPg94Ni8F0hWrCoa6NdmSiSGRahNw31IuFCa7ZZLtWTmxHIS/BdlfVIyq4PPRq4M0 m/h2sdRJEfKWOllSBKMP0d/QjC8zjytUR1sniPeoxTH5z0ed2kh+inBehkLhQsyt+4E6 +UMy2sRjdzN8EloPdEF2jjRy6lQbbrEz/i2JbrnGhtbmwEHF6rvb4lMOj4+ycTe9KlsD 3KUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:autocrypt :openpgp:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=qgIxt9U8Xo16uql8rIZ9xheMpKrxBdoZOH4JDfo/JqU=; b=SA8p9d4PJ5H9T9BezDfP3L1Mn67p2PTasqhUKOZf8QM71ShfyezKzkR+N78Doymviy COB1DDkRfKP1eumyZJNJomLBAHGHAba4ZKWLSRjbaDTx3khl/vNb3pZPRcd5nYzZAnUE DtAwEw4+wza68gav5WS8NY4vqNPGd/ElUEDGRGhr3lbayn9gh3f6CwKEKBNEcX5fKxDI 6juPIinpaNzrlIHtvEAwHEQ1QizY9nqk6XBg1aOF5WWPpCHEg609vW/NdP6vmAN6KrOA aIhu5h+Jvyf6Aw6uyc4L1oy6fPgBN2ZJKI+h8IAWFuF/xLPaJK8/MhKfqpBv3FwXAGxL bvdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=YTmgEmvc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f13-v6si39268339pgp.168.2018.06.05.12.05.47; Tue, 05 Jun 2018 12:06:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=YTmgEmvc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752178AbeFETFL (ORCPT + 99 others); Tue, 5 Jun 2018 15:05:11 -0400 Received: from mail-by2nam03on0053.outbound.protection.outlook.com ([104.47.42.53]:64864 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751968AbeFETFJ (ORCPT ); Tue, 5 Jun 2018 15:05:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qgIxt9U8Xo16uql8rIZ9xheMpKrxBdoZOH4JDfo/JqU=; b=YTmgEmvcdLhEg4HP9Gi/lIvgRRU1zuH9mdWb3vqhkjqdOOAXYFAhuz/8GNW+0q0J+yGzyn41qSXfMGhNrSU+T4oeU3uXn4iId6ug+CHx5XL1rkD3jHp9dxe0K30ZXy4ItfHmxbgUYjyaXAyKpYZP03Du/+FiiAVOVpt+foVS/38= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Harry.Wentland@amd.com; Received: from [172.29.157.77] (165.204.55.250) by BY2PR12MB0178.namprd12.prod.outlook.com (2a01:111:e400:585a::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.15; Tue, 5 Jun 2018 19:05:02 +0000 Subject: Re: [PATCH] drm/amdgpu: Grab/put runtime PM references in atomic_commit_tail() To: Lyude Paul , amd-gfx@lists.freedesktop.org Cc: Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , "David (ChunMing) Zhou" , David Airlie , Andrey Grodzovsky , Tony Cheng , "Leo (Sunpeng) Li" , Shirish S , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20180604193509.29153-1-lyude@redhat.com> From: Harry Wentland Openpgp: preference=signencrypt Autocrypt: addr=harry.wentland@amd.com; prefer-encrypt=mutual; keydata= xsBNBFhb4C8BCADhHHUNoBQ7K7LupCP0FsUb443Vuqq+dH0uo4A3lnPkMF6FJmGcJ9Sbx1C6 cd4PbVAaTFZUEmjqfpm+wCRBe11eF55hW3GJ273wvfH69Q/zmAxwO8yk+i5ZWWl8Hns5h69K D9QURHLpXxrcwnfHFah0DwV23TrD1KGB7vowCZyJOw93U/GzAlXKESy0FM7ZOYIJH83X7qhh Q9KX94iTEYTeH86Wy8hwHtqM6ySviwEz0g+UegpG8ebbz0w3b5QmdKCAg+eZTmBekP5o77YE BKqR+Miiwo9+tzm2N5GiF9HDeI2pVe/egOLa5UcmsgdF4Y5FKoMnBbAHNaA6Fev8PHlNABEB AAHNJ0hhcnJ5IFdlbnRs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6B700FFZMTR4YBVSGE8jPIzu2Fj0E8EkDmsgS+nibqSvWXfo1v231 410h35CjbYDlYQO7Z1YD7asqbaOnF0As+rckyRMweQ9CxZn5+YBijtPJA3x5ldbCfQ9rWiTu XQ== Message-ID: Date: Tue, 5 Jun 2018 15:04:56 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180604193509.29153-1-lyude@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.55.250] X-ClientProxiedBy: YTXPR0101CA0011.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00::24) To BY2PR12MB0178.namprd12.prod.outlook.com (2a01:111:e400:585a::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:BY2PR12MB0178; X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0178;3:wXcOTGBljDAyEldOg/rR8GNkviUYJoNcjfxk0I9QVT5Q495kO8zRTtT9c/TTGm/edH80O6kM3E5wmnawu8xPdnMRkBWaFlhFkZ6Sss2oKj7POvdq/8WYW/Wq2l5n+1YxnQlRK8iaxKfVB6LdR32caYyKxe4bmaL4OVOfpg1w3PI+QZ7lWn9gykK0/9jUaoezVFpp1/f+kZ17vne4045tGbzG58zK/IkN46HIFS0a5dI+vdiFUOelsbgci8AhubmO;25:kvhSoQQNgHaafife6GdeRXc93uysjiJ61kCSbCyQS4F7duSEI8x+ohb5zIgHGXW/htgrxkiFXpLZ3/8G+oVSm7G8GnyEsDepnNbgUbYdEPs8MaGi7Su9EEBI5HA0j0fxHFPNMEir6JAfueX1qMEM/j7VCNBAL/sjJZf5hQNwXC5+MGHjWHrHJNk1Rx2vu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Kyy/iYv53kPNi2jFfFWsZWUJai8bEzeYweC6RRy7n1SHYr4QPQR0zxnjZ4x7l7Xy4bI6DuF1mf3EgNijZryHHwu4wJoqoa5W+Tm5CMml2qaaIuJM3C7HUljmzhUQoZxu40UtSQJ7nU0hCgUOXVtWO5XpWZcPhIRZFS0AFN0WYN9ZV3W8PjHP1I9FEPROnNULRAQvLHuTbgnkCNvnbCWZ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231254)(944501410)(52105095)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:BY2PR12MB0178;BCL:0;PCL:0;RULEID:;SRVR:BY2PR12MB0178; X-Forefront-PRVS: 0694C54398 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(39380400002)(376002)(39860400002)(366004)(396003)(346002)(199004)(189003)(16576012)(68736007)(31696002)(52116002)(5660300001)(31686004)(2486003)(86362001)(25786009)(66066001)(65806001)(65956001)(23676004)(230700001)(6666003)(52146003)(486006)(446003)(316002)(47776003)(11346002)(58126008)(65826007)(8936002)(6116002)(72206003)(54906003)(8676002)(2616005)(106356001)(476003)(64126003)(36756003)(956004)(44832011)(50466002)(26005)(77096007)(7736002)(386003)(305945005)(2906002)(16526019)(186003)(6486002)(53546011)(3846002)(229853002)(6246003)(105586002)(76176011)(81156014)(81166006)(4326008)(53936002)(59450400001)(478600001)(97736004);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR12MB0178;H:[172.29.157.77];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts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cL50HEjuy7u3uTG8DTKdA1t7uu+TUi0gaS7lT6GT5oG3QbqhT/Ny4onKH7hWz95PzQmSkjI6h8Nc35/WvExx3bwJ0Om/a6PPuugNXZDlxJO2T6Lz0rw0mgBGP60ePl7gAuhdWg6192qE2g=;24:DdA7ioqCeA6EDu76Nq8eLriGiEgOY20oRPOuOe2hQpgL3wUEaArKICKnpDMobkOqhMGhEa5nez9u7pxbq3fHpBr54aCUdZep3fuRLH4sDUs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0178;7:vYccpmgaBj18fVsu4TT0r0bIKJN1FfxwVRUKWSMb3/2Im2S/cmk5tqKsSNxN6AQ5di3zEx6Z//IhAJyyl9d7Bhq7wQCKiPMlr9iB0JSXknWWaNzUaiymTHR1704nuLNJeFDx4xetsyKZ0T3htYn2eAk/U4ueUe9gXLp5iA/cPtk4AhEwZRJU6lvMjjjAKIpQat9jG+YzflqOzsa8Cy3dKT+YO8JkIuD8fOznSp8WiJGY445TlbQbrpsk96pigNjD;20:m6NnUxVs/ytbd1w2EwiVABewcIt3fe2bD9pnffDFAYNYj+zrXG/IPcWWzn4MZIScXpu5gQVLrFKcIUYLVChGatnn9pJWuk2IuTCUpc0oFPRqDuE0yliDyzDVUF8DYzs7tU60s3k6Sq14bSJhgDXUgF0F8xd3iFNXyZI1A1vGj8CwHrsYjGkuBb5DWtBcVZjEpGAnUPXXj9I9OJd9pl4U3QeFXhrwSv0bgHq5WiQMhBKb32+Ym1PasZx2UigUPFxd X-MS-Office365-Filtering-Correlation-Id: cc2d2d9d-03fa-431e-b1e2-08d5cb173ed3 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2018 19:05:02.0602 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc2d2d9d-03fa-431e-b1e2-08d5cb173ed3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0178 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-06-04 03:35 PM, Lyude Paul wrote: > So, unfortunately I recently made the discovery that in the upstream > kernel, the only reason that amdgpu is not currently suffering from > issues with runtime PM putting the GPU into suspend while it's driving > displays is due to the fact that on most prime systems, we have sound > devices associated with the GPU that hold their own runtime PM ref for > the GPU. > > What this means however, is that in the event that there isn't any kind > of sound device active (which can easily be reproduced by building a > kernel with sound drivers disabled), the GPU will fall asleep even when > there's displays active. This appears to be in part due to the fact that > amdgpu has not actually ever relied on it's rpm_idle() function to be > the only thing keeping it running, and normally grabs it's own power > references whenever there are displays active (as can be seen with the > original pre-DC codepath in amdgpu_display_crtc_set_config() in > amdgpu_display.c). This means it's very likely that this bug was > introduced during the switch over the DC. > > So to fix this, we start grabbing runtime PM references every time we > enable a previously disabled CRTC in atomic_commit_tail(). This appears > to be the correct solution, as it matches up with what i915 does in > i915/intel_runtime_pm.c. > > The one sideaffect of this is that we ignore the variable that the > pre-DC code used to use for tracking when it needed runtime PM refs, > adev->have_disp_power_ref. This is mainly because there's no way for a > driver to tell whether or not all of it's CRTCs are enabled or disabled > when we've begun committing an atomic state, as there may be CRTC > commits happening in parallel that aren't contained within the atomic > state being committed. So, it's safer to just get/put a reference for > each CRTC being enabled or disabled in the new atomic state. > > Signed-off-by: Lyude Paul I'm not familiar with the runtime_pm stuff, as is painfully obvious from the fact that we missed that with the DC driver. That said, from a cursory look at runtime_pm.txt, this looks right. Reviewed-by: Harry Wentland I'll pull this in through the amd-stg tree. > --- > As a note, I'm not entirely happy with this fix and I wouldn't be > surprised if I missed something while looking through amdgpu. So, please > don't hesistate to suggest a better fix :). I still don't really like amdgpu_dm_atomic_commit_tail and related functions. We have plans to rework these and make them more straight-forward. Harry > > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > index 1dd1142246c2..361b81ef6997 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > @@ -46,6 +46,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -4211,6 +4212,8 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) > if (dm_old_crtc_state->stream) > remove_stream(adev, acrtc, dm_old_crtc_state->stream); > > + pm_runtime_get_noresume(dev->dev); > + > acrtc->enabled = true; > acrtc->hw_mode = new_crtc_state->mode; > crtc->hwmode = new_crtc_state->mode; > @@ -4396,6 +4399,16 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) > drm_atomic_helper_wait_for_flip_done(dev, state); > > drm_atomic_helper_cleanup_planes(dev, state); > + > + /* Finally, drop a runtime PM reference for each newly disabled CRTC, > + * so we can put the GPU into runtime suspend if we're not driving any > + * displays anymore > + */ > + pm_runtime_mark_last_busy(dev->dev); > + for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { > + if (old_crtc_state->active && !new_crtc_state->active) > + pm_runtime_put_autosuspend(dev->dev); > + } > } > > >