All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
	Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH] drm/i915: implement HSW display sequences for package C8+
Date: Wed, 5 Jun 2013 22:39:03 +0300	[thread overview]
Message-ID: <20130605193903.GI5004@intel.com> (raw)
In-Reply-To: <CAKMK7uHcsFMX9LWAZyK-ajAyiBKTj3qr2oRJgU-sBeHuE=qu+w@mail.gmail.com>

On Wed, Jun 05, 2013 at 08:04:48PM +0200, Daniel Vetter wrote:
> On Wed, Jun 5, 2013 at 7:20 PM, Paulo Zanoni <przanoni@gmail.com> wrote:
> >>   So all together I vote for the generic interface to be called something
> >>   like
> >>
> >>   intel_aux_display_runtime_forbid/allow
> >
> > I changed to intel_aux_display_shutdown_forbid/allow, because we
> > forbid the shutdown, not the "runtime".
> 
> Just one quick comment: The idea was to be 100% consisten with the
> runtime pm api (I've dropped the pm_ part unfortunately), which is:
> 
> extern void pm_runtime_allow(struct device *dev);
> extern void pm_runtime_forbid(struct device *dev);

I've not seen those guys before, but they don't seem like something
we ought to be using. In fact it seems they're there solely for the
purpose of sysfs. They frob the runtime_auto boolean which has no ref
count protecting it, so someone writing to the sysfs "control" file
could undo what we just did from the driver, and vice versa. There's
still the usage_count though so the device should remain alive, but
then that's what _get()/_put() also modify.

I do see quite a few pm_runtime_allow/forbid calls from drivers though,
which is confusing to say the least. Either I'm confused about the
purpose of these functions, or there has been a serious problem with 
driver review.

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-06-05 19:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16 16:47 [PATCH] drm/i915: implement HSW display sequences for package C8+ Paulo Zanoni
2013-04-17  7:47 ` Daniel Vetter
2013-06-05 17:20   ` Paulo Zanoni
2013-06-05 18:04     ` Daniel Vetter
2013-06-05 19:39       ` Ville Syrjälä [this message]
2013-06-05 20:35         ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130605193903.GI5004@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.