From: "Ville Syrjälä" <ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Thierry Reding
<thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
Cc: Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Laurent Pinchart
<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 5/5] drm/tegra: Implement page-flipping support
Date: Wed, 30 Jan 2013 11:42:40 +0200 [thread overview]
Message-ID: <20130130094240.GT9135@intel.com> (raw)
In-Reply-To: <20130130093247.GB21322-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
On Wed, Jan 30, 2013 at 10:32:47AM +0100, 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
> > <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org> 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 :(
>
> I think I may just recently have run into this bug on Intel hardware.
> Although perhaps I just used this wrongly.
>
> Just for the fun of it I wanted to implement Conway's Game of Life on
> top of DRM/KMS. So I use two dumb buffer objects to alternately render
> to. Then I wanted to use page-flipping to synchronize with VBLANK.
>
> So the sequence is basically:
>
> while (!done) {
> grid_tick(grid);
> grid_draw(grid, screen);
> screen_flip(screen);
> grid_swap(grid);
> }
>
> Where screen_flip() chooses the framebuffer and passes it to
> drmModePageFlip() like so:
>
> int fb = screen->fb[screen->current];
>
> drmModePageFlip(screen->fd, screen->crtc, fb,
> DRM_MODE_PAGE_FLIP_EVENT, screen);
>
> This runs for about 3 seconds and then hangs, so the display is no
> longer updated. I've also verified that the same happens on Radeon.
> But maybe I am mistaken and this isn't the proper programming sequence?
You asked for page flip events. Do you actually handle them in your code?
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2013-01-30 9:42 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
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ä [this message]
[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=20130130094240.GT9135@intel.com \
--to=ville.syrjala-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=daniel-/w4YWyX8dFk@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@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).