Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e21b88202c | ||
|
|
a0f28c39cf | ||
|
|
83098eccd4 | ||
|
|
e192d6a874 | ||
|
|
1aeb21b2b6 | ||
|
|
03c42577c9 | ||
|
|
99a457a8b7 | ||
|
|
23bd30c24a | ||
|
|
fa274a36dc | ||
|
|
48b7dcef61 | ||
|
|
5a993f2d85 | ||
|
|
a33a63e017 | ||
|
|
d4b125e2b1 | ||
|
|
1acf513289 | ||
|
|
4d68bbc79f | ||
|
|
7d7d039511 | ||
|
|
a3e6ef9f90 | ||
|
|
5b12c2cfda | ||
|
|
e38a234218 | ||
|
|
75f76a5712 | ||
|
|
ce106e93d3 | ||
|
|
ce619630ed | ||
|
|
11d21641a2 | ||
|
|
729fc33efd | ||
|
|
24a3cfbd29 | ||
|
|
9d59f3e5c5 | ||
|
|
62b869855e | ||
|
|
6b81536af9 | ||
|
|
3c9211e696 | ||
|
|
7e5ff32ae9 | ||
|
|
87d2714553 |
61 changed files with 157 additions and 989 deletions
|
|
@ -1,12 +0,0 @@
|
|||
((nil
|
||||
(indent-tabs-mode . t)
|
||||
(tab-width . 8)
|
||||
(c-basic-offset . 4)
|
||||
(c-file-style . "stroustrup")
|
||||
(fill-column . 78)
|
||||
(eval . (progn
|
||||
(c-set-offset 'innamespace '0)
|
||||
(c-set-offset 'inline-open '0)))
|
||||
)
|
||||
(makefile-mode (indent-tabs-mode . t))
|
||||
)
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
root=true
|
||||
|
||||
[*]
|
||||
indent_style=tab
|
||||
tab_width=8
|
||||
indent_size=4
|
||||
charset=utf-8
|
||||
|
||||
[src/{drmmode_display.c,radeon_dri3.c,radeon_glamor.c,radeon_glamor.h,radeon_glamor_wrappers.c}]
|
||||
indent_size=8
|
||||
|
||||
[src/ati.c]
|
||||
indent_style=space
|
||||
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.4.0
|
||||
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.4.0
|
||||
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.4.0
|
||||
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.4.0
|
||||
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.4.0
|
||||
|
|
|
|||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -66,8 +66,8 @@ core
|
|||
*.tar.bz2
|
||||
*.tar.gz
|
||||
#
|
||||
# Add & Override patterns for xf86-video-ati
|
||||
# Add & Override patterns for xf86-video-ati
|
||||
#
|
||||
# Edit the following section as needed
|
||||
# For example, !report.pc overrides *.pc. See 'man gitignore'
|
||||
#
|
||||
#
|
||||
|
|
|
|||
126
.gitlab-ci.yml
126
.gitlab-ci.yml
|
|
@ -1,126 +0,0 @@
|
|||
# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml:
|
||||
|
||||
# FDO_DISTRIBUTION_TAG is the tag of the docker image used for the build
|
||||
# jobs. If the image doesn't exist yet, the docker-image stage generates it
|
||||
# or copies it from upstream (this is all handled by the templates).
|
||||
#
|
||||
# In order to generate a new image, one should generally change the tag.
|
||||
# While removing the image from the registry would also work, that's not
|
||||
# recommended except for ephemeral images during development.
|
||||
#
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: bookworm-slim
|
||||
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/debian-install.sh'
|
||||
FDO_DISTRIBUTION_PACKAGES: 'ca-certificates'
|
||||
FDO_DISTRIBUTION_TAG: "2024-02-23.2"
|
||||
FDO_UPSTREAM_REPO: xorg/driver/xf86-video-ati
|
||||
|
||||
#
|
||||
# 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 9568e38927f9e9c48d4f586f84a071c3a4bdcd39 # 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/ci-fairy.yml'
|
||||
- template: Security/SAST.gitlab-ci.yml
|
||||
|
||||
|
||||
stages:
|
||||
- docker-image
|
||||
- build
|
||||
- test
|
||||
|
||||
#
|
||||
# Verify that commit messages are as expected
|
||||
#
|
||||
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
|
||||
|
||||
#
|
||||
# Verify that the merge request has the allow-collaboration checkbox ticked
|
||||
#
|
||||
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
|
||||
|
||||
|
||||
#
|
||||
# Build a container with the given tag and the packages pre-installed.
|
||||
# This only happens if/when the tag changes, otherwise the existing image is
|
||||
# re-used.
|
||||
#
|
||||
container-build:
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
stage: docker-image
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
|
||||
|
||||
# The default build instructions
|
||||
.default_build:
|
||||
extends:
|
||||
- .fdo.distribution-image@debian
|
||||
stage: build
|
||||
script:
|
||||
- ./autogen.sh
|
||||
- make -j${FDO_CI_CONCURRENT:-4} check V=1
|
||||
variables:
|
||||
CFLAGS: "-pipe -g -O2 -Werror"
|
||||
ACLOCAL_PATH: /usr/local/xserver-$XSERVER_VERSION/share/aclocal
|
||||
PKG_CONFIG_PATH: /usr/local/xserver-$XSERVER_VERSION/lib/pkgconfig
|
||||
|
||||
build-distcheck:
|
||||
extends:
|
||||
- .default_build
|
||||
script:
|
||||
- ./autogen.sh
|
||||
- make -j${FDO_CI_CONCURRENT:-4} check V=1
|
||||
- make install V=1
|
||||
- make -j${FDO_CI_CONCURRENT:-4} distcheck
|
||||
variables:
|
||||
XSERVER_VERSION: "21.1"
|
||||
|
||||
# excludes version already checked in build-distcheck
|
||||
build-gcc:
|
||||
extends:
|
||||
- .default_build
|
||||
parallel:
|
||||
matrix:
|
||||
- XSERVER_VERSION: ["1.18", "1.19", "1.20"]
|
||||
|
||||
build-clang:
|
||||
extends:
|
||||
- .default_build
|
||||
parallel:
|
||||
matrix:
|
||||
- XSERVER_VERSION: ["1.18", "1.19", "1.20", "21.1"]
|
||||
variables:
|
||||
CC: clang
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
echo 'deb-src https://deb.debian.org/debian bookworm main' >/etc/apt/sources.list.d/deb-src.list
|
||||
apt-get update
|
||||
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
EPHEMERAL="
|
||||
ca-certificates
|
||||
git
|
||||
"
|
||||
|
||||
# libXfont/xserver build dependencies
|
||||
apt-get install -y --no-remove \
|
||||
autoconf \
|
||||
automake \
|
||||
build-essential \
|
||||
libtool \
|
||||
pkg-config \
|
||||
$EPHEMERAL
|
||||
|
||||
echo 'APT::Get::Build-Dep-Automatic "true";' >>/etc/apt/apt.conf
|
||||
apt-get build-dep -y xorg-server
|
||||
|
||||
# xserver 1.18 and older branches require libXfont 1.5 instead of 2.0
|
||||
git clone https://gitlab.freedesktop.org/xorg/lib/libXfont.git
|
||||
cd libXfont
|
||||
git checkout libXfont-1.5-branch
|
||||
./autogen.sh
|
||||
make install-pkgconfigDATA
|
||||
cd ..
|
||||
rm -rf libXfont
|
||||
|
||||
|
||||
git clone https://gitlab.freedesktop.org/xorg/xserver.git
|
||||
cd xserver
|
||||
|
||||
for VERSION in 1.13 1.14 1.15; do
|
||||
git checkout server-${VERSION}-branch
|
||||
# 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/local/xserver-$VERSION --enable-dri2 --disable-dmx
|
||||
make -C include install-nodist_sdkHEADERS
|
||||
make install-headers install-aclocalDATA install-pkgconfigDATA clean
|
||||
git restore configure.ac
|
||||
done
|
||||
|
||||
for VERSION in 1.16 1.17 1.18 1.19 1.20 21.1; do
|
||||
git checkout server-${VERSION}-branch
|
||||
# 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/local/xserver-$VERSION --enable-dri2 --enable-dri3 --enable-glamor --disable-dmx
|
||||
make -C include install-nodist_sdkHEADERS
|
||||
make install-headers install-aclocalDATA install-pkgconfigDATA clean
|
||||
git restore configure.ac
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf xserver
|
||||
|
||||
|
||||
# xf86-video-ati build dependencies
|
||||
apt-get install -y --no-remove \
|
||||
clang \
|
||||
libdrm-dev \
|
||||
libgbm-dev \
|
||||
libgl1-mesa-dev \
|
||||
libpciaccess-dev \
|
||||
libpixman-1-dev \
|
||||
libudev-dev \
|
||||
libxcvt-dev \
|
||||
mesa-common-dev \
|
||||
xutils-dev \
|
||||
x11proto-dev
|
||||
|
||||
|
||||
# Remove unneeded packages
|
||||
apt-get purge -y $EPHEMERAL
|
||||
apt-get autoremove -y --purge
|
||||
10
README.md
10
README.md
|
|
@ -4,14 +4,6 @@ xf86-video-ati - Xorg driver for ATI/AMD Radeon GPUs using the radeon kernel dri
|
|||
Questions regarding this software should be directed at the
|
||||
[amd-gfx mailing list](https://lists.freedesktop.org/mailman/listinfo/amd-gfx).
|
||||
|
||||
The
|
||||
[main development code repository](https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati)
|
||||
can be found at FreeDesktop Gitlab.
|
||||
[main development code repository](https://github.com/X11Libre/xf86-video-ati)
|
||||
|
||||
Please submit bug reports there and use merge requests for patch submission.
|
||||
|
||||
See the X.org wiki for
|
||||
[further patch submission instructions](https://www.x.org/wiki/Development/Documentation/SubmittingPatches)
|
||||
and
|
||||
[more information on the git code manager](https://wiki.x.org/wiki/GitPage).
|
||||
|
||||
|
|
|
|||
55
configure.ac
55
configure.ac
|
|
@ -22,12 +22,13 @@
|
|||
|
||||
# Initialize Autoconf
|
||||
AC_PREREQ([2.60])
|
||||
AC_INIT([xf86-video-ati],
|
||||
[22.0.0],
|
||||
[https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/-/issues],
|
||||
[xf86-video-ati])
|
||||
AC_INIT([xlibre-xf86-video-ati],
|
||||
[25.0.1],
|
||||
[https://github.com/X11Libre/xf86-video-ati/issues],
|
||||
[xlibre-xf86-video-ati])
|
||||
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
|
|
@ -35,7 +36,6 @@ AC_CONFIG_AUX_DIR(.)
|
|||
|
||||
# Initialize Automake
|
||||
AM_INIT_AUTOMAKE([foreign dist-xz])
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
|
||||
m4_ifndef([XORG_MACROS_VERSION],
|
||||
|
|
@ -45,7 +45,7 @@ XORG_DEFAULT_OPTIONS
|
|||
|
||||
# Initialize libtool
|
||||
AC_DISABLE_STATIC
|
||||
AC_PROG_LIBTOOL
|
||||
LT_INIT
|
||||
|
||||
# Checks for programs.
|
||||
AM_PROG_CC_C_O
|
||||
|
|
@ -75,11 +75,8 @@ PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.89])
|
|||
PKG_CHECK_MODULES(LIBDRM_RADEON, [libdrm_radeon])
|
||||
|
||||
# Obtain compiler/linker options for the driver dependencies
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.18 xproto fontsproto xf86driproto $REQUIRED_MODULES])
|
||||
PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
|
||||
HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
|
||||
HAVE_XEXTPROTO_71="no")
|
||||
AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 25.0.0 xproto fontsproto xf86driproto $REQUIRED_MODULES])
|
||||
PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1])
|
||||
|
||||
# Define a configure option for an alternate X Server configuration directory
|
||||
AC_ARG_WITH(xorg-conf-dir,
|
||||
|
|
@ -162,9 +159,9 @@ XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
|
|||
|
||||
# Checks for headers/macros for byte swapping
|
||||
# Known variants:
|
||||
# <byteswap.h> bswap_16, bswap_32, bswap_64 (glibc)
|
||||
# <byteswap.h> bswap_16, bswap_32 (glibc)
|
||||
# <sys/endian.h> __swap16, __swap32, __swap64 (OpenBSD)
|
||||
# <sys/endian.h> bswap16, bswap32, bswap64 (other BSD's)
|
||||
# <sys/endian.h> bswap16, bswap32 (other BSD's)
|
||||
# and a fallback to local macros if none of the above are found
|
||||
|
||||
# if <byteswap.h> is found, assume it's the correct version
|
||||
|
|
@ -199,7 +196,7 @@ b = bswap16(a);
|
|||
if test "$SYS_ENDIAN_BSWAP" = "yes" ; then
|
||||
USE_SYS_ENDIAN_H=yes
|
||||
BSWAP=bswap
|
||||
else
|
||||
else
|
||||
if test "$SYS_ENDIAN__SWAP" = "yes" ; then
|
||||
USE_SYS_ENDIAN_H=yes
|
||||
BSWAP=__swap
|
||||
|
|
@ -209,40 +206,18 @@ b = bswap16(a);
|
|||
fi
|
||||
|
||||
if test "$USE_SYS_ENDIAN_H" = "yes" ; then
|
||||
AC_DEFINE([USE_SYS_ENDIAN_H], 1,
|
||||
AC_DEFINE([USE_SYS_ENDIAN_H], 1,
|
||||
[Define to use byteswap macros from <sys/endian.h>])
|
||||
AC_DEFINE_UNQUOTED([radeon_bswap_16], ${BSWAP}16,
|
||||
AC_DEFINE_UNQUOTED([radeon_bswap_16], ${BSWAP}16,
|
||||
[Define to 16-bit byteswap macro])
|
||||
AC_DEFINE_UNQUOTED([radeon_bswap_32], ${BSWAP}32,
|
||||
AC_DEFINE_UNQUOTED([radeon_bswap_32], ${BSWAP}32,
|
||||
[Define to 32-bit byteswap macro])
|
||||
AC_DEFINE_UNQUOTED([radeon_bswap_64], ${BSWAP}64,
|
||||
[Define to 64-bit byteswap macro])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST([moduledir])
|
||||
|
||||
DRIVER_NAME=ati
|
||||
AC_SUBST([DRIVER_NAME])
|
||||
|
||||
AC_MSG_NOTICE(
|
||||
[The atimisc sub-driver has been split out to xf86-video-mach64:]
|
||||
[ https://gitlab.freedesktop.org/xorg/driver/xf86-video-mach64]
|
||||
[Please install that driver as well for mach64-based cards.]
|
||||
)
|
||||
|
||||
AC_MSG_NOTICE(
|
||||
[The r128 sub-driver has been split out to xf86-video-r128:]
|
||||
[ https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128]
|
||||
[Please install that driver as well for rage128-based cards.]
|
||||
)
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
src/Makefile
|
||||
man/Makefile
|
||||
conf/Makefile
|
||||
])
|
||||
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile conf/Makefile])
|
||||
AC_OUTPUT
|
||||
|
||||
dnl
|
||||
|
|
|
|||
|
|
@ -19,15 +19,15 @@
|
|||
# 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 radeon.man
|
||||
driverman_PRE = ati.man radeon.man
|
||||
|
||||
driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
|
||||
|
||||
EXTRA_DIST = @DRIVER_NAME@.man radeon.man
|
||||
EXTRA_DIST = ati.man radeon.man
|
||||
|
||||
CLEANFILES = $(driverman_DATA)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
.ds q \N'34'
|
||||
.TH ATI __drivermansuffix__ 2010-12-02 __vendorversion__
|
||||
.SH NAME
|
||||
ati \- ATI video wrapper driver for Xorg
|
||||
ati \- ATI video wrapper driver for XLibre
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B "Section \*qDevice\*q"
|
||||
|
|
@ -13,7 +13,7 @@ ati \- ATI video wrapper driver for Xorg
|
|||
.fi
|
||||
.SH DESCRIPTION
|
||||
.B ati
|
||||
is an Xorg wrapper driver for ATI video cards.
|
||||
is an XLibre wrapper driver for ATI video cards.
|
||||
It autodetects whether your hardware has a
|
||||
Radeon, Rage 128, or Mach64 or earlier class of chipset, and loads the
|
||||
.BR radeon (__drivermansuffix__),
|
||||
|
|
@ -33,7 +33,7 @@ Please refer to
|
|||
for general configuration details,
|
||||
and the specific card driver for driver configuration details.
|
||||
.SH "SEE ALSO"
|
||||
.BR Xorg (__appmansuffix__),
|
||||
.BR XLibre (__appmansuffix__),
|
||||
.BR xorg.conf (__filemansuffix__),
|
||||
.BR Xserver (__appmansuffix__),
|
||||
.BR X (__miscmansuffix__),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.ds q \N'34'
|
||||
.TH RADEON __drivermansuffix__ 2024-09-29 __vendorversion__
|
||||
.SH NAME
|
||||
radeon \- ATI/AMD RADEON video driver for Xorg
|
||||
radeon \- ATI/AMD RADEON video driver for XLibre
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B "Section \*qDevice\*q"
|
||||
|
|
@ -12,7 +12,7 @@ radeon \- ATI/AMD RADEON video driver for Xorg
|
|||
.fi
|
||||
.SH DESCRIPTION
|
||||
.B radeon
|
||||
is an Xorg driver for ATI/AMD RADEON-based video cards with the
|
||||
is an XLibre driver for ATI/AMD RADEON-based video cards with the
|
||||
following features:
|
||||
.PP
|
||||
.PD 0
|
||||
|
|
@ -400,7 +400,7 @@ contrast, and brightness, and must be disabled to use those attributes.
|
|||
The default is
|
||||
.B 'off'(0).
|
||||
.SH SEE ALSO
|
||||
.BR Xorg (__appmansuffix__),
|
||||
.BR XLibre (__appmansuffix__),
|
||||
.BR xorg.conf (__filemansuffix__),
|
||||
.BR Xserver (__appmansuffix__),
|
||||
.BR X (__miscmansuffix__)
|
||||
|
|
@ -412,7 +412,7 @@ https://www.x.org/wiki/radeon
|
|||
.IP " 2." 4
|
||||
Overview about radeon development code:
|
||||
.RS 4
|
||||
https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati
|
||||
https://github.com/X11Libre/xf86-video-ati
|
||||
.RE
|
||||
.IP " 3." 4
|
||||
Mailing list:
|
||||
|
|
@ -427,12 +427,7 @@ IRC channel:
|
|||
.IP " 5." 4
|
||||
Query the bugtracker for radeon bugs:
|
||||
.RS 4
|
||||
https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/-/issues
|
||||
.RE
|
||||
.IP " 6." 4
|
||||
Submit bugs & patches:
|
||||
.RS 4
|
||||
https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/
|
||||
https://github.com/X11Libre/xf86-video-ati/issues
|
||||
.RE
|
||||
.SH AUTHORS
|
||||
.nf
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@ EXTRA_DIST = \
|
|||
cayman_reg.h \
|
||||
cayman_reg_auto.h \
|
||||
cayman_shader.h \
|
||||
compat-api.h \
|
||||
ati.h \
|
||||
ativersion.h \
|
||||
bicubic_table.h \
|
||||
|
|
|
|||
|
|
@ -52,10 +52,7 @@
|
|||
* The driver is intended to support all ATI adapters since their VGA Wonder
|
||||
* V3, including OEM counterparts.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <pciaccess.h>
|
||||
#include <xf86drm.h>
|
||||
|
|
@ -140,7 +137,7 @@ ati_device_get_indexed(int index)
|
|||
#endif
|
||||
|
||||
void
|
||||
ati_gdev_subdriver(pointer options)
|
||||
ati_gdev_subdriver(void *options)
|
||||
{
|
||||
int nATIGDev, nMach64GDev, nR128GDev, nRadeonGDev, nAmdgpuGDev;
|
||||
GDevPtr *ATIGDevs;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,6 @@
|
|||
|
||||
#include "xf86_OSproc.h"
|
||||
|
||||
extern void ati_gdev_subdriver(pointer options);
|
||||
extern void ati_gdev_subdriver(void *options);
|
||||
|
||||
#endif /* ___ATI_H___ */
|
||||
|
|
|
|||
|
|
@ -19,10 +19,7 @@
|
|||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "ati.h"
|
||||
#include "ativersion.h"
|
||||
|
|
@ -48,11 +45,11 @@ static XF86ModuleVersionInfo ATIVersionRec =
|
|||
*
|
||||
* This function is called every time the module is loaded.
|
||||
*/
|
||||
static pointer
|
||||
static void*
|
||||
ATISetup
|
||||
(
|
||||
pointer Module,
|
||||
pointer Options,
|
||||
void *Module,
|
||||
void *Options,
|
||||
int *ErrorMajor,
|
||||
int *ErrorMinor
|
||||
)
|
||||
|
|
@ -65,7 +62,7 @@ ATISetup
|
|||
ati_gdev_subdriver(Options);
|
||||
}
|
||||
|
||||
return (pointer)1;
|
||||
return (void*)1;
|
||||
}
|
||||
|
||||
/* The following record must be called atiModuleData */
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
enum region_type {
|
||||
REGION_MEM,
|
||||
REGION_IO
|
||||
REGION_IO
|
||||
};
|
||||
|
||||
typedef struct pci_device *pciVideoPtr;
|
||||
|
|
|
|||
|
|
@ -23,9 +23,7 @@
|
|||
* Authors: Alex Deucher <alexander.deucher@amd.com>
|
||||
*
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "xf86.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -23,10 +23,7 @@
|
|||
* Author: Alex Deucher <alexander.deucher@amd.com>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "xf86.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,43 +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>
|
||||
*/
|
||||
|
||||
#ifndef COMPAT_API_H
|
||||
#define COMPAT_API_H
|
||||
|
||||
#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0)
|
||||
#define BLOCKHANDLER_ARGS_DECL ScreenPtr pScreen, pointer pTimeout
|
||||
#define BLOCKHANDLER_ARGS pScreen, pTimeout
|
||||
#else
|
||||
#define BLOCKHANDLER_ARGS_DECL ScreenPtr pScreen, pointer pTimeout, pointer pReadmask
|
||||
#define BLOCKHANDLER_ARGS pScreen, pTimeout, pReadmask
|
||||
#endif
|
||||
|
||||
#if ABI_VIDEODRV_VERSION < SET_ABI_VERSION(25, 2)
|
||||
#define current_primary current_master
|
||||
#define primary_pixmap master_pixmap
|
||||
#define secondary_dst slave_dst
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -24,10 +24,7 @@
|
|||
* Dave Airlie <airlied@redhat.com>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
|
@ -47,19 +44,10 @@
|
|||
#include "drmmode_display.h"
|
||||
|
||||
/* DPMS */
|
||||
#ifdef HAVE_XEXTPROTO_71
|
||||
#include <X11/extensions/dpmsconst.h>
|
||||
#else
|
||||
#define DPMS_SERVER
|
||||
#include <X11/extensions/dpms.h>
|
||||
#endif
|
||||
|
||||
#define DEFAULT_NOMINAL_FRAME_RATE 60
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 22
|
||||
#define HAVE_NOTIFY_FD 1
|
||||
#endif
|
||||
|
||||
static Bool
|
||||
drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height);
|
||||
|
||||
|
|
@ -565,7 +553,7 @@ drmmode_crtc_scanout_create(xf86CrtcPtr crtc, struct drmmode_scanout *scanout,
|
|||
scanout->height = height;
|
||||
} else {
|
||||
ErrorF("failed to create CRTC scanout FB\n");
|
||||
error:
|
||||
error:
|
||||
drmmode_crtc_scanout_destroy(drmmode, scanout);
|
||||
}
|
||||
|
||||
|
|
@ -610,15 +598,6 @@ drmmode_can_use_hw_cursor(xf86CrtcPtr crtc)
|
|||
if (crtc->transformPresent)
|
||||
return FALSE;
|
||||
|
||||
#if XF86_CRTC_VERSION < 7
|
||||
/* Xorg doesn't correctly handle cursor position transform in the
|
||||
* rotation case
|
||||
*/
|
||||
if (crtc->driverIsPerformingTransform &&
|
||||
(crtc->rotation & 0xf) != RR_Rotate_0)
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -650,11 +629,6 @@ drmmode_crtc_update_tear_free(xf86CrtcPtr crtc)
|
|||
}
|
||||
}
|
||||
|
||||
#if XF86_CRTC_VERSION < 7
|
||||
#define XF86DriverTransformOutput TRUE
|
||||
#define XF86DriverTransformNone FALSE
|
||||
#endif
|
||||
|
||||
static Bool
|
||||
drmmode_handle_transform(xf86CrtcPtr crtc)
|
||||
{
|
||||
|
|
@ -726,7 +700,7 @@ drmmode_crtc_prime_scanout_update(xf86CrtcPtr crtc, DisplayModePtr mode,
|
|||
*x = *y = 0;
|
||||
drmmode_crtc->scanout_id = scanout_id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
drmmode_crtc_scanout_update(xf86CrtcPtr crtc, DisplayModePtr mode,
|
||||
|
|
@ -992,55 +966,12 @@ drmmode_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
|
|||
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
|
||||
RADEONEntPtr pRADEONEnt = RADEONEntPriv(crtc->scrn);
|
||||
|
||||
#if XF86_CRTC_VERSION < 7
|
||||
if (crtc->driverIsPerformingTransform) {
|
||||
x += crtc->x;
|
||||
y += crtc->y;
|
||||
xf86CrtcTransformCursorPos(crtc, &x, &y);
|
||||
}
|
||||
#endif
|
||||
|
||||
drmmode_crtc->cursor_x = x;
|
||||
drmmode_crtc->cursor_y = y;
|
||||
|
||||
drmModeMoveCursor(pRADEONEnt->fd, drmmode_crtc->mode_crtc->crtc_id, x, y);
|
||||
}
|
||||
|
||||
#if XF86_CRTC_VERSION < 7
|
||||
|
||||
static int
|
||||
drmmode_cursor_src_offset(Rotation rotation, int width, int height,
|
||||
int x_dst, int y_dst)
|
||||
{
|
||||
int t;
|
||||
|
||||
switch (rotation & 0xf) {
|
||||
case RR_Rotate_90:
|
||||
t = x_dst;
|
||||
x_dst = height - y_dst - 1;
|
||||
y_dst = t;
|
||||
break;
|
||||
case RR_Rotate_180:
|
||||
x_dst = width - x_dst - 1;
|
||||
y_dst = height - y_dst - 1;
|
||||
break;
|
||||
case RR_Rotate_270:
|
||||
t = x_dst;
|
||||
x_dst = y_dst;
|
||||
y_dst = width - t - 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (rotation & RR_Reflect_X)
|
||||
x_dst = width - x_dst - 1;
|
||||
if (rotation & RR_Reflect_Y)
|
||||
y_dst = height - y_dst - 1;
|
||||
|
||||
return y_dst * height + x_dst;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static Bool
|
||||
drmmode_cursor_pixel(xf86CrtcPtr crtc, uint32_t *argb, Bool *premultiplied,
|
||||
Bool *apply_gamma)
|
||||
|
|
@ -1113,29 +1044,6 @@ drmmode_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image)
|
|||
if (crtc->scrn->depth != 24 && crtc->scrn->depth != 32)
|
||||
apply_gamma = FALSE;
|
||||
|
||||
#if XF86_CRTC_VERSION < 7
|
||||
if (crtc->driverIsPerformingTransform) {
|
||||
uint32_t cursor_w = info->cursor_w, cursor_h = info->cursor_h;
|
||||
int dstx, dsty;
|
||||
int srcoffset;
|
||||
|
||||
retry_transform:
|
||||
for (dsty = 0; dsty < cursor_h; dsty++) {
|
||||
for (dstx = 0; dstx < cursor_w; dstx++) {
|
||||
srcoffset = drmmode_cursor_src_offset(crtc->rotation,
|
||||
cursor_w,
|
||||
cursor_h,
|
||||
dstx, dsty);
|
||||
argb = image[srcoffset];
|
||||
if (!drmmode_cursor_pixel(crtc, &argb, &premultiplied,
|
||||
&apply_gamma))
|
||||
goto retry_transform;
|
||||
|
||||
ptr[dsty * info->cursor_w + dstx] = cpu_to_le32(argb);
|
||||
}
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
uint32_t cursor_size = info->cursor_w * info->cursor_h;
|
||||
int i;
|
||||
|
|
@ -1770,7 +1678,7 @@ drmmode_output_create_resources(xf86OutputPtr output)
|
|||
drmmode_output->props = calloc(mode_output->count_props + 1, sizeof(drmmode_prop_rec));
|
||||
if (!drmmode_output->props)
|
||||
return;
|
||||
|
||||
|
||||
drmmode_output->num_props = 0;
|
||||
for (i = 0, j = 0; i < mode_output->count_props; i++) {
|
||||
drmmode_prop = drmModeGetProperty(pRADEONEnt->fd, mode_output->props[i]);
|
||||
|
|
@ -2090,9 +1998,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
|
|||
drmModeEncoderPtr *kencoders = NULL;
|
||||
drmmode_output_private_ptr drmmode_output;
|
||||
drmModePropertyBlobPtr path_blob = NULL;
|
||||
#if XF86_CRTC_VERSION >= 8
|
||||
Bool nonDesktop = FALSE;
|
||||
#endif
|
||||
char name[32];
|
||||
int i;
|
||||
const char *s;
|
||||
|
|
@ -2103,12 +2009,10 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
|
|||
|
||||
path_blob = koutput_get_prop_blob(pRADEONEnt->fd, koutput, "PATH");
|
||||
|
||||
#if XF86_CRTC_VERSION >= 8
|
||||
i = koutput_get_prop_idx(pRADEONEnt->fd, koutput, DRM_MODE_PROP_RANGE,
|
||||
"non-desktop");
|
||||
if (i >= 0)
|
||||
nonDesktop = koutput->prop_values[i] != 0;
|
||||
#endif
|
||||
|
||||
kencoders = calloc(sizeof(drmModeEncoderPtr), koutput->count_encoders);
|
||||
if (!kencoders) {
|
||||
|
|
@ -2139,9 +2043,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
|
|||
drmmode_output = output->driver_private;
|
||||
drmmode_output->output_id = mode_res->connectors[num];
|
||||
drmmode_output->mode_output = koutput;
|
||||
#if XF86_CRTC_VERSION >= 8
|
||||
output->non_desktop = nonDesktop;
|
||||
#endif
|
||||
for (i = 0; i < koutput->count_encoders; i++)
|
||||
drmModeFreeEncoder(kencoders[i]);
|
||||
free(kencoders);
|
||||
|
|
@ -2181,10 +2083,8 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
|
|||
output->interlaceAllowed = TRUE;
|
||||
output->doubleScanAllowed = TRUE;
|
||||
output->driver_private = drmmode_output;
|
||||
#if XF86_CRTC_VERSION >= 8
|
||||
output->non_desktop = nonDesktop;
|
||||
#endif
|
||||
|
||||
|
||||
output->possible_crtcs = 0xffffffff;
|
||||
for (i = 0; i < koutput->count_encoders; i++) {
|
||||
output->possible_crtcs &= kencoders[i]->possible_crtcs;
|
||||
|
|
@ -2228,7 +2128,7 @@ uint32_t find_clones(ScrnInfoPtr scrn, xf86OutputPtr output)
|
|||
clone_drmout = clone_output->driver_private;
|
||||
if (output == clone_output)
|
||||
continue;
|
||||
|
||||
|
||||
if (clone_drmout->enc_mask == 0)
|
||||
continue;
|
||||
if (drmmode_output->enc_clone_mask == clone_drmout->enc_mask)
|
||||
|
|
@ -2683,26 +2583,12 @@ drmmode_flip_handler(xf86CrtcPtr crtc, uint32_t frame, uint64_t usec, void *even
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#if HAVE_NOTIFY_FD
|
||||
static void
|
||||
drm_notify_fd(int fd, int ready, void *data)
|
||||
#else
|
||||
static void
|
||||
drm_wakeup_handler(pointer data, int err, pointer p)
|
||||
#endif
|
||||
{
|
||||
drmmode_ptr drmmode = data;
|
||||
RADEONEntPtr pRADEONEnt = RADEONEntPriv(drmmode->scrn);
|
||||
|
||||
#if !HAVE_NOTIFY_FD
|
||||
fd_set *read_mask = p;
|
||||
|
||||
if (err >= 0 && FD_ISSET(pRADEONEnt->fd, read_mask))
|
||||
#endif
|
||||
{
|
||||
radeon_drm_handle_event(pRADEONEnt->fd, &drmmode->event_context);
|
||||
}
|
||||
radeon_drm_handle_event(pRADEONEnt->fd, &drmmode->event_context);
|
||||
}
|
||||
|
||||
static Bool drmmode_probe_page_flip_target(RADEONEntPtr pRADEONEnt)
|
||||
|
|
@ -2865,15 +2751,8 @@ void drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
|
|||
|
||||
info->drmmode_inited = TRUE;
|
||||
if (pRADEONEnt->fd_wakeup_registered != serverGeneration) {
|
||||
#if HAVE_NOTIFY_FD
|
||||
SetNotifyFd(pRADEONEnt->fd, drm_notify_fd, X_NOTIFY_READ,
|
||||
&info->drmmode);
|
||||
#else
|
||||
AddGeneralSocket(pRADEONEnt->fd);
|
||||
RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
|
||||
drm_wakeup_handler,
|
||||
&info->drmmode);
|
||||
#endif
|
||||
pRADEONEnt->fd_wakeup_registered = serverGeneration;
|
||||
pRADEONEnt->fd_wakeup_ref = 1;
|
||||
} else
|
||||
|
|
@ -2895,17 +2774,10 @@ void drmmode_fini(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
|
|||
|
||||
if (pRADEONEnt->fd_wakeup_registered == serverGeneration &&
|
||||
!--pRADEONEnt->fd_wakeup_ref) {
|
||||
#if HAVE_NOTIFY_FD
|
||||
RemoveNotifyFd(pRADEONEnt->fd);
|
||||
#else
|
||||
RemoveGeneralSocket(pRADEONEnt->fd);
|
||||
RemoveBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
|
||||
drm_wakeup_handler, pScrn);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Bool drmmode_set_bufmgr(ScrnInfoPtr pScrn, drmmode_ptr drmmode, struct radeon_bo_manager *bufmgr)
|
||||
{
|
||||
drmmode->bufmgr = bufmgr;
|
||||
|
|
@ -3011,7 +2883,7 @@ miPointerSpriteFuncRec drmmode_sprite_funcs = {
|
|||
.DeviceCursorCleanup = drmmode_sprite_device_cursor_cleanup,
|
||||
};
|
||||
|
||||
|
||||
|
||||
void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y)
|
||||
{
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||
|
|
|
|||
|
|
@ -23,9 +23,7 @@
|
|||
* Authors: Alex Deucher <alexander.deucher@amd.com>
|
||||
*
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "xf86.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -23,10 +23,7 @@
|
|||
* Author: Alex Deucher <alexander.deucher@amd.com>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "xf86.h"
|
||||
|
||||
|
|
@ -2072,7 +2069,7 @@ EVERGREENDrawInit(ScreenPtr pScreen)
|
|||
info->accel_state->exa->UploadToScreen = EVERGREENUploadToScreen;
|
||||
info->accel_state->exa->DownloadFromScreen = EVERGREENDownloadFromScreen;
|
||||
info->accel_state->exa->CreatePixmap2 = RADEONEXACreatePixmap2;
|
||||
info->accel_state->exa->SharePixmapBacking = RADEONEXASharePixmapBacking;
|
||||
info->accel_state->exa->SharePixmapBacking = RADEONEXASharePixmapBacking;
|
||||
info->accel_state->exa->SetSharedPixmapBacking = RADEONEXASetSharedPixmapBacking;
|
||||
info->accel_state->exa->flags = EXA_OFFSCREEN_PIXMAPS | EXA_SUPPORTS_PREPARE_AUX |
|
||||
EXA_HANDLES_PIXMAPS | EXA_MIXED_PIXMAPS;
|
||||
|
|
|
|||
|
|
@ -23,10 +23,7 @@
|
|||
* Author: Alex Deucher <alexander.deucher@amd.com>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "xf86.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -23,10 +23,7 @@
|
|||
* Author: Alex Deucher <alexander.deucher@amd.com>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "xf86.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ while (<CSV>) {
|
|||
|
||||
if (($columns[2] ne "R128") && ($columns[2] ne "MACH64") && ($columns[2] ne "MACH32")) {
|
||||
print PCICHIPSET " { PCI_CHIP_$columns[1], PCI_CHIP_$columns[1], RES_SHARED_VGA },\n";
|
||||
|
||||
|
||||
print PCIDEVICEMATCH " ATI_DEVICE_MATCH( PCI_CHIP_$columns[1], 0 ),\n";
|
||||
|
||||
print RADEONCHIPSET " { PCI_CHIP_$columns[1], \"$columns[8]\" },\n";
|
||||
|
|
|
|||
|
|
@ -23,10 +23,7 @@
|
|||
* Author: Alex Deucher <alexander.deucher@amd.com>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "xf86.h"
|
||||
|
||||
|
|
@ -577,7 +574,7 @@ R600PrepareCopy(PixmapPtr pSrc, PixmapPtr pDst,
|
|||
0);
|
||||
if (!accel_state->copy_area_bo)
|
||||
RADEON_FALLBACK(("temp copy surface alloc failed\n"));
|
||||
|
||||
|
||||
radeon_cs_space_add_persistent_bo(info->cs, accel_state->copy_area_bo,
|
||||
0, RADEON_GEM_DOMAIN_VRAM);
|
||||
if (radeon_cs_space_check(info->cs)) {
|
||||
|
|
@ -2051,7 +2048,7 @@ R600DrawInit(ScreenPtr pScreen)
|
|||
info->accel_state->exa->UploadToScreen = R600UploadToScreenCS;
|
||||
info->accel_state->exa->DownloadFromScreen = R600DownloadFromScreenCS;
|
||||
info->accel_state->exa->CreatePixmap2 = RADEONEXACreatePixmap2;
|
||||
info->accel_state->exa->SharePixmapBacking = RADEONEXASharePixmapBacking;
|
||||
info->accel_state->exa->SharePixmapBacking = RADEONEXASharePixmapBacking;
|
||||
info->accel_state->exa->SetSharedPixmapBacking = RADEONEXASetSharedPixmapBacking;
|
||||
info->accel_state->exa->flags = EXA_OFFSCREEN_PIXMAPS | EXA_SUPPORTS_PREPARE_AUX |
|
||||
EXA_HANDLES_PIXMAPS | EXA_MIXED_PIXMAPS;
|
||||
|
|
|
|||
|
|
@ -23,10 +23,7 @@
|
|||
* Author: Alex Deucher <alexander.deucher@amd.com>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "xf86.h"
|
||||
|
||||
|
|
@ -455,13 +452,13 @@ int R600_copy_ps(RADEONChipFamily ChipSet, uint32_t* shader)
|
|||
|
||||
/*
|
||||
* ; xv vertex shader
|
||||
* 00 VTX: ADDR(4) CNT(2)
|
||||
* 0 VFETCH R1.xy01, R0.x, fc0 MEGA(16) FORMAT(32_32_FLOAT)
|
||||
* FORMAT_COMP(SIGNED)
|
||||
* 1 VFETCH R0.xy01, R0.x, fc0 MINI(8) OFFSET(8) FORMAT(32_32_FLOAT)
|
||||
* FORMAT_COMP(SIGNED)
|
||||
* 00 VTX: ADDR(4) CNT(2)
|
||||
* 0 VFETCH R1.xy01, R0.x, fc0 MEGA(16) FORMAT(32_32_FLOAT)
|
||||
* FORMAT_COMP(SIGNED)
|
||||
* 1 VFETCH R0.xy01, R0.x, fc0 MINI(8) OFFSET(8) FORMAT(32_32_FLOAT)
|
||||
* FORMAT_COMP(SIGNED)
|
||||
* 01 EXP_DONE: POS0, R1
|
||||
* 02 EXP_DONE: PARAM0, R0 NO_BARRIER
|
||||
* 02 EXP_DONE: PARAM0, R0 NO_BARRIER
|
||||
* END_OF_PROGRAM
|
||||
*/
|
||||
int R600_xv_vs(RADEONChipFamily ChipSet, uint32_t* shader)
|
||||
|
|
|
|||
|
|
@ -23,10 +23,7 @@
|
|||
* Author: Alex Deucher <alexander.deucher@amd.com>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "xf86.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,7 @@
|
|||
* Authors: Alex Deucher <alexander.deucher@amd.com>
|
||||
* Matthias Hopf <mhopf@suse.de>
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "xf86.h"
|
||||
|
||||
|
|
|
|||
23
src/radeon.h
23
src/radeon.h
|
|
@ -90,8 +90,6 @@
|
|||
#include "picturestr.h"
|
||||
#endif
|
||||
|
||||
#include "compat-api.h"
|
||||
|
||||
#include "simple_list.h"
|
||||
#include "atipcirename.h"
|
||||
|
||||
|
|
@ -108,7 +106,6 @@ struct _SyncFence;
|
|||
#include <byteswap.h>
|
||||
#define radeon_bswap_16 bswap_16
|
||||
#define radeon_bswap_32 bswap_32
|
||||
#define radeon_bswap_64 bswap_64
|
||||
#elif defined(USE_SYS_ENDIAN_H)
|
||||
#include <sys/endian.h>
|
||||
#else
|
||||
|
|
@ -118,23 +115,13 @@ struct _SyncFence;
|
|||
#define radeon_bswap_32(value) \
|
||||
(((uint32_t)radeon_bswap_16((uint16_t)((value) & 0xffff)) << 16) | \
|
||||
(uint32_t)radeon_bswap_16((uint16_t)((value) >> 16)))
|
||||
|
||||
#define radeon_bswap_64(value) \
|
||||
(((uint64_t)radeon_bswap_32((uint32_t)((value) & 0xffffffff)) \
|
||||
<< 32) | \
|
||||
(uint64_t)radeon_bswap_32((uint32_t)((value) >> 32)))
|
||||
|
||||
#endif
|
||||
|
||||
#if X_BYTE_ORDER == X_BIG_ENDIAN
|
||||
#define le32_to_cpu(x) radeon_bswap_32(x)
|
||||
#define le16_to_cpu(x) radeon_bswap_16(x)
|
||||
#define cpu_to_le32(x) radeon_bswap_32(x)
|
||||
#define cpu_to_le16(x) radeon_bswap_16(x)
|
||||
#else
|
||||
#define le32_to_cpu(x) (x)
|
||||
#define le16_to_cpu(x) (x)
|
||||
#define cpu_to_le32(x) (x)
|
||||
#define cpu_to_le16(x) (x)
|
||||
#endif
|
||||
|
||||
/* Provide substitutes for gcc's __FUNCTION__ on other compilers */
|
||||
|
|
@ -345,7 +332,7 @@ struct radeon_2d_state {
|
|||
struct radeon_bo *dst_bo;
|
||||
struct radeon_bo *src_bo;
|
||||
};
|
||||
|
||||
|
||||
#define DMA_BO_FREE_TIME 1000
|
||||
|
||||
struct radeon_dma_bo {
|
||||
|
|
@ -498,7 +485,7 @@ typedef struct {
|
|||
|
||||
Bool (*CloseScreen)(ScreenPtr pScreen);
|
||||
|
||||
void (*BlockHandler)(BLOCKHANDLER_ARGS_DECL);
|
||||
void (*BlockHandler)(ScreenPtr pScreen, void *pTimeout);
|
||||
|
||||
void (*CreateFence) (ScreenPtr pScreen, struct _SyncFence *pFence,
|
||||
Bool initially_triggered);
|
||||
|
|
@ -550,7 +537,7 @@ typedef struct {
|
|||
Bool r600_shadow_fb;
|
||||
void *fb_shadow;
|
||||
|
||||
void (*reemit_current2d)(ScrnInfoPtr pScrn, int op); // emit the current 2D state into the IB
|
||||
void (*reemit_current2d)(ScrnInfoPtr pScrn, int op); // emit the current 2D state into the IB
|
||||
struct radeon_2d_state state_2d;
|
||||
struct radeon_buffer *front_buffer;
|
||||
struct radeon_bo_manager *bufmgr;
|
||||
|
|
@ -862,7 +849,7 @@ radeon_pixmap_get_fb(PixmapPtr pix)
|
|||
|
||||
if (fb_ptr && *fb_ptr)
|
||||
return *fb_ptr;
|
||||
|
||||
|
||||
if (radeon_get_pixmap_handle(pix, &handle)) {
|
||||
ScrnInfoPtr scrn = xf86ScreenToScrn(pix->drawable.pScreen);
|
||||
RADEONEntPtr pRADEONEnt = RADEONEntPriv(scrn);
|
||||
|
|
|
|||
|
|
@ -25,10 +25,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Authors:
|
||||
|
|
@ -984,7 +981,7 @@ void RADEONWaitForVLine(ScrnInfoPtr pScrn, PixmapPtr pPix,
|
|||
}
|
||||
OUT_RING_REG(RADEON_WAIT_UNTIL, (RADEON_WAIT_CRTC_VLINE |
|
||||
RADEON_ENG_DISPLAY_SELECT_CRTC0));
|
||||
|
||||
|
||||
OUT_RING(CP_PACKET3(RADEON_CP_PACKET3_NOP, 0));
|
||||
OUT_RING(drmmode_crtc->mode_crtc->crtc_id);
|
||||
ADVANCE_RING();
|
||||
|
|
|
|||
|
|
@ -19,10 +19,7 @@
|
|||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
#include "config.h"
|
||||
|
||||
#include "radeon.h"
|
||||
#include "radeon_glamor.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2008 Kristian Høgsberg
|
||||
* Copyright 2008 Kristian Høgsberg
|
||||
* Copyright 2008 Jérôme Glisse
|
||||
*
|
||||
* All Rights Reserved.
|
||||
|
|
@ -25,9 +25,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "radeon.h"
|
||||
#include "radeon_dri2.h"
|
||||
|
|
@ -195,7 +193,7 @@ radeon_dri2_create_buffer2(ScreenPtr pScreen,
|
|||
flags = RADEON_CREATE_PIXMAP_TILING_MACRO | RADEON_CREATE_PIXMAP_TILING_MICRO;
|
||||
if (IS_R200_3D || info->ChipFamily == CHIP_FAMILY_RV200 || info->ChipFamily == CHIP_FAMILY_RADEON)
|
||||
flags |= RADEON_CREATE_PIXMAP_DEPTH;
|
||||
|
||||
|
||||
break;
|
||||
case DRI2BufferBackLeft:
|
||||
case DRI2BufferBackRight:
|
||||
|
|
@ -289,7 +287,7 @@ radeon_dri2_destroy_buffer2(ScreenPtr pScreen,
|
|||
if (private->refcnt == 0) {
|
||||
ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
|
||||
|
||||
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
|
||||
"Attempted to destroy previously destroyed buffer.\
|
||||
This is a programming error\n");
|
||||
return;
|
||||
|
|
@ -376,7 +374,7 @@ radeon_dri2_copy_region2(ScreenPtr pScreen,
|
|||
ValidateGC(dst_drawable, gc);
|
||||
|
||||
vsync = info->accel_state->vsync;
|
||||
/* Driver option "SwapbuffersWait" defines if we vsync DRI2 copy-swaps. */
|
||||
/* Driver option "SwapbuffersWait" defines if we vsync DRI2 copy-swaps. */
|
||||
info->accel_state->vsync = info->swapBuffersWait;
|
||||
info->accel_state->force = TRUE;
|
||||
|
||||
|
|
@ -432,7 +430,7 @@ radeon_dri2_unref_buffer(BufferPtr buffer)
|
|||
}
|
||||
|
||||
static void
|
||||
radeon_dri2_client_state_changed(CallbackListPtr *ClientStateCallback, pointer data, pointer calldata)
|
||||
radeon_dri2_client_state_changed(CallbackListPtr *ClientStateCallback, void *data, void *calldata)
|
||||
{
|
||||
NewClientInfoRec *clientinfo = calldata;
|
||||
ClientPtr pClient = clientinfo->client;
|
||||
|
|
@ -940,7 +938,7 @@ static int radeon_dri2_get_msc(DrawablePtr draw, CARD64 *ust, CARD64 *msc)
|
|||
}
|
||||
|
||||
static
|
||||
CARD32 radeon_dri2_deferred_event(OsTimerPtr timer, CARD32 now, pointer data)
|
||||
CARD32 radeon_dri2_deferred_event(OsTimerPtr timer, CARD32 now, void *data)
|
||||
{
|
||||
DRI2FrameEventPtr event_info = (DRI2FrameEventPtr)data;
|
||||
xf86CrtcPtr crtc = event_info->crtc;
|
||||
|
|
@ -1204,7 +1202,7 @@ static int radeon_dri2_schedule_swap(ClientPtr client, DrawablePtr draw,
|
|||
|
||||
/* radeon_dri2_frame_event_handler will get called some unknown time in the
|
||||
* future with these buffers. Take a reference to ensure that they won't
|
||||
* get destroyed before then.
|
||||
* get destroyed before then.
|
||||
*/
|
||||
radeon_dri2_ref_buffer(front);
|
||||
radeon_dri2_ref_buffer(back);
|
||||
|
|
|
|||
|
|
@ -20,11 +20,7 @@
|
|||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||
* OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "radeon.h"
|
||||
#include "radeon_bo_gem.h"
|
||||
|
|
|
|||
|
|
@ -25,10 +25,7 @@
|
|||
* Dave Airlie <airlied@redhat.com>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,10 +28,7 @@
|
|||
* Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "radeon.h"
|
||||
#include "radeon_reg.h"
|
||||
|
|
@ -207,7 +204,7 @@ Bool RADEONPrepareAccess_CS(PixmapPtr pPix, int index)
|
|||
|
||||
if (flush)
|
||||
radeon_cs_flush_indirect(pScrn);
|
||||
|
||||
|
||||
/* flush IB */
|
||||
ret = radeon_bo_map(driver_priv->bo->bo.radeon, 1);
|
||||
if (ret) {
|
||||
|
|
|
|||
|
|
@ -646,7 +646,7 @@ Bool RADEONDrawInit(ScreenPtr pScreen)
|
|||
info->accel_state->exa->PrepareAccess = RADEONPrepareAccess_CS;
|
||||
info->accel_state->exa->FinishAccess = RADEONFinishAccess_CS;
|
||||
info->accel_state->exa->CreatePixmap2 = RADEONEXACreatePixmap2;
|
||||
info->accel_state->exa->SharePixmapBacking = RADEONEXASharePixmapBacking;
|
||||
info->accel_state->exa->SharePixmapBacking = RADEONEXASharePixmapBacking;
|
||||
info->accel_state->exa->SetSharedPixmapBacking = RADEONEXASetSharedPixmapBacking;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -264,13 +264,13 @@ static Bool RADEONSetupSourceTile(PicturePtr pPict,
|
|||
|
||||
info->accel_state->need_src_tile_x = info->accel_state->need_src_tile_y = FALSE;
|
||||
info->accel_state->src_tile_width = info->accel_state->src_tile_height = 65536; /* "infinite" */
|
||||
|
||||
|
||||
if (repeatType == RepeatNormal || repeatType == RepeatReflect) {
|
||||
Bool badPitch = needMatchingPitch && !RADEONPitchMatches(pPix);
|
||||
|
||||
|
||||
int w = pPict->pDrawable ? pPict->pDrawable->width : 1;
|
||||
int h = pPict->pDrawable ? pPict->pDrawable->height : 1;
|
||||
|
||||
|
||||
if (pPict->transform) {
|
||||
if (badPitch)
|
||||
RADEON_FALLBACK(("Width %d and pitch %u not compatible for repeat\n",
|
||||
|
|
@ -1217,7 +1217,7 @@ static Bool R300TextureSetup(PicturePtr pPict, PixmapPtr pPix,
|
|||
txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_WRAP);
|
||||
else
|
||||
txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL);
|
||||
|
||||
|
||||
if (unit != 0 || !info->accel_state->need_src_tile_y)
|
||||
txfilter |= R300_TX_CLAMP_T(R300_TX_CLAMP_WRAP);
|
||||
else
|
||||
|
|
@ -2073,7 +2073,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture,
|
|||
}
|
||||
ADVANCE_RING();
|
||||
|
||||
|
||||
|
||||
BEGIN_ACCEL_RELOC(3, 2);
|
||||
EMIT_WRITE_OFFSET(R300_RB3D_COLOROFFSET0, 0, pDst);
|
||||
EMIT_COLORPITCH(R300_RB3D_COLORPITCH0, colorpitch, pDst);
|
||||
|
|
@ -2390,7 +2390,7 @@ static void RadeonComposite(PixmapPtr pDst,
|
|||
int remainingWidth = width;
|
||||
int tileSrcX, tileMaskX, tileDstX;
|
||||
int h = info->accel_state->src_tile_height - tileSrcY;
|
||||
|
||||
|
||||
if (h > remainingHeight)
|
||||
h = remainingHeight;
|
||||
remainingHeight -= h;
|
||||
|
|
@ -2398,13 +2398,13 @@ static void RadeonComposite(PixmapPtr pDst,
|
|||
modulus(srcX, info->accel_state->src_tile_width, tileSrcX);
|
||||
tileMaskX = maskX;
|
||||
tileDstX = dstX;
|
||||
|
||||
|
||||
while (remainingWidth > 0) {
|
||||
int w = info->accel_state->src_tile_width - tileSrcX;
|
||||
if (w > remainingWidth)
|
||||
w = remainingWidth;
|
||||
remainingWidth -= w;
|
||||
|
||||
|
||||
RadeonCompositeTile(pScrn,
|
||||
info,
|
||||
pDst,
|
||||
|
|
@ -2412,7 +2412,7 @@ static void RadeonComposite(PixmapPtr pDst,
|
|||
tileMaskX, tileMaskY,
|
||||
tileDstX, tileDstY,
|
||||
w, h);
|
||||
|
||||
|
||||
tileSrcX = 0;
|
||||
tileMaskX += w;
|
||||
tileDstX += w;
|
||||
|
|
|
|||
|
|
@ -30,9 +30,7 @@
|
|||
* Alex Deucher <alexander.deucher@amd.com>
|
||||
* Matthias Hopf <mhopf@suse.de>
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "radeon.h"
|
||||
#include "radeon_probe.h"
|
||||
|
|
|
|||
|
|
@ -23,10 +23,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <xf86.h>
|
||||
|
||||
|
|
@ -72,7 +69,7 @@ radeon_glamor_pre_init(ScrnInfoPtr scrn)
|
|||
{
|
||||
RADEONEntPtr pRADEONEnt = RADEONEntPriv(scrn);
|
||||
RADEONInfoPtr info = RADEONPTR(scrn);
|
||||
pointer glamor_module;
|
||||
void *glamor_module;
|
||||
CARD32 version;
|
||||
const char *s;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,11 +26,7 @@
|
|||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef USE_GLAMOR
|
||||
|
||||
|
|
@ -429,7 +425,7 @@ radeon_glamor_poly_fill_rect(DrawablePtr pDrawable, GCPtr pGC,
|
|||
static void
|
||||
radeon_glamor_image_glyph_blt(DrawablePtr pDrawable, GCPtr pGC,
|
||||
int x, int y, unsigned int nglyph,
|
||||
CharInfoPtr *ppci, pointer pglyphBase)
|
||||
CharInfoPtr *ppci, void *pglyphBase)
|
||||
{
|
||||
ScrnInfoPtr scrn = xf86ScreenToScrn(pDrawable->pScreen);
|
||||
PixmapPtr pixmap = get_drawable_pixmap(pDrawable);
|
||||
|
|
@ -448,7 +444,7 @@ radeon_glamor_image_glyph_blt(DrawablePtr pDrawable, GCPtr pGC,
|
|||
static void
|
||||
radeon_glamor_poly_glyph_blt(DrawablePtr pDrawable, GCPtr pGC,
|
||||
int x, int y, unsigned int nglyph,
|
||||
CharInfoPtr *ppci, pointer pglyphBase)
|
||||
CharInfoPtr *ppci, void *pglyphBase)
|
||||
{
|
||||
ScrnInfoPtr scrn = xf86ScreenToScrn(pDrawable->pScreen);
|
||||
PixmapPtr pixmap = get_drawable_pixmap(pDrawable);
|
||||
|
|
|
|||
|
|
@ -24,9 +24,7 @@
|
|||
* Dave Airlie <airlied@redhat.com>
|
||||
*
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
|
@ -47,12 +45,7 @@
|
|||
#include <present.h>
|
||||
|
||||
/* DPMS */
|
||||
#ifdef HAVE_XEXTPROTO_71
|
||||
#include <X11/extensions/dpmsconst.h>
|
||||
#else
|
||||
#define DPMS_SERVER
|
||||
#include <X11/extensions/dpms.h>
|
||||
#endif
|
||||
|
||||
#ifdef __DragonFly__
|
||||
#include <xf86_OSproc.h>
|
||||
|
|
@ -279,7 +272,7 @@ callback_needs_flush(RADEONInfoPtr info, struct radeon_client_priv *client_priv)
|
|||
|
||||
static void
|
||||
radeon_event_callback(CallbackListPtr *list,
|
||||
pointer user_data, pointer call_data)
|
||||
void *user_data, void *call_data)
|
||||
{
|
||||
EventInfoRec *eventinfo = call_data;
|
||||
ScrnInfoPtr pScrn = user_data;
|
||||
|
|
@ -302,7 +295,7 @@ radeon_event_callback(CallbackListPtr *list,
|
|||
*/
|
||||
client_priv->needs_flush = info->gpu_flushed;
|
||||
server_priv->needs_flush = info->gpu_flushed;
|
||||
|
||||
|
||||
for (i = 0; i < eventinfo->count; i++) {
|
||||
if (eventinfo->events[i].u.u.type == info->callback_event_type) {
|
||||
client_priv->needs_flush++;
|
||||
|
|
@ -314,7 +307,7 @@ radeon_event_callback(CallbackListPtr *list,
|
|||
|
||||
static void
|
||||
radeon_flush_callback(CallbackListPtr *list,
|
||||
pointer user_data, pointer call_data)
|
||||
void *user_data, void *call_data)
|
||||
{
|
||||
ScrnInfoPtr pScrn = user_data;
|
||||
ScreenPtr pScreen = pScrn->pScreen;
|
||||
|
|
@ -842,7 +835,7 @@ radeon_prime_scanout_flip(PixmapDirtyUpdatePtr ent)
|
|||
"Failed to get FB for PRIME flip.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
drm_queue_seq = radeon_drm_queue_alloc(crtc,
|
||||
RADEON_DRM_QUEUE_CLIENT_DEFAULT,
|
||||
RADEON_DRM_QUEUE_ID_DEFAULT, fb,
|
||||
|
|
@ -1208,7 +1201,7 @@ radeon_scanout_flip(ScreenPtr pScreen, RADEONInfoPtr info,
|
|||
drmmode_fb_reference(pRADEONEnt->fd, &drmmode_crtc->flip_pending, fb);
|
||||
}
|
||||
|
||||
static void RADEONBlockHandler_KMS(BLOCKHANDLER_ARGS_DECL)
|
||||
static void RADEONBlockHandler_KMS(ScreenPtr pScreen, void *pTimeout)
|
||||
{
|
||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
||||
RADEONInfoPtr info = RADEONPTR(pScrn);
|
||||
|
|
@ -1216,7 +1209,7 @@ static void RADEONBlockHandler_KMS(BLOCKHANDLER_ARGS_DECL)
|
|||
int c;
|
||||
|
||||
pScreen->BlockHandler = info->BlockHandler;
|
||||
(*pScreen->BlockHandler) (BLOCKHANDLER_ARGS);
|
||||
pScreen->BlockHandler(pScreen, pTimeout);
|
||||
pScreen->BlockHandler = RADEONBlockHandler_KMS;
|
||||
|
||||
if (!xf86ScreenToScrn(radeon_primary_screen(pScreen))->vtSema)
|
||||
|
|
@ -1791,7 +1784,7 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
|
|||
(unsigned)ARRAY_SIZE(pRADEONEnt->scrn));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (!RADEONGetRec(pScrn)) return FALSE;
|
||||
|
||||
info = RADEONPTR(pScrn);
|
||||
|
|
@ -2337,7 +2330,7 @@ Bool RADEONScreenInit_KMS(ScreenPtr pScreen, int argc, char **argv)
|
|||
}
|
||||
|
||||
radeon_cs_set_limit(info->cs, RADEON_GEM_DOMAIN_GTT, info->gart_size);
|
||||
radeon_cs_space_set_flush(info->cs, (void(*)(void *))radeon_cs_flush_indirect, pScrn);
|
||||
radeon_cs_space_set_flush(info->cs, (void(*)(void *))radeon_cs_flush_indirect, pScrn);
|
||||
|
||||
if (!radeon_setup_kernel_mem(pScreen)) {
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "radeon_setup_kernel_mem failed\n");
|
||||
|
|
@ -2589,7 +2582,7 @@ Bool RADEONEnterVT_KMS(ScrnInfoPtr pScrn)
|
|||
}
|
||||
|
||||
static
|
||||
CARD32 cleanup_black_fb(OsTimerPtr timer, CARD32 now, pointer data)
|
||||
CARD32 cleanup_black_fb(OsTimerPtr timer, CARD32 now, void *data)
|
||||
{
|
||||
ScreenPtr screen = data;
|
||||
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
|
||||
|
|
|
|||
|
|
@ -19,10 +19,7 @@
|
|||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "radeon_probe.h"
|
||||
#include "radeon_version.h"
|
||||
|
|
@ -50,11 +47,11 @@ static XF86ModuleVersionInfo RADEONVersionRec =
|
|||
*
|
||||
* This function is called every time the module is loaded.
|
||||
*/
|
||||
static pointer
|
||||
static void *
|
||||
RADEONSetup
|
||||
(
|
||||
pointer Module,
|
||||
pointer Options,
|
||||
void *Module,
|
||||
void *Options,
|
||||
int *ErrorMajor,
|
||||
int *ErrorMinor
|
||||
)
|
||||
|
|
@ -66,7 +63,7 @@ RADEONSetup
|
|||
xf86AddDriver(&RADEON, Module, HaveDriverFuncs);
|
||||
}
|
||||
|
||||
return (pointer)TRUE;
|
||||
return (void*)TRUE;
|
||||
}
|
||||
|
||||
/* The following record must be called radeonModuleData */
|
||||
|
|
|
|||
|
|
@ -20,10 +20,7 @@
|
|||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||
* OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "radeon.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -25,10 +25,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@
|
|||
#include "xf86platformBus.h"
|
||||
#endif
|
||||
|
||||
#include "compat-api.h"
|
||||
#include "exa.h"
|
||||
|
||||
extern DriverRec RADEON;
|
||||
|
|
|
|||
|
|
@ -2304,7 +2304,7 @@
|
|||
# define RADEON_ROUND_PREC_8TH_PIX (1 << 30)
|
||||
# define RADEON_ROUND_PREC_4TH_PIX (2 << 30)
|
||||
# define RADEON_ROUND_PREC_HALF_PIX (3 << 30)
|
||||
#define R200_RE_CNTL 0x1c50
|
||||
#define R200_RE_CNTL 0x1c50
|
||||
# define R200_STIPPLE_ENABLE 0x1
|
||||
# define R200_SCISSOR_ENABLE 0x2
|
||||
# define R200_PATTERN_ENABLE 0x4
|
||||
|
|
@ -2596,7 +2596,7 @@
|
|||
# define RADEON_VF_NUM_VERTICES_SHIFT 16
|
||||
|
||||
#define RADEON_SE_PORT_DATA0 0x2000
|
||||
|
||||
|
||||
#define R200_SE_VAP_CNTL 0x2080
|
||||
# define R200_VAP_TCL_ENABLE 0x00000001
|
||||
# define R200_VAP_SINGLE_BUF_STATE_ENABLE 0x00000010
|
||||
|
|
@ -2630,7 +2630,7 @@
|
|||
# define R200_SCISSOR_ENABLE_0 0x10000000
|
||||
# define R200_SCISSOR_ENABLE_1 0x20000000
|
||||
# define R200_SCISSOR_ENABLE_2 0x40000000
|
||||
#define R200_PP_TXFILTER_0 0x2c00
|
||||
#define R200_PP_TXFILTER_0 0x2c00
|
||||
#define R200_PP_TXFILTER_1 0x2c20
|
||||
#define R200_PP_TXFILTER_2 0x2c40
|
||||
#define R200_PP_TXFILTER_3 0x2c60
|
||||
|
|
@ -3856,7 +3856,7 @@
|
|||
# define AVIVO_DACB_POWERDOWN_POWERDOWN (1 << 0)
|
||||
# define AVIVO_DACB_POWERDOWN_BLUE (1 << 8)
|
||||
# define AVIVO_DACB_POWERDOWN_GREEN (1 << 16)
|
||||
# define AVIVO_DACB_POWERDOWN_RED
|
||||
# define AVIVO_DACB_POWERDOWN_RED
|
||||
|
||||
#define AVIVO_TMDSA_CNTL 0x7880
|
||||
# define AVIVO_TMDSA_CNTL_ENABLE (1 << 0)
|
||||
|
|
|
|||
|
|
@ -24,10 +24,7 @@
|
|||
* Based on radeon_exa_render.c and kdrive ati_video.c by Eric Anholt, et al.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
@ -166,7 +163,7 @@ RADEONFreeVideoMemory(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
|
|||
}
|
||||
|
||||
static void
|
||||
RADEONStopVideo(ScrnInfoPtr pScrn, pointer data, Bool cleanup)
|
||||
RADEONStopVideo(ScrnInfoPtr pScrn, void *data, Bool cleanup)
|
||||
{
|
||||
RADEONPortPrivPtr pPriv = (RADEONPortPrivPtr)data;
|
||||
|
||||
|
|
@ -223,7 +220,7 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
|
|||
short height,
|
||||
Bool sync,
|
||||
RegionPtr clipBoxes,
|
||||
pointer data,
|
||||
void *data,
|
||||
DrawablePtr pDraw)
|
||||
{
|
||||
ScreenPtr pScreen = pScrn->pScreen;
|
||||
|
|
@ -348,13 +345,13 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
|
|||
nlines = ((y2 + 0xffff) >> 16) - top;
|
||||
|
||||
pPriv->currentBuffer ^= 1;
|
||||
|
||||
|
||||
src_bo = pPriv->src_bo[pPriv->currentBuffer];
|
||||
|
||||
ret = radeon_bo_map(src_bo, 1);
|
||||
if (ret)
|
||||
return BadAlloc;
|
||||
|
||||
|
||||
pPriv->src_addr = src_bo->ptr;
|
||||
pPriv->src_pitch = dstPitch;
|
||||
|
||||
|
|
@ -606,7 +603,7 @@ int
|
|||
RADEONGetTexPortAttribute(ScrnInfoPtr pScrn,
|
||||
Atom attribute,
|
||||
INT32 *value,
|
||||
pointer data)
|
||||
void *data)
|
||||
{
|
||||
RADEONInfoPtr info = RADEONPTR(pScrn);
|
||||
RADEONPortPrivPtr pPriv = (RADEONPortPrivPtr)data;
|
||||
|
|
@ -648,7 +645,7 @@ int
|
|||
RADEONSetTexPortAttribute(ScrnInfoPtr pScrn,
|
||||
Atom attribute,
|
||||
INT32 value,
|
||||
pointer data)
|
||||
void *data)
|
||||
{
|
||||
RADEONInfoPtr info = RADEONPTR(pScrn);
|
||||
RADEONPortPrivPtr pPriv = (RADEONPortPrivPtr)data;
|
||||
|
|
@ -740,7 +737,7 @@ RADEONQueryBestSize(
|
|||
short vid_w, short vid_h,
|
||||
short drw_w, short drw_h,
|
||||
unsigned int *p_w, unsigned int *p_h,
|
||||
pointer data
|
||||
void *data
|
||||
){
|
||||
RADEONPortPrivPtr pPriv = (RADEONPortPrivPtr)data;
|
||||
|
||||
|
|
@ -914,7 +911,7 @@ RADEONSetupImageTexturedVideo(ScreenPtr pScreen)
|
|||
|
||||
/* gotta uninit this someplace, XXX: shouldn't be necessary for textured */
|
||||
REGION_NULL(pScreen, &pPriv->clip);
|
||||
adapt->pPortPrivates[i].ptr = (pointer) (pPriv);
|
||||
adapt->pPortPrivates[i].ptr = (void*) (pPriv);
|
||||
}
|
||||
|
||||
if (IS_R500_3D || IS_R300_3D)
|
||||
|
|
|
|||
|
|
@ -2384,7 +2384,7 @@ R500PrepareTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
|
|||
if (pPriv->bicubic_enabled)
|
||||
radeon_cs_space_add_persistent_bo(info->cs, info->bicubic_bo,
|
||||
RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0);
|
||||
|
||||
|
||||
driver_priv = exaGetPixmapDriverPrivate(pPixmap);
|
||||
radeon_cs_space_add_persistent_bo(info->cs, driver_priv->bo->bo.radeon, 0,
|
||||
RADEON_GEM_DOMAIN_VRAM);
|
||||
|
|
|
|||
|
|
@ -24,9 +24,7 @@
|
|||
* Dave Airlie <airlied@redhat.com>
|
||||
*
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include "radeon.h"
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ radeon_vbo_space(ScrnInfoPtr pScrn,
|
|||
radeon_vbo_check(pScrn, vbo, vert_size);
|
||||
|
||||
vbo->vb_op_vert_size = vert_size;
|
||||
vb = (pointer)((char *)vbo->vb_bo->ptr + vbo->vb_offset);
|
||||
vb = (void*)((char *)vbo->vb_bo->ptr + vbo->vb_offset);
|
||||
return vb;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
@ -18,12 +15,7 @@
|
|||
#include "dixstruct.h"
|
||||
|
||||
/* DPMS */
|
||||
#ifdef HAVE_XEXTPROTO_71
|
||||
#include <X11/extensions/dpmsconst.h>
|
||||
#else
|
||||
#define DPMS_SERVER
|
||||
#include <X11/extensions/dpms.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/Xv.h>
|
||||
#include "fourcc.h"
|
||||
|
|
@ -253,7 +245,7 @@ RADEONCopyMungedData(
|
|||
w /= 2;
|
||||
|
||||
for( j = 0; j < h; j++ ) {
|
||||
dst = (pointer)dst1;
|
||||
dst = (void*)dst1;
|
||||
s1 = src1; s2 = src2; s3 = src3;
|
||||
i = w;
|
||||
while( i > 4 ) {
|
||||
|
|
@ -269,12 +261,12 @@ RADEONCopyMungedData(
|
|||
dst++; s2++; s3++;
|
||||
s1 += 2;
|
||||
}
|
||||
|
||||
|
||||
dst1 += dstPitch;
|
||||
src1 += srcPitch;
|
||||
if( j & 1 ) {
|
||||
src2 += srcPitch2;
|
||||
src3 += srcPitch2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
#define __RADEON_VIDEO_H__
|
||||
|
||||
#include "xf86i2c.h"
|
||||
#include "i2c_def.h"
|
||||
|
||||
#include "xf86Crtc.h"
|
||||
|
||||
#include "bicubic_table.h"
|
||||
|
|
|
|||
|
|
@ -24,14 +24,10 @@
|
|||
* Based on vl_hwmc.c from xf86-video-nouveau
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <xf86.h>
|
||||
#include "radeon_video.h"
|
||||
#include "compat-api.h"
|
||||
|
||||
#include <X11/extensions/Xv.h>
|
||||
#include <X11/extensions/XvMC.h>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Intended to work with a list sentinel which is created as an empty
|
||||
* list. Insert & delete are O(1).
|
||||
*
|
||||
*
|
||||
* \author
|
||||
* (C) 1997, Keith Whitwell
|
||||
*/
|
||||
|
|
@ -154,19 +154,19 @@ do { \
|
|||
|
||||
/**
|
||||
* Test whether element is at end of the list.
|
||||
*
|
||||
*
|
||||
* \param list list.
|
||||
* \param elem element.
|
||||
*
|
||||
*
|
||||
* \return non-zero if element is at end of list, or zero otherwise.
|
||||
*/
|
||||
#define at_end(list, elem) ((elem) == (list))
|
||||
|
||||
/**
|
||||
* Test if a list is empty.
|
||||
*
|
||||
*
|
||||
* \param list list.
|
||||
*
|
||||
*
|
||||
* \return non-zero if list empty, or zero otherwise.
|
||||
*/
|
||||
#define is_empty_list(list) ((list)->next == (list))
|
||||
|
|
@ -188,7 +188,7 @@ do { \
|
|||
*
|
||||
* Same as #foreach but lets you unlink the current value during a list
|
||||
* traversal. Useful for freeing a list, element by element.
|
||||
*
|
||||
*
|
||||
* \param ptr pointer to the current element.
|
||||
* \param t temporary pointer.
|
||||
* \param list list.
|
||||
|
|
|
|||
Loading…
Reference in a new issue