Re: [PATCH v2 12/12] JUST FOR TEST: Add one-shot trigger to update display

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

 



On Wed, Jul 01, 2015 at 10:36:17AM +0200, Daniel Vetter wrote:
> On Wed, Jul 01, 2015 at 04:21:55PM +0800, Mark Zhang wrote:
> > This HACK adds a workqueue to refresh the display periodically.
> > This is used just for testing.
> 
> ->dirty is the drm hook you're looking for, it's meant to flush out any
> frontbuffer rendering. Generic kms clients using the dumb buffers (e.g.
> fedora boot splash) use this already.
> 
> And of course you need to upload a new frame every time an (atomic) flip
> happens too, but I guess you have that already. No need at all for a
> periodic upload hack like this.

btw the nice thing with dirty is that it hands you the exact invalidation
rectangle, which means you can minimize uploads. For atomic flips we plan
to have the same, but it's not implemented yet.

Another problem is that currently the fbdev helper in drm_fb_helper.c
doesn't support the dirty callback. But there's other drivers which need
this too (e.g. i915 will gain a dirty callback soon) and qxl has all the
code implemented already. So the only thing you need to do is move the qxl
code into drm_fb_helper.c and adapt it to use the dirty callback instead
of directly calling qxl code. Then you should be all set. Note that simply
calling ->dirty from fbdev hooks doesn't work since a lot of those hooks
are called from irq context (cursors and stuff) and hence you need a
workqueue to do the actual dirty call.

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux