Commit 7fdcf8e8 authored by Spenser Gilliland's avatar Spenser Gilliland Committed by Peter Korsgaard
Browse files

ti-gfx: add new package



adds accelerated GPU support for the OMAP35xx, AM35xx, AM37xx, DM37xx,
AM387x, DM814x, AM389x, DM816x, and AM335x platforms.

[Peter: fix .pc files install]
Signed-off-by: default avatarSpenser Gilliland <spenser@gillilanding.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Sundareson, Prabindh <prabu@ti.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Sinan Akpolat <sinan@linkas.com.tr>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 61900d92
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -294,6 +294,7 @@ source "package/snowball-hdmiservice/Config.in"
source "package/sredird/Config.in"
source "package/statserial/Config.in"
source "package/sysstat/Config.in"
source "package/ti-gfx/Config.in"
source "package/ti-utils/Config.in"
source "package/uboot-tools/Config.in"
source "package/udev/Config.in"
+4 −0
Original line number Diff line number Diff line
@@ -10,6 +10,10 @@ ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
LIBEGL_DEPENDENCIES += rpi-userland
endif

ifeq ($(BR2_PACKAGE_TI_GFX),y)
LIBEGL_DEPENDENCIES += ti-gfx
endif

ifeq ($(LIBEGL_DEPENDENCIES),)
define LIBEGL_CONFIGURE_CMDS
	echo "No libEGL implementation selected. Configuration error."
+4 −0
Original line number Diff line number Diff line
@@ -10,6 +10,10 @@ ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
LIBGLES_DEPENDENCIES += rpi-userland
endif

ifeq ($(BR2_PACKAGE_TI_GFX),y)
LIBGLES_DEPENDENCIES += ti-gfx
endif

ifeq ($(LIBGLES_DEPENDENCIES),)
define LIBGLES_CONFIGURE_CMDS
	echo "No libGLES implementation selected. Configuration error."
+69 −0
Original line number Diff line number Diff line
config BR2_PACKAGE_TI_GFX
	bool "ti-gfx"
	select BR2_PACKAGE_HAS_OPENGL_EGL
	select BR2_PACKAGE_HAS_OPENGL_ES
	select BR2_PACKAGE_HAS_POWERVR
	depends on BR2_LINUX_KERNEL && BR2_TOOLCHAIN_USES_GLIBC && BR2_arm
	help
	  Graphics libraries for TI boards.

	  http://downloads.ti.com/dsps/dsps_public_sw/gfxsdk/

if BR2_PACKAGE_TI_GFX

config BR2_PACKAGE_TI_GFX_DEBUG
	bool "enable debug support"
	help
	  Turns on debugging in the kernel module, install libraries built with
	  debugging enabled, installs various tests and installs esrev script.

config BR2_PACKAGE_TI_GFX_DEMOS
	bool "install demos"
	default y
	help
	  Install the OGLES2ChameleonMan and OGLES2MagicLantern demos

config BR2_PACKAGE_TI_GFX_EGLIMAGE
	bool "install eglimage version of libraries"
	help
	  Installs OpenGL libaries which support the eglimage api.

config BR2_PACKAGE_TI_GFX_HARD_FLOAT
	bool "use hard float binaries"
	help
	  Install hard float binaries (required if using a hard float toolchain)

choice
	prompt "Target"
	default BR2_PACKAGE_TI_GFX_ES3
	help
	  Select the SOC for which you would like to install drivers. Please use the
	  chart at
	  http://processors.wiki.ti.com/index.php/OMAP35x_Graphics_SDK_Getting_Started_Guide

config BR2_PACKAGE_TI_GFX_ES3
	bool "es3.x (OMAP35xx, AM35xx Rev 3.1+)"
	help
	 OMAP35xx, AM35xx Rev 3.1+

config BR2_PACKAGE_TI_GFX_ES5
	bool "es5.x (AM37xx, DM37xx)"
	help
	  AM37xx, DM37xx

config BR2_PACKAGE_TI_GFX_ES6
	bool "es6.x (AM387x, DMA814x, AM389x, DM816x)"
	help
	  AM387x, DM814x, AM389x, DM816x

config BR2_PACKAGE_TI_GFX_ES8
	bool "es8.x (AM335x)"
	help
	  AM335x

endchoice

endif

comment "ti-gfx requires an eglibc/glibc based toolchain and the linux kernel"
	depends on !(BR2_LINUX_KERNEL && BR2_TOOLCHAIN_USES_GLIBC) && BR2_arm
+53 −0
Original line number Diff line number Diff line
#!/bin/sh

start() {
	echo "ti-gfx: starting pvr driver"

	BITSPERPIXEL="$(fbset | awk '/geom/ {print $6}')"
	YRES="$(fbset | awk '/geom/ {print $3}')"
	# Set RGBA ordering to something the drivers like
	if [ "$BITSPERPIXEL" = "32" ] ; then
		fbset -rgba 8/16,8/8,8/0,8/24
	fi
	# Try to enable triple buffering when there's enough VRAM
	fbset -vyres $(( YRES*3 ))

	modprobe pvrsrvkm
	modprobe omaplfb
	modprobe bufferclass_ti

	pvr_maj=$(awk '$2=="pvrsrvkm" { print $1; }' /proc/devices)
	rm -f /dev/pvrsrvkm

	mknod /dev/pvrsrvkm c $pvr_maj 0
	chmod 600 /dev/pvrsrvkm

	if ! /usr/bin/pvrsrvctl --start --no-module; then
		echo "ti-gfx: unable to start server"
	fi
}

stop() {
	echo "ti-gfx: stopping pvr driver"

	rmmod bufferclass_ti
	rmmod omaplfb
	rmmod pvrsrvkm
}

case "$1" in
start)
	start
;;
stop)
	stop
;;
restart)
	stop
	start
;;
*)
	echo "ti-gfx: Please use start, stop, or restart."
	exit 1
;;
esac
Loading