From: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
To: Thierry Reding
<thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
Cc: Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>,
David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 5/5] drm/tegra: Implement page-flipping support
Date: Sat, 02 Feb 2013 00:05:28 +0100 [thread overview]
Message-ID: <1944869.Bk5ttSU6yt@avalon> (raw)
In-Reply-To: <20130116185606.GC28660-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2742 bytes --]
Hi Thierry,
On Wednesday 16 January 2013 19:56:06 Thierry Reding wrote:
> On Wed, Jan 16, 2013 at 01:36:17PM +0100, Daniel Vetter wrote:
> > On Wed, Jan 16, 2013 at 11:01 AM, Thierry Reding wrote:
> > > drm_events_release() should be enough to clean up the events, but I
> > > suspect the reason why Laurent put that code in was that the drm_crtc
> > > private data still has a reference to the event and needs to clear it.
> > > Otherwise the next page flip won't be scheduled because .page_flip()
> > > would return -EBUSY.
> >
> > Hm, indeed we seem to have a nice bug in most drivers there :(
> >
> > > However, it seems like {tegra_dc,shmob_drm_crtc}_cancel_page_flip()
> > > could both be simplified a lot and just set their event to NULL. Then
> > > again, maybe keeping a separate reference isn't all that useful. Maybe
> > > the better thing to do here is iterate over the list of pending VBLANK
> > > events in *_finish_page_flip() and process each of them? That would
> > > allow more than one user-space process to queue page flips.
> >
> > I think we need a slightly more generally useful solution, since most
> > drivers are currently broken. I've read a bit through the code, but
> > short of refcounting drm events and adding event->file_priv checks at
> > relevent places I don't see a sane solution ... And even that one is
> > rather invasive. Do you have an idea? Imo doing the cleanup in each
> > driver will be rather error-prone, and since usually kms clients wait
> > for flips to complete, also guaranteed to be little tested.
>
> While this probably doesn't improve the situation much, maybe adding
> more extensive tests to libdrm or so would help. I wrote a couple of
> small programs to test vblank and plane support.
>
> The vblank one basically generates two framebuffers with different
> patterns and uses page-flipping to alternate between them. The plane
> test does something similar, sets up a plane and associates a buffer
> with it. It includes scaling the plane to test that functionality as
> well.
>
> Perhaps these tests could even be added to the existing libdrm tests,
> but maybe having separate binaries wouldn't hurt.
Further cleanup of the modetest application is somewhere on my to-do list (but
probably so low that I'll never get to it unless there's a real incentive
;-)). It's a good candidate for more page flip testing (there's basic page
flip support there already).
> Back to the original topic: should it not work to queue a page flip and
> immediately exit(0) after that to test the cleanup code? I suppose if
> that can be tested on all drivers we should have pretty good coverage.
Maybe we need some kind of compliance test suite tool ?
--
Regards,
Laurent Pinchart
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2013-02-01 23:05 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 15:55 [PATCH 0/5] drm/tegra: Miscellaneous enhancements Thierry Reding
[not found] ` <1358178932-25505-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2013-01-14 15:55 ` [PATCH 1/5] drm: Allow vblank support without DRIVER_HAVE_IRQ Thierry Reding
2013-01-14 15:55 ` [PATCH 2/5] drm/tegra: Add plane support Thierry Reding
2013-01-14 15:55 ` [PATCH 3/5] drm/tegra: Implement .mode_set_base() Thierry Reding
2013-01-14 15:55 ` [PATCH 4/5] drm/tegra: Implement VBLANK support Thierry Reding
[not found] ` <1358178932-25505-5-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2013-01-22 18:21 ` Jon Mayo
[not found] ` <CADWT_cPtdmSF+_ybe70ZY_z5idzr0KQe94r57ok-Hf-V22wixA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-23 9:06 ` Mark Zhang
2013-01-30 8:34 ` Thierry Reding
[not found] ` <20130130083453.GA21322-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2013-01-30 12:36 ` Daniel Vetter
[not found] ` <CAKMK7uHo9inMzKXqpnH9+H7Tm+nnChGUXE+mGA51L0fNrwoX0Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-31 2:06 ` Mario Kleiner
[not found] ` <5109D1A1.9010207-TdbV1Z3I5XE0NhjG498hmQ@public.gmane.org>
2013-01-31 8:17 ` Daniel Vetter
2013-01-14 15:55 ` [PATCH 5/5] drm/tegra: Implement page-flipping support Thierry Reding
[not found] ` <1358178932-25505-6-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2013-01-15 17:53 ` Daniel Vetter
[not found] ` <CAKMK7uFMa-QwyZJo6QaxAAbpGeNvoNp_T19wF_uA1hr1d2KHog-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-15 20:17 ` Thierry Reding
[not found] ` <20130115201705.GA25976-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2013-01-16 9:43 ` Daniel Vetter
[not found] ` <CAKMK7uEV_w5rfoUv3xdTdYra+UOCnirf5GUK+2L2pxifUxFVmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-16 10:01 ` Thierry Reding
[not found] ` <20130116100149.GA13628-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2013-01-16 12:36 ` Daniel Vetter
[not found] ` <CAKMK7uFQKwvEN0j-L=g1UwTzVvtYyqyyBaH8apQnqWPa2sq5vQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-16 13:31 ` Rob Clark
2013-01-16 18:56 ` Thierry Reding
[not found] ` <20130116185606.GC28660-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2013-02-01 23:05 ` Laurent Pinchart [this message]
2013-02-11 18:00 ` Daniel Vetter
2013-01-30 9:32 ` Thierry Reding
[not found] ` <20130130093247.GB21322-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2013-01-30 9:42 ` Ville Syrjälä
[not found] ` <20130130094240.GT9135-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-01-30 11:14 ` Thierry Reding
[not found] ` <20130130111436.GA11202-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2013-01-30 11:19 ` Thierry Reding
2013-02-01 23:01 ` Laurent Pinchart
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=1944869.Bk5ttSU6yt@avalon \
--to=laurent.pinchart-rylnwiuwjnjg/c1bvhzhaw@public.gmane.org \
--cc=airlied-cv59FeDIM0c@public.gmane.org \
--cc=daniel-/w4YWyX8dFk@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.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;
as well as URLs for NNTP newsgroup(s).