[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0adb89a9-4642-2104-1ba5-ebb86c7ac4fc@gmail.com>
Date: Mon, 29 Nov 2021 00:50:46 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Michał Mirosław <mirq-linux@...e.qmqm.pl>
Cc: Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Viresh Kumar <vireshk@...nel.org>,
Stephen Boyd <sboyd@...nel.org>,
Peter De Schrijver <pdeschrijver@...dia.com>,
Mikko Perttunen <mperttunen@...dia.com>,
Lee Jones <lee.jones@...aro.org>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Nishanth Menon <nm@...com>,
Adrian Hunter <adrian.hunter@...el.com>,
Michael Turquette <mturquette@...libre.com>,
linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-pm@...r.kernel.org, linux-pwm@...r.kernel.org,
linux-mmc@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-clk@...r.kernel.org, David Heidelberg <david@...t.cz>
Subject: Re: [PATCH v15 12/39] drm/tegra: gr2d: Support generic power domain
and runtime PM
28.11.2021 08:47, Michał Mirosław пишет:
> On Sun, Nov 14, 2021 at 10:34:08PM +0300, Dmitry Osipenko wrote:
>> Add runtime power management and support generic power domains.
> [...]
>> @@ -104,10 +127,17 @@ static int gr2d_open_channel(struct tegra_drm_client *client,
>> struct tegra_drm_context *context)
>> {
>> struct gr2d *gr2d = to_gr2d(client);
>> + int err;
>> +
>> + err = pm_runtime_resume_and_get(client->base.dev);
>> + if (err)
>> + return err;
>>
>> context->channel = host1x_channel_get(gr2d->channel);
>> - if (!context->channel)
>> + if (!context->channel) {
>> + pm_runtime_put(context->client->base.dev);
>
> Could host1x_channel_get/put() handle pm_runtime* calls ? I would expect
> this to be common code for the users.
We already have host1x code that manages runtime PM of the client
drivers, but it does that only for the code path of the new UAPI.
In case of the older UAPI, seems we can move the RPM get/put into
tegra/drm.c. I'll consider that change for v16, thank you.
> BTW, pm_runtime_resume_and_get() uses different dev than
> pm_runtime_put() in the error path - is this intended?
These functions use the same dev. The context->client is redundant
there, good catch.
Powered by blists - more mailing lists