Configuring a second graphics card with XWindows

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

Configuring a second graphics card with XWindows

Jump to solution
2,400 Views
mstevens
Contributor II

I have the basic frame buffer working on fb0 and fb2.  If I do not launch XWindows, I can read and write to the framebuffers just find.

 

X is looking for a second card, but there is not one.

root@cgtimx6:/dev/dri# ls
card0

 

I have my fbs correctly configured. So what do I need to do in order to get the vivante /glxs to load two.  I can move between screens (fb0 and fb2) successfully, but I can not get both up. 

 

My displays are LVDS (800x480).  What do I need to configure to get it to add displays?  They are configured as separate.

 

echo 1>/sys/class/graphics/fb2/blank
cat /dev/fb0 >/tmp/a
cat /tmp/a >/dev/fb2

Will successfully copy the image from one screen to the other if X is not running.  So the hardware is configured correctly.

 

The X log shows

[3276244.299] (II) AIGLX: Screen 0 is not DRI2 capable
[3276244.299] (EE) AIGLX: reverting to software rendering
[3276244.696] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[3276244.697] (II) AIGLX: Loaded and initialized swrast
[3276244.697] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[3276244.697] (II) VIVANTE(0): Setting screen physical size to 211 x 127

 

I have attached my full conf and log files.  

Do I need to configure a sub device? 

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

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

1 Solution
1,465 Views
mstevens
Contributor II

SOLUTION

This link  has a series of patches the timing may be wrong for your display hardware you. However you will need most of them.  Below is my modified xorg.conf

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

Section "Device"
Identifier "i.MX Accelerated Framebuffer Device-1"
Driver "vivante"
Option "fbdev" "/dev/fb2"
Option "vivante_fbdev" "/dev/fb2"
Option "HWcursor" "false"
Option "NoAccel" "True"
EndSection

Section "Monitor"
Identifier "Monitor0"
EndSection

Section "Monitor"
Identifier "Monitor1"
EndSection


Section "Screen"
Identifier "Scr0"
Monitor "Monitor0"
Device "i.MX Accelerated Framebuffer Device-0"
EndSection

Section "Screen"
Identifier "Scr1"
Monitor "Monitor1"
Device "i.MX Accelerated Framebuffer Device-1"
EndSection

Section "ServerFlags"
Option "Xinerama" "true"
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Scr0" 0 0
Screen "Scr1" RightOf "Scr0"
EndSection

You will also need to calibrate your touch displays. 

export DISPLAY=:0.1
xinput set-prop 8 --type=float "Coordinate Transformation Matrix" 0.5 0 0.5 0 1 0 0 0 1

xinput_calibrate

export DISPLAY=:0.0
xinput set-prop 7 --type=float "Coordinate Transformation Matrix" 0.5 0 0 0 1 0 0 0 1

xinput_calibrate


The calibration values need to be set as "Evdev Axis Calibration" (examples below).

You need the transformation matrix to keep the scaling proper. 

export DISPLAY=:0.1
xinput set-prop 8 --type=float "Coordinate Transformation Matrix" 0.5 0 0.5 0 1 0 0 0 1

xinput set-prop 8  "Evdev Axis Calibration" 15 4011 101 3968

export DISPLAY=:0.0
xinput set-prop 7 --type=float "Coordinate Transformation Matrix" 0.5 0 0 0 1 0 0 0 1
xinput set-prop 7  "Evdev Axis Calibration" 28 3980 -109 3867

Finally I'd like to say a big thank you to conga tech support for all their help.  I posted this solution so that no one else needs to go through the trouble I had.

View solution in original post

5 Replies
1,465 Views
walber_silva
Contributor I

Hello, i'm facing the same problem as Wiktor, keep ending on segmentation fault, Is there still a way to adquire this patch?

0 Kudos
1,465 Views
wiktors_ovallec
Contributor I

Link to patch doesn't work anymore and xorg.conf with these settings ends up on segmentation fault. Is there still any way to acquire this patch?

0 Kudos
1,466 Views
mstevens
Contributor II

SOLUTION

This link  has a series of patches the timing may be wrong for your display hardware you. However you will need most of them.  Below is my modified xorg.conf

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

Section "Device"
Identifier "i.MX Accelerated Framebuffer Device-1"
Driver "vivante"
Option "fbdev" "/dev/fb2"
Option "vivante_fbdev" "/dev/fb2"
Option "HWcursor" "false"
Option "NoAccel" "True"
EndSection

Section "Monitor"
Identifier "Monitor0"
EndSection

Section "Monitor"
Identifier "Monitor1"
EndSection


Section "Screen"
Identifier "Scr0"
Monitor "Monitor0"
Device "i.MX Accelerated Framebuffer Device-0"
EndSection

Section "Screen"
Identifier "Scr1"
Monitor "Monitor1"
Device "i.MX Accelerated Framebuffer Device-1"
EndSection

Section "ServerFlags"
Option "Xinerama" "true"
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Scr0" 0 0
Screen "Scr1" RightOf "Scr0"
EndSection

You will also need to calibrate your touch displays. 

export DISPLAY=:0.1
xinput set-prop 8 --type=float "Coordinate Transformation Matrix" 0.5 0 0.5 0 1 0 0 0 1

xinput_calibrate

export DISPLAY=:0.0
xinput set-prop 7 --type=float "Coordinate Transformation Matrix" 0.5 0 0 0 1 0 0 0 1

xinput_calibrate


The calibration values need to be set as "Evdev Axis Calibration" (examples below).

You need the transformation matrix to keep the scaling proper. 

export DISPLAY=:0.1
xinput set-prop 8 --type=float "Coordinate Transformation Matrix" 0.5 0 0.5 0 1 0 0 0 1

xinput set-prop 8  "Evdev Axis Calibration" 15 4011 101 3968

export DISPLAY=:0.0
xinput set-prop 7 --type=float "Coordinate Transformation Matrix" 0.5 0 0 0 1 0 0 0 1
xinput set-prop 7  "Evdev Axis Calibration" 28 3980 -109 3867

Finally I'd like to say a big thank you to conga tech support for all their help.  I posted this solution so that no one else needs to go through the trouble I had.

1,465 Views
mstevens
Contributor II

@Bio_TICFLS

I do not need hardware accelleration, I just need them to display.  This is for a UI so it is fine for it to be slow.  I tried the generic fbdev (I think), it did not work.  What is the best path for getting two displays up?   This is a UI no need for hardware rendering.

0 Kudos
1,465 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Michael,

Dual render X11 display hw acceleration interface is not currently supported on NXP BSP.

Regards

0 Kudos