[Letux-kernel] Step-by-Step instructions for demonstrating PVR/SGX on Pyra (OMAP5)

Michael Mrozek EvilDragon at openpandora.org
Tue Aug 6 01:24:53 CEST 2019


On Mo, 2019-08-05 at 18:56 +0200, H. Nikolaus Schaller wrote:

Hi,

actually, the question whether it needs to be rotated or not by TILER
is not an easy one.

I'd say it does not need to be rotated by TILER, as 3D can do rotation
on-the-fly for free.

But when you connect the Pyra via HDMI to a monitor, it should behave
exactly the same as on on the normal LCD - so the 3D program needs to
know whether it should rotate or not.

Also, any programs that aren't recompiled but are being run directly
from the Debian repo aren't aware of that... but are there any OpenGLES
programs in the repo anyways? I'd guess they all use OpenGL.

However, there's ptitSeb's OpenGL wrapper which will serve as the
OpenGL driver (at least in PyraOS).

So any OpenGL program will first go to the wrapper which uses OpenGLES
SGX to display 3D.

And that wrapper would know if it runs off HDMI or the internal LCD, so
it could take care of proper orientation.

So my guess is:
No, TILER probably does NOT need to rotate 3D output.

> > Am 05.08.2019 um 17:57 schrieb H. Nikolaus Schaller <
> > hns at goldelico.com>:
> > 
> > Here are some step-by step instruction how to make an SD card
> > to demonstrate PVR/SGX on Pyra:
> > 
> > # ssh into BeagleBone and become root
> > # insert empty (or to be overwritten) SD card into reader
> > wget -O makesd "
> > http://git.goldelico.com/?p=gta04-makesd.git;a=blob_plain;hb=HEAD;f=makesd
> > " && chmod +x makesd
> > DEV=/dev/sdb ./makesd pyra -r 
> > http://download.goldelico.com/letux-debian-rootfs/20190708-stretch-9.9-armhf-minimal.tbz
> > -m 
> > http://download.goldelico.com/letux-kernel/letux-4.19.4-pvr-lpae/modules.tgz
> > -f1 -k 
> > http://download.goldelico.com/letux-kernel/letux-4.19.4-pvr-lpae/uImage
> > -d 
> > http://download.goldelico.com/letux-kernel/letux-4.19.4-pvr-lpae/device-trees.tbz
> > mkdir -p /media/letux/rootfs
> > mount /dev/sdb2 /media/letux/rootfs
> > cd /media/letux/rootfs
> > KVERSION=$(cd lib/modules && ls -1)
> > wget -O lib/modules/$KVERSION/kernel/pvrsrvkm.ko 
> > https://packages.pyra-handheld.com/images/extra/pvr/4.19.4-letux-lpae-zmatt-pyra/pvrsrvkm.ko
> > depmod -b . $KVERSION
> > wget -O sgx.tar.xz 
> > https://packages.pyra-handheld.com/images/extra/sgx.tar.xz
> > tar xvJf sgx.tar.xz
> > cp -R sgx/pvr/etc sgx/pvr/lib .
> > cp -R sgx/pvr/bin sgx/pvr/include ./usr
> > sed -i.bak "s/modprobe -q pvrsrvkm/modprobe -q -f pvrsrvkm/g"
> > etc/init.d/rc.pvr    # ignore small diff in version code
> > ln -sf libgbm.so.1 usr/lib/arm-linux-gnueabihf/libgbm.so.2    #
> > there is (will be) no libgbm.so.2 in Debian
> > mv root/tiler-ctl root/tiler-ctl.off    # disable tiler
> 
> Because someone asked on the YouTube comments, I did another quick
> test.
> It seems to work with tiler-ctl 270 equally well. So there is no
> crash or something and no
> need to disable the tiler for making a demo.
> 
> A different question is if we expect the 3D image being rotated as
> well. I.e. gles1test1 triangles pointing left or upwards?
> Unfortunately I could not find an image on Google how the output of
> gles1test1 should look like.
> And there is no source code so we don't know that the programmers
> have stated in code.
> 
> My test shows: SGX screen image is not rotated, only framebuffer text
> console.
> 
> Maybe, after having kmscube working, we can compare with other 3D
> setups.
> 
> > # mv usr/bin/Xorg usr/bin/Xorg.off    # disable X11 - there is no
> > X11 here!
> > cd $HOME
> > umount /dev/sdb*
> > # extract SD card and insert into Pyra
> > 
> > # boot Pyra
> > # login as root through console or ssh into Pyra (ssh 
> > root at 192.168.0.202 through USB3 port)
> > yes | apt-get install libdrm-omap1 libgbm1   # needs some active
> > internet connection on Pyra (e.g. ethernet over USB, wwan, wlan)
> > /etc/init.d/rc.pvr start    # does not start automatically
> > cat /proc/pvr/*    # check that PVR was loaded successfully
> > eglinfo    # get some info
> > gles1test1 100    # run demo
> > 
> > This is a setup similar to which I used for making this quick
> > video:
> > 
> > 	https://youtu.be/Vis_pUOV6rw
> > 
> > Notes:
> > * there is some conflict between libEGL and xcb which means if some
> > X11 system is installed by LetuxOS,
> >  running eglinfo and gles1test1 will fail.
> > * this setup disables tiler rotation on the Pyra so that the text
> > console on screen is tilted.
> > * for the 4GB RAM Pyra you must replace
> > 
> > 	DEV=/dev/sdb ./makesd pyra -r ...
> > 
> >  by
> > 
> > 	DEV=/dev/sdb ./makesd pyra-4gb -r ...
> > 
> >  to get the correct U-Boot installed on SD card.
> > * I tried to build kmscube and could compile it (with a handful of
> > warnings) but gbm fails to load
> >  some "omapdrm" driver.
> > * compare to the 6 years old video from the GTA04 :)
> > 
> > 	https://www.youtube.com/watch?v=gA7L_Y2iqWc
> > 
> > Now since I have a working sample, I can start to replace/rebuild
> > individual components (mainly kernel module
> > variations and user-space setup) and check if it still works
> > equally well or breaks. It is much easier to
> > develop something against a visible and tangible target instead of
> > digging through the fog.
> > 
> > My next goal is to get the SGX driver code into drivers/staging/pvr
> > so that is no longer needed to build it
> > outside the kernel. And to make it more universal, so that the same
> > kernel tree and application binaries
> > can run on OMAP3/4/5. This still will be challenging, but seems to
> > be doable now.
> > 
> > BR and thanks to all who did contribute and help on the Pyra forum
> > to reach this milestone,
> > Nikolaus
> > 
> > _______________________________________________
> > http://projects.goldelico.com/p/gta04-kernel/
> > Letux-kernel mailing list
> > Letux-kernel at openphoenux.org
> > http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel
> 
> _______________________________________________
> Kernel mailing list
> Kernel at pyra-handheld.com
> http://pyra-handheld.com/cgi-bin/mailman/listinfo/kernel
> 
-- 
Mit freundlichen Grüßen,

Michael Mrozek

-----------------------
OpenPandora GmbH
Geschäftsführer: Michael Mrozek

Schäffbräustr. 11
85049 Ingolstadt
Deutschland
Tel.: 0841 / 990 5548
http://www.openpandora.de/
HRB 4879, Amtsgericht Ingolstadt
-----------------------
eMail: mrozek at openpandora.org



More information about the Letux-kernel mailing list