dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Kleiner <mario.kleiner.de@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Dave Airlie <airlied@redhat.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH 3/3] drm: Use vblank_disable_and_save in drm_vblank_cleanup()
Date: Thu, 07 Aug 2014 17:13:07 +0200	[thread overview]
Message-ID: <53E39783.4090201@gmail.com> (raw)
In-Reply-To: <CAKMK7uFxO0Zbhg0gEnFK6rDbbcMZZ+p0uZLk-iNuy1A32pK+1A@mail.gmail.com>

On 08/07/2014 08:50 AM, Daniel Vetter wrote:
> On Thu, Aug 7, 2014 at 2:50 AM, Mario Kleiner
> <mario.kleiner.de@gmail.com> wrote:
>> I'm not sure about all the new embedded drivers, if they have hw vblank
>> counters?
> Quick grep says a lot don't have it or at least not implemented - they
> use drm_vblank_count. Thinking about this, should we use that as a
> signal to also set dev->vblnka_disable_allowed = false in
> drm_vblank_init?
> -Daniel

dev->vblank_disable_allowed = false; is already the default set in drm_vblank_init().
I think it was the idea of that flag that drivers which support a somewhat correct vblank dis/enable (= have useable hw vblank counters) opt-in to the vblank disable after some idle time by setting it to true.

The strange thing is that unconditional dev->vblank_disable_allowed = 
true in drm_vblank_post_modeset()?
It's there since the first introduction of the flag.

The i915, gma500, armada and exynos drivers explicitely set the flag to 
true to opt-in to the auto vblank disable. radeon gets it implicitely 
set by calling the vblank_post_modeset function. Tegra also gets it via 
the post_modeset, and nouveau on old cards with nv04 display engine.

armada, exynos and tegra don't have proper hw vblank counter queries, 
but opt-in, so those will lose vblank counts whenever vblank irqs get 
turned off.

It's a bit all over the place.
-mario

  reply	other threads:[~2014-08-07 15:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06  1:22 drm vblank fixes Mario Kleiner
2014-08-06  1:22 ` [PATCH 1/3] drm: Remove drm_vblank_cleanup from drm_vblank_init error path Mario Kleiner
2014-08-06 10:51   ` Ville Syrjälä
2014-08-06  1:22 ` [PATCH 2/3] drm: Fix emitted vblank timestamps in drm_vblank_off() Mario Kleiner
2014-08-06 10:53   ` Ville Syrjälä
2014-08-06  1:22 ` [PATCH 3/3] drm: Use vblank_disable_and_save in drm_vblank_cleanup() Mario Kleiner
2014-08-06 10:51   ` Ville Syrjälä
2014-08-06 13:57     ` Daniel Vetter
2014-08-07  0:50       ` Mario Kleiner
2014-08-07  6:50         ` Daniel Vetter
2014-08-07 15:13           ` Mario Kleiner [this message]
2014-08-07  6:57         ` Daniel Vetter
2014-08-06  6:37 ` drm vblank fixes 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=53E39783.4090201@gmail.com \
    --to=mario.kleiner.de@gmail.com \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox