#10196 NORM 1.0-sof: starting X corrupts DCON image

Zarro Boogs per Child bugtracker at laptop.org
Mon Jul 5 15:08:12 EDT 2010


#10196: starting X corrupts DCON image
--------------------------------+-------------------------------------------
           Reporter:  dsd       |       Owner:  dsd                
               Type:  defect    |      Status:  new                
           Priority:  normal    |   Milestone:  1.0-software-update
          Component:  distro    |     Version:  not specified      
         Resolution:            |    Keywords:                     
        Next_action:  diagnose  |    Verified:  0                  
Deployment_affected:            |   Blockedby:                     
           Blocking:            |  
--------------------------------+-------------------------------------------

Comment(by dsd):

 First of all, xf86PrepareCrtcs powers down the display:

 0  DCONDPMSSet (pScrni=0x89f3b58, mode=3) at geode_dcon.c:60
 #1  0xb769fc54 in lx_crtc_dpms (crtc=0x89f45c8, mode=3) at
 lx_display.c:199
 #2  0x080e8a1a in xf86PrepareCrtcs (scrn=<value optimized out>)
     at xf86Crtc.c:2428
 #3  xf86SetDesiredModes (scrn=<value optimized out>) at xf86Crtc.c:2450
 #4  0xb769cfd4 in LXEnterGraphics (pScrn=<value optimized out>,
     pScrni=0x89f3b58) at lx_driver.c:799
 #5  0xb769e319 in LXScreenInit (scrnIndex=0, pScrn=0x89f52d8, argc=1,
     argv=0xbfac8694) at lx_driver.c:872
 #6  0x0806b318 in AddScreen (pfnInit=0xb769e010 <LXScreenInit>, argc=1,
     argv=0xbfac8694) at main.c:702
 #7  0x080a974e in InitOutput (pScreenInfo=0x8212540, argc=1,
 argv=0xbfac8694)
     at xf86Init.c:1269
 #8  0x0806ba2b in main (argc=1, argv=0xbfac8694, envp=0xbfac869c) at
 main.c:315

 This happens because the geode xf86OutputFuncsRec does not define
 get_crtc, so X decides that it doesn't know anything about the crtc behind
 the output so it decides to reset it.

 X already has a mapping between output and crtc so it is simple enough to
 implement this (will attach a patch). But I'm probably missing something
 here.

 #0  DCONDPMSSet (pScrni=0x89f3b58, mode=3) at geode_dcon.c:60
 #1  0xb769fc54 in lx_crtc_dpms (crtc=0x89f45c8, mode=3) at
 lx_display.c:199
 #2  0xb769fb57 in lx_crtc_prepare (crtc=0x89f45c8) at lx_display.c:252
 #3  0x080e847b in xf86CrtcSetModeTransform (crtc=0x89f45c8,
 mode=0x89f4684,
     rotation=1, transform=0x0, x=0, y=0) at xf86Crtc.c:331
 #4  0x080e888f in xf86SetDesiredModes (scrn=0x89f3b58) at xf86Crtc.c:2499
 #5  0xb769cfd4 in LXEnterGraphics (pScrn=<value optimized out>,
     pScrni=0x89f3b58) at lx_driver.c:799
 #6  0xb769e319 in LXScreenInit (scrnIndex=0, pScrn=0x89f52d8, argc=1,
     argv=0xbfac8694) at lx_driver.c:872
 #7  0x0806b318 in AddScreen (pfnInit=0xb769e010 <LXScreenInit>, argc=1,
     argv=0xbfac8694) at main.c:702
 #8  0x080a974e in InitOutput (pScreenInfo=0x8212540, argc=1,
 argv=0xbfac8694)
     at xf86Init.c:1269
 #9  0x0806ba2b in main (argc=1, argv=0xbfac8694, envp=0xbfac869c) at
 main.c:315

 Now xf86SetDesiredModes decides that it needs to prepare a new CRTC
 configuration causing the geode driver to power down the display while the
 new mode is being applied.

 In this case, X does not seem to have any code to consider the current
 configuration in order to say "we don't need to change anything", so this
 is hard to avoid. (this is only possible when KMS is being used, in which
 case a different codepath is followed)

 #0  DCONDPMSSet (pScrni=0x89f3b58, mode=0) at geode_dcon.c:60
 #1  0xb769fc54 in lx_crtc_dpms (crtc=0x89f45c8, mode=0) at
 lx_display.c:199
 #2  0xb769fa52 in lx_crtc_commit (crtc=0x89f45c8) at lx_display.c:308
 #3  0x080e84e1 in xf86CrtcSetModeTransform (crtc=0x89f45c8,
 mode=0x89f4684,
     rotation=1, transform=0x0, x=0, y=0) at xf86Crtc.c:345
 #4  0x080e888f in xf86SetDesiredModes (scrn=0x89f3b58) at xf86Crtc.c:2499
 #5  0xb769cfd4 in LXEnterGraphics (pScrn=<value optimized out>,
     pScrni=0x89f3b58) at lx_driver.c:799
 #6  0xb769e319 in LXScreenInit (scrnIndex=0, pScrn=0x89f52d8, argc=1,
     argv=0xbfac8694) at lx_driver.c:872
 #7  0x0806b318 in AddScreen (pfnInit=0xb769e010 <LXScreenInit>, argc=1,
     argv=0xbfac8694) at main.c:702
 #8  0x080a974e in InitOutput (pScreenInfo=0x8212540, argc=1,
 argv=0xbfac8694)
     at xf86Init.c:1269
 #9  0x0806ba2b in main (argc=1, argv=0xbfac8694, envp=0xbfac869c) at
 main.c:315

 and now geode powers the display on when it is asked to commit the new
 CRTC configuration.

 Attaching 2 xf86-video-geode patches which together fix (or avoid) the bug
 at hand. Firstly we implement get_crtc trivially, and the second is
 perhaps a little questionable, it avoids powering down the dcon if the
 display is frozen.

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


More information about the Bugs mailing list