Compare commits

...
Sign in to create a new pull request.
Author SHA1 Message Date
Enrico Weigelt, metux IT consult
e21b88202c configure.ac: re-add AC_USE_SYSTEM_EXTENSIONS
The driver uses asprintf() which requires _GNU_SOURCE. With GCC14's
stricter implicit function declaration handling, this causes a build
failure. Re-add the macro to fix the build.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-09-04 18:22:57 +02:00
Enrico Weigelt, metux IT consult
a0f28c39cf ci: bump action-build-driver to v0.4.0 2026-09-04 17:23:11 +02:00
Enrico Weigelt, metux IT consult
83098eccd4 configure.ac: replace deprecated AC_PROG_LIBTOOL by LT_INIT
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-04-21 18:20:59 +02:00
Enrico Weigelt, metux IT consult
e192d6a874 release 25.0.1
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-12 19:46:09 +01:00
Enrico Weigelt, metux IT consult
1aeb21b2b6 drop including obsolete i2c_def.h
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-12 19:19:09 +01:00
Enrico Weigelt, metux IT consult
03c42577c9 replace obsolete "pointer" typedef by plain void*
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-05 17:45:08 +01:00
Enrico Weigelt, metux IT consult
99a457a8b7 drop XF86_CRTC_VERSION check
dont need support for ancient Xserver versions

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-02 17:25:36 +01:00
Enrico Weigelt, metux IT consult
23bd30c24a drop old pre NOTIFY_FD code pathes
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-02 17:18:54 +01:00
Enrico Weigelt, metux IT consult
fa274a36dc drop obsolete compat-api.h
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 13:11:26 +01:00
Enrico Weigelt, metux IT consult
48b7dcef61 replace BLOCKHANDLER_ARGS_DECL and BLOCKHANDLER_ARGS
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 13:09:58 +01:00
Enrico Weigelt, metux IT consult
5a993f2d85 drop compat for old video driver ABI
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 13:08:29 +01:00
Enrico Weigelt, metux IT consult
a33a63e017 drop unused byteswap functions
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 11:10:02 +01:00
Enrico Weigelt, metux IT consult
d4b125e2b1 configure.ac: drop obsolete AC_SYS_LARGEFILE
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 11:05:24 +01:00
Enrico Weigelt, metux IT consult
1acf513289 .github: add NetBSD build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-29 17:10:26 +01:00
Enrico Weigelt, metux IT consult
4d68bbc79f .github: add freebsd and dragonfly build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-28 14:21:49 +01:00
Enrico Weigelt, metux IT consult
7d7d039511 .github: use new common driver build actions
Using the new driver build actions in X11Libre/actions-build-driver repo,
instead of having lots of duplicated pipeline and script in all the
individual driver repos.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-23 10:01:15 +01:00
Enrico Weigelt, metux IT consult
a3e6ef9f90 configure.ac: fix missing comma in AC_INIT() call
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 18:34:10 +01:00
Enrico Weigelt, metux IT consult
5b12c2cfda configure.ac: increase minimum xserver version to 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 16:04:28 +01:00
Enrico Weigelt, metux IT consult
e38a234218 release 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 18:51:27 +01:00
Enrico Weigelt, metux IT consult
75f76a5712 configure.ac: formatting fixes
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 18:51:07 +01:00
Enrico Weigelt, metux IT consult
ce106e93d3 configure.ac: replace DRIVER_NAME symbol by actual name
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 13:08:26 +01:00
Enrico Weigelt, metux IT consult
ce619630ed drop support for ancient pre-7.1 xextproto
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 12:01:59 +01:00
Enrico Weigelt, metux IT consult
11d21641a2 drop obsolete .editorconfig
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 11:52:27 +01:00
Enrico Weigelt, metux IT consult
729fc33efd drop obsolte .dir-locals.el
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 11:52:13 +01:00
Enrico Weigelt, metux IT consult
24a3cfbd29 drop obsolete .gitlab-ci.yml
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 11:52:02 +01:00
Enrico Weigelt, metux IT consult
9d59f3e5c5 drop obsolete HAVE_CONFIG_H
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 19:31:25 +01:00
Enrico Weigelt, metux IT consult
62b869855e man: replace Xorg by XLibre
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 13:55:41 +01:00
Enrico Weigelt, metux IT consult
6b81536af9 README.md: fix URLs
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 13:55:33 +01:00
Alan Coopersmith
3c9211e696 Strip trailing whitespace from source files
Performed with: `git ls-files | xargs perl -i -p -e 's{[ \t]+$}{}'`

`git diff -w` & `git diff -b` show no diffs from this change

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/-/merge_requests/32>
2025-12-15 15:36:42 +01:00
Enrico Weigelt, metux IT consult
7e5ff32ae9 release 22.0.1
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 12:09:52 +01:00
Enrico Weigelt, metux IT consult
87d2714553 configure.ac: fix issue tracker URL and package name
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 12:08:13 +01:00
Enrico Weigelt, metux IT consult
bcf05aee66 dont check for HAS_DIRTYTRACKING_ROTATION anymore
It's always defined since our minimal xserver version 1.18.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-08 16:04:16 +01:00
Enrico Weigelt, metux IT consult
6da5a33d54 bump minimal xorg version to 1.18
1.18 was released a decade ago, so it seems reasonable stop supporting
older ones.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-08 16:04:16 +01:00
Enrico Weigelt, metux IT consult
9c57a0cdd4 replace pict_f_transform by pixman_f_transform
pict_f_transform is deprecated and just an alias to pixman_f_transform.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-21 16:40:33 +01:00
Enrico Weigelt, metux IT consult
e237014dc6 don't crash Xserver on malloc() failure anymore (XNFasprintf)
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-20 11:18:43 +01:00
b-aaz
45f03ac5d8 Load kernel modules before using DRM on DFBSD.
On DragonFlyBSD the appropriate kernel drivers need to be loaded before
using DRM, so I added a section that loads them before calling DRM
functions.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-11-06 15:57:38 +01:00
Enrico Weigelt, metux IT consult
b58ebdbec2 drmmode_display: fix missing include of dpmsconst.h
Don't rely on some Xserver SDK header is silently doing it
by accident.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-24 14:57:42 +02:00
Enrico Weigelt, metux IT consult
fe76d2eda9 replace PICT_FORMAT_RGB() by PIXMAN_FORMAT_RGB()
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
0cc8ece58b replace PICT_FORMAT_A() by PIXMAN_FORMAT_A()
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
a867f5e6d6 replace PICT_a8 by PIXMAN_a8
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
0af57eb200 replace PICT_x1r5g5b5 by PIXMAN_x1r5g5b5
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
6ea8d8a5b1 replace PICT_a1r5g5b5 by PIXMAN_a1r5g5b5
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
c19edfdb11 replace PICT_r5g6b5 by PIXMAN_r5g6b5
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
235552fc32 replace PICT_b8g8r8x8 by PIXMAN_b8g8r8x8
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
fff6cf2b4b replace PICT_b8g8r8a8 by PIXMAN_b8g8r8a8
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
41465c77a8 replace PICT_x8b8g8r8 by PIXMAN_x8b8g8r8
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
d21e4e2f73 replace PICT_a8b8g8r8 by PIXMAN_a8b8g8r8:
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
495f3d3689 replace PICT_x8r8g8b8 by PIXMAN_x8r8g8b8
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
df771ae3a0 replace PICT_a8r8g8b8 by PIXMAN_a8r8g8b8
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
a9c6061d7b replace PICT_x2b10g10r10 by PIXMAN_x2b10g10r10
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
19ae99e1b7 replace PICT_a2b10g10r10 by PIXMAN_a2b10g10r10
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
8e322df5aa replace PICT_x2r10g10b10 by PIXMAM_x2r10g10b10
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
63e18adf5a replace PICT_a2r10g10b10 by PIXMAN_a2r10g10b10
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 13:35:47 +02:00
Enrico Weigelt, metux IT consult
69eb546285 use XNFcallocarray() instead of xnfcalloc macro
xnfcalloc is just an alias for XNFcallocarray() that doesn't seem to serve
any practical purpose, so it can go away once all drivers stopped using it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-04 11:05:00 +02:00
Enrico Weigelt, metux IT consult
bdafcc009a use XNFalloc() instead of xnfalloc
xnfalloc is just an alias for XNFalloc() that doesn't seem to serve
any practical purpose, so it can go away once all drivers stopped using it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-04 11:05:00 +02:00
Enrico Weigelt, metux IT consult
445749d198 drop support for xserver version < 1.20.99
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-04 10:37:13 +02:00
Enrico Weigelt, metux IT consult
c209a55f0e drop support for xserver version < 1.19.99.1
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-04 10:37:13 +02:00
Enrico Weigelt, metux IT consult
84bc1933e7 drop support for xserver version < 1.18.3
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-04 10:37:13 +02:00
Enrico Weigelt, metux IT consult
5e1ad66f0d drop support for xserver < 1.17.99.901
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-04 10:37:13 +02:00
Enrico Weigelt, metux IT consult
ca1779c468 drop support for xserver < 1.16.99.901
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-04 10:37:13 +02:00
Enrico Weigelt, metux IT consult
f0f7efa606 drop support for Xserver < 1.15.99
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-04 10:37:13 +02:00
Enrico Weigelt, metux IT consult
dd0c9a6034 drop support for xserver < 1.14.99.2
No need to support really ancient Xserver versions - the lowest supported
one shall be 25.0.0.0.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-04 10:37:13 +02:00
Enrico Weigelt, metux IT consult
8528cb6146 radeon_glamor_wrappers: fix missing include of fbpict.h
We're calling fbComposite() and fbAddTraps() here, which are
defined in <fbpict.h>.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-30 13:48:31 +02:00
Enrico Weigelt, metux IT consult
648188b897 radeon_glamor_wrappers: fix missing include of fb.h
We're calling fbPixmapToRegion() here, which is defined in fb.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-30 10:41:18 +02:00
Enrico Weigelt, metux IT consult
e1557e2ab2 radeon_kms: fix missing include of "fb.h"
We're calling fbPictureInit() here, which is defined in fb.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-30 10:41:18 +02:00
Enrico Weigelt, metux IT consult
31f33b3503 configure: fix broken xserver version detection
Back a decade ago, somebody obviously idn't know how to check for xserver
version and abused a quite unrelated exported symbol instead. Since that
symbol isn't exported anymore (because no driver was using it), this black
magic now fails.

We're not trying to support more than a decade old Xservers, so there's
no point in this check at all, just drop it.

Fixes: ae92d1765f
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-29 10:01:04 +02:00
b-aaz
a1af1a3665 configure: Automatically detect the default xorg-module-dir.
The module directory has changed to a per ABI folder in the xlibre-xserver.
Now the default value of `xorg-module-dir` will be detected from the `moduledir` variable in xorg-server.pc.

Signed-off-by: b-aaz <b-aazbsd.proton.me>
2025-07-24 18:03:37 +02:00
Enrico Weigelt, metux IT consult
4d63acb2b5 .github: add CI pipeline
This pipeline builds the driver against the latest Xserver stable
release as well as current master.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-24 17:23:59 +02:00
Oleh Nykyforchyn
aefc66b389 radeon_kms.c: do not flush glamor operations for a closed screen
The function radeon_cs_flus_indirect() attempts to flush radeon
operations, which have already been flushed by glamor_close_screen().
This results in a segfault.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-07-23 17:20:17 +02:00
Oleh Nykyforchyn
1fa0787cd4 radeon_glamor.c: remove a legacy glamor function support
The function glamor_egl_destroy_textured_pixmap() is absent
in glamor in recent X servers.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-07-23 17:20:17 +02:00
Oleh Nykyforchyn
f35c980403 radeon_glamor.c: do not destroy a pixmap twice
In the function radeon_glamor_destroy_pixmap a check
if (screen->DestroyPixmap(pixmap)) was erroneously used instead of
if (screen->DestroyPixmap), which resulted in destroying a pixmap
twice and hence in a segfault.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-07-23 17:20:17 +02:00
Joseph Crowell
1636af6405 fix: undefined symbol: glamor_egl_init_textured_pixmap
The function just returns true now so there is no point to this code which fails to find the function symbol any way.
2025-07-21 14:22:44 +02:00
callmetango
f35a6c771b .github: Add issue forms
Add the following forms for issue creation:

* Bug report
* Feature request
* Code change
* Documentation update
* Organizational task

* add issue type selection page on "New Issue" call
* mention Github Discussions and the mailing list where appropriate

Part-of: X11Libre/misc#156
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-07 17:07:08 +02:00
65 changed files with 743 additions and 1243 deletions

View file

@ -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))
)

View file

@ -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

View file

@ -0,0 +1,65 @@
name: 🐞 Bug report
description: Create a report to help us improve
labels: [bug, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to help everyone identify and fix the bug. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: dropdown
id: affected-version
attributes:
label: Select the version
options:
- 22.0.0.1
- Git master branch
- other or don't know
default: 1
validations:
required: true
- type: textarea
id: description
attributes:
label: Describe your issue
placeholder: When I did X then Y happened.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
placeholder: |
1. Start ...
2. Do this
3. Do that
validations:
required: true
- type: textarea
id: expected
attributes:
label: What did you expect?
placeholder: I expected this to happen.
- type: textarea
id: environment
attributes:
label: Additional Information
description: |
Additional information you want to provide such as logs, system info, environment, screenshots, etc.
placeholder: |
Add any other context about the bug here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-video-ati/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for reporting this issue! We will get back to you as soon as possible.

View file

@ -0,0 +1,49 @@
name: ✨ Feature request
description: Suggest a feature for this software
labels: [enhancement, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to properly describe the new software feature you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: "Describe the feature"
placeholder: A thing in X that allows to do Y.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Doing Y is needed for Z.
validations:
required: true
- type: textarea
id: alternative
attributes:
label: "What are the alternatives?"
placeholder: We could do A or B instead.
- type: textarea
id: context
attributes:
label: Additional context
description: Additional information you want to provide such as references to related issues or protocols, the implications on existing use cases, etc.
placeholder: |
Add any other context about the feature request here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-video-ati/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for your suggestion! Let's see together if it can be done.

View file

@ -0,0 +1,49 @@
name: 🔧 Code cleanup
description: Level up the source code
labels: [code-cleanup, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to properly describe the code cleanup you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: "Describe the cleanup"
placeholder: C in X needs to be changed into D.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Having D is needed for E.
validations:
required: true
- type: textarea
id: alternative
attributes:
label: "What are the alternatives?"
placeholder: We could do A or B instead.
- type: textarea
id: context
attributes:
label: Additional context
description: Additional information you want to provide such as implications on existing code, how to ensure API/ABI stability, which tests are needed or to be run, related issues, etc.
placeholder: |
Add any other context about the cleanup here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-video-ati/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for looking at the source code! Let's see together how it can be improved.

View file

@ -0,0 +1,38 @@
name: 🔖 Documentation update
description: Make your mark for better documentation
labels: [documentation, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to help others understand our software. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: Describe the update
placeholder: These things need to be better documented.
validations:
required: true
- type: textarea
id: environment
attributes:
label: Additional Information
description: Additional information you want to provide such as tickets related to changes in the software, affected files, screenshots, etc.
placeholder: |
Add any other context about the update here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-video-ati/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for requesting this update! We will get back to you as soon as possible.

43
.github/ISSUE_TEMPLATE/05-org-task.yml vendored Normal file
View file

@ -0,0 +1,43 @@
name: ✅ Organizational task
description: Create a task for project organization
labels: [needs-triage, organization]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to get organizational things done. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: Describe the task
placeholder: These things need to be done.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Doing Y is needed for Z.
- type: textarea
id: environment
attributes:
label: Additional Information
description: Additional information you want to provide such as the context for bigger tasks, the implicatons on existing workflows, related issues, etc.
placeholder: |
Add any other context about the task here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-video-ati/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for adding this task! We will get back to you as soon as possible.

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: XLibre Community Support
url: https://github.com/orgs/X11Libre/discussions
about: Please ask and answer questions here.
- name: Mailing List
url: https://www.freelists.org/list/xlibre
about: You can join the discussions on our mailing list.

58
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,58 @@
permissions:
contents: write
on:
push:
pull_request:
jobs:
ubuntu:
strategy:
matrix:
xserver-version: [ master, xlibre-xserver-25.1.0, xlibre-xserver-25.0.0.18 ]
runs-on: ubuntu-latest
steps:
- uses: X11Libre/action-build-driver/target/ubuntu@v0.4.0
with:
xserver-version: ${{ matrix.xserver-version }}
freebsd:
strategy:
matrix:
xserver-version: [ master, xlibre-xserver-25.1.0, xlibre-xserver-25.0.0.18 ]
runs-on: ubuntu-latest
steps:
- uses: X11Libre/action-build-driver/target/freebsd@v0.4.0
with:
xserver-version: ${{ matrix.xserver-version }}
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
steps:
- 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
View file

@ -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'
#
#

View file

@ -1,136 +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.16", "1.17", "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
build-noglamor:
extends:
- .default_build
script:
- ./autogen.sh --disable-glamor
- make -j${FDO_CI_CONCURRENT:-4} check V=1
parallel:
matrix:
- XSERVER_VERSION: ["1.13", "1.14", "1.15"]

View file

@ -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

View file

@ -18,6 +18,10 @@
# 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.
# During distcheck, system locations (as provided by pkg-config) may
# not be writable; provide instead relative locations.
DISTCHECK_CONFIGURE_FLAGS = --with-xorg-module-dir='$${libdir}/xorg/modules'
SUBDIRS = src man conf
MAINTAINERCLEANFILES = ChangeLog INSTALL

View file

@ -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).

View file

@ -19,6 +19,4 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
if HAS_XORG_CONF_DIR
dist_config_DATA = 10-radeon.conf
endif

View file

@ -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
@ -57,11 +57,12 @@ fi
AH_TOP([#include "xorg-server.h"])
# Define a configure option for an alternate module directory
PKG_PROG_PKG_CONFIG([0.25])
AC_ARG_WITH(xorg-module-dir,
AS_HELP_STRING([--with-xorg-module-dir=DIR],
[Default xorg module directory [[default=$libdir/xorg/modules]]]),
[Default xorg module directory]),
[moduledir="$withval"],
[moduledir="$libdir/xorg/modules"])
[moduledir=`$PKG_CONFIG --variable=moduledir xorg-server`])
# Store the list of server defined optional extensions in REQUIRED_MODULES
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
@ -74,17 +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.13 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" ])
# Section "OutputClass" is only supported as of xserver 1.16
PKG_CHECK_EXISTS([xorg-server >= 1.16],
[sysconfigdir=`$PKG_CONFIG --variable=sysconfigdir xorg-server`],
[sysconfigdir=""])
AM_CONDITIONAL(HAS_XORG_CONF_DIR, [test "x$sysconfigdir" != "x"])
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,
@ -133,12 +125,6 @@ if test "x$GLAMOR" != "xno"; then
[#include "xorg-server.h"
#include "glamor.h"])
AC_CHECK_DECL(glamor_egl_destroy_textured_pixmap,
[AC_DEFINE(HAVE_GLAMOR_EGL_DESTROY_TEXTURED_PIXMAP, 1,
[Have glamor_egl_destroy_textured_pixmap API])], [],
[#include "xorg-server.h"
#include "glamor.h"])
AC_CHECK_DECL(glamor_finish,
[AC_DEFINE(HAVE_GLAMOR_FINISH, 1,
[Have glamor_finish API])],
@ -160,44 +146,12 @@ else
fi
AM_CONDITIONAL(GLAMOR, test x$GLAMOR != xno)
AC_CHECK_DECL(RegionDuplicate,
[AC_DEFINE(HAVE_REGIONDUPLICATE, 1,
[Have RegionDuplicate API])], [],
[#include <xorg-server.h>
#include <regionstr.h>])
AC_CHECK_DECL(fbGlyphs,
[AC_DEFINE(HAVE_FBGLYPHS, 1, [Have fbGlyphs API])], [],
[#include <X11/Xmd.h>
#include <X11/Xfuncproto.h>
#include <X11/extensions/renderproto.h>
#include <xorg-server.h>
#include <picture.h>
#include <glyphstr.h>
#include <fbpict.h>])
AC_CHECK_DECL(xf86CursorResetCursor,
[AC_DEFINE(HAVE_XF86_CURSOR_RESET_CURSOR, 1,
[Have xf86CursorResetCursor API])], [],
[#include <xorg-server.h>
#include <xf86Cursor.h>])
AC_CHECK_HEADERS([misyncshm.h], [], [],
[#include <X11/Xdefs.h>
#include <X11/Xfuncproto.h>
#include <xorg-server.h>
#include <screenint.h>])
AC_CHECK_HEADERS([present.h], [], [],
[#include <X11/Xmd.h>
#include <X11/Xproto.h>
#include "xorg-server.h"
#include <X11/X.h>])
AC_CHECK_HEADERS([dri3.h], [], [],
[#include <X11/Xmd.h>
#include <xorg-server.h>])
CPPFLAGS="$SAVE_CPPFLAGS"
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
@ -205,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
@ -242,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
@ -252,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

View file

@ -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)

View file

@ -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__),

View file

@ -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

View file

@ -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 \

View file

@ -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;
@ -203,11 +200,14 @@ ati_gdev_subdriver(pointer options)
}
if (chip_family == ATI_CHIP_FAMILY_Radeon) {
char *busid;
char *busid = NULL;
XNFasprintf(&busid, "pci:%04x:%02x:%02x.%d",
if (asprintf(&busid, "pci:%04x:%02x:%02x.%d",
device->domain, device->bus, device->dev,
device->func);
device->func) == -1) {
ErrorF("ati: malloc() failed\n");
continue;
}
if (busid) {
int fd = drmOpen(NULL, busid);

View file

@ -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___ */

View file

@ -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 */

View file

@ -31,7 +31,7 @@
enum region_type {
REGION_MEM,
REGION_IO
REGION_IO
};
typedef struct pci_device *pciVideoPtr;

View file

@ -23,9 +23,7 @@
* Authors: Alex Deucher <alexander.deucher@amd.com>
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "xf86.h"

View file

@ -23,10 +23,7 @@
* Author: Alex Deucher <alexander.deucher@amd.com>
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "xf86.h"

View file

@ -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

View file

@ -24,10 +24,7 @@
* Dave Airlie <airlied@redhat.com>
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <errno.h>
#include <sys/ioctl.h>
@ -44,27 +41,13 @@
#include "radeon_bo_helper.h"
#include "radeon_glamor.h"
#include "radeon_reg.h"
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,19,99,1,0)
#include <dri.h>
#endif
#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);
@ -434,9 +417,7 @@ destroy_pixmap_for_fbcon(ScrnInfoPtr pScrn)
* avoid issues due to a GEM handle lifetime conflict between us and
* Mesa
*/
if (info->use_glamor &&
(info->ChipFamily >= CHIP_FAMILY_CAYMAN ||
xorgGetVersion() >= XORG_VERSION_NUMERIC(1,19,99,1,0)))
if (info->use_glamor)
return;
if (info->fbcon_pixmap)
@ -572,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);
}
@ -617,20 +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
/* HW cursor not supported with RandR 1.4 multihead up to 1.18.99.901 */
if (xorgGetVersion() <= XORG_VERSION_NUMERIC(1,18,99,901,0) &&
!xorg_list_is_empty(&crtc->scrn->pScreen->pixmap_dirty_list))
return FALSE;
return TRUE;
}
@ -662,22 +629,12 @@ 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)
{
Bool ret;
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,903,0)
crtc->driverIsPerformingTransform = XF86DriverTransformOutput;
#else
crtc->driverIsPerformingTransform = !crtc->transformPresent &&
(crtc->rotation & 0xf) == RR_Rotate_0;
#endif
ret = xf86CrtcRotate(crtc);
@ -743,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,
@ -1009,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)
@ -1067,14 +981,6 @@ drmmode_cursor_pixel(xf86CrtcPtr crtc, uint32_t *argb, Bool *premultiplied,
int i;
if (premultiplied) {
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 18, 4, 0, 0)
if (alpha == 0 && (*argb & 0xffffff) != 0) {
/* Doesn't look like premultiplied alpha */
*premultiplied = FALSE;
return FALSE;
}
#endif
if (!(*apply_gamma))
return TRUE;
@ -1138,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;
@ -1182,8 +1065,6 @@ retry:
}
}
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,903,0)
static Bool drmmode_load_cursor_argb_check(xf86CrtcPtr crtc, CARD32 * image)
{
if (!drmmode_can_use_hw_cursor(crtc))
@ -1193,8 +1074,6 @@ static Bool drmmode_load_cursor_argb_check(xf86CrtcPtr crtc, CARD32 * image)
return TRUE;
}
#endif
static void
drmmode_hide_cursor (xf86CrtcPtr crtc)
{
@ -1386,14 +1265,9 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
PixmapStartDirtyTracking(&ppix->drawable,
drmmode_crtc->scanout[scanout_id].pixmap,
0, 0, 0, 0, RR_Rotate_0);
#elif defined(HAS_DIRTYTRACKING_ROTATION)
#else
PixmapStartDirtyTracking(ppix, drmmode_crtc->scanout[scanout_id].pixmap,
0, 0, 0, 0, RR_Rotate_0);
#elif defined(HAS_DIRTYTRACKING2)
PixmapStartDirtyTracking2(ppix, drmmode_crtc->scanout[scanout_id].pixmap,
0, 0, 0, 0);
#else
PixmapStartDirtyTracking(ppix, drmmode_crtc->scanout[scanout_id].pixmap, 0, 0);
#endif
return TRUE;
}
@ -1406,10 +1280,7 @@ static xf86CrtcFuncsRec drmmode_crtc_funcs = {
.show_cursor = drmmode_show_cursor,
.hide_cursor = drmmode_hide_cursor,
.load_cursor_argb = drmmode_load_cursor_argb,
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,903,0)
.load_cursor_argb_check = drmmode_load_cursor_argb_check,
#endif
.gamma_set = drmmode_crtc_gamma_set,
.shadow_create = drmmode_crtc_shadow_create,
.shadow_allocate = drmmode_crtc_shadow_allocate,
@ -1456,7 +1327,7 @@ drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_res
if (!crtc)
return 0;
drmmode_crtc = xnfcalloc(sizeof(drmmode_crtc_private_rec), 1);
drmmode_crtc = XNFcallocarray(sizeof(drmmode_crtc_private_rec), 1);
drmmode_crtc->mode_crtc = drmModeGetCrtc(pRADEONEnt->fd, mode_res->crtcs[num]);
drmmode_crtc->drmmode = drmmode;
drmmode_crtc->dpms_mode = DPMSModeOff;
@ -1579,7 +1450,6 @@ drmmode_output_mode_valid(xf86OutputPtr output, DisplayModePtr pModes)
static void
drmmode_output_attach_tile(xf86OutputPtr output)
{
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1, 17, 99, 901, 0)
drmmode_output_private_ptr drmmode_output = output->driver_private;
drmModeConnectorPtr koutput = drmmode_output->mode_output;
RADEONEntPtr pRADEONEnt = RADEONEntPriv(output->scrn);
@ -1618,7 +1488,6 @@ drmmode_output_attach_tile(xf86OutputPtr output)
set = &tile_info;
}
xf86OutputSetTile(output, set);
#endif
}
static int
@ -1697,7 +1566,7 @@ drmmode_output_get_modes(xf86OutputPtr output)
/* modes should already be available */
for (i = 0; i < koutput->count_modes; i++) {
Mode = xnfalloc(sizeof(DisplayModeRec));
Mode = XNFalloc(sizeof(DisplayModeRec));
drmmode_ConvertFromKMode(output->scrn, &koutput->modes[i], Mode);
Modes = xf86ModesAdd(Modes, Mode);
@ -1713,9 +1582,7 @@ drmmode_output_destroy(xf86OutputPtr output)
int i;
drmModeFreePropertyBlob(drmmode_output->edid_blob);
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1, 17, 99, 901, 0)
drmModeFreePropertyBlob(drmmode_output->tile_blob);
#endif
for (i = 0; i < drmmode_output->num_props; i++) {
drmModeFreeProperty(drmmode_output->props[i].mode_prop);
@ -1811,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]);
@ -2131,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;
@ -2144,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) {
@ -2180,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);
@ -2222,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;
@ -2269,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)
@ -2724,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)
@ -2879,7 +2724,11 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
drmmode_clones_init(pScrn, drmmode, mode_res);
bus_id_string = DRICreatePCIBusID(info->PciInfo);
XNFasprintf(&provider_name, "%s @ %s", pScrn->chipset, bus_id_string);
if (asprintf(&provider_name, "%s @ %s", pScrn->chipset, bus_id_string) == -1) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "malloc() failed\n");
return FALSE;
}
free(bus_id_string);
xf86ProviderSetup(pScrn, NULL, provider_name);
free(provider_name);
@ -2902,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
@ -2932,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;
@ -3048,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);
@ -3327,12 +3162,7 @@ restart_destroy:
drmmode_validate_leases(scrn);
if (changed) {
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,2,0)
RRSetChanged(xf86ScrnToScreen(scrn));
#else
rrScrPrivPtr rrScrPriv = rrGetScrPriv(scrn->pScreen);
rrScrPriv->changed = TRUE;
#endif
RRTellChanged(xf86ScrnToScreen(scrn));
}

View file

@ -27,6 +27,8 @@
#ifndef DRMMODE_DISPLAY_H
#define DRMMODE_DISPLAY_H
#include <X11/extensions/dpmsconst.h>
#include "xf86drmMode.h"
#ifdef HAVE_LIBUDEV
#include "libudev.h"
@ -142,9 +144,7 @@ typedef struct {
drmModeConnectorPtr mode_output;
drmModeEncoderPtr *mode_encoders;
drmModePropertyBlobPtr edid_blob;
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1, 17, 99, 901, 0)
drmModePropertyBlobPtr tile_blob;
#endif
int dpms_enum_id;
int num_props;
drmmode_prop_ptr props;

View file

@ -23,9 +23,7 @@
* Authors: Alex Deucher <alexander.deucher@amd.com>
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "xf86.h"

View file

@ -23,10 +23,7 @@
* Author: Alex Deucher <alexander.deucher@amd.com>
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "xf86.h"
@ -668,20 +665,20 @@ struct formatinfo {
};
static struct formatinfo EVERGREENTexFormats[] = {
{PICT_a2r10g10b10, FMT_2_10_10_10},
{PICT_x2r10g10b10, FMT_2_10_10_10},
{PICT_a2b10g10r10, FMT_2_10_10_10},
{PICT_x2b10g10r10, FMT_2_10_10_10},
{PICT_a8r8g8b8, FMT_8_8_8_8},
{PICT_x8r8g8b8, FMT_8_8_8_8},
{PICT_a8b8g8r8, FMT_8_8_8_8},
{PICT_x8b8g8r8, FMT_8_8_8_8},
{PICT_b8g8r8a8, FMT_8_8_8_8},
{PICT_b8g8r8x8, FMT_8_8_8_8},
{PICT_r5g6b5, FMT_5_6_5},
{PICT_a1r5g5b5, FMT_1_5_5_5},
{PICT_x1r5g5b5, FMT_1_5_5_5},
{PICT_a8, FMT_8},
{PIXMAN_a2r10g10b10, FMT_2_10_10_10},
{PIXMAN_x2r10g10b10, FMT_2_10_10_10},
{PIXMAN_a2b10g10r10, FMT_2_10_10_10},
{PIXMAN_x2b10g10r10, FMT_2_10_10_10},
{PIXMAN_a8r8g8b8, FMT_8_8_8_8},
{PIXMAN_x8r8g8b8, FMT_8_8_8_8},
{PIXMAN_a8b8g8r8, FMT_8_8_8_8},
{PIXMAN_x8b8g8r8, FMT_8_8_8_8},
{PIXMAN_b8g8r8a8, FMT_8_8_8_8},
{PIXMAN_b8g8r8x8, FMT_8_8_8_8},
{PIXMAN_r5g6b5, FMT_5_6_5},
{PIXMAN_a1r5g5b5, FMT_1_5_5_5},
{PIXMAN_x1r5g5b5, FMT_1_5_5_5},
{PIXMAN_a8, FMT_8},
};
static uint32_t EVERGREENGetBlendCntl(int op, PicturePtr pMask, uint32_t dst_format)
@ -694,7 +691,7 @@ static uint32_t EVERGREENGetBlendCntl(int op, PicturePtr pMask, uint32_t dst_for
/* If there's no dst alpha channel, adjust the blend op so that we'll treat
* it as always 1.
*/
if (PICT_FORMAT_A(dst_format) == 0 && EVERGREENBlendOp[op].dst_alpha) {
if (PIXMAN_FORMAT_A(dst_format) == 0 && EVERGREENBlendOp[op].dst_alpha) {
if (sblend == (BLEND_DST_ALPHA << COLOR_SRCBLEND_shift))
sblend = (BLEND_ONE << COLOR_SRCBLEND_shift);
else if (sblend == (BLEND_ONE_MINUS_DST_ALPHA << COLOR_SRCBLEND_shift))
@ -727,28 +724,28 @@ static uint32_t EVERGREENGetBlendCntl(int op, PicturePtr pMask, uint32_t dst_for
static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format)
{
switch (pDstPicture->format) {
case PICT_a2r10g10b10:
case PICT_x2r10g10b10:
case PICT_a2b10g10r10:
case PICT_x2b10g10r10:
case PIXMAN_a2r10g10b10:
case PIXMAN_x2r10g10b10:
case PIXMAN_a2b10g10r10:
case PIXMAN_x2b10g10r10:
*dst_format = COLOR_2_10_10_10;
break;
case PICT_a8r8g8b8:
case PICT_x8r8g8b8:
case PICT_a8b8g8r8:
case PICT_x8b8g8r8:
case PICT_b8g8r8a8:
case PICT_b8g8r8x8:
case PIXMAN_a8r8g8b8:
case PIXMAN_x8r8g8b8:
case PIXMAN_a8b8g8r8:
case PIXMAN_x8b8g8r8:
case PIXMAN_b8g8r8a8:
case PIXMAN_b8g8r8x8:
*dst_format = COLOR_8_8_8_8;
break;
case PICT_r5g6b5:
case PIXMAN_r5g6b5:
*dst_format = COLOR_5_6_5;
break;
case PICT_a1r5g5b5:
case PICT_x1r5g5b5:
case PIXMAN_a1r5g5b5:
case PIXMAN_x1r5g5b5:
*dst_format = COLOR_1_5_5_5;
break;
case PICT_a8:
case PIXMAN_a8:
*dst_format = COLOR_8;
break;
default:
@ -787,8 +784,8 @@ static Bool EVERGREENCheckCompositeTexture(PicturePtr pPict,
* clipping.
*/
/* FIXME evergreen */
if (pPict->transform != 0 && repeatType == RepeatNone && PICT_FORMAT_A(pPict->format) == 0) {
if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PICT_FORMAT_A(pDstPict->format) == 0)))
if (pPict->transform != 0 && repeatType == RepeatNone && PIXMAN_FORMAT_A(pPict->format) == 0) {
if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PIXMAN_FORMAT_A(pDstPict->format) == 0)))
RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n"));
}
@ -901,50 +898,50 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix,
/* component swizzles */
switch (pPict->format) {
case PICT_a2r10g10b10:
case PICT_a1r5g5b5:
case PICT_a8r8g8b8:
case PIXMAN_a2r10g10b10:
case PIXMAN_a1r5g5b5:
case PIXMAN_a8r8g8b8:
pix_r = SQ_SEL_Z; /* R */
pix_g = SQ_SEL_Y; /* G */
pix_b = SQ_SEL_X; /* B */
pix_a = SQ_SEL_W; /* A */
break;
case PICT_a2b10g10r10:
case PICT_a8b8g8r8:
case PIXMAN_a2b10g10r10:
case PIXMAN_a8b8g8r8:
pix_r = SQ_SEL_X; /* R */
pix_g = SQ_SEL_Y; /* G */
pix_b = SQ_SEL_Z; /* B */
pix_a = SQ_SEL_W; /* A */
break;
case PICT_x2b10g10r10:
case PICT_x8b8g8r8:
case PIXMAN_x2b10g10r10:
case PIXMAN_x8b8g8r8:
pix_r = SQ_SEL_X; /* R */
pix_g = SQ_SEL_Y; /* G */
pix_b = SQ_SEL_Z; /* B */
pix_a = SQ_SEL_1; /* A */
break;
case PICT_b8g8r8a8:
case PIXMAN_b8g8r8a8:
pix_r = SQ_SEL_Y; /* R */
pix_g = SQ_SEL_Z; /* G */
pix_b = SQ_SEL_W; /* B */
pix_a = SQ_SEL_X; /* A */
break;
case PICT_b8g8r8x8:
case PIXMAN_b8g8r8x8:
pix_r = SQ_SEL_Y; /* R */
pix_g = SQ_SEL_Z; /* G */
pix_b = SQ_SEL_W; /* B */
pix_a = SQ_SEL_1; /* A */
break;
case PICT_x2r10g10b10:
case PICT_x1r5g5b5:
case PICT_x8r8g8b8:
case PICT_r5g6b5:
case PIXMAN_x2r10g10b10:
case PIXMAN_x1r5g5b5:
case PIXMAN_x8r8g8b8:
case PIXMAN_r5g6b5:
pix_r = SQ_SEL_Z; /* R */
pix_g = SQ_SEL_Y; /* G */
pix_b = SQ_SEL_X; /* B */
pix_a = SQ_SEL_1; /* A */
break;
case PICT_a8:
case PIXMAN_a8:
pix_r = SQ_SEL_0; /* R */
pix_g = SQ_SEL_0; /* G */
pix_b = SQ_SEL_0; /* B */
@ -956,18 +953,18 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix,
if (unit == 0) {
if (!accel_state->msk_pic) {
if (PICT_FORMAT_RGB(pPict->format) == 0) {
if (PIXMAN_FORMAT_RGB(pPict->format) == 0) {
pix_r = SQ_SEL_0;
pix_g = SQ_SEL_0;
pix_b = SQ_SEL_0;
}
if (PICT_FORMAT_A(pPict->format) == 0)
if (PIXMAN_FORMAT_A(pPict->format) == 0)
pix_a = SQ_SEL_1;
} else {
if (accel_state->component_alpha) {
if (accel_state->src_alpha) {
if (PICT_FORMAT_A(pPict->format) == 0) {
if (PIXMAN_FORMAT_A(pPict->format) == 0) {
pix_r = SQ_SEL_1;
pix_g = SQ_SEL_1;
pix_b = SQ_SEL_1;
@ -978,26 +975,26 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix,
pix_b = pix_a;
}
} else {
if (PICT_FORMAT_A(pPict->format) == 0)
if (PIXMAN_FORMAT_A(pPict->format) == 0)
pix_a = SQ_SEL_1;
}
} else {
if (PICT_FORMAT_RGB(pPict->format) == 0) {
if (PIXMAN_FORMAT_RGB(pPict->format) == 0) {
pix_r = SQ_SEL_0;
pix_g = SQ_SEL_0;
pix_b = SQ_SEL_0;
}
if (PICT_FORMAT_A(pPict->format) == 0)
if (PIXMAN_FORMAT_A(pPict->format) == 0)
pix_a = SQ_SEL_1;
}
}
} else {
if (accel_state->component_alpha) {
if (PICT_FORMAT_A(pPict->format) == 0)
if (PIXMAN_FORMAT_A(pPict->format) == 0)
pix_a = SQ_SEL_1;
} else {
if (PICT_FORMAT_A(pPict->format) == 0) {
if (PIXMAN_FORMAT_A(pPict->format) == 0) {
pix_r = SQ_SEL_1;
pix_g = SQ_SEL_1;
pix_b = SQ_SEL_1;
@ -1165,46 +1162,46 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u
/* component swizzles */
switch (format) {
case PICT_a1r5g5b5:
case PICT_a8r8g8b8:
case PIXMAN_a1r5g5b5:
case PIXMAN_a8r8g8b8:
pix_r = zf; /* R */
pix_g = yf; /* G */
pix_b = xf; /* B */
pix_a = wf; /* A */
break;
case PICT_a8b8g8r8:
case PIXMAN_a8b8g8r8:
pix_r = xf; /* R */
pix_g = yf; /* G */
pix_b = zf; /* B */
pix_a = wf; /* A */
break;
case PICT_x8b8g8r8:
case PIXMAN_x8b8g8r8:
pix_r = xf; /* R */
pix_g = yf; /* G */
pix_b = zf; /* B */
pix_a = 1.0; /* A */
break;
case PICT_b8g8r8a8:
case PIXMAN_b8g8r8a8:
pix_r = yf; /* R */
pix_g = zf; /* G */
pix_b = wf; /* B */
pix_a = xf; /* A */
break;
case PICT_b8g8r8x8:
case PIXMAN_b8g8r8x8:
pix_r = yf; /* R */
pix_g = zf; /* G */
pix_b = wf; /* B */
pix_a = 1.0; /* A */
break;
case PICT_x1r5g5b5:
case PICT_x8r8g8b8:
case PICT_r5g6b5:
case PIXMAN_x1r5g5b5:
case PIXMAN_x8r8g8b8:
case PIXMAN_r5g6b5:
pix_r = zf; /* R */
pix_g = yf; /* G */
pix_b = xf; /* B */
pix_a = 1.0; /* A */
break;
case PICT_a8:
case PIXMAN_a8:
pix_r = 0.0; /* R */
pix_g = 0.0; /* G */
pix_b = 0.0; /* B */
@ -1216,13 +1213,13 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u
if (unit == 0) {
if (!accel_state->msk_pic) {
if (PICT_FORMAT_RGB(format) == 0) {
if (PIXMAN_FORMAT_RGB(format) == 0) {
pix_r = 0.0;
pix_g = 0.0;
pix_b = 0.0;
}
if (PICT_FORMAT_A(format) == 0)
if (PIXMAN_FORMAT_A(format) == 0)
pix_a = 1.0;
} else {
if (accel_state->component_alpha) {
@ -1232,7 +1229,7 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u
pix_b / pix_a, pix_a / pix_a };
evergreen_set_blend_color(pScrn, cblend);
if (PICT_FORMAT_A(format) == 0) {
if (PIXMAN_FORMAT_A(format) == 0) {
pix_r = 1.0;
pix_g = 1.0;
pix_b = 1.0;
@ -1243,26 +1240,26 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u
pix_b = pix_a;
}
} else {
if (PICT_FORMAT_A(format) == 0)
if (PIXMAN_FORMAT_A(format) == 0)
pix_a = 1.0;
}
} else {
if (PICT_FORMAT_RGB(format) == 0) {
if (PIXMAN_FORMAT_RGB(format) == 0) {
pix_r = 0;
pix_g = 0;
pix_b = 0;
}
if (PICT_FORMAT_A(format) == 0)
if (PIXMAN_FORMAT_A(format) == 0)
pix_a = 1.0;
}
}
} else {
if (accel_state->component_alpha) {
if (PICT_FORMAT_A(format) == 0)
if (PIXMAN_FORMAT_A(format) == 0)
pix_a = 1.0;
} else {
if (PICT_FORMAT_A(format) == 0) {
if (PIXMAN_FORMAT_A(format) == 0) {
pix_r = 1.0;
pix_g = 1.0;
pix_b = 1.0;
@ -1439,29 +1436,29 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
cb_conf.surface = accel_state->dst_obj.surface;
switch (pDstPicture->format) {
case PICT_a2r10g10b10:
case PICT_x2r10g10b10:
case PICT_a8r8g8b8:
case PICT_x8r8g8b8:
case PICT_a1r5g5b5:
case PICT_x1r5g5b5:
case PIXMAN_a2r10g10b10:
case PIXMAN_x2r10g10b10:
case PIXMAN_a8r8g8b8:
case PIXMAN_x8r8g8b8:
case PIXMAN_a1r5g5b5:
case PIXMAN_x1r5g5b5:
default:
cb_conf.comp_swap = 1; /* ARGB */
break;
case PICT_a2b10g10r10:
case PICT_x2b10g10r10:
case PICT_a8b8g8r8:
case PICT_x8b8g8r8:
case PIXMAN_a2b10g10r10:
case PIXMAN_x2b10g10r10:
case PIXMAN_a8b8g8r8:
case PIXMAN_x8b8g8r8:
cb_conf.comp_swap = 0; /* ABGR */
break;
case PICT_b8g8r8a8:
case PICT_b8g8r8x8:
case PIXMAN_b8g8r8a8:
case PIXMAN_b8g8r8x8:
cb_conf.comp_swap = 3; /* BGRA */
break;
case PICT_r5g6b5:
case PIXMAN_r5g6b5:
cb_conf.comp_swap = 2; /* RGB */
break;
case PICT_a8:
case PIXMAN_a8:
cb_conf.comp_swap = 3; /* A */
break;
}
@ -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;

View file

@ -23,10 +23,7 @@
* Author: Alex Deucher <alexander.deucher@amd.com>
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "xf86.h"

View file

@ -23,10 +23,7 @@
* Author: Alex Deucher <alexander.deucher@amd.com>
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "xf86.h"

View file

@ -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";

View file

@ -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)) {
@ -727,20 +724,20 @@ struct formatinfo {
};
static struct formatinfo R600TexFormats[] = {
{PICT_a2r10g10b10, FMT_2_10_10_10},
{PICT_x2r10g10b10, FMT_2_10_10_10},
{PICT_a2b10g10r10, FMT_2_10_10_10},
{PICT_x2b10g10r10, FMT_2_10_10_10},
{PICT_a8r8g8b8, FMT_8_8_8_8},
{PICT_x8r8g8b8, FMT_8_8_8_8},
{PICT_a8b8g8r8, FMT_8_8_8_8},
{PICT_x8b8g8r8, FMT_8_8_8_8},
{PICT_b8g8r8a8, FMT_8_8_8_8},
{PICT_b8g8r8x8, FMT_8_8_8_8},
{PICT_r5g6b5, FMT_5_6_5},
{PICT_a1r5g5b5, FMT_1_5_5_5},
{PICT_x1r5g5b5, FMT_1_5_5_5},
{PICT_a8, FMT_8},
{PIXMAN_a2r10g10b10, FMT_2_10_10_10},
{PIXMAN_x2r10g10b10, FMT_2_10_10_10},
{PIXMAN_a2b10g10r10, FMT_2_10_10_10},
{PIXMAN_x2b10g10r10, FMT_2_10_10_10},
{PIXMAN_a8r8g8b8, FMT_8_8_8_8},
{PIXMAN_x8r8g8b8, FMT_8_8_8_8},
{PIXMAN_a8b8g8r8, FMT_8_8_8_8},
{PIXMAN_x8b8g8r8, FMT_8_8_8_8},
{PIXMAN_b8g8r8a8, FMT_8_8_8_8},
{PIXMAN_b8g8r8x8, FMT_8_8_8_8},
{PIXMAN_r5g6b5, FMT_5_6_5},
{PIXMAN_a1r5g5b5, FMT_1_5_5_5},
{PIXMAN_x1r5g5b5, FMT_1_5_5_5},
{PIXMAN_a8, FMT_8},
};
static uint32_t R600GetBlendCntl(int op, PicturePtr pMask, uint32_t dst_format)
@ -753,7 +750,7 @@ static uint32_t R600GetBlendCntl(int op, PicturePtr pMask, uint32_t dst_format)
/* If there's no dst alpha channel, adjust the blend op so that we'll treat
* it as always 1.
*/
if (PICT_FORMAT_A(dst_format) == 0 && R600BlendOp[op].dst_alpha) {
if (PIXMAN_FORMAT_A(dst_format) == 0 && R600BlendOp[op].dst_alpha) {
if (sblend == (BLEND_DST_ALPHA << COLOR_SRCBLEND_shift))
sblend = (BLEND_ONE << COLOR_SRCBLEND_shift);
else if (sblend == (BLEND_ONE_MINUS_DST_ALPHA << COLOR_SRCBLEND_shift))
@ -786,28 +783,28 @@ static uint32_t R600GetBlendCntl(int op, PicturePtr pMask, uint32_t dst_format)
static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format)
{
switch (pDstPicture->format) {
case PICT_a2r10g10b10:
case PICT_x2r10g10b10:
case PICT_a2b10g10r10:
case PICT_x2b10g10r10:
case PIXMAN_a2r10g10b10:
case PIXMAN_x2r10g10b10:
case PIXMAN_a2b10g10r10:
case PIXMAN_x2b10g10r10:
*dst_format = COLOR_2_10_10_10;
break;
case PICT_a8r8g8b8:
case PICT_x8r8g8b8:
case PICT_a8b8g8r8:
case PICT_x8b8g8r8:
case PICT_b8g8r8a8:
case PICT_b8g8r8x8:
case PIXMAN_a8r8g8b8:
case PIXMAN_x8r8g8b8:
case PIXMAN_a8b8g8r8:
case PIXMAN_x8b8g8r8:
case PIXMAN_b8g8r8a8:
case PIXMAN_b8g8r8x8:
*dst_format = COLOR_8_8_8_8;
break;
case PICT_r5g6b5:
case PIXMAN_r5g6b5:
*dst_format = COLOR_5_6_5;
break;
case PICT_a1r5g5b5:
case PICT_x1r5g5b5:
case PIXMAN_a1r5g5b5:
case PIXMAN_x1r5g5b5:
*dst_format = COLOR_1_5_5_5;
break;
case PICT_a8:
case PIXMAN_a8:
*dst_format = COLOR_8;
break;
default:
@ -846,8 +843,8 @@ static Bool R600CheckCompositeTexture(PicturePtr pPict,
* clipping.
*/
/* FIXME R6xx */
if (pPict->transform != 0 && repeatType == RepeatNone && PICT_FORMAT_A(pPict->format) == 0) {
if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PICT_FORMAT_A(pDstPict->format) == 0)))
if (pPict->transform != 0 && repeatType == RepeatNone && PIXMAN_FORMAT_A(pPict->format) == 0) {
if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PIXMAN_FORMAT_A(pDstPict->format) == 0)))
RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n"));
}
@ -916,50 +913,50 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
/* component swizzles */
switch (pPict->format) {
case PICT_a2r10g10b10:
case PICT_a1r5g5b5:
case PICT_a8r8g8b8:
case PIXMAN_a2r10g10b10:
case PIXMAN_a1r5g5b5:
case PIXMAN_a8r8g8b8:
pix_r = SQ_SEL_Z; /* R */
pix_g = SQ_SEL_Y; /* G */
pix_b = SQ_SEL_X; /* B */
pix_a = SQ_SEL_W; /* A */
break;
case PICT_a2b10g10r10:
case PICT_a8b8g8r8:
case PIXMAN_a2b10g10r10:
case PIXMAN_a8b8g8r8:
pix_r = SQ_SEL_X; /* R */
pix_g = SQ_SEL_Y; /* G */
pix_b = SQ_SEL_Z; /* B */
pix_a = SQ_SEL_W; /* A */
break;
case PICT_x2b10g10r10:
case PICT_x8b8g8r8:
case PIXMAN_x2b10g10r10:
case PIXMAN_x8b8g8r8:
pix_r = SQ_SEL_X; /* R */
pix_g = SQ_SEL_Y; /* G */
pix_b = SQ_SEL_Z; /* B */
pix_a = SQ_SEL_1; /* A */
break;
case PICT_b8g8r8a8:
case PIXMAN_b8g8r8a8:
pix_r = SQ_SEL_Y; /* R */
pix_g = SQ_SEL_Z; /* G */
pix_b = SQ_SEL_W; /* B */
pix_a = SQ_SEL_X; /* A */
break;
case PICT_b8g8r8x8:
case PIXMAN_b8g8r8x8:
pix_r = SQ_SEL_Y; /* R */
pix_g = SQ_SEL_Z; /* G */
pix_b = SQ_SEL_W; /* B */
pix_a = SQ_SEL_1; /* A */
break;
case PICT_x2r10g10b10:
case PICT_x1r5g5b5:
case PICT_x8r8g8b8:
case PICT_r5g6b5:
case PIXMAN_x2r10g10b10:
case PIXMAN_x1r5g5b5:
case PIXMAN_x8r8g8b8:
case PIXMAN_r5g6b5:
pix_r = SQ_SEL_Z; /* R */
pix_g = SQ_SEL_Y; /* G */
pix_b = SQ_SEL_X; /* B */
pix_a = SQ_SEL_1; /* A */
break;
case PICT_a8:
case PIXMAN_a8:
pix_r = SQ_SEL_0; /* R */
pix_g = SQ_SEL_0; /* G */
pix_b = SQ_SEL_0; /* B */
@ -971,18 +968,18 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
if (unit == 0) {
if (!accel_state->msk_pic) {
if (PICT_FORMAT_RGB(pPict->format) == 0) {
if (PIXMAN_FORMAT_RGB(pPict->format) == 0) {
pix_r = SQ_SEL_0;
pix_g = SQ_SEL_0;
pix_b = SQ_SEL_0;
}
if (PICT_FORMAT_A(pPict->format) == 0)
if (PIXMAN_FORMAT_A(pPict->format) == 0)
pix_a = SQ_SEL_1;
} else {
if (accel_state->component_alpha) {
if (accel_state->src_alpha) {
if (PICT_FORMAT_A(pPict->format) == 0) {
if (PIXMAN_FORMAT_A(pPict->format) == 0) {
pix_r = SQ_SEL_1;
pix_g = SQ_SEL_1;
pix_b = SQ_SEL_1;
@ -993,26 +990,26 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
pix_b = pix_a;
}
} else {
if (PICT_FORMAT_A(pPict->format) == 0)
if (PIXMAN_FORMAT_A(pPict->format) == 0)
pix_a = SQ_SEL_1;
}
} else {
if (PICT_FORMAT_RGB(pPict->format) == 0) {
if (PIXMAN_FORMAT_RGB(pPict->format) == 0) {
pix_r = SQ_SEL_0;
pix_g = SQ_SEL_0;
pix_b = SQ_SEL_0;
}
if (PICT_FORMAT_A(pPict->format) == 0)
if (PIXMAN_FORMAT_A(pPict->format) == 0)
pix_a = SQ_SEL_1;
}
}
} else {
if (accel_state->component_alpha) {
if (PICT_FORMAT_A(pPict->format) == 0)
if (PIXMAN_FORMAT_A(pPict->format) == 0)
pix_a = SQ_SEL_1;
} else {
if (PICT_FORMAT_A(pPict->format) == 0) {
if (PIXMAN_FORMAT_A(pPict->format) == 0) {
pix_r = SQ_SEL_1;
pix_g = SQ_SEL_1;
pix_b = SQ_SEL_1;
@ -1209,46 +1206,46 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32
/* component swizzles */
switch (format) {
case PICT_a1r5g5b5:
case PICT_a8r8g8b8:
case PIXMAN_a1r5g5b5:
case PIXMAN_a8r8g8b8:
pix_r = zf; /* R */
pix_g = yf; /* G */
pix_b = xf; /* B */
pix_a = wf; /* A */
break;
case PICT_a8b8g8r8:
case PIXMAN_a8b8g8r8:
pix_r = xf; /* R */
pix_g = yf; /* G */
pix_b = zf; /* B */
pix_a = wf; /* A */
break;
case PICT_x8b8g8r8:
case PIXMAN_x8b8g8r8:
pix_r = xf; /* R */
pix_g = yf; /* G */
pix_b = zf; /* B */
pix_a = 1.0; /* A */
break;
case PICT_b8g8r8a8:
case PIXMAN_b8g8r8a8:
pix_r = yf; /* R */
pix_g = zf; /* G */
pix_b = wf; /* B */
pix_a = xf; /* A */
break;
case PICT_b8g8r8x8:
case PIXMAN_b8g8r8x8:
pix_r = yf; /* R */
pix_g = zf; /* G */
pix_b = wf; /* B */
pix_a = 1.0; /* A */
break;
case PICT_x1r5g5b5:
case PICT_x8r8g8b8:
case PICT_r5g6b5:
case PIXMAN_x1r5g5b5:
case PIXMAN_x8r8g8b8:
case PIXMAN_r5g6b5:
pix_r = zf; /* R */
pix_g = yf; /* G */
pix_b = xf; /* B */
pix_a = 1.0; /* A */
break;
case PICT_a8:
case PIXMAN_a8:
pix_r = 0.0; /* R */
pix_g = 0.0; /* G */
pix_b = 0.0; /* B */
@ -1260,13 +1257,13 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32
if (unit == 0) {
if (!accel_state->msk_pic) {
if (PICT_FORMAT_RGB(format) == 0) {
if (PIXMAN_FORMAT_RGB(format) == 0) {
pix_r = 0.0;
pix_g = 0.0;
pix_b = 0.0;
}
if (PICT_FORMAT_A(format) == 0)
if (PIXMAN_FORMAT_A(format) == 0)
pix_a = 1.0;
} else {
if (accel_state->component_alpha) {
@ -1276,7 +1273,7 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32
pix_b / pix_a, pix_a / pix_a };
r600_set_blend_color(pScrn, cblend);
if (PICT_FORMAT_A(format) == 0) {
if (PIXMAN_FORMAT_A(format) == 0) {
pix_r = 1.0;
pix_g = 1.0;
pix_b = 1.0;
@ -1287,26 +1284,26 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32
pix_b = pix_a;
}
} else {
if (PICT_FORMAT_A(format) == 0)
if (PIXMAN_FORMAT_A(format) == 0)
pix_a = 1.0;
}
} else {
if (PICT_FORMAT_RGB(format) == 0) {
if (PIXMAN_FORMAT_RGB(format) == 0) {
pix_r = 0;
pix_g = 0;
pix_b = 0;
}
if (PICT_FORMAT_A(format) == 0)
if (PIXMAN_FORMAT_A(format) == 0)
pix_a = 1.0;
}
}
} else {
if (accel_state->component_alpha) {
if (PICT_FORMAT_A(format) == 0)
if (PIXMAN_FORMAT_A(format) == 0)
pix_a = 1.0;
} else {
if (PICT_FORMAT_A(format) == 0) {
if (PIXMAN_FORMAT_A(format) == 0) {
pix_r = 1.0;
pix_g = 1.0;
pix_b = 1.0;
@ -1478,29 +1475,29 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture,
cb_conf.surface = accel_state->dst_obj.surface;
switch (pDstPicture->format) {
case PICT_a2r10g10b10:
case PICT_x2r10g10b10:
case PICT_a8r8g8b8:
case PICT_x8r8g8b8:
case PICT_a1r5g5b5:
case PICT_x1r5g5b5:
case PIXMAN_a2r10g10b10:
case PIXMAN_x2r10g10b10:
case PIXMAN_a8r8g8b8:
case PIXMAN_x8r8g8b8:
case PIXMAN_a1r5g5b5:
case PIXMAN_x1r5g5b5:
default:
cb_conf.comp_swap = 1; /* ARGB */
break;
case PICT_a2b10g10r10:
case PICT_x2b10g10r10:
case PICT_a8b8g8r8:
case PICT_x8b8g8r8:
case PIXMAN_a2b10g10r10:
case PIXMAN_x2b10g10r10:
case PIXMAN_a8b8g8r8:
case PIXMAN_x8b8g8r8:
cb_conf.comp_swap = 0; /* ABGR */
break;
case PICT_b8g8r8a8:
case PICT_b8g8r8x8:
case PIXMAN_b8g8r8a8:
case PIXMAN_b8g8r8x8:
cb_conf.comp_swap = 3; /* BGRA */
break;
case PICT_r5g6b5:
case PIXMAN_r5g6b5:
cb_conf.comp_swap = 2; /* RGB */
break;
case PICT_a8:
case PIXMAN_a8:
cb_conf.comp_swap = 3; /* A */
break;
}
@ -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;

View file

@ -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)

View file

@ -23,10 +23,7 @@
* Author: Alex Deucher <alexander.deucher@amd.com>
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "xf86.h"

View file

@ -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"

View file

@ -90,32 +90,11 @@
#include "picturestr.h"
#endif
#include "compat-api.h"
#include "simple_list.h"
#include "atipcirename.h"
struct _SyncFence;
#ifndef HAVE_REGIONDUPLICATE
static inline RegionPtr
RegionDuplicate(RegionPtr pOld)
{
RegionPtr pNew;
pNew = RegionCreate(&pOld->extents, 0);
if (!pNew)
return NULL;
if (!RegionCopy(pNew, pOld)) {
RegionDestroy(pNew);
return NULL;
}
return pNew;
}
#endif
#ifndef MAX
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif
@ -127,7 +106,6 @@ RegionDuplicate(RegionPtr pOld)
#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
@ -137,23 +115,13 @@ RegionDuplicate(RegionPtr pOld)
#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 */
@ -364,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 {
@ -517,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);
@ -569,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;
@ -681,11 +649,7 @@ Bool radeon_dri3_screen_init(ScreenPtr screen);
/* radeon_kms.c */
Bool radeon_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id,
PixmapPtr src_pix, BoxRec extents);
void RADEONWindowExposures_oneshot(WindowPtr pWin, RegionPtr pRegion
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,16,99,901,0)
, RegionPtr pBSRegion
#endif
);
void RADEONWindowExposures_oneshot(WindowPtr pWin, RegionPtr pRegion);
/* radeon_present.c */
Bool radeon_present_screen_init(ScreenPtr screen);
@ -885,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);

View file

@ -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();

View file

@ -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"

View file

@ -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);

View file

@ -20,16 +20,9 @@
* 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"
#ifdef HAVE_DRI3_H
#include "radeon_bo_gem.h"
#include "radeon_glamor.h"
#include "dri3.h"
@ -117,38 +110,6 @@ radeon_dri3_open(ScreenPtr screen, RRProviderPtr provider, int *out)
return ret;
}
#if DRI3_SCREEN_INFO_VERSION >= 1 && XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(1,18,99,1,0)
static int
radeon_dri3_open_client(ClientPtr client, ScreenPtr screen,
RRProviderPtr provider, int *out)
{
const char *cmdname = GetClientCmdName(client);
Bool is_ssh = FALSE;
/* If the executable name is "ssh", assume that this client connection
* is forwarded from another host via SSH
*/
if (cmdname) {
char *cmd = strdup(cmdname);
/* Cut off any colon and whatever comes after it, see
* https://lists.freedesktop.org/archives/xorg-devel/2015-December/048164.html
*/
cmd = strtok(cmd, ":");
is_ssh = strcmp(basename(cmd), "ssh") == 0;
free(cmd);
}
if (!is_ssh)
return radeon_dri3_open(screen, provider, out);
return BadAccess;
}
#endif /* DRI3_SCREEN_INFO_VERSION >= 1 && XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(1,18,99,1,0) */
static PixmapPtr radeon_dri3_pixmap_from_fd(ScreenPtr screen,
int fd,
CARD16 width,
@ -253,13 +214,8 @@ static int radeon_dri3_fd_from_pixmap(ScreenPtr screen,
}
static dri3_screen_info_rec radeon_dri3_screen_info = {
#if DRI3_SCREEN_INFO_VERSION >= 1 && XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(1,18,99,1,0)
.version = 1,
.open_client = radeon_dri3_open_client,
#else
.version = 0,
.open = radeon_dri3_open,
#endif
.pixmap_from_fd = radeon_dri3_pixmap_from_fd,
.fd_from_pixmap = radeon_dri3_fd_from_pixmap
};
@ -280,17 +236,3 @@ radeon_dri3_screen_init(ScreenPtr screen)
return TRUE;
}
#else /* !HAVE_DRI3_H */
Bool
radeon_dri3_screen_init(ScreenPtr screen)
{
xf86DrvMsg(xf86ScreenToScrn(screen)->scrnIndex, X_INFO,
"Can't initialize DRI3 because dri3.h not available at "
"build time\n");
return FALSE;
}
#endif

View file

@ -25,10 +25,7 @@
* Dave Airlie <airlied@redhat.com>
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <errno.h>

View file

@ -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) {

View file

@ -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;

View file

@ -74,36 +74,36 @@ struct formatinfo {
* TXFORMAT_Y8 expands to (Y,Y,Y,1). TXFORMAT_I8 expands to (I,I,I,I)
*/
static struct formatinfo R100TexFormats[] = {
{PICT_a8r8g8b8, RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP},
{PICT_x8r8g8b8, RADEON_TXFORMAT_ARGB8888},
{PICT_r5g6b5, RADEON_TXFORMAT_RGB565},
{PICT_a1r5g5b5, RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP},
{PICT_x1r5g5b5, RADEON_TXFORMAT_ARGB1555},
{PICT_a8, RADEON_TXFORMAT_I8 | RADEON_TXFORMAT_ALPHA_IN_MAP},
{PIXMAN_a8r8g8b8, RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP},
{PIXMAN_x8r8g8b8, RADEON_TXFORMAT_ARGB8888},
{PIXMAN_r5g6b5, RADEON_TXFORMAT_RGB565},
{PIXMAN_a1r5g5b5, RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP},
{PIXMAN_x1r5g5b5, RADEON_TXFORMAT_ARGB1555},
{PIXMAN_a8, RADEON_TXFORMAT_I8 | RADEON_TXFORMAT_ALPHA_IN_MAP},
};
static struct formatinfo R200TexFormats[] = {
{PICT_a8r8g8b8, R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP},
{PICT_x8r8g8b8, R200_TXFORMAT_ARGB8888},
{PICT_a8b8g8r8, R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP},
{PICT_x8b8g8r8, R200_TXFORMAT_ABGR8888},
{PICT_r5g6b5, R200_TXFORMAT_RGB565},
{PICT_a1r5g5b5, R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP},
{PICT_x1r5g5b5, R200_TXFORMAT_ARGB1555},
{PICT_a8, R200_TXFORMAT_I8 | R200_TXFORMAT_ALPHA_IN_MAP},
{PIXMAN_a8r8g8b8, R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP},
{PIXMAN_x8r8g8b8, R200_TXFORMAT_ARGB8888},
{PIXMAN_a8b8g8r8, R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP},
{PIXMAN_x8b8g8r8, R200_TXFORMAT_ABGR8888},
{PIXMAN_r5g6b5, R200_TXFORMAT_RGB565},
{PIXMAN_a1r5g5b5, R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP},
{PIXMAN_x1r5g5b5, R200_TXFORMAT_ARGB1555},
{PIXMAN_a8, R200_TXFORMAT_I8 | R200_TXFORMAT_ALPHA_IN_MAP},
};
static struct formatinfo R300TexFormats[] = {
{PICT_a8r8g8b8, R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8)},
{PICT_x8r8g8b8, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8)},
{PICT_a8b8g8r8, R300_EASY_TX_FORMAT(Z, Y, X, W, W8Z8Y8X8)},
{PICT_x8b8g8r8, R300_EASY_TX_FORMAT(Z, Y, X, ONE, W8Z8Y8X8)},
{PICT_b8g8r8a8, R300_EASY_TX_FORMAT(W, Z, Y, X, W8Z8Y8X8)},
{PICT_b8g8r8x8, R300_EASY_TX_FORMAT(W, Z, Y, ONE, W8Z8Y8X8)},
{PICT_r5g6b5, R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5)},
{PICT_a1r5g5b5, R300_EASY_TX_FORMAT(X, Y, Z, W, W1Z5Y5X5)},
{PICT_x1r5g5b5, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W1Z5Y5X5)},
{PICT_a8, R300_EASY_TX_FORMAT(ZERO, ZERO, ZERO, X, X8)},
{PIXMAN_a8r8g8b8, R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8)},
{PIXMAN_x8r8g8b8, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8)},
{PIXMAN_a8b8g8r8, R300_EASY_TX_FORMAT(Z, Y, X, W, W8Z8Y8X8)},
{PIXMAN_x8b8g8r8, R300_EASY_TX_FORMAT(Z, Y, X, ONE, W8Z8Y8X8)},
{PIXMAN_b8g8r8a8, R300_EASY_TX_FORMAT(W, Z, Y, X, W8Z8Y8X8)},
{PIXMAN_b8g8r8x8, R300_EASY_TX_FORMAT(W, Z, Y, ONE, W8Z8Y8X8)},
{PIXMAN_r5g6b5, R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5)},
{PIXMAN_a1r5g5b5, R300_EASY_TX_FORMAT(X, Y, Z, W, W1Z5Y5X5)},
{PIXMAN_x1r5g5b5, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W1Z5Y5X5)},
{PIXMAN_a8, R300_EASY_TX_FORMAT(ZERO, ZERO, ZERO, X, X8)},
};
/* Common Radeon setup code */
@ -111,18 +111,18 @@ static struct formatinfo R300TexFormats[] = {
static Bool RADEONGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format)
{
switch (pDstPicture->format) {
case PICT_a8r8g8b8:
case PICT_x8r8g8b8:
case PIXMAN_a8r8g8b8:
case PIXMAN_x8r8g8b8:
*dst_format = RADEON_COLOR_FORMAT_ARGB8888;
break;
case PICT_r5g6b5:
case PIXMAN_r5g6b5:
*dst_format = RADEON_COLOR_FORMAT_RGB565;
break;
case PICT_a1r5g5b5:
case PICT_x1r5g5b5:
case PIXMAN_a1r5g5b5:
case PIXMAN_x1r5g5b5:
*dst_format = RADEON_COLOR_FORMAT_ARGB1555;
break;
case PICT_a8:
case PIXMAN_a8:
*dst_format = RADEON_COLOR_FORMAT_RGB8;
break;
default:
@ -136,22 +136,22 @@ static Bool RADEONGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format)
static Bool R300GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format)
{
switch (pDstPicture->format) {
case PICT_a8r8g8b8:
case PICT_x8r8g8b8:
case PICT_a8b8g8r8:
case PICT_x8b8g8r8:
case PICT_b8g8r8a8:
case PICT_b8g8r8x8:
case PIXMAN_a8r8g8b8:
case PIXMAN_x8r8g8b8:
case PIXMAN_a8b8g8r8:
case PIXMAN_x8b8g8r8:
case PIXMAN_b8g8r8a8:
case PIXMAN_b8g8r8x8:
*dst_format = R300_COLORFORMAT_ARGB8888;
break;
case PICT_r5g6b5:
case PIXMAN_r5g6b5:
*dst_format = R300_COLORFORMAT_RGB565;
break;
case PICT_a1r5g5b5:
case PICT_x1r5g5b5:
case PIXMAN_a1r5g5b5:
case PIXMAN_x1r5g5b5:
*dst_format = R300_COLORFORMAT_ARGB1555;
break;
case PICT_a8:
case PIXMAN_a8:
*dst_format = R300_COLORFORMAT_I8;
break;
default:
@ -171,7 +171,7 @@ static uint32_t RADEONGetBlendCntl(int op, PicturePtr pMask, uint32_t dst_format
/* If there's no dst alpha channel, adjust the blend op so that we'll treat
* it as always 1.
*/
if (PICT_FORMAT_A(dst_format) == 0 && RadeonBlendOp[op].dst_alpha) {
if (PIXMAN_FORMAT_A(dst_format) == 0 && RadeonBlendOp[op].dst_alpha) {
if (sblend == RADEON_SRC_BLEND_GL_DST_ALPHA)
sblend = RADEON_SRC_BLEND_GL_ONE;
else if (sblend == RADEON_SRC_BLEND_GL_ONE_MINUS_DST_ALPHA)
@ -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",
@ -334,8 +334,8 @@ static Bool R100CheckCompositeTexture(PicturePtr pPict,
* matter. I have not, however, verified that the X server always does such
* clipping.
*/
if (pPict->transform != 0 && repeatType == RepeatNone && PICT_FORMAT_A(pPict->format) == 0) {
if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PICT_FORMAT_A(pDstPict->format) == 0)))
if (pPict->transform != 0 && repeatType == RepeatNone && PIXMAN_FORMAT_A(pPict->format) == 0) {
if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PIXMAN_FORMAT_A(pDstPict->format) == 0)))
RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n"));
}
@ -589,7 +589,7 @@ static Bool R100PrepareComposite(int op,
if (!RADEONGetDestFormat(pDstPicture, &dst_format))
return FALSE;
if (pDstPicture->format == PICT_a8 && RadeonBlendOp[op].dst_alpha)
if (pDstPicture->format == PIXMAN_a8 && RadeonBlendOp[op].dst_alpha)
RADEON_FALLBACK(("Can't dst alpha blend A8\n"));
pixel_shift = pDst->drawable.bitsPerPixel >> 4;
@ -655,11 +655,11 @@ static Bool R100PrepareComposite(int op,
cblend = RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX | RADEON_COLOR_ARG_C_ZERO;
ablend = RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX | RADEON_ALPHA_ARG_C_ZERO;
if (pDstPicture->format == PICT_a8 ||
if (pDstPicture->format == PIXMAN_a8 ||
(pMask && pMaskPicture->componentAlpha && RadeonBlendOp[op].src_alpha))
{
cblend |= RADEON_COLOR_ARG_A_T0_ALPHA;
} else if (pSrcPicture->format == PICT_a8)
} else if (pSrcPicture->format == PIXMAN_a8)
cblend |= RADEON_COLOR_ARG_A_ZERO;
else
cblend |= RADEON_COLOR_ARG_A_T0_COLOR;
@ -667,7 +667,7 @@ static Bool R100PrepareComposite(int op,
if (pMask) {
if (pMaskPicture->componentAlpha &&
pDstPicture->format != PICT_a8)
pDstPicture->format != PIXMAN_a8)
cblend |= RADEON_COLOR_ARG_B_T1_COLOR;
else
cblend |= RADEON_COLOR_ARG_B_T1_ALPHA;
@ -731,8 +731,8 @@ static Bool R200CheckCompositeTexture(PicturePtr pPict,
* matter. I have not, however, verified that the X server always does such
* clipping.
*/
if (pPict->transform != 0 && repeatType == RepeatNone && PICT_FORMAT_A(pPict->format) == 0) {
if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PICT_FORMAT_A(pDstPict->format) == 0)))
if (pPict->transform != 0 && repeatType == RepeatNone && PIXMAN_FORMAT_A(pPict->format) == 0) {
if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PIXMAN_FORMAT_A(pDstPict->format) == 0)))
RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n"));
}
@ -951,7 +951,7 @@ static Bool R200PrepareComposite(int op, PicturePtr pSrcPicture,
if (!RADEONGetDestFormat(pDstPicture, &dst_format))
return FALSE;
if (pDstPicture->format == PICT_a8 && RadeonBlendOp[op].dst_alpha)
if (pDstPicture->format == PIXMAN_a8 && RadeonBlendOp[op].dst_alpha)
RADEON_FALLBACK(("Can't dst alpha blend A8\n"));
pixel_shift = pDst->drawable.bitsPerPixel >> 4;
@ -1030,11 +1030,11 @@ static Bool R200PrepareComposite(int op, PicturePtr pSrcPicture,
cblend = R200_TXC_OP_MADD | R200_TXC_ARG_C_ZERO;
ablend = R200_TXA_OP_MADD | R200_TXA_ARG_C_ZERO;
if (pDstPicture->format == PICT_a8 ||
if (pDstPicture->format == PIXMAN_a8 ||
(pMask && pMaskPicture->componentAlpha && RadeonBlendOp[op].src_alpha))
{
cblend |= R200_TXC_ARG_A_R0_ALPHA;
} else if (pSrcPicture->format == PICT_a8)
} else if (pSrcPicture->format == PIXMAN_a8)
cblend |= R200_TXC_ARG_A_ZERO;
else
cblend |= R200_TXC_ARG_A_R0_COLOR;
@ -1042,7 +1042,7 @@ static Bool R200PrepareComposite(int op, PicturePtr pSrcPicture,
if (pMask) {
if (pMaskPicture->componentAlpha &&
pDstPicture->format != PICT_a8)
pDstPicture->format != PIXMAN_a8)
cblend |= R200_TXC_ARG_B_R1_COLOR;
else
cblend |= R200_TXC_ARG_B_R1_ALPHA;
@ -1113,8 +1113,8 @@ static Bool R300CheckCompositeTexture(PicturePtr pPict,
* matter. I have not, however, verified that the X server always does such
* clipping.
*/
if (pPict->transform != 0 && repeatType == RepeatNone && PICT_FORMAT_A(pPict->format) == 0) {
if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PICT_FORMAT_A(pDstPict->format) == 0)))
if (pPict->transform != 0 && repeatType == RepeatNone && PIXMAN_FORMAT_A(pPict->format) == 0) {
if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PIXMAN_FORMAT_A(pDstPict->format) == 0)))
RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\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
@ -1594,8 +1594,8 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture,
/* shader output swizzling */
switch (pDstPicture->format) {
case PICT_a8r8g8b8:
case PICT_x8r8g8b8:
case PIXMAN_a8r8g8b8:
case PIXMAN_x8r8g8b8:
default:
output_fmt = (R300_OUT_FMT_C4_8 |
R300_OUT_FMT_C0_SEL_BLUE |
@ -1603,23 +1603,23 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture,
R300_OUT_FMT_C2_SEL_RED |
R300_OUT_FMT_C3_SEL_ALPHA);
break;
case PICT_a8b8g8r8:
case PICT_x8b8g8r8:
case PIXMAN_a8b8g8r8:
case PIXMAN_x8b8g8r8:
output_fmt = (R300_OUT_FMT_C4_8 |
R300_OUT_FMT_C0_SEL_RED |
R300_OUT_FMT_C1_SEL_GREEN |
R300_OUT_FMT_C2_SEL_BLUE |
R300_OUT_FMT_C3_SEL_ALPHA);
break;
case PICT_b8g8r8a8:
case PICT_b8g8r8x8:
case PIXMAN_b8g8r8a8:
case PIXMAN_b8g8r8x8:
output_fmt = (R300_OUT_FMT_C4_8 |
R300_OUT_FMT_C0_SEL_ALPHA |
R300_OUT_FMT_C1_SEL_RED |
R300_OUT_FMT_C2_SEL_GREEN |
R300_OUT_FMT_C3_SEL_BLUE);
break;
case PICT_a8:
case PIXMAN_a8:
output_fmt = (R300_OUT_FMT_C4_8 |
R300_OUT_FMT_C0_SEL_ALPHA);
break;
@ -1627,12 +1627,12 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture,
/* setup pixel shader */
if (IS_R300_3D) {
if (PICT_FORMAT_RGB(pSrcPicture->format) == 0)
if (PIXMAN_FORMAT_RGB(pSrcPicture->format) == 0)
src_color = R300_ALU_RGB_0_0;
else
src_color = R300_ALU_RGB_SRC0_RGB;
if (PICT_FORMAT_A(pSrcPicture->format) == 0)
if (PIXMAN_FORMAT_A(pSrcPicture->format) == 0)
src_alpha = R300_ALU_ALPHA_1_0;
else
src_alpha = R300_ALU_ALPHA_SRC0_A;
@ -1640,7 +1640,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture,
if (pMask) {
if (pMaskPicture->componentAlpha) {
if (RadeonBlendOp[op].src_alpha) {
if (PICT_FORMAT_A(pSrcPicture->format) == 0)
if (PIXMAN_FORMAT_A(pSrcPicture->format) == 0)
src_color = R300_ALU_RGB_1_0;
else
src_color = R300_ALU_RGB_SRC0_AAA;
@ -1648,12 +1648,12 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture,
src_color = R300_ALU_RGB_SRC0_RGB;
mask_color = R300_ALU_RGB_SRC1_RGB;
} else {
if (PICT_FORMAT_A(pMaskPicture->format) == 0)
if (PIXMAN_FORMAT_A(pMaskPicture->format) == 0)
mask_color = R300_ALU_RGB_1_0;
else
mask_color = R300_ALU_RGB_SRC1_AAA;
}
if (PICT_FORMAT_A(pMaskPicture->format) == 0)
if (PIXMAN_FORMAT_A(pMaskPicture->format) == 0)
mask_alpha = R300_ALU_ALPHA_1_0;
else
mask_alpha = R300_ALU_ALPHA_SRC1_A;
@ -1805,7 +1805,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture,
R300_ALU_ALPHA_CLAMP));
ADVANCE_RING();
} else {
if (PICT_FORMAT_RGB(pSrcPicture->format) == 0)
if (PIXMAN_FORMAT_RGB(pSrcPicture->format) == 0)
src_color = (R500_ALU_RGB_R_SWIZ_A_0 |
R500_ALU_RGB_G_SWIZ_A_0 |
R500_ALU_RGB_B_SWIZ_A_0);
@ -1814,7 +1814,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture,
R500_ALU_RGB_G_SWIZ_A_G |
R500_ALU_RGB_B_SWIZ_A_B);
if (PICT_FORMAT_A(pSrcPicture->format) == 0)
if (PIXMAN_FORMAT_A(pSrcPicture->format) == 0)
src_alpha = R500_ALPHA_SWIZ_A_1;
else
src_alpha = R500_ALPHA_SWIZ_A_A;
@ -1822,7 +1822,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture,
if (pMask) {
if (pMaskPicture->componentAlpha) {
if (RadeonBlendOp[op].src_alpha) {
if (PICT_FORMAT_A(pSrcPicture->format) == 0)
if (PIXMAN_FORMAT_A(pSrcPicture->format) == 0)
src_color = (R500_ALU_RGB_R_SWIZ_A_1 |
R500_ALU_RGB_G_SWIZ_A_1 |
R500_ALU_RGB_B_SWIZ_A_1);
@ -1839,7 +1839,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture,
R500_ALU_RGB_G_SWIZ_B_G |
R500_ALU_RGB_B_SWIZ_B_B);
} else {
if (PICT_FORMAT_A(pMaskPicture->format) == 0)
if (PIXMAN_FORMAT_A(pMaskPicture->format) == 0)
mask_color = (R500_ALU_RGB_R_SWIZ_B_1 |
R500_ALU_RGB_G_SWIZ_B_1 |
R500_ALU_RGB_B_SWIZ_B_1);
@ -1848,7 +1848,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture,
R500_ALU_RGB_G_SWIZ_B_A |
R500_ALU_RGB_B_SWIZ_B_A);
}
if (PICT_FORMAT_A(pMaskPicture->format) == 0)
if (PIXMAN_FORMAT_A(pMaskPicture->format) == 0)
mask_alpha = R500_ALPHA_SWIZ_B_1;
else
mask_alpha = R500_ALPHA_SWIZ_B_A;
@ -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;

View file

@ -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"

View file

@ -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;
@ -81,13 +78,8 @@ radeon_glamor_pre_init(ScrnInfoPtr scrn)
s = xf86GetOptValString(info->Options, OPTION_ACCELMETHOD);
if (!s) {
if (xorgGetVersion() >= XORG_VERSION_NUMERIC(1,18,3,0,0)) {
if (info->ChipFamily < CHIP_FAMILY_R600)
return FALSE;
} else {
if (info->ChipFamily < CHIP_FAMILY_TAHITI)
return FALSE;
}
if (info->ChipFamily < CHIP_FAMILY_R600)
return FALSE;
}
if (s && strcasecmp(s, "glamor") != 0) {
@ -109,34 +101,13 @@ radeon_glamor_pre_init(ScrnInfoPtr scrn)
"glamor may not work (well) with GPUs < RV515.\n");
}
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,20,99,0,0)
if (scrn->depth < 24) {
#else
if (scrn->depth < 15) {
#endif
xf86DrvMsg(scrn->scrnIndex, s ? X_ERROR : X_WARNING,
"Depth %d not supported with glamor, disabling\n",
scrn->depth);
return FALSE;
}
if (scrn->depth == 30 &&
xorgGetVersion() < XORG_VERSION_NUMERIC(1,19,99,1,0)) {
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
"Depth 30 is not supported by GLAMOR with Xorg < "
"1.19.99.1\n");
return FALSE;
}
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,15,0,0,0)
if (!xf86LoaderCheckSymbol("glamor_egl_init")) {
xf86DrvMsg(scrn->scrnIndex, s ? X_ERROR : X_WARNING,
"glamor requires Load \"glamoregl\" in "
"Section \"Module\", disabling.\n");
return FALSE;
}
#endif
info->gbm = gbm_create_device(pRADEONEnt->fd);
if (!info->gbm) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
@ -182,11 +153,8 @@ radeon_glamor_create_textured_pixmap(PixmapPtr pixmap, struct radeon_buffer *bo)
if (bo->flags & RADEON_BO_FLAGS_GBM) {
return glamor_egl_create_textured_pixmap_from_gbm_bo(pixmap,
bo->bo.gbm
#if XORG_VERSION_CURRENT > XORG_VERSION_NUMERIC(1,19,99,903,0)
, FALSE
#endif
);
bo->bo.gbm,
FALSE);
} else {
return glamor_egl_create_textured_pixmap(pixmap,
bo->bo.radeon->handle,
@ -196,31 +164,20 @@ radeon_glamor_create_textured_pixmap(PixmapPtr pixmap, struct radeon_buffer *bo)
static Bool radeon_glamor_destroy_pixmap(PixmapPtr pixmap)
{
#ifndef HAVE_GLAMOR_EGL_DESTROY_TEXTURED_PIXMAP
ScreenPtr screen = pixmap->drawable.pScreen;
RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(screen));
Bool ret = TRUE;
#endif
if (pixmap->refcnt == 1) {
#ifdef HAVE_GLAMOR_EGL_DESTROY_TEXTURED_PIXMAP
glamor_egl_destroy_textured_pixmap(pixmap);
#endif
if (pixmap->refcnt == 1)
radeon_set_pixmap_bo(pixmap, NULL);
}
#ifdef HAVE_GLAMOR_EGL_DESTROY_TEXTURED_PIXMAP
fbDestroyPixmap(pixmap);
return TRUE;
#else
screen->DestroyPixmap = info->glamor.SavedDestroyPixmap;
if (screen->DestroyPixmap(pixmap))
if (info->glamor.SavedDestroyPixmap) {
screen->DestroyPixmap = info->glamor.SavedDestroyPixmap;
ret = screen->DestroyPixmap(pixmap);
info->glamor.SavedDestroyPixmap = screen->DestroyPixmap;
}
screen->DestroyPixmap = radeon_glamor_destroy_pixmap;
return ret;
#endif
}
static PixmapPtr
@ -436,18 +393,14 @@ radeon_glamor_init(ScreenPtr screen)
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
RADEONInfoPtr info = RADEONPTR(scrn);
#ifdef RENDER
#ifdef HAVE_FBGLYPHS
UnrealizeGlyphProcPtr SavedUnrealizeGlyph = NULL;
#endif
PictureScreenPtr ps = NULL;
if (info->shadow_primary) {
ps = GetPictureScreenIfSet(screen);
if (ps) {
#ifdef HAVE_FBGLYPHS
SavedUnrealizeGlyph = ps->UnrealizeGlyph;
#endif
info->glamor.SavedGlyphs = ps->Glyphs;
info->glamor.SavedTriangles = ps->Triangles;
info->glamor.SavedTrapezoids = ps->Trapezoids;
@ -463,19 +416,13 @@ radeon_glamor_init(ScreenPtr screen)
return FALSE;
}
if (!glamor_egl_init_textured_pixmap(screen)) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"Failed to initialize textured pixmap of screen for glamor.\n");
return FALSE;
}
if (!dixRegisterPrivateKey(&glamor_pixmap_index, PRIVATE_PIXMAP, 0))
return FALSE;
if (info->shadow_primary)
radeon_glamor_screen_init(screen);
#if defined(RENDER) && defined(HAVE_FBGLYPHS)
#if defined(RENDER)
/* For ShadowPrimary, we need fbUnrealizeGlyph instead of
* glamor_unrealize_glyph
*/

View file

@ -26,14 +26,13 @@
* 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
#include <fb.h>
#include <fbpict.h>
#include "radeon.h"
#include "radeon_bo_helper.h"
#include "radeon_glamor.h"
@ -426,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);
@ -445,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);

View file

@ -24,9 +24,7 @@
* Dave Airlie <airlied@redhat.com>
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <errno.h>
#include <sys/ioctl.h>
@ -43,23 +41,20 @@
#include "radeon_version.h"
#include "shadow.h"
#include <xf86Priv.h>
#include "atipciids.h"
#if HAVE_PRESENT_H
#include <present.h>
#endif
/* DPMS */
#ifdef HAVE_XEXTPROTO_71
#include <X11/extensions/dpmsconst.h>
#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
#ifdef __DragonFly__
#include <xf86_OSproc.h>
#endif
#include <X11/extensions/damageproto.h>
#include <fb.h>
#include "radeon_chipinfo_gen.h"
#include "radeon_bo_gem.h"
@ -107,7 +102,7 @@ void radeon_cs_flush_indirect(ScrnInfoPtr pScrn)
#ifdef USE_GLAMOR
if (info->use_glamor) {
glamor_block_handler(pScrn->pScreen);
/* Pending operations have already been flushed in glamor_close_screen() */
return;
}
#endif
@ -187,7 +182,7 @@ static Bool RADEONGetRec(ScrnInfoPtr pScrn)
{
if (pScrn->driverPrivate) return TRUE;
pScrn->driverPrivate = xnfcalloc(sizeof(RADEONInfoRec), 1);
pScrn->driverPrivate = XNFcallocarray(sizeof(RADEONInfoRec), 1);
return TRUE;
}
@ -277,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;
@ -300,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++;
@ -312,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;
@ -426,7 +421,7 @@ radeon_scanout_extents_intersect(xf86CrtcPtr xf86_crtc, BoxPtr extents)
}
static RegionPtr
transform_region(RegionPtr region, struct pict_f_transform *transform,
transform_region(RegionPtr region, struct pixman_f_transform *transform,
int w, int h)
{
BoxPtr boxes = RegionRects(region);
@ -555,14 +550,12 @@ dirty_region(PixmapDirtyUpdatePtr dirty)
RegionPtr damageregion = DamageRegion(dirty->damage);
RegionPtr dstregion;
#ifdef HAS_DIRTYTRACKING_ROTATION
if (dirty->rotation != RR_Rotate_0) {
dstregion = transform_region(damageregion,
&dirty->f_inverse,
dirty->secondary_dst->drawable.width,
dirty->secondary_dst->drawable.height);
} else
#endif
{
RegionRec pixregion;
@ -588,11 +581,7 @@ redisplay_dirty(PixmapDirtyUpdatePtr dirty, RegionPtr region)
if (dirty->secondary_dst->primary_pixmap)
DamageRegionAppend(&dirty->secondary_dst->drawable, region);
#ifdef HAS_DIRTYTRACKING_ROTATION
PixmapSyncDirtyHelper(dirty);
#else
PixmapSyncDirtyHelper(dirty, region);
#endif
radeon_cs_flush_indirect(src_scrn);
if (dirty->secondary_dst->primary_pixmap)
@ -846,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,
@ -1212,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);
@ -1220,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)
@ -1524,8 +1513,29 @@ static int radeon_get_drm_master_fd(ScrnInfoPtr pScrn)
}
#endif
XNFasprintf(&busid, "pci:%04x:%02x:%02x.%d",
dev->domain, dev->bus, dev->dev, dev->func);
if (asprintf(&busid, "pci:%04x:%02x:%02x.%d",
dev->domain, dev->bus, dev->dev, dev->func) == -1) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "malloc() failed\n");
return -1;
}
#ifdef __DragonFly__
/* On DragonFlyBSD Appropriate kernel drivers need to be loaded before
* accessing DRM facilities */
int loaded=0; /* if we were able to load the module. */
loaded = xf86LoadKernelModule("radeon");
/* EEXIST is set if the module has already been loaded in the kernel */
if (!loaded && errno != EEXIST) {
loaded = xf86LoadKernelModule("radeonkms");
if (!loaded && errno != EEXIST) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"[drm] Failed to load kernel module for %s: %s\n",
busid, strerror(errno));
free(busid);
return -1;
}
}
#endif
fd = drmOpen(NULL, busid);
if (fd == -1)
@ -1734,11 +1744,7 @@ static Bool RADEONCreateWindow_oneshot(WindowPtr pWin)
}
/* When the root window is mapped, set the initial modes */
void RADEONWindowExposures_oneshot(WindowPtr pWin, RegionPtr pRegion
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,16,99,901,0)
, RegionPtr pBSRegion
#endif
)
void RADEONWindowExposures_oneshot(WindowPtr pWin, RegionPtr pRegion)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
@ -1748,11 +1754,7 @@ void RADEONWindowExposures_oneshot(WindowPtr pWin, RegionPtr pRegion
ErrorF("%s called for non-root window %p\n", __func__, pWin);
pScreen->WindowExposures = info->WindowExposures;
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,16,99,901,0)
pScreen->WindowExposures(pWin, pRegion, pBSRegion);
#else
pScreen->WindowExposures(pWin, pRegion);
#endif
radeon_finish(pScrn, info->front_buffer);
drmmode_set_desired_modes(pScrn, &info->drmmode, TRUE);
@ -1782,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);
@ -2328,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");
@ -2397,10 +2399,7 @@ Bool RADEONScreenInit_KMS(ScreenPtr pScreen, int argc, char **argv)
#endif
if (!pScreen->isGPU) {
if (xorgGetVersion() >= XORG_VERSION_NUMERIC(1,18,3,0,0))
value = info->use_glamor;
else
value = FALSE;
value = info->use_glamor;
from = X_DEFAULT;
if (!info->r600_shadow_fb) {
@ -2583,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);

View file

@ -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 */

View file

@ -20,15 +20,10 @@
* 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"
#ifdef HAVE_PRESENT_H
#include <stdio.h>
#include <string.h>
#include <assert.h>
@ -275,11 +270,6 @@ radeon_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
if (info->drmmode.dri2_flipping)
return FALSE;
#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(1, 20, 99, 1, 0)
if (pixmap->devKind != screen_pixmap->devKind)
return FALSE;
#endif
#ifdef USE_GLAMOR
if (priv && priv->fb_failed)
return FALSE;
@ -491,17 +481,3 @@ radeon_present_screen_init(ScreenPtr screen)
return TRUE;
}
#else /* !HAVE_PRESENT_H */
Bool
radeon_present_screen_init(ScreenPtr screen)
{
xf86DrvMsg(xf86ScreenToScrn(screen)->scrnIndex, X_INFO,
"Present extension disabled because present.h not available at "
"build time\n");
return FALSE;
}
#endif

View file

@ -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>
@ -49,13 +46,9 @@
#include "xf86drmMode.h"
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,19,99,1,0)
#include <xf86Pci.h>
#else
#include "dri.h"
#endif
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
#include <xf86_OSproc.h>
#endif
@ -101,7 +94,7 @@ static Bool radeon_kernel_mode_enabled(ScrnInfoPtr pScrn, struct pci_device *pci
busIdString = DRICreatePCIBusID(pci_dev);
ret = drmCheckModesettingSupported(busIdString);
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
if (ret) {
if (xf86LoadKernelModule("radeonkms"))
ret = drmCheckModesettingSupported(busIdString);
@ -168,7 +161,7 @@ radeon_get_scrninfo(int entity_num, void *pci_dev)
xf86SetEntityInstanceForScreen(pScrn, pEnt->index, xf86GetNumEntityInstances(pEnt->index) - 1);
if (!pPriv->ptr)
pPriv->ptr = xnfcalloc(sizeof(RADEONEntRec), 1);
pPriv->ptr = XNFcallocarray(sizeof(RADEONEntRec), 1);
}
free(pEnt);
@ -197,10 +190,8 @@ RADEONDriverFunc(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data)
flag = (CARD32 *)data;
(*flag) = 0;
return TRUE;
#if XORG_VERSION_CURRENT > XORG_VERSION_NUMERIC(1,15,99,0,0)
case SUPPORTS_SERVER_FDS:
return TRUE;
#endif
default:
return FALSE;
}
@ -264,7 +255,7 @@ radeon_platform_probe(DriverPtr pDriver,
xf86SetEntityInstanceForScreen(pScrn, pEnt->index, xf86GetNumEntityInstances(pEnt->index) - 1);
if (!pPriv->ptr) {
pPriv->ptr = xnfcalloc(sizeof(RADEONEntRec), 1);
pPriv->ptr = XNFcallocarray(sizeof(RADEONEntRec), 1);
pRADEONEnt = pPriv->ptr;
} else {
pRADEONEnt = pPriv->ptr;

View file

@ -48,7 +48,6 @@
#include "xf86platformBus.h"
#endif
#include "compat-api.h"
#include "exa.h"
extern DriverRec RADEON;

View file

@ -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)

View file

@ -23,8 +23,6 @@
#include "radeon.h"
#ifdef HAVE_MISYNCSHM_H
#include "misync.h"
#include "misyncshm.h"
#include "misyncstr.h"
@ -131,22 +129,3 @@ radeon_sync_close(ScreenPtr screen)
info->CreateFence = NULL;
}
#else /* !HAVE_MISYNCSHM_H */
Bool
radeon_sync_init(ScreenPtr screen)
{
xf86DrvMsg(xf86ScreenToScrn(screen)->scrnIndex, X_INFO,
"SYNC extension fences disabled because misyncshm.h not "
"available at build time\n");
return FALSE;
}
void
radeon_sync_close(ScreenPtr screen)
{
}
#endif

View file

@ -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)

View file

@ -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);

View file

@ -24,9 +24,7 @@
* Dave Airlie <airlied@redhat.com>
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <errno.h>
#include "radeon.h"

View file

@ -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;
}

View file

@ -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;
}
}
}
}

View file

@ -2,8 +2,6 @@
#define __RADEON_VIDEO_H__
#include "xf86i2c.h"
#include "i2c_def.h"
#include "xf86Crtc.h"
#include "bicubic_table.h"

View file

@ -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>

View file

@ -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.