Problem with exaModifyPixmapHeader_classic?

april aapril03 at gmail.com
Tue May 18 22:57:43 PDT 2010


Thanks.

Here's my problem.
I use EXA and RandR, EXA offscreen is a part of Video memory and DRM
manages the rest.

I want to do RandR rotaton, and use DRM to allocate  this rotation
shadow buffer,
while when I use exaGetPixmapOffset to get the offset of shadow buffer
,and use composite to accel.





                                            |<-----       DRM        --------->|
--------------------------------------------------------------------------------------
|  onscreen |  EXA offscreen    |    |       |                            |
---------------------------------------------------------------------------------------
                                                      ^
                                                       |
                                                   RandR rotate shadow
buffer

BUT, In Ubuntu10.4, the exaGetPixmapOffset  returns the WRONG value,
while Ubutun9.10 and previos is OK.

I found there are some changes of EXA code between Ubuntu10.0(Xorg
1.7.6) and Ubuntun9.04, (because of UXA?)
When I allocate shadow buffer and call GetScratchPixmapHeader, in
exaModifyPixmapHeader_classic, because of the rotation shadow buffer
is not in EXA Offscreen, pExaPixmap->fb_ptr will not have vaule here ,
while exaGetPixmapOffset(in exa.c)  will use this.

----------------------------------------------------------------------------------------------------------------
IN function exaModifyPixmapHeader_classic():

	/* Classic EXA:
	 * - Framebuffer.
	 * - Scratch pixmap with offscreen memory.
	 */
	if (pExaScr->info->memoryBase && pPixData) {
	    if ((CARD8 *)pPixData >= pExaScr->info->memoryBase &&
		((CARD8 *)pPixData - pExaScr->info->memoryBase) <
				pExaScr->info->memorySize) {
		pExaPixmap->fb_ptr = pPixData;
		pExaPixmap->fb_pitch = devKind;
		pExaPixmap->offscreen = TRUE;
	    }
	}
----------------------------------------------------------------------------------------------------------------------------
It seems the exaGetPixmapOffset  function only works when pixmap in
EXA Offcreen.

So, How to solve this? I only use the classical EXA this time(Not
driver handers pixmap)
Must I allocate shadow buffer in EXA offscreen?

I think in classical EXA, the video memory is alway maped as a whole,
may be no need to restrict this within EXA Offscreen.

what's your suggestions?

Thank you very much



2010/5/18 Michel Dänzer <michel at daenzer.net>:
> On Die, 2010-05-18 at 17:42 +0800, april wrote:
>> Hi all:
>>  I found problems when using exaGetPixmapOffset to get the offset of
>> pixmap in framebuffer when this Pixmap is not within the EXA
>> offscreen.
>>  Because the pExaPixmap->fb_ptr is NULL.
>> In function exaModifyPixmapHeader_classic, pExaPixmap->fb_ptr is NULL
>> unless pixmap is in EXA Offscreen.
>>
>> So can it be changed to the follow?
>> --------------------------------------------------------------------------------
>>       /* Classic EXA:
>>        * - Framebuffer.
>>        * - Scratch pixmap with offscreen memory.
>>        */
>>       if (pExaScr->info->memoryBase && pPixData) {
>> -         if ((CARD8 *)pPixData >= pExaScr->info->memoryBase &&
>> -             ((CARD8 *)pPixData - pExaScr->info->memoryBase) <
>> -                             pExaScr->info->memorySize) {
>> +      if (exaPixmapIsOffscreen(pExaPixmap)) {
>>               pExaPixmap->fb_ptr = pPixData;
>>               pExaPixmap->fb_pitch = devKind;
>>               pExaPixmap->offscreen = TRUE;
>>           }
>>       }
>
> I think that would be wrong if fb_ptr != NULL?
>
> It might be helpful if you can provide more details about the problem
> you're trying to solve.
>
>
> --
> Earthling Michel Dänzer           |                http://www.vmware.com
> Libre software enthusiast         |          Debian, X and DRI developer
>


More information about the xorg-devel mailing list