mirror of
https://github.com/X11Libre/xf86-video-fbdev.git
synced 2026-03-24 17:45:26 +00:00
Compare commits
19 Commits
xf86-video
...
wip/ci
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c6deb7df5 | ||
|
|
81d7edd384 | ||
|
|
6bdea80acc | ||
|
|
0f89fbffcb | ||
|
|
c8d9f3be7e | ||
|
|
ae894fe112 | ||
|
|
dc48c20ceb | ||
|
|
7bccdf4373 | ||
|
|
112b6c1153 | ||
|
|
89728ce1d6 | ||
|
|
554d6fda21 | ||
|
|
7f445dbd5a | ||
|
|
a8aa1c97f9 | ||
|
|
6ef9644156 | ||
|
|
cf1875209c | ||
|
|
2850cd86d1 | ||
|
|
4730f13b92 | ||
|
|
4865f92f74 | ||
|
|
f676c9def1 |
5
.gitlab-ci.yml
Normal file
5
.gitlab-ci.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
variables:
|
||||
FDO_UPSTREAM_REPO: 'xorg/driver/xf86-video-fbdev'
|
||||
|
||||
include:
|
||||
- local: '.gitlab-ci/common/xorg-driver.yml'
|
||||
20
.gitlab-ci/common/README.md
Normal file
20
.gitlab-ci/common/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
common CI stuff - supposed to be synced across all drivers
|
||||
|
||||
moving this to a dedicated CI component is left for a later exercise.
|
||||
|
||||
Some scripts can also be used locally, eg. in a VM:
|
||||
|
||||
Prepare the image:
|
||||
|
||||
.gitlab-ci/common/debian/image-install.sh
|
||||
.gitlab-ci/common/freebsd/image-install.sh
|
||||
|
||||
Build the xserver + driver:
|
||||
|
||||
.gitlab-ci/common/build-driver.sh debian <xserver git ref>
|
||||
.gitlab-ci/common/build-driver.sh freebsd <xserver git ref>
|
||||
|
||||
Build just the xserver:
|
||||
|
||||
.gitlab-ci/common/build-xserver.sh debian <xserver git ref>
|
||||
.gitlab-ci/common/build-xserver.sh freebsd <xserver git ref>
|
||||
61
.gitlab-ci/common/build-driver.sh
Executable file
61
.gitlab-ci/common/build-driver.sh
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
PLATFORM="$1"
|
||||
XSERVER_REF="$2"
|
||||
|
||||
if [ ! "$PLATFORM" ]; then
|
||||
echo "missing PLATFORM" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! "$XSERVER_REF" ]; then
|
||||
echo "missing XSERVER_REF" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
.gitlab-ci/common/build-xserver.sh "$PLATFORM" "$XSERVER_REF"
|
||||
|
||||
MACH=`gcc -dumpmachine`
|
||||
echo "Building on machine $MACH"
|
||||
|
||||
case "$PLATFORM" in
|
||||
freebsd)
|
||||
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/libdata/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/libdata/pkgconfig"
|
||||
export ACLOCAL_PATH="/usr/share/aclocal:/usr/local/share/aclocal"
|
||||
export CFLAGS="$CFLAGS -I/usr/local/include"
|
||||
export UDEV_CFLAGS=" "
|
||||
export UDEV_LIBS=" "
|
||||
;;
|
||||
debian)
|
||||
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig"
|
||||
;;
|
||||
*)
|
||||
echo "unknown platform $PLATFORM" >&2
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -f autogen.sh ]; then
|
||||
(
|
||||
echo "building driver via autotools"
|
||||
rm -Rf _builddir
|
||||
mkdir -p _builddir
|
||||
cd _builddir
|
||||
../autogen.sh --disable-silent-rules
|
||||
make
|
||||
make check
|
||||
make distcheck
|
||||
)
|
||||
elif [ -f meson.build ]; then
|
||||
(
|
||||
echo "building driver via meson"
|
||||
meson setup _build
|
||||
cd _build
|
||||
meson compile
|
||||
meson install
|
||||
)
|
||||
else
|
||||
echo "failed detecting build system"
|
||||
exit 1
|
||||
fi
|
||||
71
.gitlab-ci/common/build-xserver.sh
Executable file
71
.gitlab-ci/common/build-xserver.sh
Executable file
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
PLATFORM="$1"
|
||||
XSERVER_REF="$2"
|
||||
|
||||
if [ ! "$XSERVER_REF" ]; then
|
||||
echo "missing XSERVER_REF variable" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
XSERVER_CLONE=/tmp/xserver
|
||||
XSERVER_BUILD=$XSERVER_CLONE/_builddir
|
||||
XSERVER_REPO=https://gitlab.freedesktop.org/xorg/xserver.git
|
||||
|
||||
MACH=`gcc -dumpmachine`
|
||||
|
||||
export PKG_CONFIG_PATH="/usr/lib/$MACH/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"
|
||||
export PKG_CONFIG_PATH="/usr/local/lib/$MACH/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:$PKG_CONFIG_PATH"
|
||||
|
||||
echo "cloning xserver"
|
||||
rm -Rf $XSERVER_CLONE
|
||||
git clone --depth=1 -b $XSERVER_REF $XSERVER_REPO $XSERVER_CLONE
|
||||
|
||||
echo "checking platform: $PLATFORM"
|
||||
case "$PLATFORM" in
|
||||
freebsd)
|
||||
echo "Building on FreeBSD"
|
||||
XSERVER_OS_AUTOCONF_FLAGS="--without-dtrace"
|
||||
XSERVER_MESON_DISABLE="glx udev udev_kms"
|
||||
;;
|
||||
debian)
|
||||
echo "Building on Debian"
|
||||
;;
|
||||
*)
|
||||
echo "unknown platform $PLATFORM" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -f $XSERVER_CLONE/meson.build ]; then
|
||||
(
|
||||
echo "Building Xserver via meson"
|
||||
for opt in $XSERVER_MESON_DISABLE ; do
|
||||
if grep "'$opt'" $XSERVER_CLONE/meson_options.txt ; then
|
||||
echo "disable $opt"
|
||||
XSERVER_MESON_FLAGS="$XSERVER_MESON_FLAGS -D$opt=false"
|
||||
else
|
||||
echo "no option $opt"
|
||||
fi
|
||||
done
|
||||
mkdir -p $XSERVER_BUILD
|
||||
cd $XSERVER_BUILD
|
||||
meson setup --prefix=/usr $XSERVER_MESON_FLAGS
|
||||
meson compile
|
||||
meson install
|
||||
)
|
||||
else
|
||||
(
|
||||
echo "Building Xserver via autotools"
|
||||
cd $XSERVER_CLONE
|
||||
# Workaround glvnd having reset the version in gl.pc from what Mesa used
|
||||
# similar to xserver commit e6ef2b12404dfec7f23592a3524d2a63d9d25802
|
||||
sed -i -e 's/gl >= [79].[12].0/gl >= 1.2/' configure.ac
|
||||
./autogen.sh --prefix=/usr $XSERVER_AUTOCONF_FLAGS $XSERVER_OS_AUTOCONF_FLAGS
|
||||
make -j`nproc`
|
||||
make -j`nproc` install
|
||||
)
|
||||
fi
|
||||
88
.gitlab-ci/common/debian/image-install.sh
Executable file
88
.gitlab-ci/common/debian/image-install.sh
Executable file
@@ -0,0 +1,88 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
echo 'deb-src https://deb.debian.org/debian bullseye main' >>/etc/apt/sources.list.d/deb-src.list
|
||||
echo 'deb-src https://deb.debian.org/debian bullseye-updates main' >>/etc/apt/sources.list.d/deb-src.list
|
||||
apt-get update
|
||||
|
||||
apt-get autoremove -y --purge
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
autoconf \
|
||||
automake \
|
||||
build-essential \
|
||||
libtool \
|
||||
pkg-config \
|
||||
ca-certificates \
|
||||
git \
|
||||
debian-archive-keyring \
|
||||
python3 python3-setuptools libxshmfence-dev \
|
||||
clang \
|
||||
libxvmc-dev libxcb1-dev libx11-xcb-dev libxcb-dri2-0-dev libxcb-util-dev \
|
||||
libxfixes-dev libxcb-xfixes0-dev libxrender-dev libxdamage-dev libxrandr-dev \
|
||||
libxcursor-dev libxss-dev libxinerama-dev libxtst-dev libpng-dev libssl-dev \
|
||||
libxcb-dri3-dev libxxf86vm-dev libxfont-dev libxkbfile-dev libdrm-dev \
|
||||
libgbm-dev libgl1-mesa-dev libpciaccess-dev libpixman-1-dev libudev-dev \
|
||||
libgcrypt-dev libepoxy-dev libevdev-dev libmtdev-dev libinput-dev \
|
||||
mesa-common-dev libspice-protocol-dev libspice-server-dev \
|
||||
meson \
|
||||
nettle-dev \
|
||||
pkg-config \
|
||||
valgrind \
|
||||
x11-xkb-utils xfonts-utils xutils-dev x11proto-dev
|
||||
|
||||
build_autoconf() {
|
||||
local subdir="$1"
|
||||
shift
|
||||
(
|
||||
cd $subdir
|
||||
./autogen.sh "$@"
|
||||
make -j${FDO_CI_CONCURRENT:-4}
|
||||
make -j${FDO_CI_CONCURRENT:-4} install
|
||||
)
|
||||
}
|
||||
|
||||
build_meson() {
|
||||
local subdir="$1"
|
||||
shift
|
||||
(
|
||||
cd $subdir
|
||||
meson _build -Dprefix=/usr "$@"
|
||||
ninja -C _build -j${FDO_CI_CONCURRENT:-4} install
|
||||
)
|
||||
}
|
||||
|
||||
do_clone() {
|
||||
git clone "$1" --depth 1 --branch="$2"
|
||||
}
|
||||
|
||||
mkdir -p /tmp/build-deps
|
||||
cd /tmp/build-deps
|
||||
|
||||
# xserver 1.18 and older branches require libXfont 1.5 instead of 2.0
|
||||
echo "Installing libXfont 1.5"
|
||||
do_clone https://gitlab.freedesktop.org/xorg/lib/libXfont.git libXfont-1.5-branch
|
||||
build_autoconf libXfont
|
||||
|
||||
echo "Installing font-util"
|
||||
do_clone https://gitlab.freedesktop.org/xorg/font/util.git font-util-1.4.1
|
||||
build_autoconf util --prefix=/usr
|
||||
|
||||
echo "Installing libxcvt"
|
||||
do_clone https://gitlab.freedesktop.org/xorg/lib/libxcvt.git libxcvt-0.1.0
|
||||
build_meson libxcvt
|
||||
|
||||
# xserver requires xorgproto >= 2024.1 for XWAYLAND
|
||||
echo "Installing xorgproto"
|
||||
do_clone https://gitlab.freedesktop.org/xorg/proto/xorgproto.git xorgproto-2024.1
|
||||
build_autoconf xorgproto
|
||||
|
||||
# Xwayland requires drm 2.4.116 for drmSyncobjEventfd
|
||||
# xf86-video-freedreno and xf86-video-omap need extra features
|
||||
echo "Installing libdrm"
|
||||
do_clone https://gitlab.freedesktop.org/mesa/drm libdrm-2.4.116
|
||||
build_meson drm -Dfreedreno=enabled -Dnouveau=enabled -Domap=enabled
|
||||
|
||||
rm -Rf /tmp/build-deps
|
||||
8
.gitlab-ci/common/freebsd/FreeBSD.conf
Normal file
8
.gitlab-ci/common/freebsd/FreeBSD.conf
Normal file
@@ -0,0 +1,8 @@
|
||||
# using the latest branch
|
||||
FreeBSD: {
|
||||
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
|
||||
mirror_type: "srv",
|
||||
signature_type: "fingerprints",
|
||||
fingerprints: "/usr/share/keys/pkg",
|
||||
enabled: yes
|
||||
}
|
||||
59
.gitlab-ci/common/freebsd/image-install.sh
Executable file
59
.gitlab-ci/common/freebsd/image-install.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# note: really wanna install to /usr/local, since that's explicitly searched first,
|
||||
# so we always catch the locally installed before any system/ports provided one
|
||||
# otherwise we might run into trouble like trying to use outdated xorgproto
|
||||
build_autoconf() {
|
||||
local subdir="$1"
|
||||
shift
|
||||
(
|
||||
cd $subdir
|
||||
./autogen.sh --prefix=/usr/local "$@"
|
||||
make -j${FDO_CI_CONCURRENT:-4}
|
||||
make -j${FDO_CI_CONCURRENT:-4} install
|
||||
)
|
||||
}
|
||||
|
||||
build_meson() {
|
||||
local subdir="$1"
|
||||
shift
|
||||
(
|
||||
cd $subdir
|
||||
meson _build -Dprefix=/usr/local "$@"
|
||||
ninja -C _build -j${FDO_CI_CONCURRENT:-4} install
|
||||
)
|
||||
}
|
||||
|
||||
do_clone() {
|
||||
git clone "$1" --depth 1 --branch="$2"
|
||||
}
|
||||
|
||||
cp .gitlab-ci/common/freebsd/FreeBSD.conf /etc/pkg
|
||||
|
||||
pkg upgrade -f -y
|
||||
|
||||
pkg install -y \
|
||||
git gcc pkgconf autoconf automake libtool xorg-macros xorgproto meson \
|
||||
ninja pixman xtrans libXau libXdmcp libXfont libXfont2 libxkbfile libxcvt \
|
||||
libpciaccess font-util libepoll-shim libdrm mesa-libs libdrm libglu mesa-dri \
|
||||
libepoxy nettle xkbcomp libXvMC xcb-util valgrind libXcursor libXScrnSaver \
|
||||
libXinerama libXtst evdev-proto libevdev libmtdev libinput spice-protocol \
|
||||
libspice-server
|
||||
|
||||
[ -f /bin/bash ] || ln -sf /usr/local/bin/bash /bin/bash
|
||||
|
||||
# Xwayland requires drm 2.4.116 for drmSyncobjEventfd
|
||||
# xf86-video-freedreno and xf86-video-omap need extra features
|
||||
echo "Installing libdrm"
|
||||
do_clone https://gitlab.freedesktop.org/mesa/drm libdrm-2.4.116
|
||||
(
|
||||
cd drm
|
||||
git config user.email "buildbot@freebsd"
|
||||
git config user.name "FreeBSD build bot"
|
||||
git am ../.gitlab-ci/common/freebsd/libdrm-2.4.116.patch
|
||||
)
|
||||
build_meson drm -Dfreedreno=enabled -Dnouveau=enabled -Domap=enabled
|
||||
|
||||
echo "=== post-install script END"
|
||||
109
.gitlab-ci/common/freebsd/libdrm-2.4.116.patch
Normal file
109
.gitlab-ci/common/freebsd/libdrm-2.4.116.patch
Normal file
@@ -0,0 +1,109 @@
|
||||
From a87432dbb281ddf1c50a5e78091d38f0dac79416 Mon Sep 17 00:00:00 2001
|
||||
From: "Enrico Weigelt, metux IT consult" <info@metux.net>
|
||||
Date: Fri, 7 Jun 2024 15:18:47 +0200
|
||||
Subject: [PATCH 1/2] fix FTBS on FreeBSD (or non-Linux in general)
|
||||
|
||||
Several drivers still including <linux/stddef.h>, but not using anything
|
||||
from it, thus breaking build on non-Linux platforms (eg. FreeBSD).
|
||||
Since not needed at all, just stop including it.
|
||||
|
||||
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
|
||||
---
|
||||
etnaviv/etnaviv_device.c | 1 -
|
||||
exynos/exynos_drm.c | 1 -
|
||||
exynos/exynos_fimg2d.c | 1 -
|
||||
omap/omap_drm.c | 1 -
|
||||
tests/exynos/exynos_fimg2d_test.c | 1 -
|
||||
5 files changed, 5 deletions(-)
|
||||
|
||||
diff --git a/etnaviv/etnaviv_device.c b/etnaviv/etnaviv_device.c
|
||||
index 699df256..a63bd15d 100644
|
||||
--- a/etnaviv/etnaviv_device.c
|
||||
+++ b/etnaviv/etnaviv_device.c
|
||||
@@ -25,7 +25,6 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
-#include <linux/stddef.h>
|
||||
#include <linux/types.h>
|
||||
#include <errno.h>
|
||||
#include <sys/mman.h>
|
||||
diff --git a/exynos/exynos_drm.c b/exynos/exynos_drm.c
|
||||
index 3e322a17..fb4cd8de 100644
|
||||
--- a/exynos/exynos_drm.c
|
||||
+++ b/exynos/exynos_drm.c
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sys/mman.h>
|
||||
-#include <linux/stddef.h>
|
||||
|
||||
#include <xf86drm.h>
|
||||
|
||||
diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
|
||||
index ac6fa687..f0aee962 100644
|
||||
--- a/exynos/exynos_fimg2d.c
|
||||
+++ b/exynos/exynos_fimg2d.c
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include <sys/mman.h>
|
||||
-#include <linux/stddef.h>
|
||||
|
||||
#include <xf86drm.h>
|
||||
|
||||
diff --git a/omap/omap_drm.c b/omap/omap_drm.c
|
||||
index aa273660..42d35ef7 100644
|
||||
--- a/omap/omap_drm.c
|
||||
+++ b/omap/omap_drm.c
|
||||
@@ -27,7 +27,6 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
-#include <linux/stddef.h>
|
||||
#include <linux/types.h>
|
||||
#include <errno.h>
|
||||
#include <sys/mman.h>
|
||||
diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c
|
||||
index d85e2f6b..b1baa503 100644
|
||||
--- a/tests/exynos/exynos_fimg2d_test.c
|
||||
+++ b/tests/exynos/exynos_fimg2d_test.c
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sys/mman.h>
|
||||
-#include <linux/stddef.h>
|
||||
|
||||
#include <xf86drm.h>
|
||||
#include <xf86drmMode.h>
|
||||
--
|
||||
2.39.2
|
||||
|
||||
From 79123db12c6c5f42747fae02068b482055e8c376 Mon Sep 17 00:00:00 2001
|
||||
From: "Enrico Weigelt, metux IT consult" <info@metux.net>
|
||||
Date: Fri, 7 Jun 2024 15:43:13 +0200
|
||||
Subject: [PATCH 2/2] omap: fix FTBS on FreeBSD and drop unneeded include
|
||||
|
||||
No need to explicitly include <linux/types.h>, since drm.h already does that,
|
||||
but conditionally only Linux only.
|
||||
|
||||
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
|
||||
---
|
||||
omap/omap_drm.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/omap/omap_drm.c b/omap/omap_drm.c
|
||||
index 42d35ef7..93d2207f 100644
|
||||
--- a/omap/omap_drm.c
|
||||
+++ b/omap/omap_drm.c
|
||||
@@ -27,7 +27,6 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
-#include <linux/types.h>
|
||||
#include <errno.h>
|
||||
#include <sys/mman.h>
|
||||
#include <fcntl.h>
|
||||
--
|
||||
2.39.2
|
||||
|
||||
216
.gitlab-ci/common/xorg-driver.yml
Normal file
216
.gitlab-ci/common/xorg-driver.yml
Normal file
@@ -0,0 +1,216 @@
|
||||
# version 0.1.19
|
||||
variables:
|
||||
DEBIAN_VERSION: 'bullseye-slim'
|
||||
DEBIAN_TAG: "2024-06-06.09"
|
||||
DEBIAN_EXEC: 'bash .gitlab-ci/common/debian/image-install.sh'
|
||||
DEBIAN_SKIP: "false" # to enable, it has to be litterally "true"
|
||||
|
||||
FREEBSD_TAG: '2024-06-06.06'
|
||||
FREEBSD_VERSION: '14.0'
|
||||
# image is yet too small for that - need a more complicated way :(
|
||||
# FREEBSD_EXEC: "bash .gitlab-ci/common/freebsd/image-install.sh"
|
||||
FREEBSD_SKIP: "false" # to enable, it has to be litterally "true"
|
||||
|
||||
.templates_sha: &template_sha bc70242ffb8402243e934659ecc1a2d1c89eca2b # see https://docs.gitlab.com/ee/ci/yaml/#includefile
|
||||
|
||||
include:
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: *template_sha
|
||||
file: '/templates/debian.yml'
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: *template_sha
|
||||
file: '/templates/freebsd.yml'
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: *template_sha
|
||||
file: '/templates/ci-fairy.yml'
|
||||
- template: Security/SAST.gitlab-ci.yml
|
||||
|
||||
stages:
|
||||
- images
|
||||
- build
|
||||
- test
|
||||
|
||||
# standard commits quality check
|
||||
check-commits:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
stage: test
|
||||
script:
|
||||
- ci-fairy check-commits --junit-xml=results.xml
|
||||
except:
|
||||
- master@$FDO_UPSTREAM_REPO
|
||||
variables:
|
||||
GIT_DEPTH: 100
|
||||
artifacts:
|
||||
reports:
|
||||
junit: results.xml
|
||||
allow_failure: true
|
||||
needs:
|
||||
|
||||
# standard merge request quality checks
|
||||
check-merge-request:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
stage: test
|
||||
script:
|
||||
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
|
||||
artifacts:
|
||||
when: on_failure
|
||||
reports:
|
||||
junit: results.xml
|
||||
allow_failure: true
|
||||
needs:
|
||||
|
||||
# create debian build image
|
||||
image@debian@amd64:
|
||||
extends:
|
||||
- .xorg.distro@debian@amd64
|
||||
- .fdo.container-build@debian
|
||||
stage: images
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
rules:
|
||||
- if: $DEBIAN_SKIP != "true"
|
||||
when: always
|
||||
needs:
|
||||
|
||||
image@debian@i386:
|
||||
extends:
|
||||
- .xorg.distro@debian@i386
|
||||
- .fdo.container-build@debian
|
||||
stage: images
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
rules:
|
||||
- if: $DEBIAN_SKIP != "true"
|
||||
when: always
|
||||
needs:
|
||||
|
||||
# inherit this to define FDO_DISTRIBUTION_* variables for Debian
|
||||
.xorg.distro@debian@amd64:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: "$DEBIAN_VERSION"
|
||||
FDO_DISTRIBUTION_EXEC: "$DEBIAN_EXEC"
|
||||
FDO_DISTRIBUTION_TAG: "amd64-$DEBIAN_TAG"
|
||||
FDO_BASE_IMAGE: "amd64/debian:$DEBIAN_VERSION"
|
||||
|
||||
.xorg.distro@debian@i386:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: "$DEBIAN_VERSION"
|
||||
FDO_DISTRIBUTION_EXEC: "$DEBIAN_EXEC"
|
||||
FDO_DISTRIBUTION_TAG: "i386-$DEBIAN_TAG"
|
||||
FDO_BASE_IMAGE: "i386/debian:$DEBIAN_VERSION"
|
||||
|
||||
# overwrite this one if another matrix is needed
|
||||
.xorg.driver_matrix@debian:
|
||||
parallel:
|
||||
matrix:
|
||||
- CC: [ "gcc", "clang" ]
|
||||
XSERVER_REF: [
|
||||
# these break on Debian
|
||||
# "xorg-server-1.18.4",
|
||||
# "xorg-server-1.19.7",
|
||||
"xorg-server-1.20.14",
|
||||
"xorg-server-21.1.13",
|
||||
"master"
|
||||
]
|
||||
|
||||
# default build with meson on Debian
|
||||
.xorg.driver_common@debian:
|
||||
needs:
|
||||
- image@debian@i386
|
||||
- image@debian@amd64
|
||||
extends:
|
||||
- .fdo.distribution-image@debian
|
||||
stage: build
|
||||
script:
|
||||
- .gitlab-ci/common/build-driver.sh "debian" "$XSERVER_REF"
|
||||
variables:
|
||||
CFLAGS: "-pipe -g -O2"
|
||||
rules:
|
||||
- if: $DEBIAN_SKIP != "true"
|
||||
when: always
|
||||
|
||||
# overwrite this when you need some special Debian build
|
||||
build@debian@amd64:
|
||||
extends:
|
||||
- .xorg.driver_matrix@debian
|
||||
- .xorg.driver_common@debian
|
||||
- .xorg.distro@debian@amd64
|
||||
|
||||
build@debian@i386:
|
||||
extends:
|
||||
- .xorg.driver_matrix@debian
|
||||
- .xorg.driver_common@debian
|
||||
- .xorg.distro@debian@i386
|
||||
|
||||
# inherit this to define FDO_DISTRIBUTION_* variables for FreeBSD
|
||||
.xorg.distro@freebsd:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: "$FREEBSD_VERSION"
|
||||
FDO_DISTRIBUTION_EXEC: "$FREEBSD_EXEC"
|
||||
FDO_DISTRIBUTION_TAG: "$FREEBSD_TAG"
|
||||
|
||||
# create base image for FreeBSD
|
||||
image@freebsd:
|
||||
extends:
|
||||
- .xorg.distro@freebsd
|
||||
- .fdo.qemu-build@freebsd@x86_64
|
||||
stage: images
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
rules:
|
||||
- if: $FREEBSD_SKIP != "true"
|
||||
when: always
|
||||
|
||||
# inherit this to get the default build matrix
|
||||
.xorg.driver_matrix@freebsd:
|
||||
parallel:
|
||||
matrix:
|
||||
- CC: [ "gcc", "clang" ]
|
||||
XSERVER_REF: [
|
||||
# "xorg-server-1.18.4", # this breaks due name clash on "bool"
|
||||
# "xorg-server-1.19.7",
|
||||
# "xorg-server-1.20.14", # breaks meson ... see: 331850ce6f0c48a1cfc489da2a27ca0220997a2f -- server-1.20-branch
|
||||
"xorg-server-21.0.99.1",
|
||||
"xorg-server-21.1.13",
|
||||
"master"
|
||||
]
|
||||
|
||||
# common build for driver on FreeBSD. meson and autoconf are both handled by this
|
||||
.xorg.driver_common@freebsd:
|
||||
needs:
|
||||
- image@freebsd
|
||||
stage: build
|
||||
extends:
|
||||
- .fdo.distribution-image@freebsd
|
||||
- .xorg.distro@freebsd
|
||||
script:
|
||||
# FIXME: increasing image and running image-install.sh should be done
|
||||
# at container image build time, but would have to replicate too much
|
||||
# of the cbuild script here. better wait until CI folks have increased
|
||||
# the image size or provide hooks for that
|
||||
- xz -d -T0 /app/image.raw.xz
|
||||
- rm -f /app/image.raw.xz
|
||||
- truncate -s +5G /app/image.raw
|
||||
- /app/vmctl start
|
||||
- set +e
|
||||
- /app/vmctl exec "service growfs onestart"
|
||||
- scp -r $PWD "vm:"
|
||||
- /app/vmctl exec "cd $CI_PROJECT_NAME && .gitlab-ci/common/freebsd/image-install.sh"
|
||||
- /app/vmctl exec "cd $CI_PROJECT_NAME && .gitlab-ci/common/build-driver.sh freebsd $XSERVER_REF" && touch .success
|
||||
# copy any test results from the VM to our container so we can
|
||||
# save them as artifacts
|
||||
- scp -r vm:$CI_PROJECT_NAME/test-results.xml . || true # this is allowed to fail
|
||||
- /app/vmctl stop
|
||||
- set -e
|
||||
- test -e .success || exit 1
|
||||
rules:
|
||||
- if: $FREEBSD_SKIP != "true"
|
||||
when: always
|
||||
|
||||
# overwrite this if you need some special FreeBSD build
|
||||
build@freebsd:
|
||||
extends:
|
||||
- .xorg.driver_matrix@freebsd
|
||||
- .xorg.driver_common@freebsd
|
||||
@@ -30,3 +30,5 @@ ChangeLog:
|
||||
$(CHANGELOG_CMD)
|
||||
|
||||
dist-hook: ChangeLog INSTALL
|
||||
|
||||
EXTRA_DIST = README.md
|
||||
|
||||
20
README
20
README
@@ -1,20 +0,0 @@
|
||||
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
|
||||
18
README.md
Normal file
18
README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
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
|
||||
|
||||
Please submit bug reports and requests to merge patches there.
|
||||
|
||||
For patch submission instructions, see:
|
||||
|
||||
https://www.x.org/wiki/Development/Documentation/SubmittingPatches
|
||||
|
||||
17
configure.ac
17
configure.ac
@@ -24,14 +24,14 @@
|
||||
AC_PREREQ([2.60])
|
||||
AC_INIT([xf86-video-fbdev],
|
||||
[0.5.0],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
|
||||
[https://gitlab.freedesktop.org/xorg/driver/xf86-video-fbdev/issues],
|
||||
[xf86-video-fbdev])
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_AUX_DIR(.)
|
||||
|
||||
# Initialize Automake
|
||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
||||
AM_INIT_AUTOMAKE([foreign dist-xz])
|
||||
|
||||
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
|
||||
m4_ifndef([XORG_MACROS_VERSION],
|
||||
@@ -40,8 +40,7 @@ XORG_MACROS_VERSION(1.8)
|
||||
XORG_DEFAULT_OPTIONS
|
||||
|
||||
# Initialize libtool
|
||||
AC_DISABLE_STATIC
|
||||
AC_PROG_LIBTOOL
|
||||
LT_INIT([disable-static])
|
||||
|
||||
AH_TOP([#include "xorg-server.h"])
|
||||
|
||||
@@ -61,15 +60,7 @@ 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.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"
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.18 xproto fontsproto $REQUIRED_MODULES])
|
||||
|
||||
AM_CONDITIONAL(PCIACCESS, [test "x$PCIACCESS" = xyes])
|
||||
if test "x$PCIACCESS" = xyes; then
|
||||
|
||||
@@ -23,11 +23,10 @@
|
||||
# -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@
|
||||
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_la_SOURCES = \
|
||||
compat-api.h \
|
||||
fbdev.c
|
||||
|
||||
101
src/compat-api.h
101
src/compat-api.h
@@ -1,101 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012 Red Hat, 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.
|
||||
*
|
||||
* Author: Dave Airlie <airlied@redhat.com>
|
||||
*/
|
||||
|
||||
/* this file provides API compat between server post 1.13 and pre it,
|
||||
it should be reused inside as many drivers as possible */
|
||||
#ifndef COMPAT_API_H
|
||||
#define COMPAT_API_H
|
||||
|
||||
#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR
|
||||
#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum]
|
||||
#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p
|
||||
#endif
|
||||
|
||||
#ifndef XF86_HAS_SCRN_CONV
|
||||
#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum]
|
||||
#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
|
||||
#endif
|
||||
|
||||
#ifndef XF86_SCRN_INTERFACE
|
||||
|
||||
#define SCRN_ARG_TYPE int
|
||||
#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)]
|
||||
|
||||
#define SCREEN_ARG_TYPE int
|
||||
#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)]
|
||||
|
||||
#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv
|
||||
|
||||
#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask
|
||||
#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask
|
||||
|
||||
#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen
|
||||
#define CLOSE_SCREEN_ARGS scrnIndex, pScreen
|
||||
|
||||
#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags
|
||||
#define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0
|
||||
|
||||
#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags
|
||||
#define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0
|
||||
|
||||
#define FREE_SCREEN_ARGS_DECL int arg, int flags
|
||||
#define FREE_SCREEN_ARGS(x) (x)->scrnIndex, 0
|
||||
|
||||
#define VT_FUNC_ARGS_DECL int arg, int flags
|
||||
#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags)
|
||||
|
||||
#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex)
|
||||
#else
|
||||
#define SCRN_ARG_TYPE ScrnInfoPtr
|
||||
#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1)
|
||||
|
||||
#define SCREEN_ARG_TYPE ScreenPtr
|
||||
#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1)
|
||||
|
||||
#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
|
||||
|
||||
#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
|
||||
#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
|
||||
|
||||
#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
|
||||
#define CLOSE_SCREEN_ARGS pScreen
|
||||
|
||||
#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y
|
||||
#define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y
|
||||
|
||||
#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode
|
||||
#define SWITCH_MODE_ARGS(arg, m) arg, m
|
||||
|
||||
#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg
|
||||
#define FREE_SCREEN_ARGS(x) (x)
|
||||
|
||||
#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg
|
||||
#define VT_FUNC_ARGS(flags) pScrn
|
||||
|
||||
#define XF86_ENABLEDISABLEFB_ARG(x) (x)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
59
src/fbdev.c
59
src/fbdev.c
@@ -23,17 +23,10 @@
|
||||
/* for visuals */
|
||||
#include "fb.h"
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
|
||||
#include "xf86Resources.h"
|
||||
#include "xf86RAC.h"
|
||||
#endif
|
||||
|
||||
#include "fbdevhw.h"
|
||||
|
||||
#include "xf86xv.h"
|
||||
|
||||
#include "compat-api.h"
|
||||
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
#include <pciaccess.h>
|
||||
#endif
|
||||
@@ -65,11 +58,11 @@ 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(SCREEN_INIT_ARGS_DECL);
|
||||
static Bool FBDevCloseScreen(CLOSE_SCREEN_ARGS_DECL);
|
||||
static Bool FBDevScreenInit(ScreenPtr pScreen, int argc, char **argv);
|
||||
static Bool FBDevCloseScreen(ScreenPtr pScreen);
|
||||
static void * FBDevWindowLinear(ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode,
|
||||
CARD32 *size, void *closure);
|
||||
static void FBDevPointerMoved(SCRN_ARG_TYPE arg, int x, int y);
|
||||
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);
|
||||
@@ -189,7 +182,7 @@ typedef struct {
|
||||
void *shadow;
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
CreateScreenResourcesProcPtr CreateScreenResources;
|
||||
void (*PointerMoved)(SCRN_ARG_TYPE arg, int x, int y);
|
||||
void (*PointerMoved)(ScrnInfoPtr pScrn, int x, int y);
|
||||
EntityInfoPtr pEnt;
|
||||
/* DGA info */
|
||||
DGAModePtr pDGAMode;
|
||||
@@ -205,7 +198,7 @@ FBDevGetRec(ScrnInfoPtr pScrn)
|
||||
if (pScrn->driverPrivate != NULL)
|
||||
return TRUE;
|
||||
|
||||
pScrn->driverPrivate = xnfcalloc(sizeof(FBDevRec), 1);
|
||||
pScrn->driverPrivate = XNFcallocarray(sizeof(FBDevRec), 1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -334,7 +327,6 @@ FBDevProbe(DriverPtr drv, int flags)
|
||||
return FALSE;
|
||||
|
||||
for (i = 0; i < numDevSections; i++) {
|
||||
Bool isIsa = FALSE;
|
||||
Bool isPci = FALSE;
|
||||
|
||||
dev = xf86FindOptionValue(devSections[i]->options,"fbdev");
|
||||
@@ -345,15 +337,8 @@ FBDevProbe(DriverPtr drv, int flags)
|
||||
if (!xf86CheckPciSlot(bus,device,func))
|
||||
continue;
|
||||
isPci = TRUE;
|
||||
} else
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_ISA
|
||||
if (xf86ParseIsaBusString(devSections[i]->busID))
|
||||
isIsa = TRUE;
|
||||
else
|
||||
#endif
|
||||
0;
|
||||
|
||||
}
|
||||
if (fbdevHWProbe(NULL,dev,NULL)) {
|
||||
pScrn = NULL;
|
||||
@@ -374,16 +359,6 @@ 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,
|
||||
devSections[i], TRUE);
|
||||
pScrn = xf86ConfigIsaEntity(pScrn,0,entity,
|
||||
NULL,RES_SHARED_VGA,
|
||||
NULL,NULL,NULL,NULL);
|
||||
#endif
|
||||
} else {
|
||||
int entity;
|
||||
@@ -765,7 +740,7 @@ fbdevSaveScreen(ScreenPtr pScreen, int mode)
|
||||
}
|
||||
|
||||
static Bool
|
||||
FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
|
||||
FBDevScreenInit(ScreenPtr pScreen, int argc, char **argv)
|
||||
{
|
||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
||||
FBDevPtr fPtr = FBDEVPTR(pScrn);
|
||||
@@ -800,7 +775,7 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
|
||||
return FALSE;
|
||||
}
|
||||
fbdevHWSaveScreen(pScreen, SCREEN_SAVER_ON);
|
||||
fbdevHWAdjustFrame(ADJUST_FRAME_ARGS(pScrn, 0, 0));
|
||||
fbdevHWAdjustFrame(pScrn, 0, 0);
|
||||
|
||||
/* mi layer */
|
||||
miClearVisualTypes();
|
||||
@@ -1010,7 +985,7 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
|
||||
fPtr->CloseScreen = pScreen->CloseScreen;
|
||||
pScreen->CloseScreen = FBDevCloseScreen;
|
||||
|
||||
#if XV
|
||||
#ifdef XV
|
||||
{
|
||||
XF86VideoAdaptorPtr *ptr;
|
||||
|
||||
@@ -1027,7 +1002,7 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
|
||||
}
|
||||
|
||||
static Bool
|
||||
FBDevCloseScreen(CLOSE_SCREEN_ARGS_DECL)
|
||||
FBDevCloseScreen(ScreenPtr pScreen)
|
||||
{
|
||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
||||
FBDevPtr fPtr = FBDEVPTR(pScrn);
|
||||
@@ -1048,7 +1023,7 @@ FBDevCloseScreen(CLOSE_SCREEN_ARGS_DECL)
|
||||
|
||||
pScreen->CreateScreenResources = fPtr->CreateScreenResources;
|
||||
pScreen->CloseScreen = fPtr->CloseScreen;
|
||||
return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
|
||||
return (*pScreen->CloseScreen)(pScreen);
|
||||
}
|
||||
|
||||
|
||||
@@ -1076,9 +1051,8 @@ FBDevWindowLinear(ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode,
|
||||
}
|
||||
|
||||
static void
|
||||
FBDevPointerMoved(SCRN_ARG_TYPE arg, int x, int y)
|
||||
FBDevPointerMoved(ScrnInfoPtr pScrn, int x, int y)
|
||||
{
|
||||
SCRN_INFO_PTR(arg);
|
||||
FBDevPtr fPtr = FBDEVPTR(pScrn);
|
||||
int newX, newY;
|
||||
|
||||
@@ -1110,7 +1084,7 @@ FBDevPointerMoved(SCRN_ARG_TYPE arg, int x, int y)
|
||||
}
|
||||
|
||||
/* Pass adjusted pointer coordinates to wrapped PointerMoved function. */
|
||||
(*fPtr->PointerMoved)(arg, newX, newY);
|
||||
(*fPtr->PointerMoved)(pScrn, newX, newY);
|
||||
}
|
||||
|
||||
|
||||
@@ -1142,7 +1116,6 @@ static Bool
|
||||
FBDevDGASetMode(ScrnInfoPtr pScrn, DGAModePtr pDGAMode)
|
||||
{
|
||||
DisplayModePtr pMode;
|
||||
int scrnIdx = pScrn->pScreen->myNum;
|
||||
int frameX0, frameY0;
|
||||
|
||||
if (pDGAMode) {
|
||||
@@ -1157,9 +1130,9 @@ FBDevDGASetMode(ScrnInfoPtr pScrn, DGAModePtr pDGAMode)
|
||||
frameY0 = pScrn->frameY0;
|
||||
}
|
||||
|
||||
if (!(*pScrn->SwitchMode)(SWITCH_MODE_ARGS(pScrn, pMode)))
|
||||
if (!(*pScrn->SwitchMode)(pScrn, pMode))
|
||||
return FALSE;
|
||||
(*pScrn->AdjustFrame)(ADJUST_FRAME_ARGS(pScrn, frameX0, frameY0));
|
||||
(*pScrn->AdjustFrame)(pScrn, frameX0, frameY0);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1167,7 +1140,7 @@ FBDevDGASetMode(ScrnInfoPtr pScrn, DGAModePtr pDGAMode)
|
||||
static void
|
||||
FBDevDGASetViewport(ScrnInfoPtr pScrn, int x, int y, int flags)
|
||||
{
|
||||
(*pScrn->AdjustFrame)(ADJUST_FRAME_ARGS(pScrn, x, y));
|
||||
(*pScrn->AdjustFrame)(pScrn, x, y);
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user