[Openchrome-devel] fix typo in alloc check plus possible improvement

James Simmons jsimmons
Mon Dec 5 09:32:24 PST 2011


> > Oops. Does the cursor still show up for the VX900 when this patch is
> > applied? I applied the patch
> 
> Unfortunately, I don't have a VX900 but on my VX800 there was no improvement 
> or degradation. Most of the time for me the HW cursor works, but sometimes a 
> square with nearly random content (sometimes it seems to be distorted parts of 
> some images) is shown.

I have noticed that distorted image as well.

> Oh, btw. today I recognized that the cursor's memory should be freed during 
> VIACloseScreen(). Currently I get a "VIA Double Alloc" message in the 
> subsequent VIAScreenInit().

Just toke a t look at xf86_cursors_fini. Nope it only handles the 
xf86_cursor layer above the RandR crtc code so the cursor memory is not 
freed. Now that I moved the cursor buffer object into the xf86Crtc private 
data area I can release that memory on crtc destory. Nope xf86CrtcDestory 
is never called. Okay the checkin over the weekend should fix that.

> > > 2. Changeset 1022 changed viaIsOffscreen so it can be used for EXA
> > >    PixmapIsOffscreen function. But it did not actually use it for
> > >    this
> > >    purpose. This possible improvement is done by the attached patch
> > >    use_viaExaIsOffscreen.patch.
> > > 
> > > Maybe you've had good reasons not to do 2. If so, I'm quite interested
> > > in this reason... ;-)
> > 
> > The reason is that from looking at the exa xorg code you also need to
> > provide exaPrepareAccess and exaFinishAccess.
> 
> Ah, OK! Actually I didn't have a look at the exa xorg code, yet, and the 
> comments in my local exa.h only say that PrepareAccess() and FinishAccess() 
> are called before, respectively after, PixmapIsOffscreen(), not that these 
> functions need to be provided by the driver... And, at least for me, the patch 
> attached with my last mail "seems to work" ;-) .

I have a few more details to work out with the new buffer manager code but 
I do plan to get around to cleaning up the EXA layer.

You can try the latest code. I did noticed one regression when you log out 
of the a desktop. Thinking about it now I bet the issues is the secodn run 
at the buffer manager initialization. I will take a crack at it in the 
next few days.






More information about the Openchrome-devel mailing list