Re: [PATCH 5/5] drm/tegra: Implement page-flipping support

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

 



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@xxxxxxxxxxxxxxxxx> 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
_______________________________________________
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