mirror of
https://github.com/X11Libre/xf86-video-fbdev.git
synced 2026-03-24 09:34:57 +00:00
Compare commits
14 Commits
xlibre-xf8
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a768d8f8f | ||
|
|
755e07f865 | ||
|
|
a052df27e5 | ||
|
|
a4d4b1976c | ||
|
|
737142f729 | ||
|
|
a5c83b22f9 | ||
|
|
b69995d4da | ||
|
|
4fac426b6c | ||
|
|
66b481d628 | ||
|
|
4f822e5dee | ||
|
|
a4e4066e0c | ||
|
|
57b598c717 | ||
|
|
6441dd72a4 | ||
|
|
cc44831a72 |
69
.github/actions/build-driver/action.yaml
vendored
69
.github/actions/build-driver/action.yaml
vendored
@@ -1,69 +0,0 @@
|
||||
name: 'build driver'
|
||||
description: 'build driver against specific Xserver'
|
||||
inputs:
|
||||
xserver-version:
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: check out driver repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: prepare build environment
|
||||
shell: bash
|
||||
run: |
|
||||
MACHINE=`gcc -dumpmachine`
|
||||
echo "MACHINE=$MACHINE" >> "$GITHUB_ENV"
|
||||
echo "PKG_CONFIG_PATH=$X11_PREFIX/share/pkgconfig:$X11_PREFIX/lib/$MACHINE/pkgconfig:$X11_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" >> "$GITHUB_ENV"
|
||||
sudo chown root /bin/tar && sudo chmod u+s /bin/tar
|
||||
|
||||
- name: apt cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /var/cache/apt
|
||||
key: apt-cache-${{ hashFiles('.github/scripts/ubuntu/install-pkg.sh') }}
|
||||
restore-keys: apt-cache-
|
||||
|
||||
- name: pkg install
|
||||
shell: bash
|
||||
run: sudo .github/scripts/ubuntu/install-pkg.sh
|
||||
|
||||
- name: X11 prereq cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
${{ env.X11_PREFIX }}
|
||||
key: ${{ runner.name }}-x11-deps-${{ hashFiles('.github/scripts/install-prereq.sh') }}
|
||||
restore-keys: ${{ runner.name }}-x11-deps-
|
||||
|
||||
- name: generic prereq
|
||||
shell: bash
|
||||
run: .github/scripts/install-prereq.sh
|
||||
|
||||
- name: check out xserver repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: X11Libre/xserver
|
||||
path: xserver-sdk
|
||||
ref: ${{ inputs.xserver-version }}
|
||||
|
||||
- name: build xserver sdk
|
||||
shell: bash
|
||||
env:
|
||||
MESON_ARGS: -Dc_args="-fno-common" -Dprefix=/usr -Dnamespace=false -Dxselinux=false -Dxephyr=false -Dwerror=false -Dxcsecurity=false -Dxorg=true -Dxvfb=false -Dxnest=false -Ddocs=false
|
||||
run: |
|
||||
cd xserver-sdk
|
||||
echo -n > .meson_environment
|
||||
echo "export MESON_BUILDDIR=$MESON_BUILDDIR" >> .meson_environment
|
||||
echo "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> .meson_environment
|
||||
.gitlab-ci/meson-build.sh --skip-test
|
||||
sudo meson install --no-rebuild -C "$MESON_BUILDDIR"
|
||||
sudo mkdir -p /usr/local/lib/$MACHINE/xorg/modules # /home/runner/x11/lib/xorg/modules
|
||||
sudo chown -R runner /usr/local/lib/$MACHINE/xorg/modules # /home/runner/x11/lib/xorg/modules
|
||||
|
||||
- name: compile driver
|
||||
shell: bash
|
||||
run: |
|
||||
CFLAGS="-Wall" ./autogen.sh # --prefix=$X11_PREFIX
|
||||
CFLAGS="-Wall" make -j # install
|
||||
13
.github/scripts/conf.sh
vendored
13
.github/scripts/conf.sh
vendored
@@ -1,13 +0,0 @@
|
||||
export X11_OS=`uname -s`
|
||||
|
||||
export X11_PREFIX="${X11_PREFIX:-$HOME/x11}"
|
||||
export X11_BUILD_DIR="${X11_BUILD_DIR:-$HOME/build-deps}"
|
||||
export DRV_BUILD_DIR="${DRV_BUILD_DIR:-$HOME/build-drivers}"
|
||||
|
||||
case "$X11_OS" in
|
||||
Darwin) export FDO_CI_CONCURRENT=`sysctl -n hw.logicalcpu` ;;
|
||||
Linux) export FDO_CI_CONCURRENT=`nproc` ;;
|
||||
esac
|
||||
|
||||
export PATH="$X11_PREFIX/bin:$PATH"
|
||||
export PKG_CONFIG_PATH="$X11_PREFIX/lib/x86_64-linux-gnu/pkgconfig:$X11_PREFIX/lib/pkgconfig:$X11_PREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
|
||||
17
.github/scripts/github/make-release
vendored
17
.github/scripts/github/make-release
vendored
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
err() {
|
||||
echo "$0: $*"
|
||||
}
|
||||
|
||||
[ "$GITHUB_REPOSITORY" ] || err "missing variable GITHUB_REPOSITORY"
|
||||
|
||||
TITLE=$(git tag -l --format='%(contents)' $tag)
|
||||
|
||||
echo "tag=$tag"
|
||||
echo "title=$TITLE"
|
||||
|
||||
gh release create "$tag" \
|
||||
--repo="$GITHUB_REPOSITORY" \
|
||||
--title="$tag" \
|
||||
--generate-notes
|
||||
15
.github/scripts/install-prereq.sh
vendored
15
.github/scripts/install-prereq.sh
vendored
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
. .github/scripts/util.sh
|
||||
|
||||
mkdir -p $X11_BUILD_DIR
|
||||
cd $X11_BUILD_DIR
|
||||
|
||||
if [ "$X11_OS" = "Linux" ]; then
|
||||
build_meson drm https://gitlab.freedesktop.org/mesa/drm libdrm-2.4.121 "" \
|
||||
-Domap=enabled
|
||||
fi
|
||||
build_meson libxcvt https://gitlab.freedesktop.org/xorg/lib/libxcvt libxcvt-0.1.0
|
||||
build_ac xorgproto https://gitlab.freedesktop.org/xorg/proto/xorgproto xorgproto-2024.1
|
||||
94
.github/scripts/ubuntu/install-pkg.sh
vendored
94
.github/scripts/ubuntu/install-pkg.sh
vendored
@@ -1,94 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Packages which are needed by this script, but not for the xserver build
|
||||
EPHEMERAL="
|
||||
libexpat-dev
|
||||
libgles2-mesa-dev
|
||||
libxkbcommon-dev
|
||||
x11-utils
|
||||
x11-xserver-utils
|
||||
xauth
|
||||
xvfb
|
||||
"
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y \
|
||||
$EPHEMERAL \
|
||||
autoconf \
|
||||
automake \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
libaudit-dev \
|
||||
libbsd-dev \
|
||||
libcairo2-dev \
|
||||
libdbus-1-dev \
|
||||
libdrm-dev \
|
||||
libegl1-mesa-dev \
|
||||
libepoxy-dev \
|
||||
libevdev2 \
|
||||
libexpat1 \
|
||||
libffi-dev \
|
||||
libgbm-dev \
|
||||
libgcrypt-dev \
|
||||
libgl1-mesa-dev \
|
||||
libgles2 \
|
||||
libglx-mesa0 \
|
||||
libinput10 \
|
||||
libinput-dev \
|
||||
libnvidia-egl-wayland-dev \
|
||||
libpciaccess-dev \
|
||||
libpixman-1-dev \
|
||||
libspice-protocol-dev \
|
||||
libsystemd-dev \
|
||||
libudev-dev \
|
||||
libunwind-dev \
|
||||
libx11-dev \
|
||||
libx11-xcb-dev \
|
||||
libxau-dev \
|
||||
libxaw7-dev \
|
||||
libxcb-glx0-dev \
|
||||
libxcb-icccm4-dev \
|
||||
libxcb-image0-dev \
|
||||
libxcb-keysyms1-dev \
|
||||
libxcb-randr0-dev \
|
||||
libxcb-render-util0-dev \
|
||||
libxcb-render0-dev \
|
||||
libxcb-shape0-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-util0-dev \
|
||||
libxcb-xf86dri0-dev \
|
||||
libxcb-xkb-dev \
|
||||
libxcb-xv0-dev \
|
||||
libxcb1-dev \
|
||||
libxdmcp-dev \
|
||||
libxext-dev \
|
||||
libxfixes-dev \
|
||||
libxfont-dev \
|
||||
libxi-dev \
|
||||
libxinerama-dev \
|
||||
libxkbcommon0 \
|
||||
libxkbfile-dev \
|
||||
libxmu-dev \
|
||||
libxmuu-dev \
|
||||
libxpm-dev \
|
||||
libxrender-dev \
|
||||
libxres-dev \
|
||||
libxshmfence-dev \
|
||||
libxt-dev \
|
||||
libxtst-dev \
|
||||
libxv-dev \
|
||||
mesa-common-dev \
|
||||
meson \
|
||||
nettle-dev \
|
||||
libpango1.0-dev \
|
||||
pkg-config \
|
||||
x11-xkb-utils \
|
||||
xfonts-utils \
|
||||
xkb-data \
|
||||
xtrans-dev \
|
||||
xutils-dev \
|
||||
libxaw7-dev \
|
||||
python3-mako
|
||||
85
.github/scripts/util.sh
vendored
85
.github/scripts/util.sh
vendored
@@ -1,85 +0,0 @@
|
||||
|
||||
. .github/scripts/conf.sh
|
||||
|
||||
clone_source() {
|
||||
local pkgname="$1"
|
||||
local url="$2"
|
||||
local ref="$3"
|
||||
local commit="$4"
|
||||
|
||||
if [ ! -f $pkgname/.git/config ]; then
|
||||
echo "need to clone $pkgname"
|
||||
if [ "$commit" ]; then
|
||||
git clone $url $pkgname --branch=$ref
|
||||
else
|
||||
git clone $url $pkgname --branch=$ref --depth 1
|
||||
fi
|
||||
else
|
||||
echo "already cloned $pkgname"
|
||||
fi
|
||||
|
||||
if [ "$commit" ]; then
|
||||
( cd $pkgname && git checkout -f "$commit" )
|
||||
fi
|
||||
}
|
||||
|
||||
build_meson() {
|
||||
local pkgname="$1"
|
||||
local url="$2"
|
||||
local ref="$3"
|
||||
local commit="$4"
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift || true
|
||||
if [ -f $X11_PREFIX/$pkgname.DONE ]; then
|
||||
echo "package $pkgname already built"
|
||||
else
|
||||
clone_source "$pkgname" "$url" "$ref" "$commit"
|
||||
(
|
||||
cd $pkgname
|
||||
meson "$@" build -Dprefix=$X11_PREFIX
|
||||
ninja -j${FDO_CI_CONCURRENT:-4} -C build install
|
||||
)
|
||||
touch $X11_PREFIX/$pkgname.DONE
|
||||
fi
|
||||
}
|
||||
|
||||
build_ac() {
|
||||
local pkgname="$1"
|
||||
local url="$2"
|
||||
local ref="$3"
|
||||
local commit="$4"
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift || true
|
||||
if [ -f $X11_PREFIX/$pkgname.DONE ]; then
|
||||
echo "package $pkgname already built"
|
||||
else
|
||||
clone_source "$pkgname" "$url" "$ref" "$commit"
|
||||
(
|
||||
cd $pkgname
|
||||
./autogen.sh --prefix=$X11_PREFIX
|
||||
make -j${FDO_CI_CONCURRENT:-4} install
|
||||
)
|
||||
touch $X11_PREFIX/$pkgname.DONE
|
||||
fi
|
||||
}
|
||||
|
||||
build_drv_ac() {
|
||||
local pkgname="$1"
|
||||
local url="$2"
|
||||
local ref="$3"
|
||||
local commit="$4"
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift || true
|
||||
clone_source "$pkgname" "$url" "$ref" "$commit"
|
||||
(
|
||||
cd $pkgname
|
||||
./autogen.sh # --prefix=$X11_PREFIX
|
||||
make -j${FDO_CI_CONCURRENT:-4} # install
|
||||
)
|
||||
}
|
||||
65
.github/workflows/build.yml
vendored
65
.github/workflows/build.yml
vendored
@@ -1,43 +1,58 @@
|
||||
name: Build driver
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
env:
|
||||
MESON_BUILDDIR: "build"
|
||||
X11_PREFIX: /home/runner/x11
|
||||
X11_BUILD_DIR: /home/runner/build-deps
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
for-xserver-stable-25_0:
|
||||
ubuntu:
|
||||
strategy:
|
||||
matrix:
|
||||
xserver-version: [ master, xlibre-xserver-25.1.0, xlibre-xserver-25.0.0.18 ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/build-driver
|
||||
- uses: X11Libre/action-build-driver/target/ubuntu@v0.3.7
|
||||
with:
|
||||
xserver-version: xlibre-xserver-25.0.0.5
|
||||
xserver-version: ${{ matrix.xserver-version }}
|
||||
|
||||
for-xserver-master:
|
||||
freebsd:
|
||||
strategy:
|
||||
matrix:
|
||||
xserver-version: [ master, xlibre-xserver-25.1.0, xlibre-xserver-25.0.0.18 ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/build-driver
|
||||
- uses: X11Libre/action-build-driver/target/freebsd@v0.3.7
|
||||
with:
|
||||
xserver-version: master
|
||||
xserver-version: ${{ matrix.xserver-version }}
|
||||
|
||||
release:
|
||||
name: Release pushed tag
|
||||
dragonfly:
|
||||
strategy:
|
||||
matrix:
|
||||
# xlibre-xserver-25.0.x not compiling on dragonfly yet
|
||||
xserver-version: [ master, xlibre-xserver-25.1.0 ]
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/xlibre-') }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Create release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: ${{ github.ref_name }}
|
||||
run: .github/scripts/github/make-release
|
||||
- uses: X11Libre/action-build-driver/target/dragonfly@v0.3.7
|
||||
with:
|
||||
xserver-version: ${{ matrix.xserver-version }}
|
||||
|
||||
netbsd:
|
||||
strategy:
|
||||
matrix:
|
||||
xserver-version: [ master, xlibre-xserver-25.1.0 ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: X11Libre/action-build-driver/target/netbsd@v0.3.7
|
||||
with:
|
||||
xserver-version: ${{ matrix.xserver-version }}
|
||||
|
||||
release-notes:
|
||||
name: Release pushed tag
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/xlibre-') }}
|
||||
needs: [ ubuntu, freebsd, dragonfly, netbsd ]
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: X11Libre/action-build-driver/release@v0.3.7
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml:
|
||||
#
|
||||
# This CI uses the freedesktop.org ci-templates.
|
||||
# Please see the ci-templates documentation for details:
|
||||
# https://freedesktop.pages.freedesktop.org/ci-templates/
|
||||
|
||||
.templates_sha: &template_sha 25e8e9f020880aa35fffe3d6b259b933f0f9449f # see https://docs.gitlab.com/ee/ci/yaml/#includefile
|
||||
|
||||
|
||||
include:
|
||||
# Arch container builder template
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: *template_sha
|
||||
file: '/templates/arch.yml'
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: *template_sha
|
||||
file: '/templates/ci-fairy.yml'
|
||||
- template: Security/SAST.gitlab-ci.yml
|
||||
|
||||
|
||||
stages:
|
||||
- prep # prep work like rebuilding the container images if there is a change
|
||||
- build # for actually building and testing things in a container
|
||||
- test
|
||||
- deploy
|
||||
|
||||
|
||||
variables:
|
||||
FDO_UPSTREAM_REPO: 'xorg/driver/xf86-video-fbdev'
|
||||
# The tag should be updated each time the list of packages is updated.
|
||||
# Changing a tag forces the associated image to be rebuilt.
|
||||
# Note: the tag has no meaning, we use a date format purely for readability
|
||||
FDO_DISTRIBUTION_TAG: '2023-10-01.0'
|
||||
FDO_DISTRIBUTION_PACKAGES: 'git gcc pkgconf autoconf automake libtool make xorg-util-macros xorgproto xorg-server-devel pixman'
|
||||
|
||||
|
||||
#
|
||||
# Verify that commit messages are as expected
|
||||
#
|
||||
check-commits:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
stage: prep
|
||||
script:
|
||||
- ci-fairy check-commits --junit-xml=results.xml
|
||||
except:
|
||||
- master@xorg/driver/xf86-video-fbdev
|
||||
variables:
|
||||
GIT_DEPTH: 100
|
||||
artifacts:
|
||||
reports:
|
||||
junit: results.xml
|
||||
|
||||
#
|
||||
# Verify that the merge request has the allow-collaboration checkbox ticked
|
||||
#
|
||||
check-merge-request:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
stage: deploy
|
||||
script:
|
||||
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
|
||||
artifacts:
|
||||
when: on_failure
|
||||
reports:
|
||||
junit: results.xml
|
||||
allow_failure: true
|
||||
|
||||
|
||||
#
|
||||
# Build a container with the given tag and the packages pre-installed.
|
||||
# This only happens if the tag changes, otherwise the existing image is
|
||||
# re-used.
|
||||
#
|
||||
container-prep:
|
||||
extends:
|
||||
- .fdo.container-build@arch
|
||||
stage: prep
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
|
||||
|
||||
#
|
||||
# The default build, runs on the image built above.
|
||||
#
|
||||
build:
|
||||
stage: build
|
||||
extends:
|
||||
- .fdo.distribution-image@arch
|
||||
script:
|
||||
- autoreconf -ivf
|
||||
- mkdir _builddir
|
||||
- pushd _builddir > /dev/null
|
||||
- ../configure --disable-silent-rules
|
||||
- make
|
||||
- make check
|
||||
- make distcheck
|
||||
- popd > /dev/null
|
||||
12
README.md
12
README.md
@@ -1,18 +1,8 @@
|
||||
xf86-video-fbdev - video driver for framebuffer device
|
||||
------------------------------------------------------
|
||||
|
||||
All questions regarding this software should be directed at the
|
||||
Xorg mailing list:
|
||||
|
||||
https://lists.x.org/mailman/listinfo/xorg
|
||||
|
||||
The primary development code repository can be found at:
|
||||
|
||||
https://gitlab.freedesktop.org/xorg/driver/xf86-video-fbdev
|
||||
https://github.com/X11Libre/xf86-video-fbdev
|
||||
|
||||
Please submit bug reports and requests to merge patches there.
|
||||
|
||||
For patch submission instructions, see:
|
||||
|
||||
https://www.x.org/wiki/Development/Documentation/SubmittingPatches
|
||||
|
||||
|
||||
38
configure.ac
38
configure.ac
@@ -23,7 +23,7 @@
|
||||
# Initialize Autoconf
|
||||
AC_PREREQ([2.60])
|
||||
AC_INIT([xlibre-xf86-video-fbdev],
|
||||
[0.5.2],
|
||||
[25.0.0],
|
||||
[https://github.com/X11Libre/xf86-video-fbdev/issues],
|
||||
[xlibrexf86-video-fbdev])
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
@@ -46,14 +46,9 @@ AH_TOP([#include "xorg-server.h"])
|
||||
|
||||
# Define a configure option for an alternate module directory
|
||||
PKG_PROG_PKG_CONFIG([0.25])
|
||||
AC_ARG_WITH(xorg-module-dir,
|
||||
AS_HELP_STRING([--with-xorg-module-dir=DIR],
|
||||
[Default xorg module directory]),
|
||||
[moduledir="$withval"],
|
||||
[moduledir=`$PKG_CONFIG --variable=moduledir xorg-server`])
|
||||
AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--enable-pciaccess],
|
||||
[Enable use of libpciaccess (default: disabled)]),
|
||||
[PCIACCESS=$enableval], [PCIACCESS=no])
|
||||
|
||||
xlibre_video_drivers_dir=`$PKG_CONFIG --variable=video_drivers_dir xlibre-server`
|
||||
AC_SUBST(xlibre_video_drivers_dir)
|
||||
|
||||
# Store the list of server defined optional extensions in REQUIRED_MODULES
|
||||
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
|
||||
@@ -61,26 +56,9 @@ XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
|
||||
XORG_DRIVER_CHECK_EXT(XV, videoproto)
|
||||
|
||||
# Obtain compiler/linker options for the driver dependencies
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.18 xproto fontsproto $REQUIRED_MODULES])
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 25.0.0 xproto fontsproto $REQUIRED_MODULES])
|
||||
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
|
||||
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_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.
|
||||
|
||||
|
||||
AC_SUBST([moduledir])
|
||||
|
||||
DRIVER_NAME=fbdev
|
||||
AC_SUBST([DRIVER_NAME])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
src/Makefile
|
||||
man/Makefile
|
||||
])
|
||||
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
|
||||
AC_OUTPUT
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
|
||||
drivermandir = $(DRIVER_MAN_DIR)
|
||||
|
||||
driverman_PRE = @DRIVER_NAME@.man
|
||||
driverman_PRE = fbdev.man
|
||||
|
||||
driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
|
||||
|
||||
EXTRA_DIST = @DRIVER_NAME@.man
|
||||
EXTRA_DIST = fbdev.man
|
||||
|
||||
CLEANFILES = $(driverman_DATA)
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
AM_CFLAGS = $(BASE_CFLAGS) $(XORG_CFLAGS)
|
||||
fbdev_drv_la_LTLIBRARIES = fbdev_drv.la
|
||||
fbdev_drv_la_LDFLAGS = -module -avoid-version
|
||||
fbdev_drv_ladir = @moduledir@/drivers
|
||||
fbdev_drv_ladir = @xlibre_video_drivers_dir@
|
||||
|
||||
fbdev_drv_la_SOURCES = \
|
||||
fbdev.c
|
||||
|
||||
70
src/fbdev.c
70
src/fbdev.c
@@ -2,10 +2,7 @@
|
||||
* Authors: Alan Hourihane, <alanh@fairlite.demon.co.uk>
|
||||
* Michel Dänzer, <michel@tungstengraphics.com>
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -27,9 +24,7 @@
|
||||
|
||||
#include "xf86xv.h"
|
||||
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
#include <pciaccess.h>
|
||||
#endif
|
||||
|
||||
/* for xf86{Depth,FbBpp}. i am a terrible person, and i am sorry. */
|
||||
#include "xf86Priv.h"
|
||||
@@ -53,10 +48,8 @@ static Bool debug = 0;
|
||||
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(ScreenPtr pScreen, int argc, char **argv);
|
||||
static Bool FBDevCloseScreen(ScreenPtr pScreen);
|
||||
@@ -65,7 +58,7 @@ static void * FBDevWindowLinear(ScreenPtr pScreen, CARD32 row, CARD32 offset, in
|
||||
static void FBDevPointerMoved(ScrnInfoPtr pScrn, int x, int y);
|
||||
static Bool FBDevDGAInit(ScrnInfoPtr pScrn, ScreenPtr pScreen);
|
||||
static Bool FBDevDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op,
|
||||
pointer ptr);
|
||||
void *ptr);
|
||||
|
||||
|
||||
enum { FBDEV_ROTATE_NONE=0, FBDEV_ROTATE_CW=270, FBDEV_ROTATE_UD=180, FBDEV_ROTATE_CCW=90 };
|
||||
@@ -77,7 +70,6 @@ enum { FBDEV_ROTATE_NONE=0, FBDEV_ROTATE_CW=270, FBDEV_ROTATE_UD=180, FBDEV_ROTA
|
||||
#define FBDEV_NAME "FBDEV"
|
||||
#define FBDEV_DRIVER_NAME "fbdev"
|
||||
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
static const struct pci_id_match fbdev_device_match[] = {
|
||||
{
|
||||
PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
|
||||
@@ -86,7 +78,6 @@ static const struct pci_id_match fbdev_device_match[] = {
|
||||
|
||||
{ 0, 0, 0 },
|
||||
};
|
||||
#endif
|
||||
|
||||
_X_EXPORT DriverRec FBDEV = {
|
||||
FBDEV_VERSION,
|
||||
@@ -100,11 +91,8 @@ _X_EXPORT DriverRec FBDEV = {
|
||||
NULL,
|
||||
0,
|
||||
FBDevDriverFunc,
|
||||
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
fbdev_device_match,
|
||||
FBDevPciProbe
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Supported "chipsets" */
|
||||
@@ -131,8 +119,6 @@ static const OptionInfoRec FBDevOptions[] = {
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
#ifdef XFree86LOADER
|
||||
|
||||
MODULESETUPPROTO(FBDevSetup);
|
||||
|
||||
static XF86ModuleVersionInfo FBDevVersRec =
|
||||
@@ -151,23 +137,21 @@ static XF86ModuleVersionInfo FBDevVersRec =
|
||||
|
||||
_X_EXPORT XF86ModuleData fbdevModuleData = { &FBDevVersRec, FBDevSetup, NULL };
|
||||
|
||||
pointer
|
||||
FBDevSetup(pointer module, pointer opts, int *errmaj, int *errmin)
|
||||
void*
|
||||
FBDevSetup(void *module, void *opts, int *errmaj, int *errmin)
|
||||
{
|
||||
static Bool setupDone = FALSE;
|
||||
|
||||
if (!setupDone) {
|
||||
setupDone = TRUE;
|
||||
xf86AddDriver(&FBDEV, module, HaveDriverFuncs);
|
||||
return (pointer)1;
|
||||
return (void*)1;
|
||||
} else {
|
||||
if (errmaj) *errmaj = LDR_ONCEONLY;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* XFree86LOADER */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* our private data, and two functions to allocate/free this */
|
||||
|
||||
@@ -255,7 +239,6 @@ fbdevValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool verbose, int flags)
|
||||
return fbdevHWValidMode(pScrn, mode, verbose, flags);
|
||||
}
|
||||
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
static Bool FBDevPciProbe(DriverPtr drv, int entity_num,
|
||||
struct pci_device *dev, intptr_t match_data)
|
||||
{
|
||||
@@ -298,8 +281,6 @@ static Bool FBDevPciProbe(DriverPtr drv, int entity_num,
|
||||
|
||||
return (pScrn != NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static Bool
|
||||
FBDevProbe(DriverPtr drv, int flags)
|
||||
@@ -308,9 +289,6 @@ FBDevProbe(DriverPtr drv, int flags)
|
||||
ScrnInfoPtr pScrn;
|
||||
GDevPtr *devSections;
|
||||
int numDevSections;
|
||||
#ifndef XSERVER_LIBPCIACCESS
|
||||
int bus,device,func;
|
||||
#endif
|
||||
char *dev;
|
||||
Bool foundScreen = FALSE;
|
||||
|
||||
@@ -331,35 +309,10 @@ FBDevProbe(DriverPtr drv, int flags)
|
||||
|
||||
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;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (fbdevHWProbe(NULL,dev,NULL)) {
|
||||
pScrn = NULL;
|
||||
if (isPci) {
|
||||
#ifndef XSERVER_LIBPCIACCESS
|
||||
/* XXX what about when there's no busID set? */
|
||||
int entity;
|
||||
|
||||
entity = xf86ClaimPciSlot(bus,device,func,drv,
|
||||
0,devSections[i],
|
||||
TRUE);
|
||||
pScrn = xf86ConfigPciEntity(pScrn,0,entity,
|
||||
NULL,RES_SHARED_VGA,
|
||||
NULL,NULL,NULL,NULL);
|
||||
/* xf86DrvMsg() can't be called without setting these */
|
||||
pScrn->driverName = FBDEV_DRIVER_NAME;
|
||||
pScrn->name = FBDEV_NAME;
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
|
||||
"claimed PCI slot %d:%d:%d\n",bus,device,func);
|
||||
|
||||
#endif
|
||||
} else {
|
||||
int entity;
|
||||
|
||||
@@ -418,21 +371,8 @@ 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;
|
||||
|
||||
if (fPtr->pEnt->location.type == BUS_PCI &&
|
||||
xf86RegisterResources(fPtr->pEnt->index,NULL,ResExclusive)) {
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
"xf86RegisterResources() found resource conflicts\n");
|
||||
return FALSE;
|
||||
}
|
||||
#else
|
||||
if (fPtr->pEnt->location.type == BUS_PCI)
|
||||
pci_dev = fPtr->pEnt->location.id.pci;
|
||||
#endif
|
||||
/* open device */
|
||||
if (!fbdevHWInit(pScrn, pci_dev,
|
||||
xf86FindOptionValue(fPtr->pEnt->device->options,
|
||||
@@ -1235,7 +1175,7 @@ FBDevDGAInit(ScrnInfoPtr pScrn, ScreenPtr pScreen)
|
||||
}
|
||||
|
||||
static Bool
|
||||
FBDevDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, pointer ptr)
|
||||
FBDevDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, void *ptr)
|
||||
{
|
||||
xorgHWFlags *flag;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user