Implementing RandR support in xf86 video driver

Alex Deucher alexdeucher at gmail.com
Thu Jul 29 21:30:18 PDT 2010


On Thu, Jul 29, 2010 at 8:15 PM, sid baral <xbaral at gmail.com> wrote:
> Dear All,
>              I am pretty new to X development.
> I am trying to implement rotation and reflection of window using RandR in
> xf86 video driver for our own chipset. We have our existing xf86 driver but
> that does not do anything for rotation or reflection. I studied some
> existing drivers(like the RADEON) one to understand how they are doing it
> but failed to get the overall idea of how to to do it.
>
> So I need some documents or some guidance which says what all things should
> be done in general to do rotation or reflection in xf86 driver. Currently
> what I have done is:
>
> 1. implemented the shadow buffer related CRTC functions and used the EBI
> memory (not the graphics card memory) for this.
>

Make sure your crtc can scan out of EBI memory.

> 2. just with this simple change what I see is some rectangular stipples
> getting drawn in new orientation(though it is not full screen)
>
> I know lot of major things to be done but probably I need a list. Can some
> one help me with this.

The basic idea is that when rotation is enabled, the crtc points to
the shadow framebuffer rather than the primary, and changes to the
primary framebuffer are tracked, rotated, and copied to the shadow
buffer.  The rotation is done using composite, so if you want it to be
fast, your driver needs to implement accelerated composite support.
If you are using EXA, you'd need to implement the Composite hook with
transform support.  This is most easily done using a textured blit,
but could also be implemented with a blitter that supports rotation.

Alex


More information about the xorg-devel mailing list