Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Clark committed Jul 20, 2011
0 parents commit 487687e
Show file tree
Hide file tree
Showing 18 changed files with 3,525 additions and 0 deletions.
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Ian Elliott <ianelliottus@yahoo.com>
Rob Clark <rob@ti.com>
20 changes: 20 additions & 0 deletions COPYING
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright © 2011 Texas Instruments, Inc

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
34 changes: 34 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2005 Adam Jackson.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# on the rights to use, copy, modify, merge, publish, distribute, sub
# license, and/or sell copies of the Software, and to permit persons to whom
# the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
# ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}

SUBDIRS = src man
MAINTAINERCLEANFILES = ChangeLog INSTALL

.PHONY: ChangeLog INSTALL

INSTALL:
$(INSTALL_CMD)

ChangeLog:
$(CHANGELOG_CMD)

dist-hook: ChangeLog INSTALL
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TBD
19 changes: 19 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
xf86-video-omap
Open-source X.org graphics driver for TI OMAP graphics

Currently relies on a closed-source submodule for EXA acceleration on
the following chipsets:
+ OMAP3430
+ OMAP3630
+ OMAP4430
+ OMAP4460


NOTE: this driver is work in progress.. you probably don't want to try
and use it yet. The API/ABI between driver and kernel, and driver and
acceleration submodules is not stable yet. This driver requires the
omapdrm kernel driver w/ GEM support.

EXA vs UXA? This is an open question..


33 changes: 33 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#! /bin/sh

cd `dirname $0`

# on some platforms, you have "g" versions of some of these tools instead,
# ie glibtoolize instead of libtoolize..
find_tool() {
which $1 2> /dev/null || which g$1 2> /dev/null
}

aclocal=`find_tool aclocal`
libtoolize=`find_tool libtoolize`
automake=`find_tool automake`
autoconf=`find_tool autoconf`
autoheader=`find_tool autoheader`

mkdir -p config && $aclocal && $libtoolize --copy --force && $automake --copy --add-missing --foreign && $autoheader && $autoconf

test -n "$NOCONFIGURE" && {
echo "skipping configure stage as requested."
echo "autogen.sh done."
exit 0
}

CONFIGURE_DEF_OPT="--enable-maintainer-mode"
echo ./configure $CONFIGURE_DEF_OPT $*
./configure $CONFIGURE_DEF_OPT $* || {
echo " configure failed"
exit 1
}

echo "Now type 'make' to compile"

97 changes: 97 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.60)
# XXX bug URL should be https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
# but this makes autoheader choke..
AC_INIT([xf86-video-omap],
[0.0.1],
[https://bugs.freedesktop.org/enter_bug.cgi],
[xf86-video-omap])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(.)

AM_INIT_AUTOMAKE([dist-bzip2])

AM_MAINTAINER_MODE

# Require xorg-macros: XORG_DEFAULT_OPTIONS
m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.4)
XORG_DEFAULT_OPTIONS

# Checks for programs.
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_PROG_CC

AC_CHECK_HEADERS([sys/ioctl.h])

AH_TOP([#include "xorg-server.h"])

AC_ARG_WITH(xorg-module-dir,
AC_HELP_STRING([--with-xorg-module-dir=DIR],
[Default xorg module directory [[default=$libdir/xorg/modules]]]),
[moduledir="$withval"],
[moduledir="$libdir/xorg/modules"])

# Checks for extensions
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
XORG_DRIVER_CHECK_EXT(XV, videoproto)
XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)

# Checks for pkg-config packages
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.3] xproto fontsproto libdrm xf86driproto $REQUIRED_MODULES)
sdkdir=$(pkg-config --variable=sdkdir xorg-server)

# Checks for header files.
AC_HEADER_STDC

save_CFLAGS="$CFLAGS"
CFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS"
CPPFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS"
AC_MSG_CHECKING([whether to include DRI support])
if test x$DRI != xno; then
AC_CHECK_FILE([${sdkdir}/dri.h],
[have_dri_h="yes"], [have_dri_h="no"])
AC_CHECK_FILE([${sdkdir}/dristruct.h],
[have_dristruct_h="yes"], [have_dristruct_h="no"])
fi
AC_MSG_CHECKING([whether to include DRI support])
if test x$DRI = xauto; then
if test "$have_dri_h" = yes -a \
"$have_dristruct_h" = yes; then
DRI="yes"
else
DRI="no"
fi
fi
AC_MSG_RESULT([$DRI])
CFLAGS="$save_CFLAGS $DEBUGFLAGS"

AM_CONDITIONAL(DRI, test x$DRI = xyes)
if test "$DRI" = yes; then
PKG_CHECK_MODULES(DRI, [xf86driproto glproto])
AC_DEFINE(XF86DRI,1,[Enable DRI driver support])
AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
fi

AM_CONDITIONAL(VIDEO_DEBUG, test x$VIDEO_DEBUG = xyes)
if test "$VIDEO_DEBUG" = yes; then
AC_DEFINE(VIDEO_DEBUG,1,[Enable debug support])
fi

AC_SUBST([DRI_CFLAGS])

DRIVER_NAME=omap
AC_SUBST([DRIVER_NAME])
AC_SUBST([moduledir])

AC_OUTPUT([
Makefile
src/Makefile
man/Makefile
])
37 changes: 37 additions & 0 deletions man/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#

drivermandir = $(DRIVER_MAN_DIR)
driverman_DATA = $(DRIVER_NAME).$(DRIVER_MAN_SUFFIX)

EXTRA_DIST = $(DRIVER_NAME).man

CLEANFILES = $(driverman_DATA)

# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure


SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man

.man.$(DRIVER_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
114 changes: 114 additions & 0 deletions man/omap.man
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
.TH omap __drivermansuffix__ __vendorversion__
.SH NAME
omap \- OMAP SoC graphics
.SH SYNOPSIS
.nf
.B "Section \*qDevice\*q"
.BI " Identifier \*q" devname \*q
.B " Driver \*qomap\*q"
\ \ ...
.B EndSection
.fi
.SH DESCRIPTION
.B omap
is an __xservername__ driver for OMAP SoCs.
.SH SUPPORTED HARDWARE
.B omap
supports the OMAP3430, OMAP3630, OMAP4430, OMAP4460

.SH CONFIGURATION DETAILS
Please refer to __xconfigfile__(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver.
.PP
TODO
.PP
The following driver
.B Options
are supported
.TP
.BI "Option \*qDebug\*q \*q" boolean \*q
Enable debug logging.
.IP
Default: Disabled
.TP
.BI "Option \*qNoAccel\*q \*q" boolean \*q
Disable hw acceleration.
.IP
Default: Disabled

.SH OUTPUT CONFIGURATION
The driver supports runtime configuration of detected outputs. You can use the
.B xrandr
tool to control outputs on the command line as follows:

.RS
.B xrandr \-\-output
.I output
.B \-\-set
.I property value
.RE

Note that you may need to quote property and value arguments that contain spaces.
Each output listed below may have one or more properties associated
with it (like a binary EDID block if one is found). Some outputs have
unique properties which are described below. See the "MULTIHEAD
CONFIGURATIONS" section below for additional information.

TODO

.PP
See __xconfigfile__(__filemansuffix__) for information on associating Monitor
sections with these outputs for configuration. Associating Monitor sections
with each output can be helpful if you need to ignore a specific output, for
example, or statically configure an extended desktop monitor layout.

.SH MULTIHEAD CONFIGURATIONS

The number of independent outputs is dictated by the number of CRTCs
(in X parlance) a given chip supports. OMAP3xxx supports up to two,
while OMAP4xxx supports up to three displays. The actual number of
displays supported will depend on the board. But a built-in LCD and
external HDMI are a common configuration.

You can use the "xrandr" tool, or various desktop utilities, to change
your output configuration at runtime. To statically configure your
outputs, you can use the "Monitor-<type>" options along with
additional monitor sections in your xorg.conf to create your screen
topology. The example below puts the VGA output to the right of the
builtin laptop screen, both running at 1024x768.

.nf
.B "Section \*qMonitor\*q"
.BI " Identifier \*qLaptop FooBar Internal Display\*q"
.BI " Option \*qPosition\*q \*q0 0\*q"
.B "EndSection"

.B "Section \*qMonitor\*q"
.BI " Identifier \*qSome Random CRT\*q"
.BI " Option \*qPosition\*q \*q1024 0\*q"
.BI " Option \*qRightOf\*q \*qLaptop FoodBar Internal Display\*q"
.B "EndSection"

.B "Section \*qDevice\*q"
.BI " Driver \*qomap\*q"
.BI " Option \*qmonitor-LVDS\*q \*qLaptop FooBar Internal Display\*q"
.BI " Option \*qmonitor-VGA\*q \*qSome Random CRT\*q"
.B "EndSection"

.SH REPORTING BUGS

The xf86-video-omap driver is part of the X.Org and Freedesktop.org
umbrella projects. Report bugs at
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg. Mailing
lists are also commonly used to report experiences and ask questions
about configuration and other topics. See lists.freedesktop.org for
more information (the xorg@lists.freedesktop.org mailing list is the
most appropriate place to ask X.Org and driver related questions).

.SH "SEE ALSO"
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
.SH AUTHORS
Authors include: Ian Elliott, Rob Clark.
Loading

0 comments on commit 487687e

Please sign in to comment.