2010/6/13 Cui, Hunk <[email protected]>:
> Hi, Maarten,
>
>        In our xf86-video-geode driver, all of memories are allocated by 
> GeodeAllocOffscreen, the exa offscreen memory is part of the memorySize. And 
> the rotation data is not in memorySize, it is allocated after memorySize.

This is exactly the reason why exa doesn't recognize it. Rotateddata
has to be allocated between memoryBase and memorySize. Only
exaAllocOffscreen can do that.

>
>        About the GeodeAllocOffscreen, it is Data structure tables, why you 
> said "allocate exa offscreen memory out of a private pool"? What the diff 
> between GeodeAllocOffscreen and exaOffscreen? In exaOffscreenInit, the EXA 
> offscreen base and size are loaded into server, so the exa should recognize 
> it as offscreen memory, furthermore, the ratate_memory(2MB) is not included 
> in EXA offscreen space.
>        That "pPixData - pExaScr->info->memoryBase = 
> pExaScr->info->memorySize" should right.

Just because it's right for your driver doesn't mean it's right
everywhere (the memory after memorySize could belong to another device
for example). Classic exa is made on the assumption that all memory
usable for gpu acceleration is a linear range between memoryBase and
memorySize. If you don't want this limitation then you should move to
another type of exa where the driver has more control.

I just don't see why you cannot use exaAllocOffscreen for rotatedData,
that's what every driver has done and it works last i tried.

What you have proposed so far is just a hack that will never be added.

>
>        If you confuse in this explain, I can provide a chart about the memory 
> allocate.
>
> Thanks,
> Hunk Cui
>
>
>
> -----Original Message-----
> From: Maarten Maathuis [mailto:[email protected]]
> Sent: Sunday, June 13, 2010 6:08 PM
> To: Cui, Hunk
> Cc: [email protected]; [email protected]; Michel Dänzer
> Subject: Re: Who can explain the diff between Xserver-1.6.4 version and >1.7 
> version about the ExaGetPixmapAddress?
>
> On Sun, Jun 13, 2010 at 10:18 AM, Cui, Hunk <[email protected]> wrote:
>> Hi, Maarten,
>>
>>        After I debug the GeodeAllocOffscreen() operation (it is an internal 
>> function), I found it have been replaced exaOffscreenAlloc() with 
>> GeodeAllocOffscreen().
>>
>>        About the change, you can see: 
>> http://cgit.freedesktop.org/xorg/driver/xf86-video-geode/commit/?id=d681a844e448712a9a419d2a4dca81930d39a80a
>>
>>        A wholesale update to Randr 1.2 for LX accompanied by massive
>> cleanup since 08/07/2008, include exaOffscreenAlloc(), because no longer to 
>> maintain the gx_video. So you can find the exaOffscreenAlloc on Geode-gx. 
>> And now, only need to maintain Geode-LX, I believe the GeodeAllocOffscreen() 
>> have been update to a strong effort. It have been allocated the Geode-LX 
>> memory, include Compression buffer, TryHWCursor, exaBfSz, EXA offscreen 
>> space, a shadow buffer, a video overlay. (you can see in lx_memory.c -> 
>> LXInitOffscreen).
>>
>>        My issue is RandR-unable to rotate. (I have been described the 
>> phenomenon in: 
>> https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-geode/+bug/377929/comments/12
>>  ).
>>
>>        I have been debug the memory allocation method in LXInitOffscreen. 
>> After allocate the EXA offscreen space 
>> (http://cgit.freedesktop.org/xorg/driver/xf86-video-geode/tree/src/lx_memory.c#n261
>>  )
>> The crtc shadow frame buffer (Rotate_memory) allocate:
>> ________
>>        size -= pScrni->virtualX *
>>        (pScrni->virtualY * (pScrni->bitsPerPixel >> 3));
>> ________about 2MB size
>>
>> The video overlay size is 2MB size.
>> Then the memorySize = offscreenBase + EXA offscreen Space size
>>
>> Steps:
>>        1). In exaOffscreenInit (Xserver: exa_offscreen.c: 677), the 
>> offscreenAreas struct will be allocated. When do rotate action.
>>        2). The client program will call the xf86CrtcRotate (In 
>> xf86Rotate.c), then it will allocate the Rotate_memory in shadow frame 
>> buffer (less than 2MB).
>>        3). Xf86RotatePrepare -> lx_crtc_shadow_create -> 
>> GetScratchPixmapHeader -> exaModifyPixmapHeader_classic, the 
>> rotate_memory_base will be loaded into pPixData, the value is equal to 
>> memorySize+memoryBase, So "pPixData - pExaScr->info->memoryBase = 
>> pExaScr->info->memorySize", but now in Xserver, it only have "<". The judge 
>> is not come into existence. The fb_ptr address value is 0x0.
>
> You allocate exa offscreen memory out of a private pool with
> GeodeAllocOffscreen, only that memory is considered usable for
> acceleration by exa. Your proposed change to <= is taping over the
> real issue. GeodeAllocOffscreen seems to give you memory directly
> after exa's offscreen memory, but that doesn't mean exa should
> recognize it as offscreen memory. Your change would hack exa to accept
> one extra byte as valid, but shouldn't your whole 2 MB region be
> inside? If the whole 2 MB was inside < or <= wouldn't even matter.
>
> I've cc'ed someone else who also knows a lot about exa, but i still
> stand by my judgement that you need to use exaOffscreenAlloc for the
> rotation data, and not some private memory exa knows nothing about.
>
>>
>>        I think the GeodeAllocOffscreen() memory allocate action is right. 
>> Please take a look, I have not find another reason. So I suggest to add "=".
>>
>>        Looking forward to your reply.
>>
>> Thanks,
>> Hunk Cui
>>
>
>



-- 
Life spent, a precious moment, in the wink of an eye we live and we die.
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to