#12542 HIGH 13.2.0: Screen rotation causes graphics corruption on XO-4

Zarro Boogs per Child bugtracker at laptop.org
Tue Apr 16 12:54:07 EDT 2013


#12542: Screen rotation causes graphics corruption on XO-4
---------------------------------------+------------------------------------
           Reporter:  greenfeld        |       Owner:  dsd                              
               Type:  defect           |      Status:  new                              
           Priority:  high             |   Milestone:  13.2.0                           
          Component:  x window system  |     Version:  Development build as of this date
         Resolution:                   |    Keywords:                                   
        Next_action:  diagnose         |    Verified:  0                                
Deployment_affected:                   |   Blockedby:                                   
           Blocking:                   |  
---------------------------------------+------------------------------------

Comment(by dsd):

 In the above analysis, "pixmap A" is actually the scratch pixmap. I
 confirmed this by looking at the code more closely. At the point when
 "pixmap A" is allocated, we are in mrvl_crtc_shadow_create() which does
 basically:

 {{{
     return GetScratchPixmapHeader(pScrn->pScreen,
                                            width, height,
                                            pScrn->depth,
                                            pScrn->bitsPerPixel,
                                            rotate_pitch,
                                            data);
 }}}

 When we get to mrvl_crtc_shadow_destroy() we do the opposite,
 FreeScratchPixmapHeader, but in the current unpatched X code, that
 function doesn't actually do any freeing, it keeps the pixmap around for
 later reuse, so DestroyPixmap is not called.

 Then later when we come to draw the moon, the exa code calls
 GetScratchPixmapHeader() which causes reuse of the scratch pixmap (rather
 than allocating a new one), and it is the re-use that seems to lead to
 corrupted drawing. (but I am not exactly sure why)

 If I modify the test to just start X, draw the moon, and exit, I can see
 that the scratch pixmap is not created right until the point when drawing
 happens.

 The same bug seems to have hit geode in the past:
 https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-
 geode/+bug/377929/comments/24 - and the solution chosen there is to not
 use the scratch pixmap for rotation purposes. Maybe we should do the same.

-- 
Ticket URL: <http://dev.laptop.org/ticket/12542#comment:12>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list