mirror of
https://github.com/X11Libre/xf86-video-fbdev.git
synced 2026-03-24 17:45:26 +00:00
Compare commits
75 Commits
IPv6-REVIE
...
xf86-video
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ec9d466e5 | ||
|
|
b3220bf63e | ||
|
|
a9df47d6d0 | ||
|
|
a5b035414d | ||
|
|
5ec41a8b2e | ||
|
|
69f82077fd | ||
|
|
4e8a6ac78d | ||
|
|
d868015c9c | ||
|
|
a9e65feebd | ||
|
|
7b583191fa | ||
|
|
6b5e30a2df | ||
|
|
e233c12c97 | ||
|
|
dfe51de992 | ||
|
|
fe00991326 | ||
|
|
16ea2bb46c | ||
|
|
c3434c8625 | ||
|
|
db33e337a8 | ||
|
|
f9b88908fc | ||
|
|
092f0f10cb | ||
|
|
73ff2d0cd7 | ||
|
|
6bae3476b0 | ||
|
|
a9a7763ce0 | ||
|
|
31707aeccd | ||
|
|
b17f9256d5 | ||
|
|
436a2c094a | ||
|
|
5b54cbd70e | ||
|
|
b6fd370824 | ||
|
|
43236f5bfc | ||
|
|
643573a51f | ||
|
|
b5b1b7d731 | ||
|
|
abfc75fbcd | ||
|
|
a12d1ce572 | ||
|
|
6ed2e61542 | ||
|
|
24177f7218 | ||
|
|
c7b9e1a327 | ||
|
|
fe1fa4c016 | ||
|
|
41a763816d | ||
|
|
332464c43f | ||
|
|
cf1b33cb4d | ||
|
|
35c09ae4c4 | ||
|
|
2e4f3e6a0a | ||
|
|
8521127ff1 | ||
|
|
7a37e5db75 | ||
|
|
4635b198fb | ||
|
|
91b40b9c63 | ||
|
|
ff70627427 | ||
|
|
d57ddc84c3 | ||
|
|
493a1b8b11 | ||
|
|
3f11faf88c | ||
|
|
e87f2ee9b1 | ||
|
|
5f77732d9a | ||
|
|
52518e4511 | ||
|
|
a2a75f4dba | ||
|
|
28171378a1 | ||
|
|
f060ccc1f1 | ||
|
|
d0517a40a9 | ||
|
|
44d4790006 | ||
|
|
4d18c5309c | ||
|
|
82ab7895da | ||
|
|
077e3dbcf4 | ||
|
|
2327cdd208 | ||
|
|
bd1e31bdb5 | ||
|
|
1d3246ca0d | ||
|
|
ce86e2a272 | ||
|
|
4c1492ac6d | ||
|
|
64ef1f4af1 | ||
|
|
db6514cea0 | ||
|
|
1e80fe1bf9 | ||
|
|
5d8a0a2e47 | ||
|
|
69d61895f3 | ||
|
|
806863c5f6 | ||
|
|
595a614cd9 | ||
|
|
62bec818a1 | ||
|
|
48e31aaed2 | ||
|
|
3a00d91359 |
78
.gitignore
vendored
Normal file
78
.gitignore
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
#
|
||||
# X.Org module default exclusion patterns
|
||||
# The next section if for module specific patterns
|
||||
#
|
||||
# Do not edit the following section
|
||||
# GNU Build System (Autotools)
|
||||
aclocal.m4
|
||||
autom4te.cache/
|
||||
autoscan.log
|
||||
ChangeLog
|
||||
compile
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config-ml.in
|
||||
config.py
|
||||
config.status
|
||||
config.status.lineno
|
||||
config.sub
|
||||
configure
|
||||
configure.scan
|
||||
depcomp
|
||||
.deps/
|
||||
INSTALL
|
||||
install-sh
|
||||
.libs/
|
||||
libtool
|
||||
libtool.m4
|
||||
ltmain.sh
|
||||
lt~obsolete.m4
|
||||
ltoptions.m4
|
||||
ltsugar.m4
|
||||
ltversion.m4
|
||||
Makefile
|
||||
Makefile.in
|
||||
mdate-sh
|
||||
missing
|
||||
mkinstalldirs
|
||||
*.pc
|
||||
py-compile
|
||||
stamp-h?
|
||||
symlink-tree
|
||||
texinfo.tex
|
||||
ylwrap
|
||||
|
||||
# Do not edit the following section
|
||||
# Edit Compile Debug Document Distribute
|
||||
*~
|
||||
*.[0-9]
|
||||
*.[0-9]x
|
||||
*.bak
|
||||
*.bin
|
||||
core
|
||||
*.dll
|
||||
*.exe
|
||||
*-ISO*.bdf
|
||||
*-JIS*.bdf
|
||||
*-KOI8*.bdf
|
||||
*.kld
|
||||
*.ko
|
||||
*.ko.cmd
|
||||
*.lai
|
||||
*.l[oa]
|
||||
*.[oa]
|
||||
*.obj
|
||||
*.patch
|
||||
*.so
|
||||
*.pcf.gz
|
||||
*.pdb
|
||||
*.tar.bz2
|
||||
*.tar.gz
|
||||
#
|
||||
# Add & Override patterns for xf86-video-fbdev
|
||||
#
|
||||
# Edit the following section as needed
|
||||
# For example, !report.pc overrides *.pc. See 'man gitignore'
|
||||
#
|
||||
23
COPYING
Normal file
23
COPYING
Normal file
@@ -0,0 +1,23 @@
|
||||
Copyright (C) 1994-2003 The XFree86 Project, 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 fur-
|
||||
nished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice 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, FIT-
|
||||
NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
|
||||
NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of the XFree86 Project shall not
|
||||
be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
ings in this Software without prior written authorization from the XFree86
|
||||
Project.
|
||||
32
Makefile.am
Normal file
32
Makefile.am
Normal file
@@ -0,0 +1,32 @@
|
||||
# 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.
|
||||
|
||||
SUBDIRS = src man
|
||||
MAINTAINERCLEANFILES = ChangeLog INSTALL
|
||||
|
||||
.PHONY: ChangeLog INSTALL
|
||||
|
||||
INSTALL:
|
||||
$(INSTALL_CMD)
|
||||
|
||||
ChangeLog:
|
||||
$(CHANGELOG_CMD)
|
||||
|
||||
dist-hook: ChangeLog INSTALL
|
||||
20
README
Normal file
20
README
Normal file
@@ -0,0 +1,20 @@
|
||||
xf86-video-fbdev - video driver for framebuffer device
|
||||
|
||||
Please submit bugs & patches to the Xorg bugzilla:
|
||||
|
||||
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
|
||||
|
||||
All questions regarding this software should be directed at the
|
||||
Xorg mailing list:
|
||||
|
||||
http://lists.freedesktop.org/mailman/listinfo/xorg
|
||||
|
||||
The master development code repository can be found at:
|
||||
|
||||
git://anongit.freedesktop.org/git/xorg/driver/xf86-video-fbdev
|
||||
|
||||
http://cgit.freedesktop.org/xorg/driver/xf86-video-fbdev
|
||||
|
||||
For more information on the git code manager, see:
|
||||
|
||||
http://wiki.x.org/wiki/GitPage
|
||||
12
autogen.sh
Executable file
12
autogen.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#! /bin/sh
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
cd $srcdir
|
||||
|
||||
autoreconf -v --install || exit 1
|
||||
cd $ORIGDIR || exit $?
|
||||
|
||||
$srcdir/configure --enable-maintainer-mode "$@"
|
||||
97
configure.ac
Normal file
97
configure.ac
Normal file
@@ -0,0 +1,97 @@
|
||||
# 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.
|
||||
#
|
||||
# Process this file with autoconf to produce a configure script
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT([xf86-video-fbdev],
|
||||
0.4.2,
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
|
||||
xf86-video-fbdev)
|
||||
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
AC_CONFIG_AUX_DIR(.)
|
||||
|
||||
AM_INIT_AUTOMAKE([foreign 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
|
||||
|
||||
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"])
|
||||
AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--enable-pciaccess],
|
||||
[Enable use of libpciaccess (default: disabled)]),
|
||||
[PCIACCESS=$enableval], [PCIACCESS=no])
|
||||
|
||||
# Checks for extensions
|
||||
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
|
||||
XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
|
||||
XORG_DRIVER_CHECK_EXT(XV, videoproto)
|
||||
|
||||
# Checks for pkg-config packages
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$XORG_CFLAGS"
|
||||
AC_CHECK_DECL(xf86ConfigIsaEntity,
|
||||
[AC_DEFINE(HAVE_ISA, 1, [Have ISA support])],
|
||||
[],
|
||||
[#include "xf86.h"])
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
AM_CONDITIONAL(PCIACCESS, [test "x$PCIACCESS" = xyes])
|
||||
if test "x$PCIACCESS" = xyes; then
|
||||
AC_DEFINE(PCIACCESS, 1, [Use libpciaccess])
|
||||
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
|
||||
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
AC_SUBST([XORG_CFLAGS])
|
||||
AC_SUBST([moduledir])
|
||||
|
||||
DRIVER_NAME=fbdev
|
||||
AC_SUBST([DRIVER_NAME])
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
man/Makefile
|
||||
])
|
||||
56
man/Makefile.am
Normal file
56
man/Makefile.am
Normal file
@@ -0,0 +1,56 @@
|
||||
# $Id$
|
||||
#
|
||||
# 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_PRE = @DRIVER_NAME@.man
|
||||
|
||||
driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
|
||||
|
||||
EXTRA_DIST = @DRIVER_NAME@.man
|
||||
|
||||
CLEANFILES = $(driverman_DATA)
|
||||
|
||||
SED = sed
|
||||
|
||||
# Strings to replace in man pages
|
||||
XORGRELSTRING = @PACKAGE_STRING@
|
||||
XORGMANNAME = X Version 11
|
||||
|
||||
MAN_SUBSTS = \
|
||||
-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
|
||||
-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
|
||||
-e 's|__xservername__|Xorg|g' \
|
||||
-e 's|__xconfigfile__|xorg.conf|g' \
|
||||
-e 's|__projectroot__|$(prefix)|g' \
|
||||
-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
|
||||
-e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \
|
||||
-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
|
||||
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
|
||||
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
|
||||
|
||||
SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
|
||||
|
||||
.man.$(DRIVER_MAN_SUFFIX):
|
||||
sed $(MAN_SUBSTS) < $< > $@
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.man,v 1.3 2001/10/02 15:57:32 alanh Exp $
|
||||
.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.man,v 1.2 2001/01/27 18:20:47 dawes Exp $
|
||||
.\" shorthand for double quote that works everywhere.
|
||||
.ds q \N'34'
|
||||
.TH FBDEV __drivermansuffix__ __vendorversion__
|
||||
@@ -15,7 +15,7 @@ fbdev \- video driver for framebuffer device
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.B fbdev
|
||||
is an XFree86 driver for framebuffer devices. This is a non-accelerated
|
||||
is an __xservername__ driver for framebuffer devices. This is a non-accelerated
|
||||
driver, the following framebuffer depths are supported: 8, 15, 16, 24.
|
||||
All visual types are supported for depth 8, and TrueColor visual is
|
||||
supported for the other depths. Multi-head configurations are supported.
|
||||
@@ -27,7 +27,7 @@ fbdev uses the os-specific submodule fbdevhw(__drivermansuffix__) to talk
|
||||
to the kernel
|
||||
device driver. Currently a fbdevhw module is available for linux.
|
||||
.SH CONFIGURATION DETAILS
|
||||
Please refer to XF86Config(__filemansuffix__) for general configuration
|
||||
Please refer to __xconfigfile__(__filemansuffix__) for general configuration
|
||||
details. This section only covers configuration details specific to
|
||||
this driver.
|
||||
.PP
|
||||
@@ -38,7 +38,8 @@ driver can pick up the currently used video mode from the framebuffer
|
||||
driver and will use it if there are no video modes configured.
|
||||
.PP
|
||||
For PCI boards you might have to add a BusID line to the Device
|
||||
section. See above for a sample line. You can use "XFree86 -scanpci"
|
||||
section. See above for a sample line. You can use \*q\__xservername__
|
||||
-scanpci\*q
|
||||
to figure out the correct values.
|
||||
.PP
|
||||
The following driver
|
||||
@@ -56,7 +57,7 @@ Enable rotation of the display. The supported values are "CW" (clockwise,
|
||||
90 degrees), "UD" (upside down, 180 degrees) and "CCW" (counter clockwise,
|
||||
270 degrees). Implies use of the shadow framebuffer layer. Default: off.
|
||||
.SH "SEE ALSO"
|
||||
XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1),
|
||||
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__),
|
||||
X(__miscmansuffix__), fbdevhw(__drivermansuffix__)
|
||||
.SH AUTHORS
|
||||
Authors include: Gerd Knorr, Michel Dänzer, Geert Uytterhoeven
|
||||
Authors include: Gerd Knorr, Michel D\(:anzer, Geert Uytterhoeven
|
||||
|
||||
32
src/Makefile.am
Normal file
32
src/Makefile.am
Normal file
@@ -0,0 +1,32 @@
|
||||
# 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.
|
||||
|
||||
# this is obnoxious:
|
||||
# -module lets us name the module exactly how we want
|
||||
# -avoid-version prevents gratuitous .0.0.0 version numbers on the end
|
||||
# _ladir passes a dummy rpath to libtool so the thing will actually link
|
||||
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
|
||||
AM_CFLAGS = @XORG_CFLAGS@
|
||||
fbdev_drv_la_LTLIBRARIES = fbdev_drv.la
|
||||
fbdev_drv_la_LDFLAGS = -module -avoid-version
|
||||
fbdev_drv_ladir = @moduledir@/drivers
|
||||
|
||||
fbdev_drv_la_SOURCES = \
|
||||
fbdev.c
|
||||
535
src/fbdev.c
535
src/fbdev.c
@@ -1,14 +1,17 @@
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.c,v 1.42 2002/10/10 01:35:20 dawes Exp $ */
|
||||
|
||||
/*
|
||||
* Authors: Alan Hourihane, <alanh@fairlite.demon.co.uk>
|
||||
* Michel Dänzer, <michdaen@iiic.ethz.ch>
|
||||
* Michel Dänzer, <michel@tungstengraphics.com>
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* all driver need this */
|
||||
#include "xf86.h"
|
||||
#include "xf86_OSproc.h"
|
||||
#include "xf86_ansic.h"
|
||||
|
||||
#include "mipointer.h"
|
||||
#include "mibstore.h"
|
||||
@@ -20,30 +23,28 @@
|
||||
|
||||
/* for visuals */
|
||||
#include "fb.h"
|
||||
#ifdef USE_AFB
|
||||
#include "afb.h"
|
||||
#endif
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
|
||||
#include "xf86Resources.h"
|
||||
#include "xf86RAC.h"
|
||||
#endif
|
||||
|
||||
#include "fbdevhw.h"
|
||||
|
||||
#ifdef XvExtension
|
||||
#include "xf86xv.h"
|
||||
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
#include <pciaccess.h>
|
||||
#endif
|
||||
|
||||
#define DEBUG 0
|
||||
static Bool debug = 0;
|
||||
|
||||
#if DEBUG
|
||||
# define TRACE_ENTER(str) ErrorF("fbdev: " str " %d\n",pScrn->scrnIndex)
|
||||
# define TRACE_EXIT(str) ErrorF("fbdev: " str " done\n")
|
||||
# define TRACE(str) ErrorF("fbdev trace: " str "\n")
|
||||
#else
|
||||
# define TRACE_ENTER(str)
|
||||
# define TRACE_EXIT(str)
|
||||
# define TRACE(str)
|
||||
#endif
|
||||
#define TRACE_ENTER(str) \
|
||||
do { if (debug) ErrorF("fbdev: " str " %d\n",pScrn->scrnIndex); } while (0)
|
||||
#define TRACE_EXIT(str) \
|
||||
do { if (debug) ErrorF("fbdev: " str " done\n"); } while (0)
|
||||
#define TRACE(str) \
|
||||
do { if (debug) ErrorF("fbdev trace: " str "\n"); } while (0)
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* prototypes */
|
||||
@@ -51,6 +52,10 @@
|
||||
static const OptionInfoRec * FBDevAvailableOptions(int chipid, int busid);
|
||||
static void FBDevIdentify(int flags);
|
||||
static Bool FBDevProbe(DriverPtr drv, int flags);
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
static Bool FBDevPciProbe(DriverPtr drv, int entity_num,
|
||||
struct pci_device *dev, intptr_t match_data);
|
||||
#endif
|
||||
static Bool FBDevPreInit(ScrnInfoPtr pScrn, int flags);
|
||||
static Bool FBDevScreenInit(int Index, ScreenPtr pScreen, int argc,
|
||||
char **argv);
|
||||
@@ -59,15 +64,12 @@ static void * FBDevWindowLinear(ScreenPtr pScreen, CARD32 row, CARD32 offset, in
|
||||
CARD32 *size, void *closure);
|
||||
static void FBDevPointerMoved(int index, int x, int y);
|
||||
static Bool FBDevDGAInit(ScrnInfoPtr pScrn, ScreenPtr pScreen);
|
||||
static Bool FBDevDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op,
|
||||
pointer ptr);
|
||||
|
||||
|
||||
enum { FBDEV_ROTATE_NONE=0, FBDEV_ROTATE_CW=270, FBDEV_ROTATE_UD=180, FBDEV_ROTATE_CCW=90 };
|
||||
|
||||
/*static ShadowUpdateProc updateFuncs[] =
|
||||
{ shadowUpdatePacked, shadowUpdateRotate8_270, shadowUpdateRotate8_180, shadowUpdateRotate8_90,
|
||||
shadowUpdatePacked, shadowUpdateRotate16_270, shadowUpdateRotate16_180, shadowUpdateRotate16_90,
|
||||
shadowUpdatePacked, shadowUpdateRotate32_270, shadowUpdateRotate32_180, shadowUpdateRotate32_90 }; */
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
@@ -77,14 +79,23 @@ enum { FBDEV_ROTATE_NONE=0, FBDEV_ROTATE_CW=270, FBDEV_ROTATE_UD=180, FBDEV_ROTA
|
||||
*/
|
||||
static int pix24bpp = 0;
|
||||
|
||||
#define VERSION 4000
|
||||
#define FBDEV_VERSION 4000
|
||||
#define FBDEV_NAME "FBDEV"
|
||||
#define FBDEV_DRIVER_NAME "fbdev"
|
||||
#define FBDEV_MAJOR_VERSION 0
|
||||
#define FBDEV_MINOR_VERSION 1
|
||||
|
||||
DriverRec FBDEV = {
|
||||
VERSION,
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
static const struct pci_id_match fbdev_device_match[] = {
|
||||
{
|
||||
PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
|
||||
0x00030000, 0x00ffffff, 0
|
||||
},
|
||||
|
||||
{ 0, 0, 0 },
|
||||
};
|
||||
#endif
|
||||
|
||||
_X_EXPORT DriverRec FBDEV = {
|
||||
FBDEV_VERSION,
|
||||
FBDEV_DRIVER_NAME,
|
||||
#if 0
|
||||
"driver for linux framebuffer devices",
|
||||
@@ -93,15 +104,18 @@ DriverRec FBDEV = {
|
||||
FBDevProbe,
|
||||
FBDevAvailableOptions,
|
||||
NULL,
|
||||
0
|
||||
0,
|
||||
FBDevDriverFunc,
|
||||
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
fbdev_device_match,
|
||||
FBDevPciProbe
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Supported "chipsets" */
|
||||
static SymTabRec FBDevChipsets[] = {
|
||||
{ 0, "fbdev" },
|
||||
#ifdef USE_AFB
|
||||
{ 0, "afb" },
|
||||
#endif
|
||||
{-1, NULL }
|
||||
};
|
||||
|
||||
@@ -109,75 +123,20 @@ static SymTabRec FBDevChipsets[] = {
|
||||
typedef enum {
|
||||
OPTION_SHADOW_FB,
|
||||
OPTION_ROTATE,
|
||||
OPTION_FBDEV
|
||||
OPTION_FBDEV,
|
||||
OPTION_DEBUG
|
||||
} FBDevOpts;
|
||||
|
||||
static const OptionInfoRec FBDevOptions[] = {
|
||||
{ OPTION_SHADOW_FB, "ShadowFB", OPTV_BOOLEAN, {0}, FALSE },
|
||||
{ OPTION_ROTATE, "Rotate", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_FBDEV, "fbdev", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_DEBUG, "debug", OPTV_BOOLEAN, {0}, FALSE },
|
||||
{ -1, NULL, OPTV_NONE, {0}, FALSE }
|
||||
};
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
static const char *afbSymbols[] = {
|
||||
"afbScreenInit",
|
||||
"afbCreateDefColormap",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char *fbSymbols[] = {
|
||||
"fbScreenInit",
|
||||
"fbPictureInit",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char *shadowSymbols[] = {
|
||||
"shadowAdd",
|
||||
"shadowAlloc",
|
||||
"shadowInit",
|
||||
"shadowSetup",
|
||||
"shadowUpdatePacked",
|
||||
"shadowUpdateRotatePacked",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char *fbdevHWSymbols[] = {
|
||||
"fbdevHWInit",
|
||||
"fbdevHWProbe",
|
||||
"fbdevHWSetVideoModes",
|
||||
"fbdevHWUseBuildinMode",
|
||||
|
||||
"fbdevHWGetDepth",
|
||||
"fbdevHWGetLineLength",
|
||||
"fbdevHWGetName",
|
||||
"fbdevHWGetType",
|
||||
"fbdevHWGetVidmem",
|
||||
"fbdevHWLinearOffset",
|
||||
"fbdevHWLoadPalette",
|
||||
"fbdevHWMapVidmem",
|
||||
"fbdevHWUnmapVidmem",
|
||||
|
||||
/* colormap */
|
||||
"fbdevHWLoadpalette",
|
||||
|
||||
/* ScrnInfo hooks */
|
||||
"fbdevHWAdjustFrame",
|
||||
"fbdevHWEnterVT",
|
||||
"fbdevHWLeaveVT",
|
||||
"fbdevHWModeInit",
|
||||
"fbdevHWRestore",
|
||||
"fbdevHWSave",
|
||||
"fbdevHWSaveScreen",
|
||||
"fbdevHWSwitchMode",
|
||||
"fbdevHWValidMode",
|
||||
|
||||
"fbdevHWDPMSSet",
|
||||
|
||||
NULL
|
||||
};
|
||||
|
||||
#ifdef XFree86LOADER
|
||||
|
||||
MODULESETUPPROTO(FBDevSetup);
|
||||
@@ -188,15 +147,15 @@ static XF86ModuleVersionInfo FBDevVersRec =
|
||||
MODULEVENDORSTRING,
|
||||
MODINFOSTRING1,
|
||||
MODINFOSTRING2,
|
||||
XF86_VERSION_CURRENT,
|
||||
FBDEV_MAJOR_VERSION, FBDEV_MINOR_VERSION, 0,
|
||||
XORG_VERSION_CURRENT,
|
||||
PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL,
|
||||
ABI_CLASS_VIDEODRV,
|
||||
ABI_VIDEODRV_VERSION,
|
||||
NULL,
|
||||
{0,0,0,0}
|
||||
};
|
||||
|
||||
XF86ModuleData fbdevModuleData = { &FBDevVersRec, FBDevSetup, NULL };
|
||||
_X_EXPORT XF86ModuleData fbdevModuleData = { &FBDevVersRec, FBDevSetup, NULL };
|
||||
|
||||
pointer
|
||||
FBDevSetup(pointer module, pointer opts, int *errmaj, int *errmin)
|
||||
@@ -205,9 +164,7 @@ FBDevSetup(pointer module, pointer opts, int *errmaj, int *errmin)
|
||||
|
||||
if (!setupDone) {
|
||||
setupDone = TRUE;
|
||||
xf86AddDriver(&FBDEV, module, 0);
|
||||
LoaderRefSymLists(afbSymbols, fbSymbols,
|
||||
shadowSymbols, fbdevHWSymbols, NULL);
|
||||
xf86AddDriver(&FBDEV, module, HaveDriverFuncs);
|
||||
return (pointer)1;
|
||||
} else {
|
||||
if (errmaj) *errmaj = LDR_ONCEONLY;
|
||||
@@ -225,10 +182,11 @@ typedef struct {
|
||||
unsigned char* fbmem;
|
||||
int fboff;
|
||||
int lineLength;
|
||||
unsigned char* shadowmem;
|
||||
int rotate;
|
||||
Bool shadowFB;
|
||||
void *shadow;
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
CreateScreenResourcesProcPtr CreateScreenResources;
|
||||
void (*PointerMoved)(int index, int x, int y);
|
||||
EntityInfoPtr pEnt;
|
||||
/* DGA info */
|
||||
@@ -272,6 +230,53 @@ FBDevIdentify(int flags)
|
||||
xf86PrintChipsets(FBDEV_NAME, "driver for framebuffer", FBDevChipsets);
|
||||
}
|
||||
|
||||
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
static Bool FBDevPciProbe(DriverPtr drv, int entity_num,
|
||||
struct pci_device *dev, intptr_t match_data)
|
||||
{
|
||||
ScrnInfoPtr pScrn = NULL;
|
||||
|
||||
if (!xf86LoadDrvSubModule(drv, "fbdevhw"))
|
||||
return FALSE;
|
||||
|
||||
pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL);
|
||||
if (pScrn) {
|
||||
char *device;
|
||||
GDevPtr devSection = xf86GetDevFromEntity(pScrn->entityList[0],
|
||||
pScrn->entityInstanceList[0]);
|
||||
|
||||
device = xf86FindOptionValue(devSection->options, "fbdev");
|
||||
if (fbdevHWProbe(NULL, device, NULL)) {
|
||||
pScrn->driverVersion = FBDEV_VERSION;
|
||||
pScrn->driverName = FBDEV_DRIVER_NAME;
|
||||
pScrn->name = FBDEV_NAME;
|
||||
pScrn->Probe = FBDevProbe;
|
||||
pScrn->PreInit = FBDevPreInit;
|
||||
pScrn->ScreenInit = FBDevScreenInit;
|
||||
pScrn->SwitchMode = fbdevHWSwitchModeWeak();
|
||||
pScrn->AdjustFrame = fbdevHWAdjustFrameWeak();
|
||||
pScrn->EnterVT = fbdevHWEnterVTWeak();
|
||||
pScrn->LeaveVT = fbdevHWLeaveVTWeak();
|
||||
pScrn->ValidMode = fbdevHWValidModeWeak();
|
||||
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
|
||||
"claimed PCI slot %d@%d:%d:%d\n",
|
||||
dev->bus, dev->domain, dev->dev, dev->func);
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
||||
"using %s\n", device ? device : "default device");
|
||||
}
|
||||
else {
|
||||
pScrn = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return (pScrn != NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static Bool
|
||||
FBDevProbe(DriverPtr drv, int flags)
|
||||
{
|
||||
@@ -295,26 +300,32 @@ FBDevProbe(DriverPtr drv, int flags)
|
||||
if (!xf86LoadDrvSubModule(drv, "fbdevhw"))
|
||||
return FALSE;
|
||||
|
||||
xf86LoaderReqSymLists(fbdevHWSymbols, NULL);
|
||||
|
||||
for (i = 0; i < numDevSections; i++) {
|
||||
Bool isIsa = FALSE;
|
||||
Bool isPci = FALSE;
|
||||
|
||||
dev = xf86FindOptionValue(devSections[i]->options,"fbdev");
|
||||
if (devSections[i]->busID) {
|
||||
#ifndef XSERVER_LIBPCIACCESS
|
||||
if (xf86ParsePciBusString(devSections[i]->busID,&bus,&device,
|
||||
&func)) {
|
||||
if (!xf86CheckPciSlot(bus,device,func))
|
||||
continue;
|
||||
isPci = TRUE;
|
||||
} else if (xf86ParseIsaBusString(devSections[i]->busID))
|
||||
} else
|
||||
#endif
|
||||
#ifdef HAVE_ISA
|
||||
if (xf86ParseIsaBusString(devSections[i]->busID))
|
||||
isIsa = TRUE;
|
||||
else
|
||||
#endif
|
||||
0;
|
||||
|
||||
}
|
||||
if (fbdevHWProbe(NULL,dev,NULL)) {
|
||||
pScrn = NULL;
|
||||
if (isPci) {
|
||||
#ifndef XSERVER_LIBPCIACCESS
|
||||
/* XXX what about when there's no busID set? */
|
||||
int entity;
|
||||
|
||||
@@ -330,7 +341,9 @@ FBDevProbe(DriverPtr drv, int flags)
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
|
||||
"claimed PCI slot %d:%d:%d\n",bus,device,func);
|
||||
|
||||
#endif
|
||||
} else if (isIsa) {
|
||||
#ifdef HAVE_ISA
|
||||
int entity;
|
||||
|
||||
entity = xf86ClaimIsaSlot(drv, 0,
|
||||
@@ -338,6 +351,7 @@ FBDevProbe(DriverPtr drv, int flags)
|
||||
pScrn = xf86ConfigIsaEntity(pScrn,0,entity,
|
||||
NULL,RES_SHARED_VGA,
|
||||
NULL,NULL,NULL,NULL);
|
||||
#endif
|
||||
} else {
|
||||
int entity;
|
||||
|
||||
@@ -350,17 +364,17 @@ FBDevProbe(DriverPtr drv, int flags)
|
||||
if (pScrn) {
|
||||
foundScreen = TRUE;
|
||||
|
||||
pScrn->driverVersion = VERSION;
|
||||
pScrn->driverVersion = FBDEV_VERSION;
|
||||
pScrn->driverName = FBDEV_DRIVER_NAME;
|
||||
pScrn->name = FBDEV_NAME;
|
||||
pScrn->Probe = FBDevProbe;
|
||||
pScrn->PreInit = FBDevPreInit;
|
||||
pScrn->ScreenInit = FBDevScreenInit;
|
||||
pScrn->SwitchMode = fbdevHWSwitchMode;
|
||||
pScrn->AdjustFrame = fbdevHWAdjustFrame;
|
||||
pScrn->EnterVT = fbdevHWEnterVT;
|
||||
pScrn->LeaveVT = fbdevHWLeaveVT;
|
||||
pScrn->ValidMode = fbdevHWValidMode;
|
||||
pScrn->SwitchMode = fbdevHWSwitchModeWeak();
|
||||
pScrn->AdjustFrame = fbdevHWAdjustFrameWeak();
|
||||
pScrn->EnterVT = fbdevHWEnterVTWeak();
|
||||
pScrn->LeaveVT = fbdevHWLeaveVTWeak();
|
||||
pScrn->ValidMode = fbdevHWValidModeWeak();
|
||||
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
||||
"using %s\n", dev ? dev : "default device");
|
||||
@@ -377,8 +391,8 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
{
|
||||
FBDevPtr fPtr;
|
||||
int default_depth, fbbpp;
|
||||
const char *mod = NULL, *s;
|
||||
const char **syms = NULL;
|
||||
const char *s;
|
||||
int type;
|
||||
|
||||
if (flags & PROBE_DETECT) return FALSE;
|
||||
|
||||
@@ -395,6 +409,7 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
|
||||
fPtr->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
|
||||
|
||||
#ifndef XSERVER_LIBPCIACCESS
|
||||
pScrn->racMemFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT;
|
||||
/* XXX Is this right? Can probably remove RAC_FB */
|
||||
pScrn->racIoFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT;
|
||||
@@ -405,12 +420,13 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
"xf86RegisterResources() found resource conflicts\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
/* open device */
|
||||
if (!fbdevHWInit(pScrn,NULL,xf86FindOptionValue(fPtr->pEnt->device->options,"fbdev")))
|
||||
return FALSE;
|
||||
default_depth = fbdevHWGetDepth(pScrn,&fbbpp);
|
||||
if (!xf86SetDepthBpp(pScrn, default_depth, default_depth, fbbpp,0))
|
||||
if (!xf86SetDepthBpp(pScrn, default_depth, default_depth, fbbpp,
|
||||
Support24bppFb | Support32bppFb | SupportConvert32to24 | SupportConvert24to32))
|
||||
return FALSE;
|
||||
xf86PrintDepthBpp(pScrn);
|
||||
|
||||
@@ -431,7 +447,7 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
|
||||
/* We don't currently support DirectColor at > 8bpp */
|
||||
if (pScrn->depth > 8 && pScrn->defaultVisual != TrueColor) {
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Given default visual"
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "requested default visual"
|
||||
" (%s) is not supported at depth %d\n",
|
||||
xf86GetVisualName(pScrn->defaultVisual), pScrn->depth);
|
||||
return FALSE;
|
||||
@@ -450,8 +466,8 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
pScrn->chipset = "fbdev";
|
||||
pScrn->videoRam = fbdevHWGetVidmem(pScrn);
|
||||
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Hardware: %s (vidmem: %dk)\n",
|
||||
fbdevHWGetName(pScrn),pScrn->videoRam/1024);
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "hardware: %s (video memory:"
|
||||
" %dkB)\n", fbdevHWGetName(pScrn), pScrn->videoRam/1024);
|
||||
|
||||
/* handle options */
|
||||
xf86CollectOptions(pScrn, NULL);
|
||||
@@ -463,6 +479,8 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
/* use shadow framebuffer by default */
|
||||
fPtr->shadowFB = xf86ReturnOptValBool(fPtr->Options, OPTION_SHADOW_FB, TRUE);
|
||||
|
||||
debug = xf86ReturnOptValBool(fPtr->Options, OPTION_DEBUG, FALSE);
|
||||
|
||||
/* rotation */
|
||||
fPtr->rotate = FBDEV_ROTATE_NONE;
|
||||
if ((s = xf86GetOptValString(fPtr->Options, OPTION_ROTATE)))
|
||||
@@ -472,37 +490,37 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
fPtr->shadowFB = TRUE;
|
||||
fPtr->rotate = FBDEV_ROTATE_CW;
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
|
||||
"Rotating screen clockwise\n");
|
||||
"rotating screen clockwise\n");
|
||||
}
|
||||
else if(!xf86NameCmp(s, "CCW"))
|
||||
{
|
||||
fPtr->shadowFB = TRUE;
|
||||
fPtr->rotate = FBDEV_ROTATE_CCW;
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
|
||||
"Rotating screen counter clockwise\n");
|
||||
"rotating screen counter-clockwise\n");
|
||||
}
|
||||
else if(!xf86NameCmp(s, "UD"))
|
||||
{
|
||||
fPtr->shadowFB = TRUE;
|
||||
fPtr->rotate = FBDEV_ROTATE_UD;
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
|
||||
"Rotating screen upside down\n");
|
||||
"rotating screen upside-down\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
|
||||
"\"%s\" is not a valid value for Option \"Rotate\"\n", s);
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
||||
"Valid options are \"CW\", \"CCW\" or \"UD\"\n");
|
||||
"valid options are \"CW\", \"CCW\" and \"UD\"\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* select video modes */
|
||||
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Checking Modes against framebuffer device...\n");
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "checking modes against framebuffer device...\n");
|
||||
fbdevHWSetVideoModes(pScrn);
|
||||
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Checking Modes against monitor...\n");
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "checking modes against monitor...\n");
|
||||
{
|
||||
DisplayModePtr mode, first = mode = pScrn->modes;
|
||||
|
||||
@@ -518,15 +536,8 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
fbdevHWUseBuildinMode(pScrn);
|
||||
pScrn->currentMode = pScrn->modes;
|
||||
|
||||
if (fPtr->shadowFB)
|
||||
pScrn->displayWidth = pScrn->virtualX; /* ShadowFB handles this correctly */
|
||||
else {
|
||||
int fbbpp;
|
||||
/* FIXME: this doesn't work for all cases, e.g. when each scanline
|
||||
has a padding which is independent from the depth (controlfb) */
|
||||
fbdevHWGetDepth(pScrn,&fbbpp);
|
||||
pScrn->displayWidth = fbdevHWGetLineLength(pScrn)/(fbbpp >> 3);
|
||||
}
|
||||
/* First approximation, may be refined in ScreenInit */
|
||||
pScrn->displayWidth = pScrn->virtualX;
|
||||
|
||||
xf86PrintModes(pScrn);
|
||||
|
||||
@@ -534,12 +545,8 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
xf86SetDpi(pScrn, 0, 0);
|
||||
|
||||
/* Load bpp-specific modules */
|
||||
switch (fbdevHWGetType(pScrn))
|
||||
switch ((type = fbdevHWGetType(pScrn)))
|
||||
{
|
||||
case FBDEVHW_PLANES:
|
||||
mod = "afb";
|
||||
syms = afbSymbols;
|
||||
break;
|
||||
case FBDEVHW_PACKED_PIXELS:
|
||||
switch (pScrn->bitsPerPixel)
|
||||
{
|
||||
@@ -547,59 +554,100 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
case 16:
|
||||
case 24:
|
||||
case 32:
|
||||
mod = "fb";
|
||||
syms = fbSymbols;
|
||||
break;
|
||||
default:
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
"Unsupported bpp: %d", pScrn->bitsPerPixel);
|
||||
"unsupported number of bits per pixel: %d",
|
||||
pScrn->bitsPerPixel);
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case FBDEVHW_INTERLEAVED_PLANES:
|
||||
/* Not supported yet, don't know what to do with this */
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
"Interleaved Planes are not supported yet by drivers/fbdev.");
|
||||
"interleaved planes are not yet supported by the "
|
||||
"fbdev driver\n");
|
||||
return FALSE;
|
||||
case FBDEVHW_TEXT:
|
||||
/* This should never happen ...
|
||||
* we should check for this much much earlier ... */
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
"Text mode is not supprted by drivers/fbdev.\n"
|
||||
"Why do you want to run the X in TEXT mode anyway ?");
|
||||
"text mode is not supported by the fbdev driver\n");
|
||||
return FALSE;
|
||||
case FBDEVHW_VGA_PLANES:
|
||||
/* Not supported yet */
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
"EGA/VGA Planes are not supprted yet by drivers/fbdev.");
|
||||
"EGA/VGA planes are not yet supported by the fbdev "
|
||||
"driver\n");
|
||||
return FALSE;
|
||||
default:
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
"Fbdev type (%d) not supported yet.");
|
||||
"unrecognised fbdev hardware type (%d)\n", type);
|
||||
return FALSE;
|
||||
}
|
||||
if (mod && xf86LoadSubModule(pScrn, mod) == NULL) {
|
||||
if (xf86LoadSubModule(pScrn, "fb") == NULL) {
|
||||
FBDevFreeRec(pScrn);
|
||||
return FALSE;
|
||||
}
|
||||
if (mod && syms) {
|
||||
xf86LoaderReqSymLists(syms, NULL);
|
||||
}
|
||||
|
||||
/* Load shadow if needed */
|
||||
if (fPtr->shadowFB) {
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Using \"Shadow Framebuffer\"\n");
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "using shadow"
|
||||
" framebuffer\n");
|
||||
if (!xf86LoadSubModule(pScrn, "shadow")) {
|
||||
FBDevFreeRec(pScrn);
|
||||
return FALSE;
|
||||
}
|
||||
xf86LoaderReqSymLists(shadowSymbols, NULL);
|
||||
}
|
||||
|
||||
TRACE_EXIT("PreInit");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
FBDevCreateScreenResources(ScreenPtr pScreen)
|
||||
{
|
||||
PixmapPtr pPixmap;
|
||||
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||
FBDevPtr fPtr = FBDEVPTR(pScrn);
|
||||
Bool ret;
|
||||
|
||||
pScreen->CreateScreenResources = fPtr->CreateScreenResources;
|
||||
ret = pScreen->CreateScreenResources(pScreen);
|
||||
pScreen->CreateScreenResources = FBDevCreateScreenResources;
|
||||
|
||||
if (!ret)
|
||||
return FALSE;
|
||||
|
||||
pPixmap = pScreen->GetScreenPixmap(pScreen);
|
||||
|
||||
if (!shadowAdd(pScreen, pPixmap, fPtr->rotate ?
|
||||
shadowUpdateRotatePackedWeak() : shadowUpdatePackedWeak(),
|
||||
FBDevWindowLinear, fPtr->rotate, NULL)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
FBDevShadowInit(ScreenPtr pScreen)
|
||||
{
|
||||
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||
FBDevPtr fPtr = FBDEVPTR(pScrn);
|
||||
|
||||
if (!shadowSetup(pScreen)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
fPtr->CreateScreenResources = pScreen->CreateScreenResources;
|
||||
pScreen->CreateScreenResources = FBDevCreateScreenResources;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
{
|
||||
@@ -607,7 +655,8 @@ FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
FBDevPtr fPtr = FBDEVPTR(pScrn);
|
||||
VisualPtr visual;
|
||||
int init_picture = 0;
|
||||
int ret,flags,width,height;
|
||||
int ret, flags;
|
||||
int type;
|
||||
|
||||
TRACE_ENTER("FBDevScreenInit");
|
||||
|
||||
@@ -622,7 +671,8 @@ FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
#endif
|
||||
|
||||
if (NULL == (fPtr->fbmem = fbdevHWMapVidmem(pScrn))) {
|
||||
xf86DrvMsg(scrnIndex,X_ERROR,"Map vid mem failed\n");
|
||||
xf86DrvMsg(scrnIndex,X_ERROR,"mapping of video memory"
|
||||
" failed\n");
|
||||
return FALSE;
|
||||
}
|
||||
fPtr->fboff = fbdevHWLinearOffset(pScrn);
|
||||
@@ -630,7 +680,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
fbdevHWSave(pScrn);
|
||||
|
||||
if (!fbdevHWModeInit(pScrn, pScrn->currentMode)) {
|
||||
xf86DrvMsg(scrnIndex,X_ERROR,"Mode init failed\n");
|
||||
xf86DrvMsg(scrnIndex,X_ERROR,"mode initialization failed\n");
|
||||
return FALSE;
|
||||
}
|
||||
fbdevHWSaveScreen(pScreen, SCREEN_SAVER_ON);
|
||||
@@ -640,29 +690,42 @@ FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
miClearVisualTypes();
|
||||
if (pScrn->bitsPerPixel > 8) {
|
||||
if (!miSetVisualTypes(pScrn->depth, TrueColorMask, pScrn->rgbBits, TrueColor)) {
|
||||
xf86DrvMsg(scrnIndex,X_ERROR,"Set visual types failed\n");
|
||||
xf86DrvMsg(scrnIndex,X_ERROR,"visual type setup failed"
|
||||
" for %d bits per pixel [1]\n",
|
||||
pScrn->bitsPerPixel);
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
if (!miSetVisualTypes(pScrn->depth,
|
||||
miGetDefaultVisualMask(pScrn->depth),
|
||||
pScrn->rgbBits, pScrn->defaultVisual)) {
|
||||
xf86DrvMsg(scrnIndex,X_ERROR,"Set visual types failed\n");
|
||||
xf86DrvMsg(scrnIndex,X_ERROR,"visual type setup failed"
|
||||
" for %d bits per pixel [2]\n",
|
||||
pScrn->bitsPerPixel);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
if (!miSetPixmapDepths()) {
|
||||
xf86DrvMsg(scrnIndex,X_ERROR,"Set pixmap depths failed\n");
|
||||
xf86DrvMsg(scrnIndex,X_ERROR,"pixmap depth setup failed\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(fPtr->rotate==FBDEV_ROTATE_CW || fPtr->rotate==FBDEV_ROTATE_CCW)
|
||||
{
|
||||
height = pScrn->virtualX;
|
||||
width = pScrn->displayWidth = pScrn->virtualY;
|
||||
} else {
|
||||
height = pScrn->virtualY;
|
||||
width = pScrn->virtualX;
|
||||
int tmp = pScrn->virtualX;
|
||||
pScrn->virtualX = pScrn->displayWidth = pScrn->virtualY;
|
||||
pScrn->virtualY = tmp;
|
||||
} else if (!fPtr->shadowFB) {
|
||||
/* FIXME: this doesn't work for all cases, e.g. when each scanline
|
||||
has a padding which is independent from the depth (controlfb) */
|
||||
pScrn->displayWidth = fbdevHWGetLineLength(pScrn) /
|
||||
(pScrn->bitsPerPixel / 8);
|
||||
|
||||
if (pScrn->displayWidth != pScrn->virtualX) {
|
||||
xf86DrvMsg(scrnIndex, X_INFO,
|
||||
"Pitch updated to %d after ModeInit\n",
|
||||
pScrn->displayWidth);
|
||||
}
|
||||
}
|
||||
|
||||
if(fPtr->rotate && !fPtr->PointerMoved) {
|
||||
@@ -670,58 +733,39 @@ FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
pScrn->PointerMoved = FBDevPointerMoved;
|
||||
}
|
||||
|
||||
/* shadowfb */
|
||||
fPtr->fbstart = fPtr->fbmem + fPtr->fboff;
|
||||
|
||||
if (fPtr->shadowFB) {
|
||||
if ((fPtr->shadowmem = shadowAlloc(width, height,
|
||||
pScrn->bitsPerPixel)) == NULL) {
|
||||
xf86DrvMsg(scrnIndex,X_ERROR,
|
||||
"Allocation of shadow memory failed\n");
|
||||
fPtr->shadow = xcalloc(1, pScrn->virtualX * pScrn->virtualY *
|
||||
pScrn->bitsPerPixel);
|
||||
|
||||
if (!fPtr->shadow) {
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
"Failed to allocate shadow framebuffer\n");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
fPtr->fbstart = fPtr->shadowmem;
|
||||
} else {
|
||||
fPtr->shadowmem = NULL;
|
||||
fPtr->fbstart = fPtr->fbmem + fPtr->fboff;
|
||||
}
|
||||
|
||||
switch (fbdevHWGetType(pScrn))
|
||||
switch ((type = fbdevHWGetType(pScrn)))
|
||||
{
|
||||
#ifdef USE_AFB
|
||||
case FBDEVHW_PLANES:
|
||||
if (fPtr->rotate)
|
||||
{
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,
|
||||
"Internal error: Rotate not supported for afb\n");
|
||||
ret = FALSE;
|
||||
break;
|
||||
}
|
||||
if (fPtr->shadowFB)
|
||||
{
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,
|
||||
"Internal error: Shadow framebuffer not supported for afb\n");
|
||||
ret = FALSE;
|
||||
break;
|
||||
}
|
||||
ret = afbScreenInit
|
||||
(pScreen, fPtr->fbstart, pScrn->virtualX, pScrn->virtualY,
|
||||
pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth);
|
||||
break;
|
||||
#endif
|
||||
case FBDEVHW_PACKED_PIXELS:
|
||||
switch (pScrn->bitsPerPixel) {
|
||||
case 8:
|
||||
case 16:
|
||||
case 24:
|
||||
case 32:
|
||||
ret = fbScreenInit(pScreen, fPtr->fbstart, width, height,
|
||||
pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth, pScrn->bitsPerPixel);
|
||||
ret = fbScreenInit(pScreen, fPtr->shadowFB ? fPtr->shadow
|
||||
: fPtr->fbstart, pScrn->virtualX,
|
||||
pScrn->virtualY, pScrn->xDpi,
|
||||
pScrn->yDpi, pScrn->displayWidth,
|
||||
pScrn->bitsPerPixel);
|
||||
init_picture = 1;
|
||||
break;
|
||||
default:
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,
|
||||
"Internal error: invalid bpp (%d) in FBDevScreenInit\n",
|
||||
pScrn->bitsPerPixel);
|
||||
"internal error: invalid number of bits per"
|
||||
" pixel (%d) encountered in"
|
||||
" FBDevScreenInit()\n", pScrn->bitsPerPixel);
|
||||
ret = FALSE;
|
||||
break;
|
||||
}
|
||||
@@ -730,29 +774,29 @@ FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
/* This should never happen ...
|
||||
* we should check for this much much earlier ... */
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,
|
||||
"Internal error: Text mode is not supprted by drivers/fbdev.\n"
|
||||
"Comment: Why do you want to run the X in TEXT mode anyway ?");
|
||||
"internal error: interleaved planes are not yet "
|
||||
"supported by the fbdev driver\n");
|
||||
ret = FALSE;
|
||||
break;
|
||||
case FBDEVHW_TEXT:
|
||||
/* This should never happen ...
|
||||
* we should check for this much much earlier ... */
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,
|
||||
"Internal error: Text mode is not supprted by drivers/fbdev.\n"
|
||||
"Comment: Why do you want to run the X in TEXT mode anyway ?");
|
||||
"internal error: text mode is not supported by the "
|
||||
"fbdev driver\n");
|
||||
ret = FALSE;
|
||||
break;
|
||||
case FBDEVHW_VGA_PLANES:
|
||||
/* Not supported yet */
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,
|
||||
"Internal error: EGA/VGA Planes are not supprted"
|
||||
" yet by drivers/fbdev.");
|
||||
"internal error: EGA/VGA Planes are not yet "
|
||||
"supported by the fbdev driver\n");
|
||||
ret = FALSE;
|
||||
break;
|
||||
default:
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,
|
||||
"Internal error: fbdev type (%d) unsupported in"
|
||||
" FBDevScreenInit\n");
|
||||
"internal error: unrecognised hardware type (%d) "
|
||||
"encountered in FBDevScreenInit()\n", type);
|
||||
ret = FALSE;
|
||||
break;
|
||||
}
|
||||
@@ -777,24 +821,24 @@ FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
/* must be after RGB ordering fixed */
|
||||
if (init_picture && !fbPictureInit(pScreen, NULL, 0))
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
|
||||
"RENDER extension initialisation failed.\n");
|
||||
"Render extension initialisation failed\n");
|
||||
|
||||
if (fPtr->shadowFB &&
|
||||
(!shadowSetup(pScreen) || !shadowAdd(pScreen, NULL,
|
||||
fPtr->rotate ? shadowUpdateRotatePacked : shadowUpdatePacked,
|
||||
FBDevWindowLinear, fPtr->rotate, NULL)) ) {
|
||||
if (fPtr->shadowFB && !FBDevShadowInit(pScreen)) {
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,
|
||||
"Shadow framebuffer initialization failed.\n");
|
||||
"shadow framebuffer initialization failed\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!fPtr->rotate)
|
||||
FBDevDGAInit(pScrn, pScreen);
|
||||
else {
|
||||
xf86DrvMsg(scrnIndex, X_INFO, "Rotated display, disabling DGA\n");
|
||||
|
||||
xf86DrvMsg(scrnIndex, X_INFO, "display rotated; disabling DGA\n");
|
||||
xf86DrvMsg(scrnIndex, X_INFO, "using driver rotation; disabling "
|
||||
"XRandR\n");
|
||||
xf86DisableRandR();
|
||||
if (pScrn->bitsPerPixel == 24)
|
||||
xf86DrvMsg(scrnIndex, X_WARNING, "Rotation might be broken in 24 bpp\n");
|
||||
xf86DrvMsg(scrnIndex, X_WARNING, "rotation might be broken at 24 "
|
||||
"bits per pixel\n");
|
||||
}
|
||||
|
||||
xf86SetBlackWhitePixels(pScreen);
|
||||
@@ -805,52 +849,51 @@ FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
|
||||
|
||||
/* colormap */
|
||||
switch (fbdevHWGetType(pScrn))
|
||||
switch ((type = fbdevHWGetType(pScrn)))
|
||||
{
|
||||
/* XXX It would be simpler to use miCreateDefColormap() in all cases. */
|
||||
#ifdef USE_AFB
|
||||
case FBDEVHW_PLANES:
|
||||
if (!afbCreateDefColormap(pScreen))
|
||||
return FALSE;
|
||||
break;
|
||||
#endif
|
||||
case FBDEVHW_PACKED_PIXELS:
|
||||
if (!miCreateDefColormap(pScreen))
|
||||
if (!miCreateDefColormap(pScreen)) {
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,
|
||||
"internal error: miCreateDefColormap failed "
|
||||
"in FBDevScreenInit()\n");
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case FBDEVHW_INTERLEAVED_PLANES:
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,
|
||||
"Internal error: invalid fbdev type (interleaved planes)"
|
||||
" in FBDevScreenInit\n");
|
||||
"internal error: interleaved planes are not yet "
|
||||
"supported by the fbdev driver\n");
|
||||
return FALSE;
|
||||
case FBDEVHW_TEXT:
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,
|
||||
"Internal error: invalid fbdev type (text)"
|
||||
" in FBDevScreenInit\n");
|
||||
"internal error: text mode is not supported by "
|
||||
"the fbdev driver\n");
|
||||
return FALSE;
|
||||
case FBDEVHW_VGA_PLANES:
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,
|
||||
"Internal error: invalid fbdev type (ega/vga planes)"
|
||||
" in FBDevScreenInit\n");
|
||||
"internal error: EGA/VGA planes are not yet "
|
||||
"supported by the fbdev driver\n");
|
||||
return FALSE;
|
||||
default:
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,
|
||||
"Internal error: invalid fbdev type (%d) in FBDevScreenInit\n");
|
||||
"internal error: unrecognised fbdev hardware type "
|
||||
"(%d) encountered in FBDevScreenInit()\n", type);
|
||||
return FALSE;
|
||||
}
|
||||
flags = CMAP_PALETTED_TRUECOLOR;
|
||||
if(!xf86HandleColormaps(pScreen, 256, 8, fbdevHWLoadPalette, NULL, flags))
|
||||
if(!xf86HandleColormaps(pScreen, 256, 8, fbdevHWLoadPaletteWeak(),
|
||||
NULL, flags))
|
||||
return FALSE;
|
||||
|
||||
xf86DPMSInit(pScreen, fbdevHWDPMSSet, 0);
|
||||
xf86DPMSInit(pScreen, fbdevHWDPMSSetWeak(), 0);
|
||||
|
||||
pScreen->SaveScreen = fbdevHWSaveScreen;
|
||||
pScreen->SaveScreen = fbdevHWSaveScreenWeak();
|
||||
|
||||
/* Wrap the current CloseScreen function */
|
||||
fPtr->CloseScreen = pScreen->CloseScreen;
|
||||
pScreen->CloseScreen = FBDevCloseScreen;
|
||||
|
||||
#ifdef XvExtension
|
||||
{
|
||||
XF86VideoAdaptorPtr *ptr;
|
||||
|
||||
@@ -859,7 +902,6 @@ FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
xf86XVScreenInit(pScreen,ptr,n);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
TRACE_EXIT("FBDevScreenInit");
|
||||
|
||||
@@ -874,8 +916,11 @@ FBDevCloseScreen(int scrnIndex, ScreenPtr pScreen)
|
||||
|
||||
fbdevHWRestore(pScrn);
|
||||
fbdevHWUnmapVidmem(pScrn);
|
||||
if (fPtr->shadowmem)
|
||||
xfree(fPtr->shadowmem);
|
||||
if (fPtr->shadow) {
|
||||
shadowRemove(pScreen, pScreen->GetScreenPixmap(pScreen));
|
||||
xfree(fPtr->shadow);
|
||||
fPtr->shadow = NULL;
|
||||
}
|
||||
if (fPtr->pDGAMode) {
|
||||
xfree(fPtr->pDGAMode);
|
||||
fPtr->pDGAMode = NULL;
|
||||
@@ -883,6 +928,7 @@ FBDevCloseScreen(int scrnIndex, ScreenPtr pScreen)
|
||||
}
|
||||
pScrn->vtSema = FALSE;
|
||||
|
||||
pScreen->CreateScreenResources = fPtr->CreateScreenResources;
|
||||
pScreen->CloseScreen = fPtr->CloseScreen;
|
||||
return (*pScreen->CloseScreen)(scrnIndex, pScreen);
|
||||
}
|
||||
@@ -908,7 +954,7 @@ FBDevWindowLinear(ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode,
|
||||
else
|
||||
*size = fPtr->lineLength = fbdevHWGetLineLength(pScrn);
|
||||
|
||||
return ((CARD8 *)fPtr->fbmem + fPtr->fboff + row * fPtr->lineLength + offset);
|
||||
return ((CARD8 *)fPtr->fbstart + row * fPtr->lineLength + offset);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1081,6 +1127,7 @@ FBDevDGAAddModes(ScrnInfoPtr pScrn)
|
||||
static Bool
|
||||
FBDevDGAInit(ScrnInfoPtr pScrn, ScreenPtr pScreen)
|
||||
{
|
||||
#ifdef XFreeXDGA
|
||||
FBDevPtr fPtr = FBDEVPTR(pScrn);
|
||||
|
||||
if (pScrn->depth < 8)
|
||||
@@ -1091,4 +1138,22 @@ FBDevDGAInit(ScrnInfoPtr pScrn, ScreenPtr pScreen)
|
||||
|
||||
return (DGAInit(pScreen, &FBDevDGAFunctions,
|
||||
fPtr->pDGAMode, fPtr->nDGAMode));
|
||||
#else
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
static Bool
|
||||
FBDevDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, pointer ptr)
|
||||
{
|
||||
xorgHWFlags *flag;
|
||||
|
||||
switch (op) {
|
||||
case GET_REQUIRED_HW_INTERFACES:
|
||||
flag = (CARD32*)ptr;
|
||||
(*flag) = 0;
|
||||
return TRUE;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user