Re: [PATCH] drm/nouveau: Fix pre-nv50 pageflip events (v3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 10, 2015 at 03:54:52PM +0100, Mario Kleiner wrote:
> From: Daniel Vetter <daniel.vetter@xxxxxxxx>
> 
> Apparently pre-nv50 pageflip events happen before the actual vblank
> period. Therefore that functionality got semi-disabled in
> 
> commit af4870e406126b7ac0ae7c7ce5751f25ebe60f28
> Author: Mario Kleiner <mario.kleiner.de@xxxxxxxxx>
> Date:   Tue May 13 00:42:08 2014 +0200
> 
>     drm/nouveau/kms/nv04-nv40: fix pageflip events via special case.
> 
> Unfortunately that hack got uprooted in
> 
> commit cc1ef118fc099295ae6aabbacc8af94d8d8885eb
> Author: Thierry Reding <treding@xxxxxxxxxx>
> Date:   Wed Aug 12 17:00:31 2015 +0200
> 
>     drm/irq: Make pipe unsigned and name consistent
> 
> Trigering a warning when trying to sample the vblank timestamp for a
> non-existing pipe. There's a few ways to fix this:
> 
> - Open-code the old behaviour, which just enshrines this slight
>   breakage of the userspace ABI.
> 
> - Revert Mario's commit and again inflict broken timestamps, again not
>   pretty.
> 
> - Fix this for real by delaying the pageflip TS until the next vblank
>   interrupt, thereby making it accurate.
> 
> This patch implements the third option. Since having a page flip
> interrupt that happens when the pageflip gets armed and not when it
> completes in the next vblank seems to be fairly common (older i915 hw
> works very similarly) create a new helper to arm vblank events for
> such drivers.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=106431
> Cc: Thierry Reding <treding@xxxxxxxxxx>
> Cc: Mario Kleiner <mario.kleiner.de@xxxxxxxxx>
> Cc: Ben Skeggs <bskeggs@xxxxxxxxxx>
> Cc: Ilia Mirkin <imirkin@xxxxxxxxxxxx>
> 
> v2 (mario): Integrate my own review comments into Daniels patch.
>    - Fix function prototypes in drmP.h
>    - Add missing vblank_put() for pageflip completion without
>      pageflip event.
>    - Initialize sequence number for queued pageflip event to avoid
>      trouble in drm_handle_vblank_events().
>    - Remove dead code and spelling fix.
> 
> v3 (mario): Add a signed-off-by and cc stable tag per Ilja's advice.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>
> (v1) Reviewed-by: Mario Kleiner <mario.kleiner.de@xxxxxxxxx>
> (v2/v3) Signed-off-by: Mario Kleiner <mario.kleiner.de@xxxxxxxxx>
> 
> Cc: stable@xxxxxxxxxxxxxxx # v4.3
> ---
>  drivers/gpu/drm/drm_irq.c                 | 54 ++++++++++++++++++++++++++++++-
>  drivers/gpu/drm/nouveau/nouveau_display.c | 19 ++++++-----
>  include/drm/drmP.h                        |  4 +++
>  3 files changed, 68 insertions(+), 9 deletions(-)

This looks good to me. Let me clean this up a little and submit it to
Dave.

Thierry

Attachment: signature.asc
Description: PGP signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux