From 7fb2787108f87998d86d157532325798025c459f Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 14 Jun 2025 09:00:14 -0700 Subject: [PATCH 01/75] Revert "use dixDestroyPixmap() instead of direct driver call" This reverts commit c610c037369500089baddd86aa3cf8046f3dc48b Part-of: --- src/drmmode_display.c | 8 +++++--- src/radeon_dri2.c | 8 ++++---- src/radeon_exa_render.c | 10 +++++----- src/radeon_exa_shared.c | 2 +- src/radeon_glamor.c | 7 +++---- src/radeon_kms.c | 2 +- 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index af598999..a58f24dd 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -141,13 +141,15 @@ static PixmapPtr drmmode_create_bo_pixmap(ScrnInfoPtr pScrn, return pixmap; fail: - dixDestroyPixmap(pixmap, 0); + pScreen->DestroyPixmap(pixmap); return NULL; } static void drmmode_destroy_bo_pixmap(PixmapPtr pixmap) { - dixDestroyPixmap(pixmap, 0); + ScreenPtr pScreen = pixmap->drawable.pScreen; + + (*pScreen->DestroyPixmap)(pixmap); } static void @@ -440,7 +442,7 @@ destroy_pixmap_for_fbcon(ScrnInfoPtr pScrn) return; if (info->fbcon_pixmap) - dixDestroyPixmap(info->fbcon_pixmap, 0); + pScrn->pScreen->DestroyPixmap(info->fbcon_pixmap); info->fbcon_pixmap = NULL; } diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index 114cf22e..fba56e5d 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -273,7 +273,7 @@ radeon_dri2_create_buffer2(ScreenPtr pScreen, error: free(buffers); - dixDestroyPixmap(pixmap, 0); + (*pScreen->DestroyPixmap)(pixmap); return NULL; } @@ -299,7 +299,7 @@ radeon_dri2_destroy_buffer2(ScreenPtr pScreen, if (private->refcnt == 0) { if (private->pixmap) - dixDestroyPixmap(private->pixmap, 0); + (*pScreen->DestroyPixmap)(private->pixmap); free(buffers->driverPrivate); free(buffers); @@ -649,10 +649,10 @@ update_front(DrawablePtr draw, DRI2BufferPtr front) if (!info->use_glamor) exaMoveInPixmap(pixmap); if (!radeon_get_flink_name(pRADEONEnt, pixmap, &front->name)) { - dixDestroyPixmap(pixmap, 0); + (*draw->pScreen->DestroyPixmap)(pixmap); return FALSE; } - dixDestroyPixmap(priv->pixmap, 0); + (*draw->pScreen->DestroyPixmap)(priv->pixmap); front->pitch = pixmap->devKind; front->cpp = pixmap->drawable.bitsPerPixel / 8; priv->pixmap = pixmap; diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 288e9dd1..a5f9612b 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -615,7 +615,7 @@ static Bool R100PrepareComposite(int op, pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); if (!pMask) { if (!pSrcPicture->pDrawable) - dixDestroyPixmap(pSrc, 0); + pScreen->DestroyPixmap(pSrc); RADEON_FALLBACK(("Failed to create solid scratch pixmap\n")); } } @@ -977,7 +977,7 @@ static Bool R200PrepareComposite(int op, PicturePtr pSrcPicture, pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); if (!pMask) { if (!pSrcPicture->pDrawable) - dixDestroyPixmap(pSrc, 0); + pScreen->DestroyPixmap(pSrc); RADEON_FALLBACK(("Failed to create solid scratch pixmap\n")); } } @@ -1469,7 +1469,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture, pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); if (!pMask) { if (!pSrcPicture->pDrawable) - dixDestroyPixmap(pSrc, 0); + pScreen->DestroyPixmap(pSrc); RADEON_FALLBACK(("Failed to create solid scratch pixmap\n")); } } @@ -2148,10 +2148,10 @@ static void RadeonDoneComposite(PixmapPtr pDst) RadeonFinishComposite(pDst); if (!accel_state->src_pic->pDrawable) - dixDestroyPixmap(accel_state->src_pix, 0); + pScreen->DestroyPixmap(accel_state->src_pix); if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable) - dixDestroyPixmap(accel_state->msk_pix, 0); + pScreen->DestroyPixmap(accel_state->msk_pix); } #define VTX_OUT_MASK(_dstX, _dstY, _srcX, _srcY, _maskX, _maskY) \ diff --git a/src/radeon_exa_shared.c b/src/radeon_exa_shared.c index 1378876b..94238a5a 100644 --- a/src/radeon_exa_shared.c +++ b/src/radeon_exa_shared.c @@ -132,7 +132,7 @@ PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid) bo = radeon_get_pixmap_bo(pPix)->bo.radeon; if (radeon_bo_map(bo, 1)) { - dixDestroyPixmap(pPix, 0); + pScreen->DestroyPixmap(pPix); return NULL; } diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c index 8ca413f7..ccf99941 100644 --- a/src/radeon_glamor.c +++ b/src/radeon_glamor.c @@ -199,7 +199,7 @@ 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; + Bool ret; #endif if (pixmap->refcnt == 1) { @@ -214,8 +214,7 @@ static Bool radeon_glamor_destroy_pixmap(PixmapPtr pixmap) return TRUE; #else screen->DestroyPixmap = info->glamor.SavedDestroyPixmap; - if (screen->DestroyPixmap(pixmap)) - ret = screen->DestroyPixmap(pixmap); + ret = screen->DestroyPixmap(pixmap); info->glamor.SavedDestroyPixmap = screen->DestroyPixmap; screen->DestroyPixmap = radeon_glamor_destroy_pixmap; @@ -360,7 +359,7 @@ radeon_glamor_set_pixmap_bo(DrawablePtr drawable, PixmapPtr pixmap) 0, 0, pixmap->devKind, NULL); old->devPrivate.ptr = NULL; - dixDestroyPixmap(pixmap, 0); + screen->DestroyPixmap(pixmap); return old; } diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 8b4d2dd8..51b00dd9 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -209,7 +209,7 @@ static void RADEONFreeRec(ScrnInfoPtr pScrn) info = RADEONPTR(pScrn); if (info) { if (info->fbcon_pixmap) - dixDestroyPixmap(info->fbcon_pixmap, 0); + pScrn->pScreen->DestroyPixmap(info->fbcon_pixmap); if (info->accel_state) { free(info->accel_state); From f35a6c771b249c63d9b493bcc09b1baacf845e83 Mon Sep 17 00:00:00 2001 From: callmetango Date: Fri, 4 Jul 2025 21:56:43 +0000 Subject: [PATCH 02/75] .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 --- .github/ISSUE_TEMPLATE/01-bug-report.yml | 65 +++++++++++++++++++ .github/ISSUE_TEMPLATE/02-feature-request.yml | 49 ++++++++++++++ .github/ISSUE_TEMPLATE/03-code-cleanup.yml | 49 ++++++++++++++ .github/ISSUE_TEMPLATE/04-doc-update.yml | 38 +++++++++++ .github/ISSUE_TEMPLATE/05-org-task.yml | 43 ++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 +++ 6 files changed, 252 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/01-bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/02-feature-request.yml create mode 100644 .github/ISSUE_TEMPLATE/03-code-cleanup.yml create mode 100644 .github/ISSUE_TEMPLATE/04-doc-update.yml create mode 100644 .github/ISSUE_TEMPLATE/05-org-task.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/01-bug-report.yml b/.github/ISSUE_TEMPLATE/01-bug-report.yml new file mode 100644 index 00000000..9f41f595 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/01-bug-report.yml @@ -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. diff --git a/.github/ISSUE_TEMPLATE/02-feature-request.yml b/.github/ISSUE_TEMPLATE/02-feature-request.yml new file mode 100644 index 00000000..94e69e72 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/02-feature-request.yml @@ -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. diff --git a/.github/ISSUE_TEMPLATE/03-code-cleanup.yml b/.github/ISSUE_TEMPLATE/03-code-cleanup.yml new file mode 100644 index 00000000..9ffdb873 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/03-code-cleanup.yml @@ -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. diff --git a/.github/ISSUE_TEMPLATE/04-doc-update.yml b/.github/ISSUE_TEMPLATE/04-doc-update.yml new file mode 100644 index 00000000..8d19facd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/04-doc-update.yml @@ -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. diff --git a/.github/ISSUE_TEMPLATE/05-org-task.yml b/.github/ISSUE_TEMPLATE/05-org-task.yml new file mode 100644 index 00000000..22fa94f0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/05-org-task.yml @@ -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. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..5d1b3a85 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -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. From 1636af640572fdf17025c3c75dcff2a746646000 Mon Sep 17 00:00:00 2001 From: Joseph Crowell Date: Mon, 21 Jul 2025 19:50:50 +1000 Subject: [PATCH 03/75] 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. --- src/radeon_glamor.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c index 8ca413f7..30a38a44 100644 --- a/src/radeon_glamor.c +++ b/src/radeon_glamor.c @@ -463,12 +463,6 @@ 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; From f35c98040393c08d19ffa9e8272075a2590b21e0 Mon Sep 17 00:00:00 2001 From: Oleh Nykyforchyn Date: Mon, 14 Jul 2025 20:35:40 +0300 Subject: [PATCH 04/75] 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 --- src/radeon_glamor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c index 30a38a44..ea333e54 100644 --- a/src/radeon_glamor.c +++ b/src/radeon_glamor.c @@ -213,10 +213,10 @@ static Bool radeon_glamor_destroy_pixmap(PixmapPtr 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; From 1fa0787cd4662fda5ae1f4cc703a9337a185a939 Mon Sep 17 00:00:00 2001 From: Oleh Nykyforchyn Date: Tue, 15 Jul 2025 00:21:33 +0300 Subject: [PATCH 05/75] 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 --- configure.ac | 6 ------ src/radeon_glamor.c | 13 +------------ 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/configure.ac b/configure.ac index cf76caf7..5d84f208 100644 --- a/configure.ac +++ b/configure.ac @@ -133,12 +133,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])], diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c index ea333e54..9630b92d 100644 --- a/src/radeon_glamor.c +++ b/src/radeon_glamor.c @@ -196,23 +196,13 @@ 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 if (info->glamor.SavedDestroyPixmap) { screen->DestroyPixmap = info->glamor.SavedDestroyPixmap; ret = screen->DestroyPixmap(pixmap); @@ -220,7 +210,6 @@ static Bool radeon_glamor_destroy_pixmap(PixmapPtr pixmap) screen->DestroyPixmap = radeon_glamor_destroy_pixmap; return ret; -#endif } static PixmapPtr From aefc66b3891100bfd62d2c62c3bdc5e37ab457e1 Mon Sep 17 00:00:00 2001 From: Oleh Nykyforchyn Date: Tue, 15 Jul 2025 14:59:03 +0300 Subject: [PATCH 06/75] 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 --- src/radeon_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 8b4d2dd8..abc31df2 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -107,7 +107,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 From 4d63acb2b5292ab8fdafe330ba299cc35a163454 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 24 Jul 2025 17:18:09 +0200 Subject: [PATCH 07/75] .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 --- .github/actions/build-driver/action.yaml | 69 +++++++++++++++++ .github/scripts/conf.sh | 13 ++++ .github/scripts/github/make-release | 17 +++++ .github/scripts/install-prereq.sh | 15 ++++ .github/scripts/ubuntu/install-pkg.sh | 94 ++++++++++++++++++++++++ .github/scripts/util.sh | 85 +++++++++++++++++++++ .github/workflows/build.yml | 43 +++++++++++ 7 files changed, 336 insertions(+) create mode 100644 .github/actions/build-driver/action.yaml create mode 100644 .github/scripts/conf.sh create mode 100755 .github/scripts/github/make-release create mode 100755 .github/scripts/install-prereq.sh create mode 100755 .github/scripts/ubuntu/install-pkg.sh create mode 100644 .github/scripts/util.sh create mode 100644 .github/workflows/build.yml diff --git a/.github/actions/build-driver/action.yaml b/.github/actions/build-driver/action.yaml new file mode 100644 index 00000000..3032abda --- /dev/null +++ b/.github/actions/build-driver/action.yaml @@ -0,0 +1,69 @@ +name: 'build driver' +description: 'build driver against specific Xserver' +inputs: + xserver-version: + required: true + +runs: + using: "composite" + steps: + - name: check out driver repo + uses: actions/checkout@v4 + + - name: prepare build environment + shell: bash + run: | + MACHINE=`gcc -dumpmachine` + echo "MACHINE=$MACHINE" >> "$GITHUB_ENV" + echo "PKG_CONFIG_PATH=$X11_PREFIX/share/pkgconfig:$X11_PREFIX/lib/$MACHINE/pkgconfig:$X11_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" >> "$GITHUB_ENV" + sudo chown root /bin/tar && sudo chmod u+s /bin/tar + + - name: apt cache + uses: actions/cache@v4 + with: + path: /var/cache/apt + key: apt-cache-${{ hashFiles('.github/scripts/ubuntu/install-pkg.sh') }} + restore-keys: apt-cache- + + - name: pkg install + shell: bash + run: sudo .github/scripts/ubuntu/install-pkg.sh + + - name: X11 prereq cache + uses: actions/cache@v4 + with: + path: | + ${{ env.X11_PREFIX }} + key: ${{ runner.name }}-x11-deps-${{ hashFiles('.github/scripts/install-prereq.sh') }} + restore-keys: ${{ runner.name }}-x11-deps- + + - name: generic prereq + shell: bash + run: .github/scripts/install-prereq.sh + + - name: check out xserver repo + uses: actions/checkout@v4 + with: + repository: X11Libre/xserver + path: xserver-sdk + ref: ${{ inputs.xserver-version }} + + - name: build xserver sdk + shell: bash + env: + MESON_ARGS: -Dc_args="-fno-common" -Dprefix=/usr -Dnamespace=false -Dxselinux=false -Dxephyr=false -Dwerror=false -Dxcsecurity=false -Dxorg=true -Dxvfb=false -Dxnest=false -Ddocs=false + run: | + cd xserver-sdk + echo -n > .meson_environment + echo "export MESON_BUILDDIR=$MESON_BUILDDIR" >> .meson_environment + echo "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> .meson_environment + .gitlab-ci/meson-build.sh --skip-test + sudo meson install --no-rebuild -C "$MESON_BUILDDIR" + sudo mkdir -p /usr/local/lib/$MACHINE/xorg/modules # /home/runner/x11/lib/xorg/modules + sudo chown -R runner /usr/local/lib/$MACHINE/xorg/modules # /home/runner/x11/lib/xorg/modules + + - name: compile driver + shell: bash + run: | + CFLAGS="-Wall" ./autogen.sh # --prefix=$X11_PREFIX + CFLAGS="-Wall" make -j # install diff --git a/.github/scripts/conf.sh b/.github/scripts/conf.sh new file mode 100644 index 00000000..7cdab25d --- /dev/null +++ b/.github/scripts/conf.sh @@ -0,0 +1,13 @@ +export X11_OS=`uname -s` + +export X11_PREFIX="${X11_PREFIX:-$HOME/x11}" +export X11_BUILD_DIR="${X11_BUILD_DIR:-$HOME/build-deps}" +export DRV_BUILD_DIR="${DRV_BUILD_DIR:-$HOME/build-drivers}" + +case "$X11_OS" in +Darwin) export FDO_CI_CONCURRENT=`sysctl -n hw.logicalcpu` ;; +Linux) export FDO_CI_CONCURRENT=`nproc` ;; +esac + +export PATH="$X11_PREFIX/bin:$PATH" +export PKG_CONFIG_PATH="$X11_PREFIX/lib/x86_64-linux-gnu/pkgconfig:$X11_PREFIX/lib/pkgconfig:$X11_PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" diff --git a/.github/scripts/github/make-release b/.github/scripts/github/make-release new file mode 100755 index 00000000..89152bac --- /dev/null +++ b/.github/scripts/github/make-release @@ -0,0 +1,17 @@ +#!/bin/bash + +err() { + echo "$0: $*" +} + +[ "$GITHUB_REPOSITORY" ] || err "missing variable GITHUB_REPOSITORY" + +TITLE=$(git tag -l --format='%(contents)' $tag) + +echo "tag=$tag" +echo "title=$TITLE" + +gh release create "$tag" \ + --repo="$GITHUB_REPOSITORY" \ + --title="$tag" \ + --generate-notes diff --git a/.github/scripts/install-prereq.sh b/.github/scripts/install-prereq.sh new file mode 100755 index 00000000..e2bd8465 --- /dev/null +++ b/.github/scripts/install-prereq.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +. .github/scripts/util.sh + +mkdir -p $X11_BUILD_DIR +cd $X11_BUILD_DIR + +if [ "$X11_OS" = "Linux" ]; then +build_meson drm https://gitlab.freedesktop.org/mesa/drm libdrm-2.4.121 "" \ + -Domap=enabled +fi +build_meson libxcvt https://gitlab.freedesktop.org/xorg/lib/libxcvt libxcvt-0.1.0 +build_ac xorgproto https://gitlab.freedesktop.org/xorg/proto/xorgproto xorgproto-2024.1 diff --git a/.github/scripts/ubuntu/install-pkg.sh b/.github/scripts/ubuntu/install-pkg.sh new file mode 100755 index 00000000..0cdaf882 --- /dev/null +++ b/.github/scripts/ubuntu/install-pkg.sh @@ -0,0 +1,94 @@ +#!/bin/bash + +set -e + +# Packages which are needed by this script, but not for the xserver build +EPHEMERAL=" + libexpat-dev + libgles2-mesa-dev + libxkbcommon-dev + x11-utils + x11-xserver-utils + xauth + xvfb +" + +apt-get update + +apt-get install -y \ + $EPHEMERAL \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + libaudit-dev \ + libbsd-dev \ + libcairo2-dev \ + libdbus-1-dev \ + libdrm-dev \ + libegl1-mesa-dev \ + libepoxy-dev \ + libevdev2 \ + libexpat1 \ + libffi-dev \ + libgbm-dev \ + libgcrypt-dev \ + libgl1-mesa-dev \ + libgles2 \ + libglx-mesa0 \ + libinput10 \ + libinput-dev \ + libnvidia-egl-wayland-dev \ + libpciaccess-dev \ + libpixman-1-dev \ + libspice-protocol-dev \ + libsystemd-dev \ + libudev-dev \ + libunwind-dev \ + libx11-dev \ + libx11-xcb-dev \ + libxau-dev \ + libxaw7-dev \ + libxcb-glx0-dev \ + libxcb-icccm4-dev \ + libxcb-image0-dev \ + libxcb-keysyms1-dev \ + libxcb-randr0-dev \ + libxcb-render-util0-dev \ + libxcb-render0-dev \ + libxcb-shape0-dev \ + libxcb-shm0-dev \ + libxcb-util0-dev \ + libxcb-xf86dri0-dev \ + libxcb-xkb-dev \ + libxcb-xv0-dev \ + libxcb1-dev \ + libxdmcp-dev \ + libxext-dev \ + libxfixes-dev \ + libxfont-dev \ + libxi-dev \ + libxinerama-dev \ + libxkbcommon0 \ + libxkbfile-dev \ + libxmu-dev \ + libxmuu-dev \ + libxpm-dev \ + libxrender-dev \ + libxres-dev \ + libxshmfence-dev \ + libxt-dev \ + libxtst-dev \ + libxv-dev \ + mesa-common-dev \ + meson \ + nettle-dev \ + libpango1.0-dev \ + pkg-config \ + x11-xkb-utils \ + xfonts-utils \ + xkb-data \ + xtrans-dev \ + xutils-dev \ + libxaw7-dev \ + python3-mako diff --git a/.github/scripts/util.sh b/.github/scripts/util.sh new file mode 100644 index 00000000..dea16ae9 --- /dev/null +++ b/.github/scripts/util.sh @@ -0,0 +1,85 @@ + +. .github/scripts/conf.sh + +clone_source() { + local pkgname="$1" + local url="$2" + local ref="$3" + local commit="$4" + + if [ ! -f $pkgname/.git/config ]; then + echo "need to clone $pkgname" + if [ "$commit" ]; then + git clone $url $pkgname --branch=$ref + else + git clone $url $pkgname --branch=$ref --depth 1 + fi + else + echo "already cloned $pkgname" + fi + + if [ "$commit" ]; then + ( cd $pkgname && git checkout -f "$commit" ) + fi +} + +build_meson() { + local pkgname="$1" + local url="$2" + local ref="$3" + local commit="$4" + shift + shift + shift + shift || true + if [ -f $X11_PREFIX/$pkgname.DONE ]; then + echo "package $pkgname already built" + else + clone_source "$pkgname" "$url" "$ref" "$commit" + ( + cd $pkgname + meson "$@" build -Dprefix=$X11_PREFIX + ninja -j${FDO_CI_CONCURRENT:-4} -C build install + ) + touch $X11_PREFIX/$pkgname.DONE + fi +} + +build_ac() { + local pkgname="$1" + local url="$2" + local ref="$3" + local commit="$4" + shift + shift + shift + shift || true + if [ -f $X11_PREFIX/$pkgname.DONE ]; then + echo "package $pkgname already built" + else + clone_source "$pkgname" "$url" "$ref" "$commit" + ( + cd $pkgname + ./autogen.sh --prefix=$X11_PREFIX + make -j${FDO_CI_CONCURRENT:-4} install + ) + touch $X11_PREFIX/$pkgname.DONE + fi +} + +build_drv_ac() { + local pkgname="$1" + local url="$2" + local ref="$3" + local commit="$4" + shift + shift + shift + shift || true + clone_source "$pkgname" "$url" "$ref" "$commit" + ( + cd $pkgname + ./autogen.sh # --prefix=$X11_PREFIX + make -j${FDO_CI_CONCURRENT:-4} # install + ) +} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..23644b02 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: Build driver + +permissions: + contents: write + +env: + MESON_BUILDDIR: "build" + X11_PREFIX: /home/runner/x11 + X11_BUILD_DIR: /home/runner/build-deps + +on: + push: + pull_request: + +jobs: + for-xserver-stable-25_0: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/build-driver + with: + xserver-version: xlibre-xserver-25.0.0.5 + + for-xserver-master: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/build-driver + with: + xserver-version: master + + release: + name: Release pushed tag + runs-on: ubuntu-latest + if: ${{ startsWith(github.ref, 'refs/tags/xlibre-') }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Create release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref_name }} + run: .github/scripts/github/make-release From a1af1a366579892fa07e20d5bad8fcd3c700b31a Mon Sep 17 00:00:00 2001 From: b-aaz <85005689+b-aaz@users.noreply.github.com> Date: Thu, 10 Jul 2025 22:11:57 +0000 Subject: [PATCH 08/75] 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 --- Makefile.am | 4 ++++ configure.ac | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index d14ed8f9..5f815325 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/configure.ac b/configure.ac index 5d84f208..82af192c 100644 --- a/configure.ac +++ b/configure.ac @@ -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) From 31f33b3503dcfc8a6a237466a221d2cb17e1fc82 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 28 Jul 2025 14:45:18 +0200 Subject: [PATCH 09/75] 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: ae92d1765fa370a8d94c2856ad6c45d273ec3c69 Signed-off-by: Enrico Weigelt, metux IT consult --- configure.ac | 10 ---------- src/radeon_glamor.c | 6 +----- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index 82af192c..29302a56 100644 --- a/configure.ac +++ b/configure.ac @@ -161,16 +161,6 @@ AC_CHECK_DECL(RegionDuplicate, [#include #include ]) -AC_CHECK_DECL(fbGlyphs, - [AC_DEFINE(HAVE_FBGLYPHS, 1, [Have fbGlyphs API])], [], - [#include - #include - #include - #include - #include - #include - #include ]) - AC_CHECK_DECL(xf86CursorResetCursor, [AC_DEFINE(HAVE_XF86_CURSOR_RESET_CURSOR, 1, [Have xf86CursorResetCursor API])], [], diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c index 9630b92d..27cfc3b0 100644 --- a/src/radeon_glamor.c +++ b/src/radeon_glamor.c @@ -425,18 +425,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; @@ -458,7 +454,7 @@ radeon_glamor_init(ScreenPtr screen) 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 */ From e1557e2ab23e4083537952ebb32b4cc2c512d85c Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 28 Jul 2025 15:20:41 +0200 Subject: [PATCH 10/75] 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 --- src/radeon_kms.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/radeon_kms.c b/src/radeon_kms.c index abc31df2..b8bf5ddf 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -60,6 +60,7 @@ #include +#include "fb.h" #include "radeon_chipinfo_gen.h" #include "radeon_bo_gem.h" From 648188b8974c5e4a8371e3846fbbfb8f8a66c0be Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 28 Jul 2025 15:22:27 +0200 Subject: [PATCH 11/75] 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 --- src/radeon_glamor_wrappers.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/radeon_glamor_wrappers.c b/src/radeon_glamor_wrappers.c index bc47cc89..c0c8eb12 100644 --- a/src/radeon_glamor_wrappers.c +++ b/src/radeon_glamor_wrappers.c @@ -34,6 +34,8 @@ #ifdef USE_GLAMOR +#include "fb.h" + #include "radeon.h" #include "radeon_bo_helper.h" #include "radeon_glamor.h" From 8528cb61461f20d6eb712440fdf12527f10bea56 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 30 Jul 2025 11:45:12 +0200 Subject: [PATCH 12/75] radeon_glamor_wrappers: fix missing include of fbpict.h We're calling fbComposite() and fbAddTraps() here, which are defined in . Signed-off-by: Enrico Weigelt, metux IT consult --- src/radeon_glamor_wrappers.c | 3 ++- src/radeon_kms.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/radeon_glamor_wrappers.c b/src/radeon_glamor_wrappers.c index c0c8eb12..2b39f58a 100644 --- a/src/radeon_glamor_wrappers.c +++ b/src/radeon_glamor_wrappers.c @@ -34,7 +34,8 @@ #ifdef USE_GLAMOR -#include "fb.h" +#include +#include #include "radeon.h" #include "radeon_bo_helper.h" diff --git a/src/radeon_kms.c b/src/radeon_kms.c index b8bf5ddf..a657797a 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -60,7 +60,8 @@ #include -#include "fb.h" +#include + #include "radeon_chipinfo_gen.h" #include "radeon_bo_gem.h" From dd0c9a60345ea44f7b422aefde0a9d384c62f97b Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 14 Jul 2025 21:51:28 +0200 Subject: [PATCH 13/75] 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 --- src/drmmode_display.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index af598999..7f101ae0 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -3327,12 +3327,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)); } From f0f7efa60683644d3595eab06706f6d34fbc04c9 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 14 Jul 2025 21:55:43 +0200 Subject: [PATCH 14/75] drop support for Xserver < 1.15.99 Signed-off-by: Enrico Weigelt, metux IT consult --- src/drmmode_display.c | 12 ------------ src/radeon_glamor.c | 9 --------- src/radeon_probe.c | 2 -- 3 files changed, 23 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 7f101ae0..07847105 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -672,12 +672,7 @@ 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); @@ -1182,8 +1177,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 +1186,6 @@ static Bool drmmode_load_cursor_argb_check(xf86CrtcPtr crtc, CARD32 * image) return TRUE; } -#endif - static void drmmode_hide_cursor (xf86CrtcPtr crtc) { @@ -1406,10 +1397,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, diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c index 27cfc3b0..91ea596f 100644 --- a/src/radeon_glamor.c +++ b/src/radeon_glamor.c @@ -128,15 +128,6 @@ radeon_glamor_pre_init(ScrnInfoPtr scrn) 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, diff --git a/src/radeon_probe.c b/src/radeon_probe.c index 04f9e559..ab8e9348 100644 --- a/src/radeon_probe.c +++ b/src/radeon_probe.c @@ -197,10 +197,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; } From ca1779c468d5f41b128430b23230a7dea111fbc6 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 14 Jul 2025 21:59:50 +0200 Subject: [PATCH 15/75] drop support for xserver < 1.16.99.901 Signed-off-by: Enrico Weigelt, metux IT consult --- src/radeon.h | 6 +----- src/radeon_kms.c | 10 +--------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/radeon.h b/src/radeon.h index 6d1d21ee..d8a17516 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -681,11 +681,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); diff --git a/src/radeon_kms.c b/src/radeon_kms.c index a657797a..01cfccab 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -1736,11 +1736,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); @@ -1750,11 +1746,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); From 5e1ad66f0dad764817bb8f27e0be27478030b3a8 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 14 Jul 2025 22:01:40 +0200 Subject: [PATCH 16/75] drop support for xserver < 1.17.99.901 Signed-off-by: Enrico Weigelt, metux IT consult --- src/drmmode_display.c | 4 ---- src/drmmode_display.h | 2 -- 2 files changed, 6 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 07847105..2c35650a 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1567,7 +1567,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); @@ -1606,7 +1605,6 @@ drmmode_output_attach_tile(xf86OutputPtr output) set = &tile_info; } xf86OutputSetTile(output, set); -#endif } static int @@ -1701,9 +1699,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); diff --git a/src/drmmode_display.h b/src/drmmode_display.h index 8cd8a0a6..29693f07 100644 --- a/src/drmmode_display.h +++ b/src/drmmode_display.h @@ -142,9 +142,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; From 84bc1933e7560adb2ed432753a3203e61bd95ad3 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 14 Jul 2025 22:06:18 +0200 Subject: [PATCH 17/75] drop support for xserver version < 1.18.3 Signed-off-by: Enrico Weigelt, metux IT consult --- src/drmmode_display.c | 13 ------------- src/radeon_dri3.c | 37 ------------------------------------- src/radeon_glamor.c | 9 ++------- src/radeon_kms.c | 5 +---- 4 files changed, 3 insertions(+), 61 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 2c35650a..400f5e0d 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -626,11 +626,6 @@ drmmode_can_use_hw_cursor(xf86CrtcPtr crtc) 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; } @@ -1062,14 +1057,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; diff --git a/src/radeon_dri3.c b/src/radeon_dri3.c index f8f91c4b..3136de30 100644 --- a/src/radeon_dri3.c +++ b/src/radeon_dri3.c @@ -117,38 +117,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 +221,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 }; diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c index 91ea596f..6881a33e 100644 --- a/src/radeon_glamor.c +++ b/src/radeon_glamor.c @@ -81,13 +81,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) { diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 01cfccab..8f70300c 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -2391,10 +2391,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) { From c209a55f0e6789e08906b60a3ed4ece03a7a2114 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 14 Jul 2025 22:11:33 +0200 Subject: [PATCH 18/75] drop support for xserver version < 1.19.99.1 Signed-off-by: Enrico Weigelt, metux IT consult --- src/drmmode_display.c | 9 +-------- src/radeon_glamor.c | 15 ++------------- src/radeon_probe.c | 4 ---- 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 400f5e0d..bd7c2566 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -44,11 +44,6 @@ #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 -#endif - #include "drmmode_display.h" /* DPMS */ @@ -434,9 +429,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) diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c index 6881a33e..b1c6df0f 100644 --- a/src/radeon_glamor.c +++ b/src/radeon_glamor.c @@ -115,14 +115,6 @@ radeon_glamor_pre_init(ScrnInfoPtr scrn) 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; - } - info->gbm = gbm_create_device(pRADEONEnt->fd); if (!info->gbm) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, @@ -168,11 +160,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, diff --git a/src/radeon_probe.c b/src/radeon_probe.c index ab8e9348..dd6c8b84 100644 --- a/src/radeon_probe.c +++ b/src/radeon_probe.c @@ -49,11 +49,7 @@ #include "xf86drmMode.h" -#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,19,99,1,0) #include -#else -#include "dri.h" -#endif #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include From 445749d1981798820ba71b17549ff9d2a57e8645 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 14 Jul 2025 22:13:37 +0200 Subject: [PATCH 19/75] drop support for xserver version < 1.20.99 Signed-off-by: Enrico Weigelt, metux IT consult --- src/radeon_glamor.c | 4 ---- src/radeon_present.c | 5 ----- 2 files changed, 9 deletions(-) diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c index b1c6df0f..c03592db 100644 --- a/src/radeon_glamor.c +++ b/src/radeon_glamor.c @@ -104,11 +104,7 @@ 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); diff --git a/src/radeon_present.c b/src/radeon_present.c index d010aa19..303e187f 100644 --- a/src/radeon_present.c +++ b/src/radeon_present.c @@ -275,11 +275,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; From bdafcc009a29bfebdf2a627ecc3abeb18e79bb0d Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 8 May 2024 11:57:37 +0200 Subject: [PATCH 20/75] 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 --- src/drmmode_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index bd7c2566..5ba94dac 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1663,7 +1663,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); From 69eb546285ec8e24e0a95a2054e596b15fa7c878 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 8 May 2024 14:33:01 +0200 Subject: [PATCH 21/75] 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 --- src/drmmode_display.c | 2 +- src/radeon_kms.c | 2 +- src/radeon_probe.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 5ba94dac..fd0dea2c 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1424,7 +1424,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; diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 8f70300c..37d69082 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -189,7 +189,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; } diff --git a/src/radeon_probe.c b/src/radeon_probe.c index dd6c8b84..43555019 100644 --- a/src/radeon_probe.c +++ b/src/radeon_probe.c @@ -164,7 +164,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); @@ -258,7 +258,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; From 63e18adf5a61569d4b5dac91afdf52ec7fdfb45e Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:15:19 +0200 Subject: [PATCH 22/75] 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 --- src/evergreen_exa.c | 8 ++++---- src/r600_exa.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index 447ed217..fa821a3f 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -668,7 +668,7 @@ struct formatinfo { }; static struct formatinfo EVERGREENTexFormats[] = { - {PICT_a2r10g10b10, FMT_2_10_10_10}, + {PIXMAN_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}, @@ -727,7 +727,7 @@ 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 PIXMAN_a2r10g10b10: case PICT_x2r10g10b10: case PICT_a2b10g10r10: case PICT_x2b10g10r10: @@ -901,7 +901,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, /* component swizzles */ switch (pPict->format) { - case PICT_a2r10g10b10: + case PIXMAN_a2r10g10b10: case PICT_a1r5g5b5: case PICT_a8r8g8b8: pix_r = SQ_SEL_Z; /* R */ @@ -1439,7 +1439,7 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, cb_conf.surface = accel_state->dst_obj.surface; switch (pDstPicture->format) { - case PICT_a2r10g10b10: + case PIXMAN_a2r10g10b10: case PICT_x2r10g10b10: case PICT_a8r8g8b8: case PICT_x8r8g8b8: diff --git a/src/r600_exa.c b/src/r600_exa.c index 99db0c40..939ae2a2 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -727,7 +727,7 @@ struct formatinfo { }; static struct formatinfo R600TexFormats[] = { - {PICT_a2r10g10b10, FMT_2_10_10_10}, + {PIXMAN_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}, @@ -786,7 +786,7 @@ 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 PIXMAN_a2r10g10b10: case PICT_x2r10g10b10: case PICT_a2b10g10r10: case PICT_x2b10g10r10: @@ -916,7 +916,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, /* component swizzles */ switch (pPict->format) { - case PICT_a2r10g10b10: + case PIXMAN_a2r10g10b10: case PICT_a1r5g5b5: case PICT_a8r8g8b8: pix_r = SQ_SEL_Z; /* R */ @@ -1478,7 +1478,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, cb_conf.surface = accel_state->dst_obj.surface; switch (pDstPicture->format) { - case PICT_a2r10g10b10: + case PIXMAN_a2r10g10b10: case PICT_x2r10g10b10: case PICT_a8r8g8b8: case PICT_x8r8g8b8: From 8e322df5aac0303923e60bf3be765208ecba8d38 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:22:42 +0200 Subject: [PATCH 23/75] 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 --- src/evergreen_exa.c | 8 ++++---- src/r600_exa.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index fa821a3f..feefac45 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -669,7 +669,7 @@ struct formatinfo { static struct formatinfo EVERGREENTexFormats[] = { {PIXMAN_a2r10g10b10, FMT_2_10_10_10}, - {PICT_x2r10g10b10, FMT_2_10_10_10}, + {PIXMAN_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}, @@ -728,7 +728,7 @@ static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) { switch (pDstPicture->format) { case PIXMAN_a2r10g10b10: - case PICT_x2r10g10b10: + case PIXMAN_x2r10g10b10: case PICT_a2b10g10r10: case PICT_x2b10g10r10: *dst_format = COLOR_2_10_10_10; @@ -935,7 +935,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, pix_b = SQ_SEL_W; /* B */ pix_a = SQ_SEL_1; /* A */ break; - case PICT_x2r10g10b10: + case PIXMAN_x2r10g10b10: case PICT_x1r5g5b5: case PICT_x8r8g8b8: case PICT_r5g6b5: @@ -1440,7 +1440,7 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, switch (pDstPicture->format) { case PIXMAN_a2r10g10b10: - case PICT_x2r10g10b10: + case PIXMAN_x2r10g10b10: case PICT_a8r8g8b8: case PICT_x8r8g8b8: case PICT_a1r5g5b5: diff --git a/src/r600_exa.c b/src/r600_exa.c index 939ae2a2..8d01b96f 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -728,7 +728,7 @@ struct formatinfo { static struct formatinfo R600TexFormats[] = { {PIXMAN_a2r10g10b10, FMT_2_10_10_10}, - {PICT_x2r10g10b10, FMT_2_10_10_10}, + {PIXMAN_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}, @@ -787,7 +787,7 @@ static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) { switch (pDstPicture->format) { case PIXMAN_a2r10g10b10: - case PICT_x2r10g10b10: + case PIXMAN_x2r10g10b10: case PICT_a2b10g10r10: case PICT_x2b10g10r10: *dst_format = COLOR_2_10_10_10; @@ -950,7 +950,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, pix_b = SQ_SEL_W; /* B */ pix_a = SQ_SEL_1; /* A */ break; - case PICT_x2r10g10b10: + case PIXMAN_x2r10g10b10: case PICT_x1r5g5b5: case PICT_x8r8g8b8: case PICT_r5g6b5: @@ -1479,7 +1479,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, switch (pDstPicture->format) { case PIXMAN_a2r10g10b10: - case PICT_x2r10g10b10: + case PIXMAN_x2r10g10b10: case PICT_a8r8g8b8: case PICT_x8r8g8b8: case PICT_a1r5g5b5: From 19ae99e1b765af76060ee6a019e9b63a9f3bfb4d Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:26:38 +0200 Subject: [PATCH 24/75] 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 --- src/evergreen_exa.c | 8 ++++---- src/r600_exa.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index feefac45..4640f00e 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -670,7 +670,7 @@ struct formatinfo { static struct formatinfo EVERGREENTexFormats[] = { {PIXMAN_a2r10g10b10, FMT_2_10_10_10}, {PIXMAN_x2r10g10b10, FMT_2_10_10_10}, - {PICT_a2b10g10r10, FMT_2_10_10_10}, + {PIXMAN_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}, @@ -729,7 +729,7 @@ static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) switch (pDstPicture->format) { case PIXMAN_a2r10g10b10: case PIXMAN_x2r10g10b10: - case PICT_a2b10g10r10: + case PIXMAN_a2b10g10r10: case PICT_x2b10g10r10: *dst_format = COLOR_2_10_10_10; break; @@ -909,7 +909,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, pix_b = SQ_SEL_X; /* B */ pix_a = SQ_SEL_W; /* A */ break; - case PICT_a2b10g10r10: + case PIXMAN_a2b10g10r10: case PICT_a8b8g8r8: pix_r = SQ_SEL_X; /* R */ pix_g = SQ_SEL_Y; /* G */ @@ -1448,7 +1448,7 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, default: cb_conf.comp_swap = 1; /* ARGB */ break; - case PICT_a2b10g10r10: + case PIXMAN_a2b10g10r10: case PICT_x2b10g10r10: case PICT_a8b8g8r8: case PICT_x8b8g8r8: diff --git a/src/r600_exa.c b/src/r600_exa.c index 8d01b96f..1c2876b6 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -729,7 +729,7 @@ struct formatinfo { static struct formatinfo R600TexFormats[] = { {PIXMAN_a2r10g10b10, FMT_2_10_10_10}, {PIXMAN_x2r10g10b10, FMT_2_10_10_10}, - {PICT_a2b10g10r10, FMT_2_10_10_10}, + {PIXMAN_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}, @@ -788,7 +788,7 @@ static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) switch (pDstPicture->format) { case PIXMAN_a2r10g10b10: case PIXMAN_x2r10g10b10: - case PICT_a2b10g10r10: + case PIXMAN_a2b10g10r10: case PICT_x2b10g10r10: *dst_format = COLOR_2_10_10_10; break; @@ -924,7 +924,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, pix_b = SQ_SEL_X; /* B */ pix_a = SQ_SEL_W; /* A */ break; - case PICT_a2b10g10r10: + case PIXMAN_a2b10g10r10: case PICT_a8b8g8r8: pix_r = SQ_SEL_X; /* R */ pix_g = SQ_SEL_Y; /* G */ @@ -1487,7 +1487,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, default: cb_conf.comp_swap = 1; /* ARGB */ break; - case PICT_a2b10g10r10: + case PIXMAN_a2b10g10r10: case PICT_x2b10g10r10: case PICT_a8b8g8r8: case PICT_x8b8g8r8: From a9c6061d7b8e1b96b4b551c5abef73e5f6c882d3 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:27:39 +0200 Subject: [PATCH 25/75] 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 --- src/evergreen_exa.c | 8 ++++---- src/r600_exa.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index 4640f00e..ae6e53f7 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -671,7 +671,7 @@ static struct formatinfo EVERGREENTexFormats[] = { {PIXMAN_a2r10g10b10, FMT_2_10_10_10}, {PIXMAN_x2r10g10b10, FMT_2_10_10_10}, {PIXMAN_a2b10g10r10, FMT_2_10_10_10}, - {PICT_x2b10g10r10, FMT_2_10_10_10}, + {PIXMAN_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}, @@ -730,7 +730,7 @@ static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_a2r10g10b10: case PIXMAN_x2r10g10b10: case PIXMAN_a2b10g10r10: - case PICT_x2b10g10r10: + case PIXMAN_x2b10g10r10: *dst_format = COLOR_2_10_10_10; break; case PICT_a8r8g8b8: @@ -916,7 +916,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, pix_b = SQ_SEL_Z; /* B */ pix_a = SQ_SEL_W; /* A */ break; - case PICT_x2b10g10r10: + case PIXMAN_x2b10g10r10: case PICT_x8b8g8r8: pix_r = SQ_SEL_X; /* R */ pix_g = SQ_SEL_Y; /* G */ @@ -1449,7 +1449,7 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, cb_conf.comp_swap = 1; /* ARGB */ break; case PIXMAN_a2b10g10r10: - case PICT_x2b10g10r10: + case PIXMAN_x2b10g10r10: case PICT_a8b8g8r8: case PICT_x8b8g8r8: cb_conf.comp_swap = 0; /* ABGR */ diff --git a/src/r600_exa.c b/src/r600_exa.c index 1c2876b6..dcebcf92 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -730,7 +730,7 @@ static struct formatinfo R600TexFormats[] = { {PIXMAN_a2r10g10b10, FMT_2_10_10_10}, {PIXMAN_x2r10g10b10, FMT_2_10_10_10}, {PIXMAN_a2b10g10r10, FMT_2_10_10_10}, - {PICT_x2b10g10r10, FMT_2_10_10_10}, + {PIXMAN_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}, @@ -789,7 +789,7 @@ static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_a2r10g10b10: case PIXMAN_x2r10g10b10: case PIXMAN_a2b10g10r10: - case PICT_x2b10g10r10: + case PIXMAN_x2b10g10r10: *dst_format = COLOR_2_10_10_10; break; case PICT_a8r8g8b8: @@ -931,7 +931,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, pix_b = SQ_SEL_Z; /* B */ pix_a = SQ_SEL_W; /* A */ break; - case PICT_x2b10g10r10: + case PIXMAN_x2b10g10r10: case PICT_x8b8g8r8: pix_r = SQ_SEL_X; /* R */ pix_g = SQ_SEL_Y; /* G */ @@ -1488,7 +1488,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, cb_conf.comp_swap = 1; /* ARGB */ break; case PIXMAN_a2b10g10r10: - case PICT_x2b10g10r10: + case PIXMAN_x2b10g10r10: case PICT_a8b8g8r8: case PICT_x8b8g8r8: cb_conf.comp_swap = 0; /* ABGR */ From df771ae3a08a0ed57f9ac23d84c5b4d2849b551c Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:28:35 +0200 Subject: [PATCH 26/75] 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 --- src/evergreen_exa.c | 10 +++++----- src/r600_exa.c | 10 +++++----- src/radeon_exa_render.c | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index ae6e53f7..9f710d82 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -672,7 +672,7 @@ static struct formatinfo EVERGREENTexFormats[] = { {PIXMAN_x2r10g10b10, FMT_2_10_10_10}, {PIXMAN_a2b10g10r10, FMT_2_10_10_10}, {PIXMAN_x2b10g10r10, FMT_2_10_10_10}, - {PICT_a8r8g8b8, FMT_8_8_8_8}, + {PIXMAN_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}, @@ -733,7 +733,7 @@ static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_x2b10g10r10: *dst_format = COLOR_2_10_10_10; break; - case PICT_a8r8g8b8: + case PIXMAN_a8r8g8b8: case PICT_x8r8g8b8: case PICT_a8b8g8r8: case PICT_x8b8g8r8: @@ -903,7 +903,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, switch (pPict->format) { case PIXMAN_a2r10g10b10: case PICT_a1r5g5b5: - case PICT_a8r8g8b8: + case PIXMAN_a8r8g8b8: pix_r = SQ_SEL_Z; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_X; /* B */ @@ -1166,7 +1166,7 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u /* component swizzles */ switch (format) { case PICT_a1r5g5b5: - case PICT_a8r8g8b8: + case PIXMAN_a8r8g8b8: pix_r = zf; /* R */ pix_g = yf; /* G */ pix_b = xf; /* B */ @@ -1441,7 +1441,7 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, switch (pDstPicture->format) { case PIXMAN_a2r10g10b10: case PIXMAN_x2r10g10b10: - case PICT_a8r8g8b8: + case PIXMAN_a8r8g8b8: case PICT_x8r8g8b8: case PICT_a1r5g5b5: case PICT_x1r5g5b5: diff --git a/src/r600_exa.c b/src/r600_exa.c index dcebcf92..d1377a22 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -731,7 +731,7 @@ static struct formatinfo R600TexFormats[] = { {PIXMAN_x2r10g10b10, FMT_2_10_10_10}, {PIXMAN_a2b10g10r10, FMT_2_10_10_10}, {PIXMAN_x2b10g10r10, FMT_2_10_10_10}, - {PICT_a8r8g8b8, FMT_8_8_8_8}, + {PIXMAN_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}, @@ -792,7 +792,7 @@ static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_x2b10g10r10: *dst_format = COLOR_2_10_10_10; break; - case PICT_a8r8g8b8: + case PIXMAN_a8r8g8b8: case PICT_x8r8g8b8: case PICT_a8b8g8r8: case PICT_x8b8g8r8: @@ -918,7 +918,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, switch (pPict->format) { case PIXMAN_a2r10g10b10: case PICT_a1r5g5b5: - case PICT_a8r8g8b8: + case PIXMAN_a8r8g8b8: pix_r = SQ_SEL_Z; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_X; /* B */ @@ -1210,7 +1210,7 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32 /* component swizzles */ switch (format) { case PICT_a1r5g5b5: - case PICT_a8r8g8b8: + case PIXMAN_a8r8g8b8: pix_r = zf; /* R */ pix_g = yf; /* G */ pix_b = xf; /* B */ @@ -1480,7 +1480,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, switch (pDstPicture->format) { case PIXMAN_a2r10g10b10: case PIXMAN_x2r10g10b10: - case PICT_a8r8g8b8: + case PIXMAN_a8r8g8b8: case PICT_x8r8g8b8: case PICT_a1r5g5b5: case PICT_x1r5g5b5: diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 288e9dd1..f7ac2b6a 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -74,7 +74,7 @@ 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}, + {PIXMAN_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}, @@ -83,7 +83,7 @@ static struct formatinfo R100TexFormats[] = { }; static struct formatinfo R200TexFormats[] = { - {PICT_a8r8g8b8, R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP}, + {PIXMAN_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}, @@ -94,7 +94,7 @@ static struct formatinfo R200TexFormats[] = { }; static struct formatinfo R300TexFormats[] = { - {PICT_a8r8g8b8, R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8)}, + {PIXMAN_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)}, @@ -111,7 +111,7 @@ static struct formatinfo R300TexFormats[] = { static Bool RADEONGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) { switch (pDstPicture->format) { - case PICT_a8r8g8b8: + case PIXMAN_a8r8g8b8: case PICT_x8r8g8b8: *dst_format = RADEON_COLOR_FORMAT_ARGB8888; break; @@ -136,7 +136,7 @@ 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 PIXMAN_a8r8g8b8: case PICT_x8r8g8b8: case PICT_a8b8g8r8: case PICT_x8b8g8r8: @@ -1594,7 +1594,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture, /* shader output swizzling */ switch (pDstPicture->format) { - case PICT_a8r8g8b8: + case PIXMAN_a8r8g8b8: case PICT_x8r8g8b8: default: output_fmt = (R300_OUT_FMT_C4_8 | From 495f3d3689389b93d74d17724829cbed44263761 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:36:06 +0200 Subject: [PATCH 27/75] 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 --- src/evergreen_exa.c | 10 +++++----- src/r600_exa.c | 10 +++++----- src/radeon_exa_render.c | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index 9f710d82..8fd76420 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -673,7 +673,7 @@ static struct formatinfo EVERGREENTexFormats[] = { {PIXMAN_a2b10g10r10, FMT_2_10_10_10}, {PIXMAN_x2b10g10r10, FMT_2_10_10_10}, {PIXMAN_a8r8g8b8, FMT_8_8_8_8}, - {PICT_x8r8g8b8, FMT_8_8_8_8}, + {PIXMAN_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}, @@ -734,7 +734,7 @@ static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) *dst_format = COLOR_2_10_10_10; break; case PIXMAN_a8r8g8b8: - case PICT_x8r8g8b8: + case PIXMAN_x8r8g8b8: case PICT_a8b8g8r8: case PICT_x8b8g8r8: case PICT_b8g8r8a8: @@ -937,7 +937,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, break; case PIXMAN_x2r10g10b10: case PICT_x1r5g5b5: - case PICT_x8r8g8b8: + case PIXMAN_x8r8g8b8: case PICT_r5g6b5: pix_r = SQ_SEL_Z; /* R */ pix_g = SQ_SEL_Y; /* G */ @@ -1197,7 +1197,7 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u pix_a = 1.0; /* A */ break; case PICT_x1r5g5b5: - case PICT_x8r8g8b8: + case PIXMAN_x8r8g8b8: case PICT_r5g6b5: pix_r = zf; /* R */ pix_g = yf; /* G */ @@ -1442,7 +1442,7 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, case PIXMAN_a2r10g10b10: case PIXMAN_x2r10g10b10: case PIXMAN_a8r8g8b8: - case PICT_x8r8g8b8: + case PIXMAN_x8r8g8b8: case PICT_a1r5g5b5: case PICT_x1r5g5b5: default: diff --git a/src/r600_exa.c b/src/r600_exa.c index d1377a22..7b8a08c6 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -732,7 +732,7 @@ static struct formatinfo R600TexFormats[] = { {PIXMAN_a2b10g10r10, FMT_2_10_10_10}, {PIXMAN_x2b10g10r10, FMT_2_10_10_10}, {PIXMAN_a8r8g8b8, FMT_8_8_8_8}, - {PICT_x8r8g8b8, FMT_8_8_8_8}, + {PIXMAN_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}, @@ -793,7 +793,7 @@ static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) *dst_format = COLOR_2_10_10_10; break; case PIXMAN_a8r8g8b8: - case PICT_x8r8g8b8: + case PIXMAN_x8r8g8b8: case PICT_a8b8g8r8: case PICT_x8b8g8r8: case PICT_b8g8r8a8: @@ -952,7 +952,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, break; case PIXMAN_x2r10g10b10: case PICT_x1r5g5b5: - case PICT_x8r8g8b8: + case PIXMAN_x8r8g8b8: case PICT_r5g6b5: pix_r = SQ_SEL_Z; /* R */ pix_g = SQ_SEL_Y; /* G */ @@ -1241,7 +1241,7 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32 pix_a = 1.0; /* A */ break; case PICT_x1r5g5b5: - case PICT_x8r8g8b8: + case PIXMAN_x8r8g8b8: case PICT_r5g6b5: pix_r = zf; /* R */ pix_g = yf; /* G */ @@ -1481,7 +1481,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, case PIXMAN_a2r10g10b10: case PIXMAN_x2r10g10b10: case PIXMAN_a8r8g8b8: - case PICT_x8r8g8b8: + case PIXMAN_x8r8g8b8: case PICT_a1r5g5b5: case PICT_x1r5g5b5: default: diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index f7ac2b6a..d7ca5d81 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -75,7 +75,7 @@ struct formatinfo { */ static struct formatinfo R100TexFormats[] = { {PIXMAN_a8r8g8b8, RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP}, - {PICT_x8r8g8b8, RADEON_TXFORMAT_ARGB8888}, + {PIXMAN_x8r8g8b8, RADEON_TXFORMAT_ARGB8888}, {PICT_r5g6b5, RADEON_TXFORMAT_RGB565}, {PICT_a1r5g5b5, RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP}, {PICT_x1r5g5b5, RADEON_TXFORMAT_ARGB1555}, @@ -84,7 +84,7 @@ static struct formatinfo R100TexFormats[] = { static struct formatinfo R200TexFormats[] = { {PIXMAN_a8r8g8b8, R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP}, - {PICT_x8r8g8b8, R200_TXFORMAT_ARGB8888}, + {PIXMAN_x8r8g8b8, R200_TXFORMAT_ARGB8888}, {PICT_a8b8g8r8, R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP}, {PICT_x8b8g8r8, R200_TXFORMAT_ABGR8888}, {PICT_r5g6b5, R200_TXFORMAT_RGB565}, @@ -95,7 +95,7 @@ static struct formatinfo R200TexFormats[] = { static struct formatinfo R300TexFormats[] = { {PIXMAN_a8r8g8b8, R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8)}, - {PICT_x8r8g8b8, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8)}, + {PIXMAN_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)}, @@ -112,7 +112,7 @@ static Bool RADEONGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) { switch (pDstPicture->format) { case PIXMAN_a8r8g8b8: - case PICT_x8r8g8b8: + case PIXMAN_x8r8g8b8: *dst_format = RADEON_COLOR_FORMAT_ARGB8888; break; case PICT_r5g6b5: @@ -137,7 +137,7 @@ static Bool R300GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) { switch (pDstPicture->format) { case PIXMAN_a8r8g8b8: - case PICT_x8r8g8b8: + case PIXMAN_x8r8g8b8: case PICT_a8b8g8r8: case PICT_x8b8g8r8: case PICT_b8g8r8a8: @@ -1595,7 +1595,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture, /* shader output swizzling */ switch (pDstPicture->format) { case PIXMAN_a8r8g8b8: - case PICT_x8r8g8b8: + case PIXMAN_x8r8g8b8: default: output_fmt = (R300_OUT_FMT_C4_8 | R300_OUT_FMT_C0_SEL_BLUE | From d21e4e2f73eb6be7018680fe5363a8e28d6ca4e2 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:37:57 +0200 Subject: [PATCH 28/75] 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 --- src/evergreen_exa.c | 10 +++++----- src/r600_exa.c | 10 +++++----- src/radeon_exa_render.c | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index 8fd76420..52d73515 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -674,7 +674,7 @@ static struct formatinfo EVERGREENTexFormats[] = { {PIXMAN_x2b10g10r10, FMT_2_10_10_10}, {PIXMAN_a8r8g8b8, FMT_8_8_8_8}, {PIXMAN_x8r8g8b8, FMT_8_8_8_8}, - {PICT_a8b8g8r8, FMT_8_8_8_8}, + {PIXMAN_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}, @@ -735,7 +735,7 @@ static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) break; case PIXMAN_a8r8g8b8: case PIXMAN_x8r8g8b8: - case PICT_a8b8g8r8: + case PIXMAN_a8b8g8r8: case PICT_x8b8g8r8: case PICT_b8g8r8a8: case PICT_b8g8r8x8: @@ -910,7 +910,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, pix_a = SQ_SEL_W; /* A */ break; case PIXMAN_a2b10g10r10: - case PICT_a8b8g8r8: + case PIXMAN_a8b8g8r8: pix_r = SQ_SEL_X; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_Z; /* B */ @@ -1172,7 +1172,7 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u 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 */ @@ -1450,7 +1450,7 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, break; case PIXMAN_a2b10g10r10: case PIXMAN_x2b10g10r10: - case PICT_a8b8g8r8: + case PIXMAN_a8b8g8r8: case PICT_x8b8g8r8: cb_conf.comp_swap = 0; /* ABGR */ break; diff --git a/src/r600_exa.c b/src/r600_exa.c index 7b8a08c6..1bd8eccc 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -733,7 +733,7 @@ static struct formatinfo R600TexFormats[] = { {PIXMAN_x2b10g10r10, FMT_2_10_10_10}, {PIXMAN_a8r8g8b8, FMT_8_8_8_8}, {PIXMAN_x8r8g8b8, FMT_8_8_8_8}, - {PICT_a8b8g8r8, FMT_8_8_8_8}, + {PIXMAN_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}, @@ -794,7 +794,7 @@ static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) break; case PIXMAN_a8r8g8b8: case PIXMAN_x8r8g8b8: - case PICT_a8b8g8r8: + case PIXMAN_a8b8g8r8: case PICT_x8b8g8r8: case PICT_b8g8r8a8: case PICT_b8g8r8x8: @@ -925,7 +925,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, pix_a = SQ_SEL_W; /* A */ break; case PIXMAN_a2b10g10r10: - case PICT_a8b8g8r8: + case PIXMAN_a8b8g8r8: pix_r = SQ_SEL_X; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_Z; /* B */ @@ -1216,7 +1216,7 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32 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 */ @@ -1489,7 +1489,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, break; case PIXMAN_a2b10g10r10: case PIXMAN_x2b10g10r10: - case PICT_a8b8g8r8: + case PIXMAN_a8b8g8r8: case PICT_x8b8g8r8: cb_conf.comp_swap = 0; /* ABGR */ break; diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index d7ca5d81..64da4d54 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -85,7 +85,7 @@ static struct formatinfo R100TexFormats[] = { static struct formatinfo R200TexFormats[] = { {PIXMAN_a8r8g8b8, R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP}, {PIXMAN_x8r8g8b8, R200_TXFORMAT_ARGB8888}, - {PICT_a8b8g8r8, R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP}, + {PIXMAN_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}, @@ -96,7 +96,7 @@ static struct formatinfo R200TexFormats[] = { static struct formatinfo R300TexFormats[] = { {PIXMAN_a8r8g8b8, R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8)}, {PIXMAN_x8r8g8b8, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8)}, - {PICT_a8b8g8r8, R300_EASY_TX_FORMAT(Z, Y, X, W, W8Z8Y8X8)}, + {PIXMAN_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)}, @@ -138,7 +138,7 @@ static Bool R300GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) switch (pDstPicture->format) { case PIXMAN_a8r8g8b8: case PIXMAN_x8r8g8b8: - case PICT_a8b8g8r8: + case PIXMAN_a8b8g8r8: case PICT_x8b8g8r8: case PICT_b8g8r8a8: case PICT_b8g8r8x8: @@ -1603,7 +1603,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture, R300_OUT_FMT_C2_SEL_RED | R300_OUT_FMT_C3_SEL_ALPHA); break; - case PICT_a8b8g8r8: + case PIXMAN_a8b8g8r8: case PICT_x8b8g8r8: output_fmt = (R300_OUT_FMT_C4_8 | R300_OUT_FMT_C0_SEL_RED | From 41465c77a8a84d8a58e4a9dfce2b7671bbdbfa12 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:39:36 +0200 Subject: [PATCH 29/75] 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 --- src/evergreen_exa.c | 10 +++++----- src/r600_exa.c | 10 +++++----- src/radeon_exa_render.c | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index 52d73515..67fafaca 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -675,7 +675,7 @@ static struct formatinfo EVERGREENTexFormats[] = { {PIXMAN_a8r8g8b8, FMT_8_8_8_8}, {PIXMAN_x8r8g8b8, FMT_8_8_8_8}, {PIXMAN_a8b8g8r8, FMT_8_8_8_8}, - {PICT_x8b8g8r8, FMT_8_8_8_8}, + {PIXMAN_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}, @@ -736,7 +736,7 @@ static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_a8r8g8b8: case PIXMAN_x8r8g8b8: case PIXMAN_a8b8g8r8: - case PICT_x8b8g8r8: + case PIXMAN_x8b8g8r8: case PICT_b8g8r8a8: case PICT_b8g8r8x8: *dst_format = COLOR_8_8_8_8; @@ -917,7 +917,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, pix_a = SQ_SEL_W; /* A */ break; case PIXMAN_x2b10g10r10: - case PICT_x8b8g8r8: + case PIXMAN_x8b8g8r8: pix_r = SQ_SEL_X; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_Z; /* B */ @@ -1178,7 +1178,7 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u 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 */ @@ -1451,7 +1451,7 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, case PIXMAN_a2b10g10r10: case PIXMAN_x2b10g10r10: case PIXMAN_a8b8g8r8: - case PICT_x8b8g8r8: + case PIXMAN_x8b8g8r8: cb_conf.comp_swap = 0; /* ABGR */ break; case PICT_b8g8r8a8: diff --git a/src/r600_exa.c b/src/r600_exa.c index 1bd8eccc..746d60e9 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -734,7 +734,7 @@ static struct formatinfo R600TexFormats[] = { {PIXMAN_a8r8g8b8, FMT_8_8_8_8}, {PIXMAN_x8r8g8b8, FMT_8_8_8_8}, {PIXMAN_a8b8g8r8, FMT_8_8_8_8}, - {PICT_x8b8g8r8, FMT_8_8_8_8}, + {PIXMAN_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}, @@ -795,7 +795,7 @@ static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_a8r8g8b8: case PIXMAN_x8r8g8b8: case PIXMAN_a8b8g8r8: - case PICT_x8b8g8r8: + case PIXMAN_x8b8g8r8: case PICT_b8g8r8a8: case PICT_b8g8r8x8: *dst_format = COLOR_8_8_8_8; @@ -932,7 +932,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, pix_a = SQ_SEL_W; /* A */ break; case PIXMAN_x2b10g10r10: - case PICT_x8b8g8r8: + case PIXMAN_x8b8g8r8: pix_r = SQ_SEL_X; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_Z; /* B */ @@ -1222,7 +1222,7 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32 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 */ @@ -1490,7 +1490,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, case PIXMAN_a2b10g10r10: case PIXMAN_x2b10g10r10: case PIXMAN_a8b8g8r8: - case PICT_x8b8g8r8: + case PIXMAN_x8b8g8r8: cb_conf.comp_swap = 0; /* ABGR */ break; case PICT_b8g8r8a8: diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 64da4d54..29f80f12 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -86,7 +86,7 @@ static struct formatinfo R200TexFormats[] = { {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}, - {PICT_x8b8g8r8, R200_TXFORMAT_ABGR8888}, + {PIXMAN_x8b8g8r8, R200_TXFORMAT_ABGR8888}, {PICT_r5g6b5, R200_TXFORMAT_RGB565}, {PICT_a1r5g5b5, R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP}, {PICT_x1r5g5b5, R200_TXFORMAT_ARGB1555}, @@ -97,7 +97,7 @@ static struct formatinfo R300TexFormats[] = { {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)}, - {PICT_x8b8g8r8, R300_EASY_TX_FORMAT(Z, Y, X, ONE, W8Z8Y8X8)}, + {PIXMAN_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)}, @@ -139,7 +139,7 @@ static Bool R300GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_a8r8g8b8: case PIXMAN_x8r8g8b8: case PIXMAN_a8b8g8r8: - case PICT_x8b8g8r8: + case PIXMAN_x8b8g8r8: case PICT_b8g8r8a8: case PICT_b8g8r8x8: *dst_format = R300_COLORFORMAT_ARGB8888; @@ -1604,7 +1604,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture, R300_OUT_FMT_C3_SEL_ALPHA); break; case PIXMAN_a8b8g8r8: - case PICT_x8b8g8r8: + case PIXMAN_x8b8g8r8: output_fmt = (R300_OUT_FMT_C4_8 | R300_OUT_FMT_C0_SEL_RED | R300_OUT_FMT_C1_SEL_GREEN | From fff6cf2b4b285c4750cb6383ef172e6aeacb2811 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:41:15 +0200 Subject: [PATCH 30/75] 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 --- src/evergreen_exa.c | 10 +++++----- src/r600_exa.c | 10 +++++----- src/radeon_exa_render.c | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index 67fafaca..d7f51523 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -676,7 +676,7 @@ static struct formatinfo EVERGREENTexFormats[] = { {PIXMAN_x8r8g8b8, FMT_8_8_8_8}, {PIXMAN_a8b8g8r8, FMT_8_8_8_8}, {PIXMAN_x8b8g8r8, FMT_8_8_8_8}, - {PICT_b8g8r8a8, FMT_8_8_8_8}, + {PIXMAN_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}, @@ -737,7 +737,7 @@ static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_x8r8g8b8: case PIXMAN_a8b8g8r8: case PIXMAN_x8b8g8r8: - case PICT_b8g8r8a8: + case PIXMAN_b8g8r8a8: case PICT_b8g8r8x8: *dst_format = COLOR_8_8_8_8; break; @@ -923,7 +923,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, 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 */ @@ -1184,7 +1184,7 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u 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 */ @@ -1454,7 +1454,7 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, case PIXMAN_x8b8g8r8: cb_conf.comp_swap = 0; /* ABGR */ break; - case PICT_b8g8r8a8: + case PIXMAN_b8g8r8a8: case PICT_b8g8r8x8: cb_conf.comp_swap = 3; /* BGRA */ break; diff --git a/src/r600_exa.c b/src/r600_exa.c index 746d60e9..cf682f40 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -735,7 +735,7 @@ static struct formatinfo R600TexFormats[] = { {PIXMAN_x8r8g8b8, FMT_8_8_8_8}, {PIXMAN_a8b8g8r8, FMT_8_8_8_8}, {PIXMAN_x8b8g8r8, FMT_8_8_8_8}, - {PICT_b8g8r8a8, FMT_8_8_8_8}, + {PIXMAN_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}, @@ -796,7 +796,7 @@ static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_x8r8g8b8: case PIXMAN_a8b8g8r8: case PIXMAN_x8b8g8r8: - case PICT_b8g8r8a8: + case PIXMAN_b8g8r8a8: case PICT_b8g8r8x8: *dst_format = COLOR_8_8_8_8; break; @@ -938,7 +938,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, 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 */ @@ -1228,7 +1228,7 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32 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 */ @@ -1493,7 +1493,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, case PIXMAN_x8b8g8r8: cb_conf.comp_swap = 0; /* ABGR */ break; - case PICT_b8g8r8a8: + case PIXMAN_b8g8r8a8: case PICT_b8g8r8x8: cb_conf.comp_swap = 3; /* BGRA */ break; diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 29f80f12..6e2a3096 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -98,7 +98,7 @@ static struct formatinfo R300TexFormats[] = { {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)}, - {PICT_b8g8r8a8, R300_EASY_TX_FORMAT(W, Z, Y, X, W8Z8Y8X8)}, + {PIXMAN_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)}, @@ -140,7 +140,7 @@ static Bool R300GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_x8r8g8b8: case PIXMAN_a8b8g8r8: case PIXMAN_x8b8g8r8: - case PICT_b8g8r8a8: + case PIXMAN_b8g8r8a8: case PICT_b8g8r8x8: *dst_format = R300_COLORFORMAT_ARGB8888; break; @@ -1611,7 +1611,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture, R300_OUT_FMT_C2_SEL_BLUE | R300_OUT_FMT_C3_SEL_ALPHA); break; - case PICT_b8g8r8a8: + case PIXMAN_b8g8r8a8: case PICT_b8g8r8x8: output_fmt = (R300_OUT_FMT_C4_8 | R300_OUT_FMT_C0_SEL_ALPHA | From 235552fc328b963c1b550c66a5b62d0f79b19b96 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:42:26 +0200 Subject: [PATCH 31/75] 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 --- src/evergreen_exa.c | 10 +++++----- src/r600_exa.c | 10 +++++----- src/radeon_exa_render.c | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index d7f51523..7402f522 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -677,7 +677,7 @@ static struct formatinfo EVERGREENTexFormats[] = { {PIXMAN_a8b8g8r8, FMT_8_8_8_8}, {PIXMAN_x8b8g8r8, FMT_8_8_8_8}, {PIXMAN_b8g8r8a8, FMT_8_8_8_8}, - {PICT_b8g8r8x8, FMT_8_8_8_8}, + {PIXMAN_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}, @@ -738,7 +738,7 @@ static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_a8b8g8r8: case PIXMAN_x8b8g8r8: case PIXMAN_b8g8r8a8: - case PICT_b8g8r8x8: + case PIXMAN_b8g8r8x8: *dst_format = COLOR_8_8_8_8; break; case PICT_r5g6b5: @@ -929,7 +929,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, 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 */ @@ -1190,7 +1190,7 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u 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 */ @@ -1455,7 +1455,7 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, cb_conf.comp_swap = 0; /* ABGR */ break; case PIXMAN_b8g8r8a8: - case PICT_b8g8r8x8: + case PIXMAN_b8g8r8x8: cb_conf.comp_swap = 3; /* BGRA */ break; case PICT_r5g6b5: diff --git a/src/r600_exa.c b/src/r600_exa.c index cf682f40..a0844914 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -736,7 +736,7 @@ static struct formatinfo R600TexFormats[] = { {PIXMAN_a8b8g8r8, FMT_8_8_8_8}, {PIXMAN_x8b8g8r8, FMT_8_8_8_8}, {PIXMAN_b8g8r8a8, FMT_8_8_8_8}, - {PICT_b8g8r8x8, FMT_8_8_8_8}, + {PIXMAN_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}, @@ -797,7 +797,7 @@ static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_a8b8g8r8: case PIXMAN_x8b8g8r8: case PIXMAN_b8g8r8a8: - case PICT_b8g8r8x8: + case PIXMAN_b8g8r8x8: *dst_format = COLOR_8_8_8_8; break; case PICT_r5g6b5: @@ -944,7 +944,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, 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 */ @@ -1234,7 +1234,7 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32 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 */ @@ -1494,7 +1494,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, cb_conf.comp_swap = 0; /* ABGR */ break; case PIXMAN_b8g8r8a8: - case PICT_b8g8r8x8: + case PIXMAN_b8g8r8x8: cb_conf.comp_swap = 3; /* BGRA */ break; case PICT_r5g6b5: diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 6e2a3096..fffb9125 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -99,7 +99,7 @@ static struct formatinfo R300TexFormats[] = { {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)}, - {PICT_b8g8r8x8, R300_EASY_TX_FORMAT(W, Z, Y, ONE, W8Z8Y8X8)}, + {PIXMAN_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)}, @@ -141,7 +141,7 @@ static Bool R300GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_a8b8g8r8: case PIXMAN_x8b8g8r8: case PIXMAN_b8g8r8a8: - case PICT_b8g8r8x8: + case PIXMAN_b8g8r8x8: *dst_format = R300_COLORFORMAT_ARGB8888; break; case PICT_r5g6b5: @@ -1612,7 +1612,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture, R300_OUT_FMT_C3_SEL_ALPHA); break; case PIXMAN_b8g8r8a8: - case PICT_b8g8r8x8: + case PIXMAN_b8g8r8x8: output_fmt = (R300_OUT_FMT_C4_8 | R300_OUT_FMT_C0_SEL_ALPHA | R300_OUT_FMT_C1_SEL_RED | From c19edfdb1175ac450f79d0b576d7e0fc1a9b7db6 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:44:43 +0200 Subject: [PATCH 32/75] 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 --- src/evergreen_exa.c | 10 +++++----- src/r600_exa.c | 10 +++++----- src/radeon_exa_render.c | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index 7402f522..ed2d5995 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -678,7 +678,7 @@ static struct formatinfo EVERGREENTexFormats[] = { {PIXMAN_x8b8g8r8, FMT_8_8_8_8}, {PIXMAN_b8g8r8a8, FMT_8_8_8_8}, {PIXMAN_b8g8r8x8, FMT_8_8_8_8}, - {PICT_r5g6b5, FMT_5_6_5}, + {PIXMAN_r5g6b5, FMT_5_6_5}, {PICT_a1r5g5b5, FMT_1_5_5_5}, {PICT_x1r5g5b5, FMT_1_5_5_5}, {PICT_a8, FMT_8}, @@ -741,7 +741,7 @@ static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) 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: @@ -938,7 +938,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, case PIXMAN_x2r10g10b10: case PICT_x1r5g5b5: case PIXMAN_x8r8g8b8: - case PICT_r5g6b5: + case PIXMAN_r5g6b5: pix_r = SQ_SEL_Z; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_X; /* B */ @@ -1198,7 +1198,7 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u break; case PICT_x1r5g5b5: case PIXMAN_x8r8g8b8: - case PICT_r5g6b5: + case PIXMAN_r5g6b5: pix_r = zf; /* R */ pix_g = yf; /* G */ pix_b = xf; /* B */ @@ -1458,7 +1458,7 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, 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: diff --git a/src/r600_exa.c b/src/r600_exa.c index a0844914..e48a8513 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -737,7 +737,7 @@ static struct formatinfo R600TexFormats[] = { {PIXMAN_x8b8g8r8, FMT_8_8_8_8}, {PIXMAN_b8g8r8a8, FMT_8_8_8_8}, {PIXMAN_b8g8r8x8, FMT_8_8_8_8}, - {PICT_r5g6b5, FMT_5_6_5}, + {PIXMAN_r5g6b5, FMT_5_6_5}, {PICT_a1r5g5b5, FMT_1_5_5_5}, {PICT_x1r5g5b5, FMT_1_5_5_5}, {PICT_a8, FMT_8}, @@ -800,7 +800,7 @@ static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) 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: @@ -953,7 +953,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, case PIXMAN_x2r10g10b10: case PICT_x1r5g5b5: case PIXMAN_x8r8g8b8: - case PICT_r5g6b5: + case PIXMAN_r5g6b5: pix_r = SQ_SEL_Z; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_X; /* B */ @@ -1242,7 +1242,7 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32 break; case PICT_x1r5g5b5: case PIXMAN_x8r8g8b8: - case PICT_r5g6b5: + case PIXMAN_r5g6b5: pix_r = zf; /* R */ pix_g = yf; /* G */ pix_b = xf; /* B */ @@ -1497,7 +1497,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, 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: diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index fffb9125..13416416 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -76,7 +76,7 @@ struct formatinfo { static struct formatinfo R100TexFormats[] = { {PIXMAN_a8r8g8b8, RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP}, {PIXMAN_x8r8g8b8, RADEON_TXFORMAT_ARGB8888}, - {PICT_r5g6b5, RADEON_TXFORMAT_RGB565}, + {PIXMAN_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}, @@ -87,7 +87,7 @@ static struct formatinfo R200TexFormats[] = { {PIXMAN_x8r8g8b8, R200_TXFORMAT_ARGB8888}, {PIXMAN_a8b8g8r8, R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP}, {PIXMAN_x8b8g8r8, R200_TXFORMAT_ABGR8888}, - {PICT_r5g6b5, R200_TXFORMAT_RGB565}, + {PIXMAN_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}, @@ -100,7 +100,7 @@ static struct formatinfo R300TexFormats[] = { {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)}, - {PICT_r5g6b5, R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5)}, + {PIXMAN_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)}, @@ -115,7 +115,7 @@ static Bool RADEONGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) 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: @@ -144,7 +144,7 @@ static Bool R300GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_b8g8r8x8: *dst_format = R300_COLORFORMAT_ARGB8888; break; - case PICT_r5g6b5: + case PIXMAN_r5g6b5: *dst_format = R300_COLORFORMAT_RGB565; break; case PICT_a1r5g5b5: From 6ea8d8a5b18d9c492a483bffcd51f82687a9f5c8 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:46:42 +0200 Subject: [PATCH 33/75] 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 --- src/evergreen_exa.c | 10 +++++----- src/r600_exa.c | 10 +++++----- src/radeon_exa_render.c | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index ed2d5995..06ad97a9 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -679,7 +679,7 @@ static struct formatinfo EVERGREENTexFormats[] = { {PIXMAN_b8g8r8a8, FMT_8_8_8_8}, {PIXMAN_b8g8r8x8, FMT_8_8_8_8}, {PIXMAN_r5g6b5, FMT_5_6_5}, - {PICT_a1r5g5b5, FMT_1_5_5_5}, + {PIXMAN_a1r5g5b5, FMT_1_5_5_5}, {PICT_x1r5g5b5, FMT_1_5_5_5}, {PICT_a8, FMT_8}, }; @@ -744,7 +744,7 @@ static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_r5g6b5: *dst_format = COLOR_5_6_5; break; - case PICT_a1r5g5b5: + case PIXMAN_a1r5g5b5: case PICT_x1r5g5b5: *dst_format = COLOR_1_5_5_5; break; @@ -902,7 +902,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, /* component swizzles */ switch (pPict->format) { case PIXMAN_a2r10g10b10: - case PICT_a1r5g5b5: + case PIXMAN_a1r5g5b5: case PIXMAN_a8r8g8b8: pix_r = SQ_SEL_Z; /* R */ pix_g = SQ_SEL_Y; /* G */ @@ -1165,7 +1165,7 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u /* component swizzles */ switch (format) { - case PICT_a1r5g5b5: + case PIXMAN_a1r5g5b5: case PIXMAN_a8r8g8b8: pix_r = zf; /* R */ pix_g = yf; /* G */ @@ -1443,7 +1443,7 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, case PIXMAN_x2r10g10b10: case PIXMAN_a8r8g8b8: case PIXMAN_x8r8g8b8: - case PICT_a1r5g5b5: + case PIXMAN_a1r5g5b5: case PICT_x1r5g5b5: default: cb_conf.comp_swap = 1; /* ARGB */ diff --git a/src/r600_exa.c b/src/r600_exa.c index e48a8513..9e45a042 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -738,7 +738,7 @@ static struct formatinfo R600TexFormats[] = { {PIXMAN_b8g8r8a8, FMT_8_8_8_8}, {PIXMAN_b8g8r8x8, FMT_8_8_8_8}, {PIXMAN_r5g6b5, FMT_5_6_5}, - {PICT_a1r5g5b5, FMT_1_5_5_5}, + {PIXMAN_a1r5g5b5, FMT_1_5_5_5}, {PICT_x1r5g5b5, FMT_1_5_5_5}, {PICT_a8, FMT_8}, }; @@ -803,7 +803,7 @@ static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_r5g6b5: *dst_format = COLOR_5_6_5; break; - case PICT_a1r5g5b5: + case PIXMAN_a1r5g5b5: case PICT_x1r5g5b5: *dst_format = COLOR_1_5_5_5; break; @@ -917,7 +917,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, /* component swizzles */ switch (pPict->format) { case PIXMAN_a2r10g10b10: - case PICT_a1r5g5b5: + case PIXMAN_a1r5g5b5: case PIXMAN_a8r8g8b8: pix_r = SQ_SEL_Z; /* R */ pix_g = SQ_SEL_Y; /* G */ @@ -1209,7 +1209,7 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32 /* component swizzles */ switch (format) { - case PICT_a1r5g5b5: + case PIXMAN_a1r5g5b5: case PIXMAN_a8r8g8b8: pix_r = zf; /* R */ pix_g = yf; /* G */ @@ -1482,7 +1482,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, case PIXMAN_x2r10g10b10: case PIXMAN_a8r8g8b8: case PIXMAN_x8r8g8b8: - case PICT_a1r5g5b5: + case PIXMAN_a1r5g5b5: case PICT_x1r5g5b5: default: cb_conf.comp_swap = 1; /* ARGB */ diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 13416416..f074526e 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -77,7 +77,7 @@ static struct formatinfo R100TexFormats[] = { {PIXMAN_a8r8g8b8, RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP}, {PIXMAN_x8r8g8b8, RADEON_TXFORMAT_ARGB8888}, {PIXMAN_r5g6b5, RADEON_TXFORMAT_RGB565}, - {PICT_a1r5g5b5, RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP}, + {PIXMAN_a1r5g5b5, RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP}, {PICT_x1r5g5b5, RADEON_TXFORMAT_ARGB1555}, {PICT_a8, RADEON_TXFORMAT_I8 | RADEON_TXFORMAT_ALPHA_IN_MAP}, }; @@ -88,7 +88,7 @@ static struct formatinfo R200TexFormats[] = { {PIXMAN_a8b8g8r8, R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP}, {PIXMAN_x8b8g8r8, R200_TXFORMAT_ABGR8888}, {PIXMAN_r5g6b5, R200_TXFORMAT_RGB565}, - {PICT_a1r5g5b5, R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP}, + {PIXMAN_a1r5g5b5, R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP}, {PICT_x1r5g5b5, R200_TXFORMAT_ARGB1555}, {PICT_a8, R200_TXFORMAT_I8 | R200_TXFORMAT_ALPHA_IN_MAP}, }; @@ -101,7 +101,7 @@ static struct formatinfo R300TexFormats[] = { {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)}, - {PICT_a1r5g5b5, R300_EASY_TX_FORMAT(X, Y, Z, W, W1Z5Y5X5)}, + {PIXMAN_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)}, }; @@ -118,7 +118,7 @@ static Bool RADEONGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_r5g6b5: *dst_format = RADEON_COLOR_FORMAT_RGB565; break; - case PICT_a1r5g5b5: + case PIXMAN_a1r5g5b5: case PICT_x1r5g5b5: *dst_format = RADEON_COLOR_FORMAT_ARGB1555; break; @@ -147,7 +147,7 @@ static Bool R300GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_r5g6b5: *dst_format = R300_COLORFORMAT_RGB565; break; - case PICT_a1r5g5b5: + case PIXMAN_a1r5g5b5: case PICT_x1r5g5b5: *dst_format = R300_COLORFORMAT_ARGB1555; break; From 0af57eb20037bb30c4f10aa6b8fecb6bb3a8b0b2 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:48:13 +0200 Subject: [PATCH 34/75] 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 --- src/evergreen_exa.c | 10 +++++----- src/r600_exa.c | 10 +++++----- src/radeon_exa_render.c | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index 06ad97a9..e40d0af1 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -680,7 +680,7 @@ static struct formatinfo EVERGREENTexFormats[] = { {PIXMAN_b8g8r8x8, FMT_8_8_8_8}, {PIXMAN_r5g6b5, FMT_5_6_5}, {PIXMAN_a1r5g5b5, FMT_1_5_5_5}, - {PICT_x1r5g5b5, FMT_1_5_5_5}, + {PIXMAN_x1r5g5b5, FMT_1_5_5_5}, {PICT_a8, FMT_8}, }; @@ -745,7 +745,7 @@ static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) *dst_format = COLOR_5_6_5; break; case PIXMAN_a1r5g5b5: - case PICT_x1r5g5b5: + case PIXMAN_x1r5g5b5: *dst_format = COLOR_1_5_5_5; break; case PICT_a8: @@ -936,7 +936,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, pix_a = SQ_SEL_1; /* A */ break; case PIXMAN_x2r10g10b10: - case PICT_x1r5g5b5: + case PIXMAN_x1r5g5b5: case PIXMAN_x8r8g8b8: case PIXMAN_r5g6b5: pix_r = SQ_SEL_Z; /* R */ @@ -1196,7 +1196,7 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u pix_b = wf; /* B */ pix_a = 1.0; /* A */ break; - case PICT_x1r5g5b5: + case PIXMAN_x1r5g5b5: case PIXMAN_x8r8g8b8: case PIXMAN_r5g6b5: pix_r = zf; /* R */ @@ -1444,7 +1444,7 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, case PIXMAN_a8r8g8b8: case PIXMAN_x8r8g8b8: case PIXMAN_a1r5g5b5: - case PICT_x1r5g5b5: + case PIXMAN_x1r5g5b5: default: cb_conf.comp_swap = 1; /* ARGB */ break; diff --git a/src/r600_exa.c b/src/r600_exa.c index 9e45a042..1a4ae165 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -739,7 +739,7 @@ static struct formatinfo R600TexFormats[] = { {PIXMAN_b8g8r8x8, FMT_8_8_8_8}, {PIXMAN_r5g6b5, FMT_5_6_5}, {PIXMAN_a1r5g5b5, FMT_1_5_5_5}, - {PICT_x1r5g5b5, FMT_1_5_5_5}, + {PIXMAN_x1r5g5b5, FMT_1_5_5_5}, {PICT_a8, FMT_8}, }; @@ -804,7 +804,7 @@ static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) *dst_format = COLOR_5_6_5; break; case PIXMAN_a1r5g5b5: - case PICT_x1r5g5b5: + case PIXMAN_x1r5g5b5: *dst_format = COLOR_1_5_5_5; break; case PICT_a8: @@ -951,7 +951,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, pix_a = SQ_SEL_1; /* A */ break; case PIXMAN_x2r10g10b10: - case PICT_x1r5g5b5: + case PIXMAN_x1r5g5b5: case PIXMAN_x8r8g8b8: case PIXMAN_r5g6b5: pix_r = SQ_SEL_Z; /* R */ @@ -1240,7 +1240,7 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32 pix_b = wf; /* B */ pix_a = 1.0; /* A */ break; - case PICT_x1r5g5b5: + case PIXMAN_x1r5g5b5: case PIXMAN_x8r8g8b8: case PIXMAN_r5g6b5: pix_r = zf; /* R */ @@ -1483,7 +1483,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, case PIXMAN_a8r8g8b8: case PIXMAN_x8r8g8b8: case PIXMAN_a1r5g5b5: - case PICT_x1r5g5b5: + case PIXMAN_x1r5g5b5: default: cb_conf.comp_swap = 1; /* ARGB */ break; diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index f074526e..70183a2a 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -78,7 +78,7 @@ static struct formatinfo R100TexFormats[] = { {PIXMAN_x8r8g8b8, RADEON_TXFORMAT_ARGB8888}, {PIXMAN_r5g6b5, RADEON_TXFORMAT_RGB565}, {PIXMAN_a1r5g5b5, RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP}, - {PICT_x1r5g5b5, RADEON_TXFORMAT_ARGB1555}, + {PIXMAN_x1r5g5b5, RADEON_TXFORMAT_ARGB1555}, {PICT_a8, RADEON_TXFORMAT_I8 | RADEON_TXFORMAT_ALPHA_IN_MAP}, }; @@ -89,7 +89,7 @@ static struct formatinfo R200TexFormats[] = { {PIXMAN_x8b8g8r8, R200_TXFORMAT_ABGR8888}, {PIXMAN_r5g6b5, R200_TXFORMAT_RGB565}, {PIXMAN_a1r5g5b5, R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP}, - {PICT_x1r5g5b5, R200_TXFORMAT_ARGB1555}, + {PIXMAN_x1r5g5b5, R200_TXFORMAT_ARGB1555}, {PICT_a8, R200_TXFORMAT_I8 | R200_TXFORMAT_ALPHA_IN_MAP}, }; @@ -102,7 +102,7 @@ static struct formatinfo R300TexFormats[] = { {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)}, - {PICT_x1r5g5b5, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W1Z5Y5X5)}, + {PIXMAN_x1r5g5b5, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W1Z5Y5X5)}, {PICT_a8, R300_EASY_TX_FORMAT(ZERO, ZERO, ZERO, X, X8)}, }; @@ -119,7 +119,7 @@ static Bool RADEONGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) *dst_format = RADEON_COLOR_FORMAT_RGB565; break; case PIXMAN_a1r5g5b5: - case PICT_x1r5g5b5: + case PIXMAN_x1r5g5b5: *dst_format = RADEON_COLOR_FORMAT_ARGB1555; break; case PICT_a8: @@ -148,7 +148,7 @@ static Bool R300GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) *dst_format = R300_COLORFORMAT_RGB565; break; case PIXMAN_a1r5g5b5: - case PICT_x1r5g5b5: + case PIXMAN_x1r5g5b5: *dst_format = R300_COLORFORMAT_ARGB1555; break; case PICT_a8: From a867f5e6d6599e15a59682e72ce5ed630e98d0f8 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:50:11 +0200 Subject: [PATCH 35/75] 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 --- src/evergreen_exa.c | 10 +++++----- src/r600_exa.c | 10 +++++----- src/radeon_exa_render.c | 28 ++++++++++++++-------------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index e40d0af1..9a4dd5c7 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -681,7 +681,7 @@ static struct formatinfo EVERGREENTexFormats[] = { {PIXMAN_r5g6b5, FMT_5_6_5}, {PIXMAN_a1r5g5b5, FMT_1_5_5_5}, {PIXMAN_x1r5g5b5, FMT_1_5_5_5}, - {PICT_a8, FMT_8}, + {PIXMAN_a8, FMT_8}, }; static uint32_t EVERGREENGetBlendCntl(int op, PicturePtr pMask, uint32_t dst_format) @@ -748,7 +748,7 @@ static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_x1r5g5b5: *dst_format = COLOR_1_5_5_5; break; - case PICT_a8: + case PIXMAN_a8: *dst_format = COLOR_8; break; default: @@ -944,7 +944,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, 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 */ @@ -1204,7 +1204,7 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u 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 */ @@ -1461,7 +1461,7 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, case PIXMAN_r5g6b5: cb_conf.comp_swap = 2; /* RGB */ break; - case PICT_a8: + case PIXMAN_a8: cb_conf.comp_swap = 3; /* A */ break; } diff --git a/src/r600_exa.c b/src/r600_exa.c index 1a4ae165..57b2fe25 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -740,7 +740,7 @@ static struct formatinfo R600TexFormats[] = { {PIXMAN_r5g6b5, FMT_5_6_5}, {PIXMAN_a1r5g5b5, FMT_1_5_5_5}, {PIXMAN_x1r5g5b5, FMT_1_5_5_5}, - {PICT_a8, FMT_8}, + {PIXMAN_a8, FMT_8}, }; static uint32_t R600GetBlendCntl(int op, PicturePtr pMask, uint32_t dst_format) @@ -807,7 +807,7 @@ static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_x1r5g5b5: *dst_format = COLOR_1_5_5_5; break; - case PICT_a8: + case PIXMAN_a8: *dst_format = COLOR_8; break; default: @@ -959,7 +959,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, 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 */ @@ -1248,7 +1248,7 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32 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 */ @@ -1500,7 +1500,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, case PIXMAN_r5g6b5: cb_conf.comp_swap = 2; /* RGB */ break; - case PICT_a8: + case PIXMAN_a8: cb_conf.comp_swap = 3; /* A */ break; } diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 70183a2a..69fd1a23 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -79,7 +79,7 @@ static struct formatinfo R100TexFormats[] = { {PIXMAN_r5g6b5, RADEON_TXFORMAT_RGB565}, {PIXMAN_a1r5g5b5, RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP}, {PIXMAN_x1r5g5b5, RADEON_TXFORMAT_ARGB1555}, - {PICT_a8, RADEON_TXFORMAT_I8 | RADEON_TXFORMAT_ALPHA_IN_MAP}, + {PIXMAN_a8, RADEON_TXFORMAT_I8 | RADEON_TXFORMAT_ALPHA_IN_MAP}, }; static struct formatinfo R200TexFormats[] = { @@ -90,7 +90,7 @@ static struct formatinfo R200TexFormats[] = { {PIXMAN_r5g6b5, R200_TXFORMAT_RGB565}, {PIXMAN_a1r5g5b5, R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP}, {PIXMAN_x1r5g5b5, R200_TXFORMAT_ARGB1555}, - {PICT_a8, R200_TXFORMAT_I8 | R200_TXFORMAT_ALPHA_IN_MAP}, + {PIXMAN_a8, R200_TXFORMAT_I8 | R200_TXFORMAT_ALPHA_IN_MAP}, }; static struct formatinfo R300TexFormats[] = { @@ -103,7 +103,7 @@ static struct formatinfo R300TexFormats[] = { {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)}, - {PICT_a8, R300_EASY_TX_FORMAT(ZERO, ZERO, ZERO, X, X8)}, + {PIXMAN_a8, R300_EASY_TX_FORMAT(ZERO, ZERO, ZERO, X, X8)}, }; /* Common Radeon setup code */ @@ -122,7 +122,7 @@ static Bool RADEONGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_x1r5g5b5: *dst_format = RADEON_COLOR_FORMAT_ARGB1555; break; - case PICT_a8: + case PIXMAN_a8: *dst_format = RADEON_COLOR_FORMAT_RGB8; break; default: @@ -151,7 +151,7 @@ static Bool R300GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) case PIXMAN_x1r5g5b5: *dst_format = R300_COLORFORMAT_ARGB1555; break; - case PICT_a8: + case PIXMAN_a8: *dst_format = R300_COLORFORMAT_I8; break; default: @@ -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; @@ -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; @@ -1619,7 +1619,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture, 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; From 0cc8ece58b78826ba8fce4c331e8b5a5a1b2d2e1 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:52:33 +0200 Subject: [PATCH 36/75] 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 --- src/evergreen_exa.c | 30 +++++++++++++++--------------- src/r600_exa.c | 30 +++++++++++++++--------------- src/radeon_exa_render.c | 30 +++++++++++++++--------------- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index 9a4dd5c7..fef5719e 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -694,7 +694,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)) @@ -787,8 +787,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")); } @@ -962,12 +962,12 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, 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,7 +978,7 @@ 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 { @@ -988,16 +988,16 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, 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; @@ -1222,7 +1222,7 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u 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 +1232,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,7 +1243,7 @@ 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 { @@ -1253,16 +1253,16 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u 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; diff --git a/src/r600_exa.c b/src/r600_exa.c index 57b2fe25..b1668100 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -753,7 +753,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)) @@ -846,8 +846,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")); } @@ -977,12 +977,12 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, 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,7 +993,7 @@ 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 { @@ -1003,16 +1003,16 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, 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; @@ -1266,7 +1266,7 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32 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 +1276,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,7 +1287,7 @@ 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 { @@ -1297,16 +1297,16 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32 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; diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 69fd1a23..167487c1 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -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) @@ -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")); } @@ -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")); } @@ -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")); } @@ -1632,7 +1632,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture, 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; @@ -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; From fe76d2eda991a19f28e3077c2f7d635146e5f5e2 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 17:54:23 +0200 Subject: [PATCH 37/75] 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 --- src/evergreen_exa.c | 8 ++++---- src/r600_exa.c | 8 ++++---- src/radeon_exa_render.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index fef5719e..d6e5a8b5 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -956,7 +956,7 @@ 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; @@ -982,7 +982,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, 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; @@ -1216,7 +1216,7 @@ 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; @@ -1247,7 +1247,7 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u 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; diff --git a/src/r600_exa.c b/src/r600_exa.c index b1668100..71963ad8 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -971,7 +971,7 @@ 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; @@ -997,7 +997,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, 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; @@ -1260,7 +1260,7 @@ 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; @@ -1291,7 +1291,7 @@ static void R600SetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32 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; diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 167487c1..f8a7795e 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -1627,7 +1627,7 @@ 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; @@ -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); From 008e3482dee196604ef43307109d133a173e45ce Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 12 Aug 2025 17:22:33 -0700 Subject: [PATCH 38/75] 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 Part-of: --- .gitignore | 4 ++-- configure.ac | 10 +++++----- man/Makefile.am | 2 +- src/atipcirename.h | 2 +- src/drmmode_display.c | 14 +++++++------- src/evergreen_exa.c | 2 +- src/pcidb/parse_pci_ids.pl | 2 +- src/r600_exa.c | 4 ++-- src/r600_shader.c | 12 ++++++------ src/radeon.h | 8 ++++---- src/radeon_accel.c | 2 +- src/radeon_dri2.c | 10 +++++----- src/radeon_exa.c | 2 +- src/radeon_exa_funcs.c | 2 +- src/radeon_exa_render.c | 18 +++++++++--------- src/radeon_kms.c | 8 ++++---- src/radeon_reg.h | 8 ++++---- src/radeon_textured_video.c | 4 ++-- src/radeon_textured_videofuncs.c | 2 +- src/radeon_video.c | 4 ++-- src/simple_list.h | 12 ++++++------ 21 files changed, 66 insertions(+), 66 deletions(-) diff --git a/.gitignore b/.gitignore index 49cbec78..9e2b3dc3 100644 --- a/.gitignore +++ b/.gitignore @@ -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' -# +# diff --git a/configure.ac b/configure.ac index cf76caf7..57af58b2 100644 --- a/configure.ac +++ b/configure.ac @@ -242,7 +242,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,13 +252,13 @@ 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 ]) - 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, + AC_DEFINE_UNQUOTED([radeon_bswap_64], ${BSWAP}64, [Define to 64-bit byteswap macro]) fi fi diff --git a/man/Makefile.am b/man/Makefile.am index 85337650..b73073e1 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -19,7 +19,7 @@ # 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) diff --git a/src/atipcirename.h b/src/atipcirename.h index fa0f9ae9..8414097d 100644 --- a/src/atipcirename.h +++ b/src/atipcirename.h @@ -31,7 +31,7 @@ enum region_type { REGION_MEM, - REGION_IO + REGION_IO }; typedef struct pci_device *pciVideoPtr; diff --git a/src/drmmode_display.c b/src/drmmode_display.c index a58f24dd..83b16d5a 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -574,7 +574,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); } @@ -745,7 +745,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, @@ -1813,7 +1813,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]); @@ -2227,7 +2227,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r #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; @@ -2271,7 +2271,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) @@ -2737,7 +2737,7 @@ drm_wakeup_handler(pointer data, int err, pointer p) { drmmode_ptr drmmode = data; RADEONEntPtr pRADEONEnt = RADEONEntPriv(drmmode->scrn); - + #if !HAVE_NOTIFY_FD fd_set *read_mask = p; @@ -3050,7 +3050,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); diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index 447ed217..ec7fe77e 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -2072,7 +2072,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; diff --git a/src/pcidb/parse_pci_ids.pl b/src/pcidb/parse_pci_ids.pl index 222dcf89..c1ec3545 100755 --- a/src/pcidb/parse_pci_ids.pl +++ b/src/pcidb/parse_pci_ids.pl @@ -48,7 +48,7 @@ while () { 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"; diff --git a/src/r600_exa.c b/src/r600_exa.c index 99db0c40..45c193f0 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -577,7 +577,7 @@ R600PrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, 0); if (!accel_state->copy_area_bo) RADEON_FALLBACK(("temp copy surface alloc failed\n")); - + radeon_cs_space_add_persistent_bo(info->cs, accel_state->copy_area_bo, 0, RADEON_GEM_DOMAIN_VRAM); if (radeon_cs_space_check(info->cs)) { @@ -2051,7 +2051,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; diff --git a/src/r600_shader.c b/src/r600_shader.c index 26a6ab64..30ce8265 100644 --- a/src/r600_shader.c +++ b/src/r600_shader.c @@ -455,13 +455,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) diff --git a/src/radeon.h b/src/radeon.h index 6d1d21ee..ad0f98c5 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -137,7 +137,7 @@ 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) | \ @@ -364,7 +364,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 { @@ -569,7 +569,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; @@ -885,7 +885,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); diff --git a/src/radeon_accel.c b/src/radeon_accel.c index a0dca68c..f09bb1da 100644 --- a/src/radeon_accel.c +++ b/src/radeon_accel.c @@ -984,7 +984,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(); diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index fba56e5d..d7492440 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -1,5 +1,5 @@ /* - * Copyright 2008 Kristian Høgsberg + * Copyright 2008 Kristian Høgsberg * Copyright 2008 Jérôme Glisse * * All Rights Reserved. @@ -195,7 +195,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 +289,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 +376,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; @@ -1204,7 +1204,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); diff --git a/src/radeon_exa.c b/src/radeon_exa.c index 320ff992..2344da7f 100644 --- a/src/radeon_exa.c +++ b/src/radeon_exa.c @@ -207,7 +207,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) { diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c index b3200cc9..535afbeb 100644 --- a/src/radeon_exa_funcs.c +++ b/src/radeon_exa_funcs.c @@ -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; diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index a5f9612b..44bcc49c 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -264,13 +264,13 @@ static Bool RADEONSetupSourceTile(PicturePtr pPict, info->accel_state->need_src_tile_x = info->accel_state->need_src_tile_y = FALSE; info->accel_state->src_tile_width = info->accel_state->src_tile_height = 65536; /* "infinite" */ - + if (repeatType == RepeatNormal || repeatType == RepeatReflect) { Bool badPitch = needMatchingPitch && !RADEONPitchMatches(pPix); - + int w = pPict->pDrawable ? pPict->pDrawable->width : 1; int h = pPict->pDrawable ? pPict->pDrawable->height : 1; - + if (pPict->transform) { if (badPitch) RADEON_FALLBACK(("Width %d and pitch %u not compatible for repeat\n", @@ -1217,7 +1217,7 @@ static Bool R300TextureSetup(PicturePtr pPict, PixmapPtr pPix, txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_WRAP); else txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL); - + if (unit != 0 || !info->accel_state->need_src_tile_y) txfilter |= R300_TX_CLAMP_T(R300_TX_CLAMP_WRAP); else @@ -2073,7 +2073,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture, } ADVANCE_RING(); - + BEGIN_ACCEL_RELOC(3, 2); EMIT_WRITE_OFFSET(R300_RB3D_COLOROFFSET0, 0, pDst); EMIT_COLORPITCH(R300_RB3D_COLORPITCH0, colorpitch, pDst); @@ -2390,7 +2390,7 @@ static void RadeonComposite(PixmapPtr pDst, int remainingWidth = width; int tileSrcX, tileMaskX, tileDstX; int h = info->accel_state->src_tile_height - tileSrcY; - + if (h > remainingHeight) h = remainingHeight; remainingHeight -= h; @@ -2398,13 +2398,13 @@ static void RadeonComposite(PixmapPtr pDst, modulus(srcX, info->accel_state->src_tile_width, tileSrcX); tileMaskX = maskX; tileDstX = dstX; - + while (remainingWidth > 0) { int w = info->accel_state->src_tile_width - tileSrcX; if (w > remainingWidth) w = remainingWidth; remainingWidth -= w; - + RadeonCompositeTile(pScrn, info, pDst, @@ -2412,7 +2412,7 @@ static void RadeonComposite(PixmapPtr pDst, tileMaskX, tileMaskY, tileDstX, tileDstY, w, h); - + tileSrcX = 0; tileMaskX += w; tileDstX += w; diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 51b00dd9..833d4812 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -300,7 +300,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++; @@ -846,7 +846,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, @@ -1782,7 +1782,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 +2328,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"); diff --git a/src/radeon_reg.h b/src/radeon_reg.h index fbf15584..e76631b8 100644 --- a/src/radeon_reg.h +++ b/src/radeon_reg.h @@ -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) diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c index be71e408..96094d5a 100644 --- a/src/radeon_textured_video.c +++ b/src/radeon_textured_video.c @@ -348,13 +348,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; diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c index ba10c60d..0e59edcc 100644 --- a/src/radeon_textured_videofuncs.c +++ b/src/radeon_textured_videofuncs.c @@ -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); diff --git a/src/radeon_video.c b/src/radeon_video.c index fc321184..5cc9e8d0 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -269,12 +269,12 @@ RADEONCopyMungedData( dst++; s2++; s3++; s1 += 2; } - + dst1 += dstPitch; src1 += srcPitch; if( j & 1 ) { src2 += srcPitch2; src3 += srcPitch2; - } + } } } diff --git a/src/simple_list.h b/src/simple_list.h index 0be4ad1a..4eee82c3 100644 --- a/src/simple_list.h +++ b/src/simple_list.h @@ -4,7 +4,7 @@ * * Intended to work with a list sentinel which is created as an empty * list. Insert & delete are O(1). - * + * * \author * (C) 1997, Keith Whitwell */ @@ -154,19 +154,19 @@ do { \ /** * Test whether element is at end of the list. - * + * * \param list list. * \param elem element. - * + * * \return non-zero if element is at end of list, or zero otherwise. */ #define at_end(list, elem) ((elem) == (list)) /** * Test if a list is empty. - * + * * \param list list. - * + * * \return non-zero if list empty, or zero otherwise. */ #define is_empty_list(list) ((list)->next == (list)) @@ -188,7 +188,7 @@ do { \ * * Same as #foreach but lets you unlink the current value during a list * traversal. Useful for freeing a list, element by element. - * + * * \param ptr pointer to the current element. * \param t temporary pointer. * \param list list. From b58ebdbec25cb86f1d41ad677bc32eee3c61353e Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 24 Sep 2025 14:57:42 +0200 Subject: [PATCH 39/75] 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 --- src/drmmode_display.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/drmmode_display.h b/src/drmmode_display.h index 29693f07..f5dc033d 100644 --- a/src/drmmode_display.h +++ b/src/drmmode_display.h @@ -27,6 +27,8 @@ #ifndef DRMMODE_DISPLAY_H #define DRMMODE_DISPLAY_H +#include + #include "xf86drmMode.h" #ifdef HAVE_LIBUDEV #include "libudev.h" From 45f03ac5d84ab7d6dc3d52bc24a89433bece9ebc Mon Sep 17 00:00:00 2001 From: b-aaz <85005689+b-aaz@users.noreply.github.com> Date: Sat, 13 Sep 2025 21:14:21 +0000 Subject: [PATCH 40/75] 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 --- src/radeon_kms.c | 22 ++++++++++++++++++++++ src/radeon_probe.c | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 37d69082..ee6ac941 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -58,6 +58,10 @@ #include #endif +#ifdef __DragonFly__ +#include +#endif + #include #include @@ -1529,6 +1533,24 @@ static int radeon_get_drm_master_fd(ScrnInfoPtr pScrn) XNFasprintf(&busid, "pci:%04x:%02x:%02x.%d", dev->domain, dev->bus, dev->dev, dev->func); +#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) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, diff --git a/src/radeon_probe.c b/src/radeon_probe.c index 43555019..9461edea 100644 --- a/src/radeon_probe.c +++ b/src/radeon_probe.c @@ -51,7 +51,7 @@ #include -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) #include #endif @@ -97,7 +97,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); From e237014dc66b9f05316a8607e53b4ac419aed09a Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 6 Nov 2025 16:56:21 +0100 Subject: [PATCH 41/75] don't crash Xserver on malloc() failure anymore (XNFasprintf) Signed-off-by: Enrico Weigelt, metux IT consult --- src/ati.c | 9 ++++++--- src/drmmode_display.c | 6 +++++- src/radeon_kms.c | 7 +++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/ati.c b/src/ati.c index 837b0094..12141757 100644 --- a/src/ati.c +++ b/src/ati.c @@ -203,11 +203,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); diff --git a/src/drmmode_display.c b/src/drmmode_display.c index fd0dea2c..cbb9d6d0 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -2843,7 +2843,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); diff --git a/src/radeon_kms.c b/src/radeon_kms.c index ee6ac941..661628c5 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -1530,8 +1530,11 @@ 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 From 9c57a0cdd4f4e9dd3e4fb5cab3eb1b43225b9d00 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 21 Nov 2025 16:30:57 +0100 Subject: [PATCH 42/75] 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 --- src/radeon_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 661628c5..1be166cd 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -432,7 +432,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); From 6da5a33d54dfe5370acf3d09ec8f1f292df0f5ae Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 14 May 2024 13:17:31 +0200 Subject: [PATCH 43/75] 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 --- .gitlab-ci.yml | 12 +----------- conf/Makefile.am | 2 -- configure.ac | 30 +----------------------------- src/radeon.h | 19 ------------------- src/radeon_dri3.c | 17 ----------------- src/radeon_kms.c | 4 ---- src/radeon_present.c | 16 ---------------- src/radeon_sync.c | 21 --------------------- 8 files changed, 2 insertions(+), 119 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4cd462b6..c4cf94e8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -114,7 +114,7 @@ build-gcc: - .default_build parallel: matrix: - - XSERVER_VERSION: ["1.16", "1.17", "1.18", "1.19", "1.20"] + - XSERVER_VERSION: ["1.18", "1.19", "1.20"] build-clang: extends: @@ -124,13 +124,3 @@ build-clang: - 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"] diff --git a/conf/Makefile.am b/conf/Makefile.am index fba75dac..966b1686 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -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 diff --git a/configure.ac b/configure.ac index 29302a56..097f37e6 100644 --- a/configure.ac +++ b/configure.ac @@ -75,18 +75,12 @@ 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(XORG, [xorg-server >= 1.18 xproto fontsproto xf86driproto $REQUIRED_MODULES]) PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]), HAVE_XEXTPROTO_71="no") AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ]) -# 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"]) - # Define a configure option for an alternate X Server configuration directory AC_ARG_WITH(xorg-conf-dir, AS_HELP_STRING([--with-xorg-conf-dir=DIR], @@ -155,34 +149,12 @@ else fi AM_CONDITIONAL(GLAMOR, test x$GLAMOR != xno) -AC_CHECK_DECL(RegionDuplicate, - [AC_DEFINE(HAVE_REGIONDUPLICATE, 1, - [Have RegionDuplicate API])], [], - [#include - #include ]) - AC_CHECK_DECL(xf86CursorResetCursor, [AC_DEFINE(HAVE_XF86_CURSOR_RESET_CURSOR, 1, [Have xf86CursorResetCursor API])], [], [#include #include ]) -AC_CHECK_HEADERS([misyncshm.h], [], [], - [#include - #include - #include - #include ]) - -AC_CHECK_HEADERS([present.h], [], [], - [#include - #include - #include "xorg-server.h" - #include ]) - -AC_CHECK_HEADERS([dri3.h], [], [], - [#include - #include ]) - CPPFLAGS="$SAVE_CPPFLAGS" PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0]) diff --git a/src/radeon.h b/src/radeon.h index d8a17516..6bb8c56a 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -97,25 +97,6 @@ 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 diff --git a/src/radeon_dri3.c b/src/radeon_dri3.c index 3136de30..7daa53ab 100644 --- a/src/radeon_dri3.c +++ b/src/radeon_dri3.c @@ -27,9 +27,6 @@ #endif #include "radeon.h" - -#ifdef HAVE_DRI3_H - #include "radeon_bo_gem.h" #include "radeon_glamor.h" #include "dri3.h" @@ -243,17 +240,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 diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 1be166cd..4ebf25bf 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -43,12 +43,8 @@ #include "radeon_version.h" #include "shadow.h" #include - #include "atipciids.h" - -#if HAVE_PRESENT_H #include -#endif /* DPMS */ #ifdef HAVE_XEXTPROTO_71 diff --git a/src/radeon_present.c b/src/radeon_present.c index 303e187f..62923d21 100644 --- a/src/radeon_present.c +++ b/src/radeon_present.c @@ -27,8 +27,6 @@ #include "radeon.h" -#ifdef HAVE_PRESENT_H - #include #include #include @@ -486,17 +484,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 diff --git a/src/radeon_sync.c b/src/radeon_sync.c index 86e0283f..180fc95e 100644 --- a/src/radeon_sync.c +++ b/src/radeon_sync.c @@ -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 From bcf05aee662a891adcd131306e5c9078f1037fca Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 15 May 2024 16:06:04 +0200 Subject: [PATCH 44/75] 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 --- src/drmmode_display.c | 7 +------ src/radeon_kms.c | 6 ------ 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index cbb9d6d0..dc7fb1d1 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1357,14 +1357,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; } diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 4ebf25bf..19d71748 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -557,14 +557,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; @@ -590,11 +588,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) From 87d271455351688fd081259bc308a1a59b5c27df Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 15 Dec 2025 12:07:28 +0100 Subject: [PATCH 45/75] configure.ac: fix issue tracker URL and package name Signed-off-by: Enrico Weigelt, metux IT consult --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 097f37e6..4a7bd0f8 100644 --- a/configure.ac +++ b/configure.ac @@ -22,10 +22,10 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([xf86-video-ati], +AC_INIT([xlibre-xf86-video-ati], [22.0.0], - [https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/-/issues], - [xf86-video-ati]) + [https://github.com/X11Libre/xf86-video-ati/issues] + [xlibre-xf86-video-ati]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) From 7e5ff32ae90e57526ec9d73234bf53a14d3e6b3a Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 15 Dec 2025 12:09:52 +0100 Subject: [PATCH 46/75] release 22.0.1 Signed-off-by: Enrico Weigelt, metux IT consult --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4a7bd0f8..48a2ec96 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xlibre-xf86-video-ati], - [22.0.0], + [22.0.1], [https://github.com/X11Libre/xf86-video-ati/issues] [xlibre-xf86-video-ati]) From 3c9211e6965c43096bdd1967c8cd6382cc33243f Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 12 Aug 2025 17:22:33 -0700 Subject: [PATCH 47/75] 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 Part-of: --- .gitignore | 4 ++-- configure.ac | 10 +++++----- man/Makefile.am | 2 +- src/atipcirename.h | 2 +- src/drmmode_display.c | 14 +++++++------- src/evergreen_exa.c | 2 +- src/pcidb/parse_pci_ids.pl | 2 +- src/r600_exa.c | 4 ++-- src/r600_shader.c | 12 ++++++------ src/radeon.h | 8 ++++---- src/radeon_accel.c | 2 +- src/radeon_dri2.c | 10 +++++----- src/radeon_exa.c | 2 +- src/radeon_exa_funcs.c | 2 +- src/radeon_exa_render.c | 18 +++++++++--------- src/radeon_kms.c | 8 ++++---- src/radeon_reg.h | 8 ++++---- src/radeon_textured_video.c | 4 ++-- src/radeon_textured_videofuncs.c | 2 +- src/radeon_video.c | 4 ++-- src/simple_list.h | 12 ++++++------ 21 files changed, 66 insertions(+), 66 deletions(-) diff --git a/.gitignore b/.gitignore index 49cbec78..9e2b3dc3 100644 --- a/.gitignore +++ b/.gitignore @@ -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' -# +# diff --git a/configure.ac b/configure.ac index 48a2ec96..da95ff8b 100644 --- a/configure.ac +++ b/configure.ac @@ -199,7 +199,7 @@ b = bswap16(a); if test "$SYS_ENDIAN_BSWAP" = "yes" ; then USE_SYS_ENDIAN_H=yes BSWAP=bswap - else + else if test "$SYS_ENDIAN__SWAP" = "yes" ; then USE_SYS_ENDIAN_H=yes BSWAP=__swap @@ -209,13 +209,13 @@ 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 ]) - 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, + AC_DEFINE_UNQUOTED([radeon_bswap_64], ${BSWAP}64, [Define to 64-bit byteswap macro]) fi fi diff --git a/man/Makefile.am b/man/Makefile.am index 85337650..b73073e1 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -19,7 +19,7 @@ # 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) diff --git a/src/atipcirename.h b/src/atipcirename.h index fa0f9ae9..8414097d 100644 --- a/src/atipcirename.h +++ b/src/atipcirename.h @@ -31,7 +31,7 @@ enum region_type { REGION_MEM, - REGION_IO + REGION_IO }; typedef struct pci_device *pciVideoPtr; diff --git a/src/drmmode_display.c b/src/drmmode_display.c index dc7fb1d1..68781e90 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -565,7 +565,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); } @@ -726,7 +726,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, @@ -1770,7 +1770,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]); @@ -2184,7 +2184,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r #if XF86_CRTC_VERSION >= 8 output->non_desktop = nonDesktop; #endif - + output->possible_crtcs = 0xffffffff; for (i = 0; i < koutput->count_encoders; i++) { output->possible_crtcs &= kencoders[i]->possible_crtcs; @@ -2228,7 +2228,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) @@ -2694,7 +2694,7 @@ drm_wakeup_handler(pointer data, int err, pointer p) { drmmode_ptr drmmode = data; RADEONEntPtr pRADEONEnt = RADEONEntPriv(drmmode->scrn); - + #if !HAVE_NOTIFY_FD fd_set *read_mask = p; @@ -3011,7 +3011,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); diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index d6e5a8b5..a45bc202 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -2072,7 +2072,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; diff --git a/src/pcidb/parse_pci_ids.pl b/src/pcidb/parse_pci_ids.pl index 222dcf89..c1ec3545 100755 --- a/src/pcidb/parse_pci_ids.pl +++ b/src/pcidb/parse_pci_ids.pl @@ -48,7 +48,7 @@ while () { 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"; diff --git a/src/r600_exa.c b/src/r600_exa.c index 71963ad8..b0ce2f4e 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -577,7 +577,7 @@ R600PrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, 0); if (!accel_state->copy_area_bo) RADEON_FALLBACK(("temp copy surface alloc failed\n")); - + radeon_cs_space_add_persistent_bo(info->cs, accel_state->copy_area_bo, 0, RADEON_GEM_DOMAIN_VRAM); if (radeon_cs_space_check(info->cs)) { @@ -2051,7 +2051,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; diff --git a/src/r600_shader.c b/src/r600_shader.c index 26a6ab64..30ce8265 100644 --- a/src/r600_shader.c +++ b/src/r600_shader.c @@ -455,13 +455,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) diff --git a/src/radeon.h b/src/radeon.h index 6bb8c56a..7ee15cdf 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -118,7 +118,7 @@ struct _SyncFence; #define radeon_bswap_32(value) \ (((uint32_t)radeon_bswap_16((uint16_t)((value) & 0xffff)) << 16) | \ (uint32_t)radeon_bswap_16((uint16_t)((value) >> 16))) - + #define radeon_bswap_64(value) \ (((uint64_t)radeon_bswap_32((uint32_t)((value) & 0xffffffff)) \ << 32) | \ @@ -345,7 +345,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 { @@ -550,7 +550,7 @@ typedef struct { Bool r600_shadow_fb; void *fb_shadow; - void (*reemit_current2d)(ScrnInfoPtr pScrn, int op); // emit the current 2D state into the IB + void (*reemit_current2d)(ScrnInfoPtr pScrn, int op); // emit the current 2D state into the IB struct radeon_2d_state state_2d; struct radeon_buffer *front_buffer; struct radeon_bo_manager *bufmgr; @@ -862,7 +862,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); diff --git a/src/radeon_accel.c b/src/radeon_accel.c index a0dca68c..f09bb1da 100644 --- a/src/radeon_accel.c +++ b/src/radeon_accel.c @@ -984,7 +984,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(); diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index 114cf22e..3a7d5980 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -1,5 +1,5 @@ /* - * Copyright 2008 Kristian Høgsberg + * Copyright 2008 Kristian Høgsberg * Copyright 2008 Jérôme Glisse * * All Rights Reserved. @@ -195,7 +195,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 +289,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 +376,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; @@ -1204,7 +1204,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); diff --git a/src/radeon_exa.c b/src/radeon_exa.c index 320ff992..2344da7f 100644 --- a/src/radeon_exa.c +++ b/src/radeon_exa.c @@ -207,7 +207,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) { diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c index b3200cc9..535afbeb 100644 --- a/src/radeon_exa_funcs.c +++ b/src/radeon_exa_funcs.c @@ -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; diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index f8a7795e..0c8f0fbb 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -264,13 +264,13 @@ static Bool RADEONSetupSourceTile(PicturePtr pPict, info->accel_state->need_src_tile_x = info->accel_state->need_src_tile_y = FALSE; info->accel_state->src_tile_width = info->accel_state->src_tile_height = 65536; /* "infinite" */ - + if (repeatType == RepeatNormal || repeatType == RepeatReflect) { Bool badPitch = needMatchingPitch && !RADEONPitchMatches(pPix); - + int w = pPict->pDrawable ? pPict->pDrawable->width : 1; int h = pPict->pDrawable ? pPict->pDrawable->height : 1; - + if (pPict->transform) { if (badPitch) RADEON_FALLBACK(("Width %d and pitch %u not compatible for repeat\n", @@ -1217,7 +1217,7 @@ static Bool R300TextureSetup(PicturePtr pPict, PixmapPtr pPix, txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_WRAP); else txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL); - + if (unit != 0 || !info->accel_state->need_src_tile_y) txfilter |= R300_TX_CLAMP_T(R300_TX_CLAMP_WRAP); else @@ -2073,7 +2073,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture, } ADVANCE_RING(); - + BEGIN_ACCEL_RELOC(3, 2); EMIT_WRITE_OFFSET(R300_RB3D_COLOROFFSET0, 0, pDst); EMIT_COLORPITCH(R300_RB3D_COLORPITCH0, colorpitch, pDst); @@ -2390,7 +2390,7 @@ static void RadeonComposite(PixmapPtr pDst, int remainingWidth = width; int tileSrcX, tileMaskX, tileDstX; int h = info->accel_state->src_tile_height - tileSrcY; - + if (h > remainingHeight) h = remainingHeight; remainingHeight -= h; @@ -2398,13 +2398,13 @@ static void RadeonComposite(PixmapPtr pDst, modulus(srcX, info->accel_state->src_tile_width, tileSrcX); tileMaskX = maskX; tileDstX = dstX; - + while (remainingWidth > 0) { int w = info->accel_state->src_tile_width - tileSrcX; if (w > remainingWidth) w = remainingWidth; remainingWidth -= w; - + RadeonCompositeTile(pScrn, info, pDst, @@ -2412,7 +2412,7 @@ static void RadeonComposite(PixmapPtr pDst, tileMaskX, tileMaskY, tileDstX, tileDstY, w, h); - + tileSrcX = 0; tileMaskX += w; tileDstX += w; diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 19d71748..b9de1cda 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -302,7 +302,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++; @@ -842,7 +842,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, @@ -1791,7 +1791,7 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags) (unsigned)ARRAY_SIZE(pRADEONEnt->scrn)); return FALSE; } - + if (!RADEONGetRec(pScrn)) return FALSE; info = RADEONPTR(pScrn); @@ -2337,7 +2337,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"); diff --git a/src/radeon_reg.h b/src/radeon_reg.h index fbf15584..e76631b8 100644 --- a/src/radeon_reg.h +++ b/src/radeon_reg.h @@ -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) diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c index be71e408..96094d5a 100644 --- a/src/radeon_textured_video.c +++ b/src/radeon_textured_video.c @@ -348,13 +348,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; diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c index ba10c60d..0e59edcc 100644 --- a/src/radeon_textured_videofuncs.c +++ b/src/radeon_textured_videofuncs.c @@ -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); diff --git a/src/radeon_video.c b/src/radeon_video.c index fc321184..5cc9e8d0 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -269,12 +269,12 @@ RADEONCopyMungedData( dst++; s2++; s3++; s1 += 2; } - + dst1 += dstPitch; src1 += srcPitch; if( j & 1 ) { src2 += srcPitch2; src3 += srcPitch2; - } + } } } diff --git a/src/simple_list.h b/src/simple_list.h index 0be4ad1a..4eee82c3 100644 --- a/src/simple_list.h +++ b/src/simple_list.h @@ -4,7 +4,7 @@ * * Intended to work with a list sentinel which is created as an empty * list. Insert & delete are O(1). - * + * * \author * (C) 1997, Keith Whitwell */ @@ -154,19 +154,19 @@ do { \ /** * Test whether element is at end of the list. - * + * * \param list list. * \param elem element. - * + * * \return non-zero if element is at end of list, or zero otherwise. */ #define at_end(list, elem) ((elem) == (list)) /** * Test if a list is empty. - * + * * \param list list. - * + * * \return non-zero if list empty, or zero otherwise. */ #define is_empty_list(list) ((list)->next == (list)) @@ -188,7 +188,7 @@ do { \ * * Same as #foreach but lets you unlink the current value during a list * traversal. Useful for freeing a list, element by element. - * + * * \param ptr pointer to the current element. * \param t temporary pointer. * \param list list. From 6b81536af92694a25d1350c21c40d1d308c3d772 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 16 Dec 2025 12:01:12 +0100 Subject: [PATCH 48/75] README.md: fix URLs Signed-off-by: Enrico Weigelt, metux IT consult --- README.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/README.md b/README.md index 6897feab..4b95a1df 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,6 @@ xf86-video-ati - Xorg driver for ATI/AMD Radeon GPUs using the radeon kernel dri Questions regarding this software should be directed at the [amd-gfx mailing list](https://lists.freedesktop.org/mailman/listinfo/amd-gfx). -The -[main development code repository](https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati) -can be found at FreeDesktop Gitlab. +[main development code repository](https://github.com/X11Libre/xf86-video-ati) Please submit bug reports there and use merge requests for patch submission. - -See the X.org wiki for -[further patch submission instructions](https://www.x.org/wiki/Development/Documentation/SubmittingPatches) -and -[more information on the git code manager](https://wiki.x.org/wiki/GitPage). - From 62b869855e88de3a59450c95540ff3afc7f1c5f8 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 16 Dec 2025 13:55:14 +0100 Subject: [PATCH 49/75] man: replace Xorg by XLibre Signed-off-by: Enrico Weigelt, metux IT consult --- man/ati.man | 6 +++--- man/radeon.man | 15 +++++---------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/man/ati.man b/man/ati.man index 52d79e65..8ac5f4ea 100644 --- a/man/ati.man +++ b/man/ati.man @@ -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__), diff --git a/man/radeon.man b/man/radeon.man index e370c1d5..941925c4 100644 --- a/man/radeon.man +++ b/man/radeon.man @@ -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 From 9d59f3e5c5f647e01f97e4869c8350684f471d18 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 17 Dec 2025 19:31:25 +0100 Subject: [PATCH 50/75] drop obsolete HAVE_CONFIG_H Signed-off-by: Enrico Weigelt, metux IT consult --- src/ati.c | 3 --- src/atimodule.c | 3 --- src/cayman_accel.c | 2 -- src/cayman_shader.c | 3 --- src/drmmode_display.c | 3 --- src/evergreen_accel.c | 2 -- src/evergreen_exa.c | 3 --- src/evergreen_shader.c | 3 --- src/evergreen_textured_videofuncs.c | 3 --- src/r600_exa.c | 3 --- src/r600_shader.c | 3 --- src/r600_textured_videofuncs.c | 3 --- src/r6xx_accel.c | 2 -- src/radeon_accel.c | 3 --- src/radeon_bo_helper.c | 5 +---- src/radeon_dri2.c | 2 -- src/radeon_dri3.c | 4 ---- src/radeon_drm_queue.c | 3 --- src/radeon_exa.c | 3 --- src/radeon_exa_shared.c | 2 -- src/radeon_glamor.c | 3 --- src/radeon_glamor_wrappers.c | 4 ---- src/radeon_kms.c | 2 -- src/radeon_misc.c | 3 --- src/radeon_present.c | 3 --- src/radeon_probe.c | 3 --- src/radeon_textured_video.c | 3 --- src/radeon_vbo.c | 2 -- src/radeon_video.c | 3 --- src/radeon_xvmc.c | 3 --- 30 files changed, 1 insertion(+), 86 deletions(-) diff --git a/src/ati.c b/src/ati.c index 12141757..a176e1ee 100644 --- a/src/ati.c +++ b/src/ati.c @@ -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 #include diff --git a/src/atimodule.c b/src/atimodule.c index f0eb147a..84a75993 100644 --- a/src/atimodule.c +++ b/src/atimodule.c @@ -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" diff --git a/src/cayman_accel.c b/src/cayman_accel.c index a754610a..1ad39446 100644 --- a/src/cayman_accel.c +++ b/src/cayman_accel.c @@ -23,9 +23,7 @@ * Authors: Alex Deucher * */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "xf86.h" diff --git a/src/cayman_shader.c b/src/cayman_shader.c index 59f41776..184d52cb 100644 --- a/src/cayman_shader.c +++ b/src/cayman_shader.c @@ -23,10 +23,7 @@ * Author: Alex Deucher * */ - -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "xf86.h" diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 68781e90..8ece14fa 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -24,10 +24,7 @@ * Dave Airlie * */ - -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include #include diff --git a/src/evergreen_accel.c b/src/evergreen_accel.c index 43146bbf..87558c2f 100644 --- a/src/evergreen_accel.c +++ b/src/evergreen_accel.c @@ -23,9 +23,7 @@ * Authors: Alex Deucher * */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "xf86.h" diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index a45bc202..48bb3b45 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -23,10 +23,7 @@ * Author: Alex Deucher * */ - -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "xf86.h" diff --git a/src/evergreen_shader.c b/src/evergreen_shader.c index 4852578e..ebf9bb2e 100644 --- a/src/evergreen_shader.c +++ b/src/evergreen_shader.c @@ -23,10 +23,7 @@ * Author: Alex Deucher * */ - -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "xf86.h" diff --git a/src/evergreen_textured_videofuncs.c b/src/evergreen_textured_videofuncs.c index 53675600..784d8811 100644 --- a/src/evergreen_textured_videofuncs.c +++ b/src/evergreen_textured_videofuncs.c @@ -23,10 +23,7 @@ * Author: Alex Deucher * */ - -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "xf86.h" diff --git a/src/r600_exa.c b/src/r600_exa.c index b0ce2f4e..28be7559 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -23,10 +23,7 @@ * Author: Alex Deucher * */ - -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "xf86.h" diff --git a/src/r600_shader.c b/src/r600_shader.c index 30ce8265..653ccc20 100644 --- a/src/r600_shader.c +++ b/src/r600_shader.c @@ -23,10 +23,7 @@ * Author: Alex Deucher * */ - -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "xf86.h" diff --git a/src/r600_textured_videofuncs.c b/src/r600_textured_videofuncs.c index c8a9b197..f4d61e39 100644 --- a/src/r600_textured_videofuncs.c +++ b/src/r600_textured_videofuncs.c @@ -23,10 +23,7 @@ * Author: Alex Deucher * */ - -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "xf86.h" diff --git a/src/r6xx_accel.c b/src/r6xx_accel.c index 1f5c0523..07548106 100644 --- a/src/r6xx_accel.c +++ b/src/r6xx_accel.c @@ -23,9 +23,7 @@ * Authors: Alex Deucher * Matthias Hopf */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "xf86.h" diff --git a/src/radeon_accel.c b/src/radeon_accel.c index f09bb1da..85a59007 100644 --- a/src/radeon_accel.c +++ b/src/radeon_accel.c @@ -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: diff --git a/src/radeon_bo_helper.c b/src/radeon_bo_helper.c index 8b3e5797..de682898 100644 --- a/src/radeon_bo_helper.c +++ b/src/radeon_bo_helper.c @@ -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" diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index 3a7d5980..a8061d55 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -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" diff --git a/src/radeon_dri3.c b/src/radeon_dri3.c index 7daa53ab..a9a2a520 100644 --- a/src/radeon_dri3.c +++ b/src/radeon_dri3.c @@ -20,11 +20,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ - - -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "radeon.h" #include "radeon_bo_gem.h" diff --git a/src/radeon_drm_queue.c b/src/radeon_drm_queue.c index fc043605..c336ad33 100644 --- a/src/radeon_drm_queue.c +++ b/src/radeon_drm_queue.c @@ -25,10 +25,7 @@ * Dave Airlie * */ - -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include diff --git a/src/radeon_exa.c b/src/radeon_exa.c index 2344da7f..2c576ba1 100644 --- a/src/radeon_exa.c +++ b/src/radeon_exa.c @@ -28,10 +28,7 @@ * Benjamin Herrenschmidt * */ - -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "radeon.h" #include "radeon_reg.h" diff --git a/src/radeon_exa_shared.c b/src/radeon_exa_shared.c index 1378876b..07664520 100644 --- a/src/radeon_exa_shared.c +++ b/src/radeon_exa_shared.c @@ -30,9 +30,7 @@ * Alex Deucher * Matthias Hopf */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "radeon.h" #include "radeon_probe.h" diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c index c03592db..7aea84fc 100644 --- a/src/radeon_glamor.c +++ b/src/radeon_glamor.c @@ -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 diff --git a/src/radeon_glamor_wrappers.c b/src/radeon_glamor_wrappers.c index 2b39f58a..951e1e86 100644 --- a/src/radeon_glamor_wrappers.c +++ b/src/radeon_glamor_wrappers.c @@ -26,11 +26,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ - - -#ifdef HAVE_CONFIG_H #include -#endif #ifdef USE_GLAMOR diff --git a/src/radeon_kms.c b/src/radeon_kms.c index b9de1cda..d0044238 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -24,9 +24,7 @@ * Dave Airlie * */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include #include diff --git a/src/radeon_misc.c b/src/radeon_misc.c index 1115118a..08ce655e 100644 --- a/src/radeon_misc.c +++ b/src/radeon_misc.c @@ -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" diff --git a/src/radeon_present.c b/src/radeon_present.c index 62923d21..80ec8a8b 100644 --- a/src/radeon_present.c +++ b/src/radeon_present.c @@ -20,10 +20,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ - -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "radeon.h" diff --git a/src/radeon_probe.c b/src/radeon_probe.c index 9461edea..2c4463f0 100644 --- a/src/radeon_probe.c +++ b/src/radeon_probe.c @@ -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 #include diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c index 96094d5a..272333a9 100644 --- a/src/radeon_textured_video.c +++ b/src/radeon_textured_video.c @@ -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 #include diff --git a/src/radeon_vbo.c b/src/radeon_vbo.c index 6b0d278a..5b7c98af 100644 --- a/src/radeon_vbo.c +++ b/src/radeon_vbo.c @@ -24,9 +24,7 @@ * Dave Airlie * */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include #include "radeon.h" diff --git a/src/radeon_video.c b/src/radeon_video.c index 5cc9e8d0..ddbac53b 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -1,7 +1,4 @@ - -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include #include diff --git a/src/radeon_xvmc.c b/src/radeon_xvmc.c index e96f0635..941efe8d 100644 --- a/src/radeon_xvmc.c +++ b/src/radeon_xvmc.c @@ -24,10 +24,7 @@ * Based on vl_hwmc.c from xf86-video-nouveau * */ - -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include #include "radeon_video.h" From 24a3cfbd29222c63e898e8351825f6cc340b43a8 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 18 Dec 2025 11:52:02 +0100 Subject: [PATCH 51/75] drop obsolete .gitlab-ci.yml Signed-off-by: Enrico Weigelt, metux IT consult --- .gitlab-ci.yml | 126 ------------------------------------------------- 1 file changed, 126 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index c4cf94e8..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,126 +0,0 @@ -# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml: - -# FDO_DISTRIBUTION_TAG is the tag of the docker image used for the build -# jobs. If the image doesn't exist yet, the docker-image stage generates it -# or copies it from upstream (this is all handled by the templates). -# -# In order to generate a new image, one should generally change the tag. -# While removing the image from the registry would also work, that's not -# recommended except for ephemeral images during development. -# -variables: - FDO_DISTRIBUTION_VERSION: bookworm-slim - FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/debian-install.sh' - FDO_DISTRIBUTION_PACKAGES: 'ca-certificates' - FDO_DISTRIBUTION_TAG: "2024-02-23.2" - FDO_UPSTREAM_REPO: xorg/driver/xf86-video-ati - -# -# This CI uses the freedesktop.org ci-templates. -# Please see the ci-templates documentation for details: -# https://freedesktop.pages.freedesktop.org/ci-templates/ - -.templates_sha: &template_sha 9568e38927f9e9c48d4f586f84a071c3a4bdcd39 # see https://docs.gitlab.com/ee/ci/yaml/#includefile - -include: - - project: 'freedesktop/ci-templates' - ref: *template_sha - file: '/templates/debian.yml' - - project: 'freedesktop/ci-templates' - ref: *template_sha - file: '/templates/ci-fairy.yml' - - template: Security/SAST.gitlab-ci.yml - - -stages: - - docker-image - - build - - test - -# -# Verify that commit messages are as expected -# -check-commits: - extends: - - .fdo.ci-fairy - stage: test - script: - - ci-fairy check-commits --junit-xml=results.xml - except: - - master@$FDO_UPSTREAM_REPO - variables: - GIT_DEPTH: 100 - artifacts: - reports: - junit: results.xml - allow_failure: true - -# -# Verify that the merge request has the allow-collaboration checkbox ticked -# -check-merge-request: - extends: - - .fdo.ci-fairy - stage: test - script: - - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml - artifacts: - when: on_failure - reports: - junit: results.xml - allow_failure: true - - -# -# Build a container with the given tag and the packages pre-installed. -# This only happens if/when the tag changes, otherwise the existing image is -# re-used. -# -container-build: - extends: - - .fdo.container-build@debian - stage: docker-image - variables: - GIT_STRATEGY: none - - -# The default build instructions -.default_build: - extends: - - .fdo.distribution-image@debian - stage: build - script: - - ./autogen.sh - - make -j${FDO_CI_CONCURRENT:-4} check V=1 - variables: - CFLAGS: "-pipe -g -O2 -Werror" - ACLOCAL_PATH: /usr/local/xserver-$XSERVER_VERSION/share/aclocal - PKG_CONFIG_PATH: /usr/local/xserver-$XSERVER_VERSION/lib/pkgconfig - -build-distcheck: - extends: - - .default_build - script: - - ./autogen.sh - - make -j${FDO_CI_CONCURRENT:-4} check V=1 - - make install V=1 - - make -j${FDO_CI_CONCURRENT:-4} distcheck - variables: - XSERVER_VERSION: "21.1" - -# excludes version already checked in build-distcheck -build-gcc: - extends: - - .default_build - parallel: - matrix: - - XSERVER_VERSION: ["1.18", "1.19", "1.20"] - -build-clang: - extends: - - .default_build - parallel: - matrix: - - XSERVER_VERSION: ["1.18", "1.19", "1.20", "21.1"] - variables: - CC: clang From 729fc33efdb22ce9bc070889cc9b6bd0f9e1f9de Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 18 Dec 2025 11:52:13 +0100 Subject: [PATCH 52/75] drop obsolte .dir-locals.el Signed-off-by: Enrico Weigelt, metux IT consult --- .dir-locals.el | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 .dir-locals.el diff --git a/.dir-locals.el b/.dir-locals.el deleted file mode 100644 index cbbe7f76..00000000 --- a/.dir-locals.el +++ /dev/null @@ -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)) - ) From 11d21641a2ac75ee4c4e0d7f75c2b1044e99ec26 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 18 Dec 2025 11:52:27 +0100 Subject: [PATCH 53/75] drop obsolete .editorconfig Signed-off-by: Enrico Weigelt, metux IT consult --- .editorconfig | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 91f0ff80..00000000 --- a/.editorconfig +++ /dev/null @@ -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 From ce619630ed03e119c31063c64413e3a74ec32696 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 18 Dec 2025 12:01:59 +0100 Subject: [PATCH 54/75] drop support for ancient pre-7.1 xextproto Signed-off-by: Enrico Weigelt, metux IT consult --- configure.ac | 5 +---- src/drmmode_display.c | 5 ----- src/radeon_kms.c | 5 ----- src/radeon_video.c | 5 ----- 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/configure.ac b/configure.ac index da95ff8b..ba640006 100644 --- a/configure.ac +++ b/configure.ac @@ -76,10 +76,7 @@ PKG_CHECK_MODULES(LIBDRM_RADEON, [libdrm_radeon]) # Obtain compiler/linker options for the driver dependencies PKG_CHECK_MODULES(XORG, [xorg-server >= 1.18 xproto fontsproto xf86driproto $REQUIRED_MODULES]) -PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], - HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]), - HAVE_XEXTPROTO_71="no") -AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ]) +PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1]) # Define a configure option for an alternate X Server configuration directory AC_ARG_WITH(xorg-conf-dir, diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 8ece14fa..185a1d5d 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -44,12 +44,7 @@ #include "drmmode_display.h" /* DPMS */ -#ifdef HAVE_XEXTPROTO_71 #include -#else -#define DPMS_SERVER -#include -#endif #define DEFAULT_NOMINAL_FRAME_RATE 60 diff --git a/src/radeon_kms.c b/src/radeon_kms.c index d0044238..77377dc7 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -45,12 +45,7 @@ #include /* DPMS */ -#ifdef HAVE_XEXTPROTO_71 #include -#else -#define DPMS_SERVER -#include -#endif #ifdef __DragonFly__ #include diff --git a/src/radeon_video.c b/src/radeon_video.c index ddbac53b..2467440e 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -15,12 +15,7 @@ #include "dixstruct.h" /* DPMS */ -#ifdef HAVE_XEXTPROTO_71 #include -#else -#define DPMS_SERVER -#include -#endif #include #include "fourcc.h" From ce106e93d38ae6c0d5187f05beeaa98736e8f991 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 18 Dec 2025 13:08:26 +0100 Subject: [PATCH 55/75] configure.ac: replace DRIVER_NAME symbol by actual name Signed-off-by: Enrico Weigelt, metux IT consult --- configure.ac | 3 --- man/Makefile.am | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index ba640006..d485d63c 100644 --- a/configure.ac +++ b/configure.ac @@ -219,9 +219,6 @@ 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] diff --git a/man/Makefile.am b/man/Makefile.am index b73073e1..3a00d7a9 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -23,11 +23,11 @@ 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) From 75f76a5712d873b4d4cbd09f04b571ada2a0f547 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 18 Dec 2025 18:51:07 +0100 Subject: [PATCH 56/75] configure.ac: formatting fixes Signed-off-by: Enrico Weigelt, metux IT consult --- configure.ac | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/configure.ac b/configure.ac index d485d63c..4a65d036 100644 --- a/configure.ac +++ b/configure.ac @@ -219,24 +219,7 @@ fi AC_SUBST([moduledir]) -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 From e38a234218ca2aa4a8ad45fde6911b5f749750ce Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 18 Dec 2025 18:51:27 +0100 Subject: [PATCH 57/75] release 25.0.0 Signed-off-by: Enrico Weigelt, metux IT consult --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4a65d036..47025625 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xlibre-xf86-video-ati], - [22.0.1], + [25.0.0], [https://github.com/X11Libre/xf86-video-ati/issues] [xlibre-xf86-video-ati]) From 5b12c2cfdaa00b544fda63f25d63ee562052a78a Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 19 Dec 2025 16:04:28 +0100 Subject: [PATCH 58/75] configure.ac: increase minimum xserver version to 25.0.0 Signed-off-by: Enrico Weigelt, metux IT consult --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 47025625..1cec4980 100644 --- a/configure.ac +++ b/configure.ac @@ -75,7 +75,7 @@ PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.89]) PKG_CHECK_MODULES(LIBDRM_RADEON, [libdrm_radeon]) # Obtain compiler/linker options for the driver dependencies -PKG_CHECK_MODULES(XORG, [xorg-server >= 1.18 xproto fontsproto xf86driproto $REQUIRED_MODULES]) +PKG_CHECK_MODULES(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 From a3e6ef9f900a371353a188cf3c73794582851998 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 19 Dec 2025 18:33:57 +0100 Subject: [PATCH 59/75] configure.ac: fix missing comma in AC_INIT() call Signed-off-by: Enrico Weigelt, metux IT consult --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1cec4980..2b5e779e 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.60]) AC_INIT([xlibre-xf86-video-ati], [25.0.0], - [https://github.com/X11Libre/xf86-video-ati/issues] + [https://github.com/X11Libre/xf86-video-ati/issues], [xlibre-xf86-video-ati]) AC_CONFIG_SRCDIR([Makefile.am]) From 7d7d03951149bd82f635cb9e720524ea9d117368 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 22 Dec 2025 14:32:47 +0100 Subject: [PATCH 60/75] .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 --- .github/actions/build-driver/action.yaml | 69 ----------------- .github/scripts/conf.sh | 13 ---- .github/scripts/github/make-release | 17 ----- .github/scripts/install-prereq.sh | 15 ---- .github/scripts/ubuntu/install-pkg.sh | 94 ------------------------ .github/scripts/util.sh | 85 --------------------- .github/workflows/build.yml | 42 ++++------- .gitlab-ci/debian-install.sh | 84 --------------------- 8 files changed, 13 insertions(+), 406 deletions(-) delete mode 100644 .github/actions/build-driver/action.yaml delete mode 100644 .github/scripts/conf.sh delete mode 100755 .github/scripts/github/make-release delete mode 100755 .github/scripts/install-prereq.sh delete mode 100755 .github/scripts/ubuntu/install-pkg.sh delete mode 100644 .github/scripts/util.sh delete mode 100644 .gitlab-ci/debian-install.sh diff --git a/.github/actions/build-driver/action.yaml b/.github/actions/build-driver/action.yaml deleted file mode 100644 index 3032abda..00000000 --- a/.github/actions/build-driver/action.yaml +++ /dev/null @@ -1,69 +0,0 @@ -name: 'build driver' -description: 'build driver against specific Xserver' -inputs: - xserver-version: - required: true - -runs: - using: "composite" - steps: - - name: check out driver repo - uses: actions/checkout@v4 - - - name: prepare build environment - shell: bash - run: | - MACHINE=`gcc -dumpmachine` - echo "MACHINE=$MACHINE" >> "$GITHUB_ENV" - echo "PKG_CONFIG_PATH=$X11_PREFIX/share/pkgconfig:$X11_PREFIX/lib/$MACHINE/pkgconfig:$X11_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" >> "$GITHUB_ENV" - sudo chown root /bin/tar && sudo chmod u+s /bin/tar - - - name: apt cache - uses: actions/cache@v4 - with: - path: /var/cache/apt - key: apt-cache-${{ hashFiles('.github/scripts/ubuntu/install-pkg.sh') }} - restore-keys: apt-cache- - - - name: pkg install - shell: bash - run: sudo .github/scripts/ubuntu/install-pkg.sh - - - name: X11 prereq cache - uses: actions/cache@v4 - with: - path: | - ${{ env.X11_PREFIX }} - key: ${{ runner.name }}-x11-deps-${{ hashFiles('.github/scripts/install-prereq.sh') }} - restore-keys: ${{ runner.name }}-x11-deps- - - - name: generic prereq - shell: bash - run: .github/scripts/install-prereq.sh - - - name: check out xserver repo - uses: actions/checkout@v4 - with: - repository: X11Libre/xserver - path: xserver-sdk - ref: ${{ inputs.xserver-version }} - - - name: build xserver sdk - shell: bash - env: - MESON_ARGS: -Dc_args="-fno-common" -Dprefix=/usr -Dnamespace=false -Dxselinux=false -Dxephyr=false -Dwerror=false -Dxcsecurity=false -Dxorg=true -Dxvfb=false -Dxnest=false -Ddocs=false - run: | - cd xserver-sdk - echo -n > .meson_environment - echo "export MESON_BUILDDIR=$MESON_BUILDDIR" >> .meson_environment - echo "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> .meson_environment - .gitlab-ci/meson-build.sh --skip-test - sudo meson install --no-rebuild -C "$MESON_BUILDDIR" - sudo mkdir -p /usr/local/lib/$MACHINE/xorg/modules # /home/runner/x11/lib/xorg/modules - sudo chown -R runner /usr/local/lib/$MACHINE/xorg/modules # /home/runner/x11/lib/xorg/modules - - - name: compile driver - shell: bash - run: | - CFLAGS="-Wall" ./autogen.sh # --prefix=$X11_PREFIX - CFLAGS="-Wall" make -j # install diff --git a/.github/scripts/conf.sh b/.github/scripts/conf.sh deleted file mode 100644 index 7cdab25d..00000000 --- a/.github/scripts/conf.sh +++ /dev/null @@ -1,13 +0,0 @@ -export X11_OS=`uname -s` - -export X11_PREFIX="${X11_PREFIX:-$HOME/x11}" -export X11_BUILD_DIR="${X11_BUILD_DIR:-$HOME/build-deps}" -export DRV_BUILD_DIR="${DRV_BUILD_DIR:-$HOME/build-drivers}" - -case "$X11_OS" in -Darwin) export FDO_CI_CONCURRENT=`sysctl -n hw.logicalcpu` ;; -Linux) export FDO_CI_CONCURRENT=`nproc` ;; -esac - -export PATH="$X11_PREFIX/bin:$PATH" -export PKG_CONFIG_PATH="$X11_PREFIX/lib/x86_64-linux-gnu/pkgconfig:$X11_PREFIX/lib/pkgconfig:$X11_PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" diff --git a/.github/scripts/github/make-release b/.github/scripts/github/make-release deleted file mode 100755 index 89152bac..00000000 --- a/.github/scripts/github/make-release +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -err() { - echo "$0: $*" -} - -[ "$GITHUB_REPOSITORY" ] || err "missing variable GITHUB_REPOSITORY" - -TITLE=$(git tag -l --format='%(contents)' $tag) - -echo "tag=$tag" -echo "title=$TITLE" - -gh release create "$tag" \ - --repo="$GITHUB_REPOSITORY" \ - --title="$tag" \ - --generate-notes diff --git a/.github/scripts/install-prereq.sh b/.github/scripts/install-prereq.sh deleted file mode 100755 index e2bd8465..00000000 --- a/.github/scripts/install-prereq.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -e - -. .github/scripts/util.sh - -mkdir -p $X11_BUILD_DIR -cd $X11_BUILD_DIR - -if [ "$X11_OS" = "Linux" ]; then -build_meson drm https://gitlab.freedesktop.org/mesa/drm libdrm-2.4.121 "" \ - -Domap=enabled -fi -build_meson libxcvt https://gitlab.freedesktop.org/xorg/lib/libxcvt libxcvt-0.1.0 -build_ac xorgproto https://gitlab.freedesktop.org/xorg/proto/xorgproto xorgproto-2024.1 diff --git a/.github/scripts/ubuntu/install-pkg.sh b/.github/scripts/ubuntu/install-pkg.sh deleted file mode 100755 index 0cdaf882..00000000 --- a/.github/scripts/ubuntu/install-pkg.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash - -set -e - -# Packages which are needed by this script, but not for the xserver build -EPHEMERAL=" - libexpat-dev - libgles2-mesa-dev - libxkbcommon-dev - x11-utils - x11-xserver-utils - xauth - xvfb -" - -apt-get update - -apt-get install -y \ - $EPHEMERAL \ - autoconf \ - automake \ - build-essential \ - ca-certificates \ - libaudit-dev \ - libbsd-dev \ - libcairo2-dev \ - libdbus-1-dev \ - libdrm-dev \ - libegl1-mesa-dev \ - libepoxy-dev \ - libevdev2 \ - libexpat1 \ - libffi-dev \ - libgbm-dev \ - libgcrypt-dev \ - libgl1-mesa-dev \ - libgles2 \ - libglx-mesa0 \ - libinput10 \ - libinput-dev \ - libnvidia-egl-wayland-dev \ - libpciaccess-dev \ - libpixman-1-dev \ - libspice-protocol-dev \ - libsystemd-dev \ - libudev-dev \ - libunwind-dev \ - libx11-dev \ - libx11-xcb-dev \ - libxau-dev \ - libxaw7-dev \ - libxcb-glx0-dev \ - libxcb-icccm4-dev \ - libxcb-image0-dev \ - libxcb-keysyms1-dev \ - libxcb-randr0-dev \ - libxcb-render-util0-dev \ - libxcb-render0-dev \ - libxcb-shape0-dev \ - libxcb-shm0-dev \ - libxcb-util0-dev \ - libxcb-xf86dri0-dev \ - libxcb-xkb-dev \ - libxcb-xv0-dev \ - libxcb1-dev \ - libxdmcp-dev \ - libxext-dev \ - libxfixes-dev \ - libxfont-dev \ - libxi-dev \ - libxinerama-dev \ - libxkbcommon0 \ - libxkbfile-dev \ - libxmu-dev \ - libxmuu-dev \ - libxpm-dev \ - libxrender-dev \ - libxres-dev \ - libxshmfence-dev \ - libxt-dev \ - libxtst-dev \ - libxv-dev \ - mesa-common-dev \ - meson \ - nettle-dev \ - libpango1.0-dev \ - pkg-config \ - x11-xkb-utils \ - xfonts-utils \ - xkb-data \ - xtrans-dev \ - xutils-dev \ - libxaw7-dev \ - python3-mako diff --git a/.github/scripts/util.sh b/.github/scripts/util.sh deleted file mode 100644 index dea16ae9..00000000 --- a/.github/scripts/util.sh +++ /dev/null @@ -1,85 +0,0 @@ - -. .github/scripts/conf.sh - -clone_source() { - local pkgname="$1" - local url="$2" - local ref="$3" - local commit="$4" - - if [ ! -f $pkgname/.git/config ]; then - echo "need to clone $pkgname" - if [ "$commit" ]; then - git clone $url $pkgname --branch=$ref - else - git clone $url $pkgname --branch=$ref --depth 1 - fi - else - echo "already cloned $pkgname" - fi - - if [ "$commit" ]; then - ( cd $pkgname && git checkout -f "$commit" ) - fi -} - -build_meson() { - local pkgname="$1" - local url="$2" - local ref="$3" - local commit="$4" - shift - shift - shift - shift || true - if [ -f $X11_PREFIX/$pkgname.DONE ]; then - echo "package $pkgname already built" - else - clone_source "$pkgname" "$url" "$ref" "$commit" - ( - cd $pkgname - meson "$@" build -Dprefix=$X11_PREFIX - ninja -j${FDO_CI_CONCURRENT:-4} -C build install - ) - touch $X11_PREFIX/$pkgname.DONE - fi -} - -build_ac() { - local pkgname="$1" - local url="$2" - local ref="$3" - local commit="$4" - shift - shift - shift - shift || true - if [ -f $X11_PREFIX/$pkgname.DONE ]; then - echo "package $pkgname already built" - else - clone_source "$pkgname" "$url" "$ref" "$commit" - ( - cd $pkgname - ./autogen.sh --prefix=$X11_PREFIX - make -j${FDO_CI_CONCURRENT:-4} install - ) - touch $X11_PREFIX/$pkgname.DONE - fi -} - -build_drv_ac() { - local pkgname="$1" - local url="$2" - local ref="$3" - local commit="$4" - shift - shift - shift - shift || true - clone_source "$pkgname" "$url" "$ref" "$commit" - ( - cd $pkgname - ./autogen.sh # --prefix=$X11_PREFIX - make -j${FDO_CI_CONCURRENT:-4} # install - ) -} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23644b02..ed3fdd96 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,43 +1,27 @@ -name: Build driver - permissions: contents: write -env: - MESON_BUILDDIR: "build" - X11_PREFIX: /home/runner/x11 - X11_BUILD_DIR: /home/runner/build-deps - on: push: pull_request: jobs: - for-xserver-stable-25_0: + target-ubuntu: + strategy: + matrix: + xserver-version: [ master, xlibre-xserver-25.1.0, xlibre-xserver-25.0.0.18 ] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/build-driver + - uses: X11Libre/action-build-driver/target/ubuntu@v0.0.1 with: - xserver-version: xlibre-xserver-25.0.0.5 + xserver-version: ${{ matrix.xserver-version }} - for-xserver-master: + release-notes: + name: Release pushed tag runs-on: ubuntu-latest + if: ${{ startsWith(github.ref, 'refs/tags/xlibre-') }} + needs: target-ubuntu + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/build-driver - with: - xserver-version: master - - release: - name: Release pushed tag - runs-on: ubuntu-latest - if: ${{ startsWith(github.ref, 'refs/tags/xlibre-') }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Create release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ github.ref_name }} - run: .github/scripts/github/make-release + - uses: X11Libre/action-build-driver/release@v0.0.1 diff --git a/.gitlab-ci/debian-install.sh b/.gitlab-ci/debian-install.sh deleted file mode 100644 index f010cd0b..00000000 --- a/.gitlab-ci/debian-install.sh +++ /dev/null @@ -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 From 4d68bbc79f0adeb8e61000cfeed976c03f399ef4 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Sat, 27 Dec 2025 15:44:51 +0100 Subject: [PATCH 61/75] .github: add freebsd and dragonfly build Signed-off-by: Enrico Weigelt, metux IT consult --- .github/workflows/build.yml | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ed3fdd96..98995282 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,13 +6,34 @@ on: pull_request: jobs: - target-ubuntu: + 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.0.1 + - uses: X11Libre/action-build-driver/target/ubuntu@v0.3.4 + 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.3.4 + 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.3.4 with: xserver-version: ${{ matrix.xserver-version }} @@ -20,8 +41,8 @@ jobs: name: Release pushed tag runs-on: ubuntu-latest if: ${{ startsWith(github.ref, 'refs/tags/xlibre-') }} - needs: target-ubuntu + needs: [ ubuntu, freebsd, dragonfly ] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: X11Libre/action-build-driver/release@v0.0.1 + - uses: X11Libre/action-build-driver/release@v0.3.4 From 1acf51328931149c37487ce0ce874a2779b42b67 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 29 Dec 2025 11:13:56 +0100 Subject: [PATCH 62/75] .github: add NetBSD build Signed-off-by: Enrico Weigelt, metux IT consult --- .github/workflows/build.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98995282..2d35cdc2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: 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.3.4 + - uses: X11Libre/action-build-driver/target/ubuntu@v0.3.7 with: xserver-version: ${{ matrix.xserver-version }} @@ -22,7 +22,7 @@ jobs: 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.3.4 + - uses: X11Libre/action-build-driver/target/freebsd@v0.3.7 with: xserver-version: ${{ matrix.xserver-version }} @@ -33,7 +33,17 @@ jobs: xserver-version: [ master, xlibre-xserver-25.1.0 ] runs-on: ubuntu-latest steps: - - uses: X11Libre/action-build-driver/target/dragonfly@v0.3.4 + - uses: X11Libre/action-build-driver/target/dragonfly@v0.3.7 + with: + xserver-version: ${{ matrix.xserver-version }} + + netbsd: + strategy: + matrix: + xserver-version: [ master, xlibre-xserver-25.1.0 ] + runs-on: ubuntu-latest + steps: + - uses: X11Libre/action-build-driver/target/netbsd@v0.3.7 with: xserver-version: ${{ matrix.xserver-version }} @@ -41,8 +51,8 @@ jobs: name: Release pushed tag runs-on: ubuntu-latest if: ${{ startsWith(github.ref, 'refs/tags/xlibre-') }} - needs: [ ubuntu, freebsd, dragonfly ] + needs: [ ubuntu, freebsd, dragonfly, netbsd ] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: X11Libre/action-build-driver/release@v0.3.4 + - uses: X11Libre/action-build-driver/release@v0.3.7 From d4b125e2b1c18b2de59bfea605af8125390d1d6d Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 31 Dec 2025 11:05:24 +0100 Subject: [PATCH 63/75] configure.ac: drop obsolete AC_SYS_LARGEFILE Signed-off-by: Enrico Weigelt, metux IT consult --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2b5e779e..492803bc 100644 --- a/configure.ac +++ b/configure.ac @@ -35,7 +35,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], From a33a63e017e9b062dd90ac2b51c74dffec70bae7 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 31 Dec 2025 11:10:02 +0100 Subject: [PATCH 64/75] drop unused byteswap functions Signed-off-by: Enrico Weigelt, metux IT consult --- configure.ac | 6 ++---- src/radeon.h | 11 ----------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index 492803bc..b07f160e 100644 --- a/configure.ac +++ b/configure.ac @@ -158,9 +158,9 @@ XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" # Checks for headers/macros for byte swapping # Known variants: -# bswap_16, bswap_32, bswap_64 (glibc) +# bswap_16, bswap_32 (glibc) # __swap16, __swap32, __swap64 (OpenBSD) -# bswap16, bswap32, bswap64 (other BSD's) +# bswap16, bswap32 (other BSD's) # and a fallback to local macros if none of the above are found # if is found, assume it's the correct version @@ -211,8 +211,6 @@ b = bswap16(a); [Define to 16-bit byteswap macro]) 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 diff --git a/src/radeon.h b/src/radeon.h index 7ee15cdf..b938e8a3 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -108,7 +108,6 @@ struct _SyncFence; #include #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 #else @@ -119,22 +118,12 @@ struct _SyncFence; (((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 */ From 5a993f2d85063f79c7ea38ba625e46a7fa07db41 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 31 Dec 2025 13:08:29 +0100 Subject: [PATCH 65/75] drop compat for old video driver ABI Signed-off-by: Enrico Weigelt, metux IT consult --- src/compat-api.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/compat-api.h b/src/compat-api.h index def6d3e4..45b78d4d 100644 --- a/src/compat-api.h +++ b/src/compat-api.h @@ -26,18 +26,7 @@ #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 From 48b7dcef61651fb0aec958f569af14a21dfde4cf Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 31 Dec 2025 13:09:58 +0100 Subject: [PATCH 66/75] replace BLOCKHANDLER_ARGS_DECL and BLOCKHANDLER_ARGS Signed-off-by: Enrico Weigelt, metux IT consult --- src/compat-api.h | 3 --- src/radeon.h | 2 +- src/radeon_kms.c | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/compat-api.h b/src/compat-api.h index 45b78d4d..3866a3f8 100644 --- a/src/compat-api.h +++ b/src/compat-api.h @@ -26,7 +26,4 @@ #ifndef COMPAT_API_H #define COMPAT_API_H -#define BLOCKHANDLER_ARGS_DECL ScreenPtr pScreen, pointer pTimeout -#define BLOCKHANDLER_ARGS pScreen, pTimeout - #endif diff --git a/src/radeon.h b/src/radeon.h index b938e8a3..dfbdd0e2 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -487,7 +487,7 @@ typedef struct { Bool (*CloseScreen)(ScreenPtr pScreen); - void (*BlockHandler)(BLOCKHANDLER_ARGS_DECL); + void (*BlockHandler)(ScreenPtr pScreen, pointer pTimeout); void (*CreateFence) (ScreenPtr pScreen, struct _SyncFence *pFence, Bool initially_triggered); diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 77377dc7..600d5817 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -1201,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, pointer pTimeout) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); @@ -1209,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) From fa274a36dc31242647c9e2fe6c8fb7c10b84cd93 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 31 Dec 2025 13:11:26 +0100 Subject: [PATCH 67/75] drop obsolete compat-api.h Signed-off-by: Enrico Weigelt, metux IT consult --- src/Makefile.am | 1 - src/compat-api.h | 29 ----------------------------- src/radeon.h | 2 -- src/radeon_probe.h | 1 - src/radeon_xvmc.c | 1 - 5 files changed, 34 deletions(-) delete mode 100644 src/compat-api.h diff --git a/src/Makefile.am b/src/Makefile.am index df4a95e4..723c299c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 \ diff --git a/src/compat-api.h b/src/compat-api.h deleted file mode 100644 index 3866a3f8..00000000 --- a/src/compat-api.h +++ /dev/null @@ -1,29 +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 - */ - -#ifndef COMPAT_API_H -#define COMPAT_API_H - -#endif diff --git a/src/radeon.h b/src/radeon.h index dfbdd0e2..37302cb9 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -90,8 +90,6 @@ #include "picturestr.h" #endif -#include "compat-api.h" - #include "simple_list.h" #include "atipcirename.h" diff --git a/src/radeon_probe.h b/src/radeon_probe.h index 7cb29b91..75f1e76b 100644 --- a/src/radeon_probe.h +++ b/src/radeon_probe.h @@ -48,7 +48,6 @@ #include "xf86platformBus.h" #endif -#include "compat-api.h" #include "exa.h" extern DriverRec RADEON; diff --git a/src/radeon_xvmc.c b/src/radeon_xvmc.c index 941efe8d..70b28ba7 100644 --- a/src/radeon_xvmc.c +++ b/src/radeon_xvmc.c @@ -28,7 +28,6 @@ #include #include "radeon_video.h" -#include "compat-api.h" #include #include From 23bd30c24a0d7ba16bff389356e61577b25041fc Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 2 Jan 2026 12:40:28 +0100 Subject: [PATCH 68/75] drop old pre NOTIFY_FD code pathes Signed-off-by: Enrico Weigelt, metux IT consult --- src/drmmode_display.c | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 185a1d5d..447c8cde 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -48,10 +48,6 @@ #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); @@ -2675,26 +2671,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) @@ -2857,15 +2839,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 @@ -2887,17 +2862,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; From 99a457a8b71a178f297f38a7c2a77b62b793b84f Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 2 Jan 2026 17:10:51 +0100 Subject: [PATCH 69/75] drop XF86_CRTC_VERSION check dont need support for ancient Xserver versions Signed-off-by: Enrico Weigelt, metux IT consult --- src/drmmode_display.c | 88 ------------------------------------------- 1 file changed, 88 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 447c8cde..bb1137a9 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -598,15 +598,6 @@ drmmode_can_use_hw_cursor(xf86CrtcPtr crtc) if (crtc->transformPresent) return FALSE; -#if XF86_CRTC_VERSION < 7 - /* Xorg doesn't correctly handle cursor position transform in the - * rotation case - */ - if (crtc->driverIsPerformingTransform && - (crtc->rotation & 0xf) != RR_Rotate_0) - return FALSE; -#endif - return TRUE; } @@ -638,11 +629,6 @@ drmmode_crtc_update_tear_free(xf86CrtcPtr crtc) } } -#if XF86_CRTC_VERSION < 7 -#define XF86DriverTransformOutput TRUE -#define XF86DriverTransformNone FALSE -#endif - static Bool drmmode_handle_transform(xf86CrtcPtr crtc) { @@ -980,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) @@ -1101,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; @@ -2078,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; @@ -2091,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) { @@ -2127,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); @@ -2169,9 +2083,7 @@ 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++) { From 03c42577c9c377764eaaa665141fcd51143bbbdc Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 5 Jan 2026 17:36:11 +0100 Subject: [PATCH 70/75] replace obsolete "pointer" typedef by plain void* Signed-off-by: Enrico Weigelt, metux IT consult --- src/ati.c | 2 +- src/ati.h | 2 +- src/atimodule.c | 8 ++++---- src/radeon.h | 2 +- src/radeon_dri2.c | 4 ++-- src/radeon_glamor.c | 2 +- src/radeon_glamor_wrappers.c | 4 ++-- src/radeon_kms.c | 8 ++++---- src/radeon_misc.c | 8 ++++---- src/radeon_textured_video.c | 12 ++++++------ src/radeon_vbo.h | 2 +- src/radeon_video.c | 2 +- 12 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/ati.c b/src/ati.c index a176e1ee..6e384fd2 100644 --- a/src/ati.c +++ b/src/ati.c @@ -137,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; diff --git a/src/ati.h b/src/ati.h index b7120d9f..f3e0daa0 100644 --- a/src/ati.h +++ b/src/ati.h @@ -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___ */ diff --git a/src/atimodule.c b/src/atimodule.c index 84a75993..1671d867 100644 --- a/src/atimodule.c +++ b/src/atimodule.c @@ -45,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 ) @@ -62,7 +62,7 @@ ATISetup ati_gdev_subdriver(Options); } - return (pointer)1; + return (void*)1; } /* The following record must be called atiModuleData */ diff --git a/src/radeon.h b/src/radeon.h index 37302cb9..7f09cf30 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -485,7 +485,7 @@ typedef struct { Bool (*CloseScreen)(ScreenPtr pScreen); - void (*BlockHandler)(ScreenPtr pScreen, pointer pTimeout); + void (*BlockHandler)(ScreenPtr pScreen, void *pTimeout); void (*CreateFence) (ScreenPtr pScreen, struct _SyncFence *pFence, Bool initially_triggered); diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index a8061d55..f9e6c1cf 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -430,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; @@ -938,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; diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c index 7aea84fc..e51e5547 100644 --- a/src/radeon_glamor.c +++ b/src/radeon_glamor.c @@ -69,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; diff --git a/src/radeon_glamor_wrappers.c b/src/radeon_glamor_wrappers.c index 951e1e86..8371f337 100644 --- a/src/radeon_glamor_wrappers.c +++ b/src/radeon_glamor_wrappers.c @@ -425,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); @@ -444,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); diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 600d5817..d855d192 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -272,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; @@ -307,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; @@ -1201,7 +1201,7 @@ radeon_scanout_flip(ScreenPtr pScreen, RADEONInfoPtr info, drmmode_fb_reference(pRADEONEnt->fd, &drmmode_crtc->flip_pending, fb); } -static void RADEONBlockHandler_KMS(ScreenPtr pScreen, pointer pTimeout) +static void RADEONBlockHandler_KMS(ScreenPtr pScreen, void *pTimeout) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); @@ -2582,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); diff --git a/src/radeon_misc.c b/src/radeon_misc.c index 08ce655e..ea696cd7 100644 --- a/src/radeon_misc.c +++ b/src/radeon_misc.c @@ -47,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 ) @@ -63,7 +63,7 @@ RADEONSetup xf86AddDriver(&RADEON, Module, HaveDriverFuncs); } - return (pointer)TRUE; + return (void*)TRUE; } /* The following record must be called radeonModuleData */ diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c index 272333a9..46c9e0a7 100644 --- a/src/radeon_textured_video.c +++ b/src/radeon_textured_video.c @@ -163,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; @@ -220,7 +220,7 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn, short height, Bool sync, RegionPtr clipBoxes, - pointer data, + void *data, DrawablePtr pDraw) { ScreenPtr pScreen = pScrn->pScreen; @@ -603,7 +603,7 @@ int RADEONGetTexPortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 *value, - pointer data) + void *data) { RADEONInfoPtr info = RADEONPTR(pScrn); RADEONPortPrivPtr pPriv = (RADEONPortPrivPtr)data; @@ -645,7 +645,7 @@ int RADEONSetTexPortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 value, - pointer data) + void *data) { RADEONInfoPtr info = RADEONPTR(pScrn); RADEONPortPrivPtr pPriv = (RADEONPortPrivPtr)data; @@ -737,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; @@ -911,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) diff --git a/src/radeon_vbo.h b/src/radeon_vbo.h index 312e03b3..c1e61f16 100644 --- a/src/radeon_vbo.h +++ b/src/radeon_vbo.h @@ -31,7 +31,7 @@ radeon_vbo_space(ScrnInfoPtr pScrn, radeon_vbo_check(pScrn, vbo, vert_size); vbo->vb_op_vert_size = vert_size; - vb = (pointer)((char *)vbo->vb_bo->ptr + vbo->vb_offset); + vb = (void*)((char *)vbo->vb_bo->ptr + vbo->vb_offset); return vb; } diff --git a/src/radeon_video.c b/src/radeon_video.c index 2467440e..a92ac45e 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -245,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 ) { From 1aeb21b2b69863b5178c2d8ef845111a796314f6 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 12 Feb 2026 19:00:20 +0100 Subject: [PATCH 71/75] drop including obsolete i2c_def.h Signed-off-by: Enrico Weigelt, metux IT consult --- src/radeon_video.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/radeon_video.h b/src/radeon_video.h index e6068e86..227ebf13 100644 --- a/src/radeon_video.h +++ b/src/radeon_video.h @@ -2,8 +2,6 @@ #define __RADEON_VIDEO_H__ #include "xf86i2c.h" -#include "i2c_def.h" - #include "xf86Crtc.h" #include "bicubic_table.h" From e192d6a87495e3b91a1c85c3a2243def23abecd7 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 12 Feb 2026 19:46:09 +0100 Subject: [PATCH 72/75] release 25.0.1 Signed-off-by: Enrico Weigelt, metux IT consult --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b07f160e..60c4dbbf 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xlibre-xf86-video-ati], - [25.0.0], + [25.0.1], [https://github.com/X11Libre/xf86-video-ati/issues], [xlibre-xf86-video-ati]) From 83098eccd4cf06c33ee859e97ee75eaeb0aaa9b3 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 21 Apr 2026 15:15:09 +0200 Subject: [PATCH 73/75] configure.ac: replace deprecated AC_PROG_LIBTOOL by LT_INIT Signed-off-by: Enrico Weigelt, metux IT consult --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 60c4dbbf..7f5b73bc 100644 --- a/configure.ac +++ b/configure.ac @@ -44,7 +44,7 @@ XORG_DEFAULT_OPTIONS # Initialize libtool AC_DISABLE_STATIC -AC_PROG_LIBTOOL +LT_INIT # Checks for programs. AM_PROG_CC_C_O From a0f28c39cf19428d3343b94124205292a4e3f8e1 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 4 Sep 2026 15:46:30 +0200 Subject: [PATCH 74/75] ci: bump action-build-driver to v0.4.0 --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d35cdc2..25307e76 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: 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.3.7 + - uses: X11Libre/action-build-driver/target/ubuntu@v0.4.0 with: xserver-version: ${{ matrix.xserver-version }} @@ -22,7 +22,7 @@ jobs: 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.3.7 + - uses: X11Libre/action-build-driver/target/freebsd@v0.4.0 with: xserver-version: ${{ matrix.xserver-version }} @@ -33,7 +33,7 @@ jobs: xserver-version: [ master, xlibre-xserver-25.1.0 ] runs-on: ubuntu-latest steps: - - uses: X11Libre/action-build-driver/target/dragonfly@v0.3.7 + - uses: X11Libre/action-build-driver/target/dragonfly@v0.4.0 with: xserver-version: ${{ matrix.xserver-version }} @@ -43,7 +43,7 @@ jobs: xserver-version: [ master, xlibre-xserver-25.1.0 ] runs-on: ubuntu-latest steps: - - uses: X11Libre/action-build-driver/target/netbsd@v0.3.7 + - uses: X11Libre/action-build-driver/target/netbsd@v0.4.0 with: xserver-version: ${{ matrix.xserver-version }} @@ -55,4 +55,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: X11Libre/action-build-driver/release@v0.3.7 + - uses: X11Libre/action-build-driver/release@v0.4.0 From e21b88202ce287969e85ff0004a638de16fa29d4 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 4 Sep 2026 11:59:56 +0200 Subject: [PATCH 75/75] 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 --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 7f5b73bc..163b7860 100644 --- a/configure.ac +++ b/configure.ac @@ -28,6 +28,7 @@ AC_INIT([xlibre-xf86-video-ati], [xlibre-xf86-video-ati]) AC_CONFIG_SRCDIR([Makefile.am]) +AC_USE_SYSTEM_EXTENSIONS AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4])