lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 28 Nov 2021 06:47:31 +0100
From:   Michał Mirosław <mirq-linux@...e.qmqm.pl>
To:     Dmitry Osipenko <digetx@...il.com>
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

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.

BTW, pm_runtime_resume_and_get() uses different dev than
pm_runtime_put() in the error path - is this intended?

Best Regards
Michał Mirosław

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ