Vivante: trying to rotate display in xorg.conf: Assert Failed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Vivante: trying to rotate display in xorg.conf: Assert Failed

13,095 Views
burr0069
Contributor II

Trying to set up xorg.conf to rotate the display 90 degrees. Everything works fine when screen rotation is "normal" (i.e. landscape mode). Manually changing orientation via "xrandr -o left" at the command line also works fine. But use the "Rotate" option in xorg.conf and the Vivante driver chokes, saying "Assertion `key->initialized' failed."

 

Anyone know what's wrong?

 

Platform:

 

   i.MX6Q

   Digi ConnectCore6 SOM

   LVDS display

   Yocto 2.0 Jethro

   Linux kernel 3.14.79

   Recipes:

      imx-gpu-viv: meta-fsl-arm 1:5.0.11.p7.4-hfp

      kernel-module-imx-gpu-viv: meta-fsl-arm 5.0.11.p7.4+fslc+gitAUTOINC+2b3290d1c1

      xf86-video-imxfb-vivante: meta-fsl-arm 3:5.0.11.p7.4

      xserver-xorg: 2:1.17.2

 

   (Full log files and conf file are attached.)

 

 

From xorg.conf:

 

Section "Device"
   Identifier "i.MX Accelerated Framebuffer Device"
   Driver "vivante"
   Option "fbdev" "/dev/fb0"
   Option "vivante_fbdev" "/dev/fb0"
   Option "HWcursor" "false"
EndSection

 

Section "Monitor"
   Identifier "Monitor0"
   Option "Rotate" "left"
EndSection

 

Section "Screen"
   Identifier "DefaultScreen"
   Device "i.MX Accelerated Framebuffer Device"
   Monitor "Monitor0"   

EndSection

 

From Xsession.log:

 

Xorg: .../tmp/work/cortexa9hf-vfp-neon-mx6qdl-dey-linux-gnueabi/xserver-xorg/2_1.17.2-r0/xorg-server-1.17.2/include/privates.h:122: dixGetPrivateAddr: Assertion `key->initialized' failed.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

 

VIVANTE's last words (from Xorg.log):

...

[4045336.734] (**) VIVANTE(0): PreInit done
[4045336.734] (--) Depth 24 pixmap format is 32 bpp
[4045336.734] (II) VIVANTE(0): Init mode for fb device
[4045336.783] (II) VIVANTE(0): hardware: DISP3 BG (video memory: 16325kB)
[4045336.784] (II) VIVANTE(0): Pitch updated to 800 after ModeInit
[4045336.784] (II) VIVANTE(0): FB Start = 0x754ff000 FB Base = 0x754ff000 FB Offset = (nil) FB PhyBase 0x3e700000
[4045336.784] (II) VIVANTE(0): reserve 8355840 bytes for on screen frame buffer; total fb memory size 16716800 bytes; offset of shadow buffer 8355840

Original Attachment has been moved to: xorg.conf.zip

Original Attachment has been moved to: Xsession.log.zip

Original Attachment has been moved to: Xorg.0.log.zip

Labels (4)
0 Kudos
6 Replies

5,381 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi,

You should try with  Option "Rotate" "left" in "Device" Section.

Section "Device"
   Identifier "i.MX Accelerated Framebuffer Device"
   Driver "vivante"
   Option "fbdev" "/dev/fb0"
   Option "vivante_fbdev" "/dev/fb0"
   Option "Rotate" "left"
EndSection

Hope this helps

0 Kudos

5,381 Views
burr0069
Contributor II

Thanks. I tried this, but it fails in a different way. The syntax for the Device section does not accept "left", but it does accept "CCW" (counter-clockwise):

Section "Device"
   Identifier "i.MX Accelerated Framebuffer Device"
   Driver "vivante"
   Option "fbdev" "/dev/fb0"
   Option "vivante_fbdev" "/dev/fb0"
   Option "Rotate" "CCW"
EndSection

The result is not an assertion failure, but it seems to hang before completing initialization, and the screen remains blank:

Last words (from Xorg.log):

...

[4051569.452] drmOpenByBusid: drmGetBusid reports platform:Vivante GCCore:00
[4051569.452] (II) [drm] DRM interface version 1.4
[4051569.453] (II) [drm] DRM open master succeeded.
[4051569.453] (II) VIVANTE(0): [drm] Using the DRM lock SAREA also for drawables.
[4051569.453] (II) VIVANTE(0): [drm] framebuffer handle = 0x3e700000
[4051569.453] (II) VIVANTE(0): [drm] added 1 reserved context for kernel
[4051569.453] (II) VIVANTE(0): X context handle = 0x1
[4051569.454] (II) VIVANTE(0): [drm] installed DRM signal handler
[4051569.454] (II) VIVANTE(0): [DRI] installation complete
[4051569.454] (--) RandR disabled
[4051569.455] (II) AIGLX: Screen 0 is not DRI2 capable
[4051569.455] (EE) AIGLX: reverting to software rendering
[4051569.489] (II) AIGLX: Loaded and initialized swrast
[4051569.489] (II) GLX: Initialized DRISWRAST GL provider for screen 0

5,381 Views
andreyeroshenko
Contributor II

Hi Michel,

It seems that I have the same problem. Is there any news? Can you share your solution?

Thank you in  advance.

0 Kudos

5,381 Views
burr0069
Contributor II

Well, currently we only have a work-around: basically, start the X server without rotation (meaning don't rotate from xorg.conf), then start any X client program (such as a window manager, but it could be any X client). Only at that point, with at least one X client running, do the rotation using xrandr. Everything seems to work OK, so long as we never close the first X client. (But even with this arrangement, X may still crash at shutdown.)

The problem seems to happen when the X server cleans up and reinitializes itself: the Vivante driver causes memory leaks after cleanup. The only way to prevent this is to make sure that X never cleans up and reinitializes. An attempt to rotate will lead to a cleanup if there is no X client running, but if there is at least one X client, then X performs the rotation but without cleanup and reinitialization.

5,381 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Michael,

Try

export DISPLAY=:0.0

If X11 is the graphical backend, you should try Xrandr utility, however per your log out

"[4051569.454] (--) RandR disabled"

you shoudl try to check with sysfs:

#echo 1>/sys/class/graphic/fb0/rotate.

Option "Left" works on NXP 4.1.15 official release BSP, you should try it.

Hope this helps

0 Kudos

5,381 Views
burr0069
Contributor II

Using the xrandr utility after successfully starting the X server, instead of putting the "Rotate" option in xorg.conf, is a good idea, but it causes a crash very similar to the one I described originally: that is, it leads to "Assertion `key->initialized' failed". I would guess that both crashes are caused by the same issue inside the Vivante driver.

I believe the "RandR disabled" message should not be taken seriously because this comes before it:

[3727136.332] (II) VIVANTE(0): RandR 1.2 enabled, ignore the following RandR disabled message.

Rotation *is* enabled in the driver--what's happening is that it crashes when it attempts to rotate.

I tried using "/sys/class/graphic/fb0/rotate", but this did not cause the screen to rotate. (Maybe because it tries to use the framebuffer directly instead of using the hardware-accelerated Vivante driver?)

I have made sure to build and run the latest version of the Vivante driver (5.0.11.p8.6) that is currently available from the meta-fsl-bsp-release layer (on branch "krogoth_4.1.15-2.0.1"). I cannot verify that the "Rotate" "left" option works with this version of the driver. It still only accepts "Rotate" "CCW", and the same failures still occur in the way described above.