* gpu outputs slave and cache flushing
@ 2013-07-30 5:04 Dave Airlie
[not found] ` <CAPM=9tygDBVbfpJH5c6xY3CWZhKBTLE6P30Ck3z1srQ_FDTuyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Dave Airlie @ 2013-07-30 5:04 UTC (permalink / raw)
To: intel-gfx, xorg-devel, Maarten Lankhorst
Hey,
so I put a patch into intel driver a while ago to avoid doing a bo
flush using map/unmap for output slave device if the kernel has vmap
flushing
However on reflection I realised this only works for CPU accessing
devices like UDL but doesn't work for GPU accessing devices like
nouveau/radeon,
Going forward I'm sure we'll eventually get GPU sync via Maarten's
patches but I'm thinking I should revert this change in the intel
driver for now,
so reverse optimus can work properly
Anyone got any ideas for a better plan going forward, maybe a stop gap
before Maartens patches.
Dave.
^ permalink raw reply [flat|nested] 4+ messages in thread[parent not found: <CAPM=9tygDBVbfpJH5c6xY3CWZhKBTLE6P30Ck3z1srQ_FDTuyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [Intel-gfx] gpu outputs slave and cache flushing [not found] ` <CAPM=9tygDBVbfpJH5c6xY3CWZhKBTLE6P30Ck3z1srQ_FDTuyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2013-07-30 8:13 ` Chris Wilson 2013-07-30 8:48 ` Maarten Lankhorst 2013-08-05 6:11 ` Daniel Vetter 0 siblings, 2 replies; 4+ messages in thread From: Chris Wilson @ 2013-07-30 8:13 UTC (permalink / raw) To: Dave Airlie Cc: Maarten Lankhorst, intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, xorg-devel-go0+a7rfsptAfugRpC6u6w On Tue, Jul 30, 2013 at 03:04:22PM +1000, Dave Airlie wrote: > Hey, > > so I put a patch into intel driver a while ago to avoid doing a bo > flush using map/unmap for output slave device if the kernel has vmap > flushing > > However on reflection I realised this only works for CPU accessing > devices like UDL but doesn't work for GPU accessing devices like > nouveau/radeon, > > Going forward I'm sure we'll eventually get GPU sync via Maarten's > patches but I'm thinking I should revert this change in the intel > driver for now, > so reverse optimus can work properly > > Anyone got any ideas for a better plan going forward, maybe a stop gap > before Maartens patches. I don't think it is possible to w/a this in userspace, so let's blame Daniel^WBen for this mess and cheer on our knight in shining armour. Go Maarten! But we need to be sure there is a similar synchronisation point for CPU access to a foriegn dma-buf. -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gpu outputs slave and cache flushing 2013-07-30 8:13 ` [Intel-gfx] " Chris Wilson @ 2013-07-30 8:48 ` Maarten Lankhorst 2013-08-05 6:11 ` Daniel Vetter 1 sibling, 0 replies; 4+ messages in thread From: Maarten Lankhorst @ 2013-07-30 8:48 UTC (permalink / raw) To: Chris Wilson, Dave Airlie, intel-gfx, xorg-devel, Daniel Vetter Op 30-07-13 10:13, Chris Wilson schreef: > On Tue, Jul 30, 2013 at 03:04:22PM +1000, Dave Airlie wrote: >> Hey, >> >> so I put a patch into intel driver a while ago to avoid doing a bo >> flush using map/unmap for output slave device if the kernel has vmap >> flushing >> >> However on reflection I realised this only works for CPU accessing >> devices like UDL but doesn't work for GPU accessing devices like >> nouveau/radeon, >> >> Going forward I'm sure we'll eventually get GPU sync via Maarten's >> patches but I'm thinking I should revert this change in the intel >> driver for now, >> so reverse optimus can work properly >> >> Anyone got any ideas for a better plan going forward, maybe a stop gap >> before Maartens patches. > I don't think it is possible to w/a this in userspace, so let's blame > Daniel^WBen for this mess and cheer on our knight in shining armour. > Go Maarten! But we need to be sure there is a similar synchronisation > point for CPU access to a foriegn dma-buf. > -Chris > It's complicated, and probably best suited to discuss at linux plumbers. :) It probably won't work without changing how the dma-buf locking is done, and for intel also depends on proper ww_mutex support. I think using reservation objects and fences in intel is the right way to go, and would allow for a less invasive integration of synchronization. In my experimental tree I used a hack in the execbuffer before to reserve all bo's, but the approach I took was rather hacky, and only applied to dma-bufs. Correct handling is probably better done by someone who understands i915 better than me. ~Maarten ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gpu outputs slave and cache flushing 2013-07-30 8:13 ` [Intel-gfx] " Chris Wilson 2013-07-30 8:48 ` Maarten Lankhorst @ 2013-08-05 6:11 ` Daniel Vetter 1 sibling, 0 replies; 4+ messages in thread From: Daniel Vetter @ 2013-08-05 6:11 UTC (permalink / raw) To: Chris Wilson, Dave Airlie, intel-gfx, xorg-devel, Maarten Lankhorst On Tue, Jul 30, 2013 at 09:13:48AM +0100, Chris Wilson wrote: > On Tue, Jul 30, 2013 at 03:04:22PM +1000, Dave Airlie wrote: > > Hey, > > > > so I put a patch into intel driver a while ago to avoid doing a bo > > flush using map/unmap for output slave device if the kernel has vmap > > flushing > > > > However on reflection I realised this only works for CPU accessing > > devices like UDL but doesn't work for GPU accessing devices like > > nouveau/radeon, > > > > Going forward I'm sure we'll eventually get GPU sync via Maarten's > > patches but I'm thinking I should revert this change in the intel > > driver for now, > > so reverse optimus can work properly > > > > Anyone got any ideas for a better plan going forward, maybe a stop gap > > before Maartens patches. > > I don't think it is possible to w/a this in userspace, so let's blame > Daniel^WBen for this mess and cheer on our knight in shining armour. > Go Maarten! But we need to be sure there is a similar synchronisation > point for CPU access to a foriegn dma-buf. Yeah, as long as we haven't thought all prime drivers and dma_buf how to sync access (and flush caches if required) userspace needs to manually flush stuff. I don't see a way around this :( On the plus side our QA has started another try at running with nouveau (last time around was just too much fallout from nouveau) to run our neat seat of prime tests. So investing into a few good tests there should pay of nicely. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-05 6:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-30 5:04 gpu outputs slave and cache flushing Dave Airlie
[not found] ` <CAPM=9tygDBVbfpJH5c6xY3CWZhKBTLE6P30Ck3z1srQ_FDTuyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-30 8:13 ` [Intel-gfx] " Chris Wilson
2013-07-30 8:48 ` Maarten Lankhorst
2013-08-05 6:11 ` Daniel Vetter
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.