Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/xf86-video-ati-kms/include merge xf86-video-a...
details: https://anonhg.NetBSD.org/xsrc/rev/de93835b8386
branches: trunk
changeset: 7553:de93835b8386
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Jun 19 08:21:49 2023 +0000
description:
merge xf86-video-ati 22.0.0.
diffstat:
external/mit/xf86-video-ati-kms/dist/src/compat-api.h | 8 +-
external/mit/xf86-video-ati-kms/dist/src/drmmode_display.c | 8 +-
external/mit/xf86-video-ati-kms/dist/src/radeon.h | 10 +-
external/mit/xf86-video-ati-kms/dist/src/radeon_glamor.c | 2 +-
external/mit/xf86-video-ati-kms/dist/src/radeon_kms.c | 95 +++++++------
external/mit/xf86-video-ati-kms/include/config.h | 10 +-
6 files changed, 71 insertions(+), 62 deletions(-)
diffs (truncated from 381 to 300 lines):
diff -r bb3a255f76dd -r de93835b8386 external/mit/xf86-video-ati-kms/dist/src/compat-api.h
--- a/external/mit/xf86-video-ati-kms/dist/src/compat-api.h Mon Jun 19 08:19:55 2023 +0000
+++ b/external/mit/xf86-video-ati-kms/dist/src/compat-api.h Mon Jun 19 08:21:49 2023 +0000
@@ -34,10 +34,10 @@
#define BLOCKHANDLER_ARGS pScreen, pTimeout, pReadmask
#endif
-#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(25, 2)
-#define current_master current_primary
-#define master_pixmap primary_pixmap
-#define slave_dst secondary_dst
+#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
diff -r bb3a255f76dd -r de93835b8386 external/mit/xf86-video-ati-kms/dist/src/drmmode_display.c
--- a/external/mit/xf86-video-ati-kms/dist/src/drmmode_display.c Mon Jun 19 08:19:55 2023 +0000
+++ b/external/mit/xf86-video-ati-kms/dist/src/drmmode_display.c Mon Jun 19 08:21:49 2023 +0000
@@ -45,7 +45,9 @@
#include "radeon_glamor.h"
#include "radeon_reg.h"
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,19,99,1,0)
#include <dri.h>
+#endif
#include "drmmode_display.h"
@@ -720,7 +722,7 @@ drmmode_crtc_prime_scanout_update(xf86Cr
xorg_list_for_each_entry(dirty, &screen->pixmap_dirty_list,
ent) {
if (radeon_dirty_src_equals(dirty, drmmode_crtc->prime_scanout_pixmap)) {
- dirty->slave_dst =
+ dirty->secondary_dst =
drmmode_crtc->scanout[scanout_id].pixmap;
break;
}
@@ -1281,7 +1283,7 @@ drmmode_show_cursor (xf86CrtcPtr crtc)
arg.hot_y = yhot;
ret = drmIoctl(pRADEONEnt->fd, DRM_IOCTL_MODE_CURSOR2, &arg);
- if (ret == -EINVAL)
+ if (ret == -1 && errno == EINVAL)
use_set_cursor2 = FALSE;
else
return;
@@ -1362,7 +1364,7 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr c
xorg_list_for_each_entry(dirty, &screen->pixmap_dirty_list, ent) {
if (radeon_dirty_src_equals(dirty, drmmode_crtc->prime_scanout_pixmap)) {
- PixmapStopDirtyTracking(dirty->src, dirty->slave_dst);
+ PixmapStopDirtyTracking(dirty->src, dirty->secondary_dst);
break;
}
}
diff -r bb3a255f76dd -r de93835b8386 external/mit/xf86-video-ati-kms/dist/src/radeon.h
--- a/external/mit/xf86-video-ati-kms/dist/src/radeon.h Mon Jun 19 08:19:55 2023 +0000
+++ b/external/mit/xf86-video-ati-kms/dist/src/radeon.h Mon Jun 19 08:21:49 2023 +0000
@@ -182,10 +182,10 @@ typedef enum {
static inline ScreenPtr
-radeon_master_screen(ScreenPtr screen)
+radeon_primary_screen(ScreenPtr screen)
{
- if (screen->current_master)
- return screen->current_master;
+ if (screen->current_primary)
+ return screen->current_primary;
return screen;
}
@@ -195,9 +195,9 @@ radeon_master_screen(ScreenPtr screen)
#define master_pixmap primary_pixmap
#endif
static inline ScreenPtr
-radeon_dirty_master(PixmapDirtyUpdatePtr dirty)
+radeon_dirty_primary(PixmapDirtyUpdatePtr dirty)
{
- return radeon_master_screen(dirty->slave_dst->drawable.pScreen);
+ return radeon_primary_screen(dirty->secondary_dst->drawable.pScreen);
}
static inline DrawablePtr
diff -r bb3a255f76dd -r de93835b8386 external/mit/xf86-video-ati-kms/dist/src/radeon_glamor.c
--- a/external/mit/xf86-video-ati-kms/dist/src/radeon_glamor.c Mon Jun 19 08:19:55 2023 +0000
+++ b/external/mit/xf86-video-ati-kms/dist/src/radeon_glamor.c Mon Jun 19 08:21:49 2023 +0000
@@ -375,7 +375,7 @@ radeon_glamor_set_pixmap_bo(DrawablePtr
static Bool
-radeon_glamor_share_pixmap_backing(PixmapPtr pixmap, ScreenPtr slave,
+radeon_glamor_share_pixmap_backing(PixmapPtr pixmap, ScreenPtr secondary,
void **handle_p)
{
ScreenPtr screen = pixmap->drawable.pScreen;
diff -r bb3a255f76dd -r de93835b8386 external/mit/xf86-video-ati-kms/dist/src/radeon_kms.c
--- a/external/mit/xf86-video-ati-kms/dist/src/radeon_kms.c Mon Jun 19 08:19:55 2023 +0000
+++ b/external/mit/xf86-video-ati-kms/dist/src/radeon_kms.c Mon Jun 19 08:21:49 2023 +0000
@@ -559,8 +559,8 @@ dirty_region(PixmapDirtyUpdatePtr dirty)
if (dirty->rotation != RR_Rotate_0) {
dstregion = transform_region(damageregion,
&dirty->f_inverse,
- dirty->slave_dst->drawable.width,
- dirty->slave_dst->drawable.height);
+ dirty->secondary_dst->drawable.width,
+ dirty->secondary_dst->drawable.height);
} else
#endif
{
@@ -568,7 +568,7 @@ dirty_region(PixmapDirtyUpdatePtr dirty)
dstregion = RegionDuplicate(damageregion);
RegionTranslate(dstregion, -dirty->x, -dirty->y);
- PixmapRegionInit(&pixregion, dirty->slave_dst);
+ PixmapRegionInit(&pixregion, dirty->secondary_dst);
RegionIntersect(dstregion, dstregion, &pixregion);
RegionUninit(&pixregion);
}
@@ -585,8 +585,8 @@ redisplay_dirty(PixmapDirtyUpdatePtr dir
if (RegionNil(region))
goto out;
- if (dirty->slave_dst->master_pixmap)
- DamageRegionAppend(&dirty->slave_dst->drawable, region);
+ if (dirty->secondary_dst->primary_pixmap)
+ DamageRegionAppend(&dirty->secondary_dst->drawable, region);
#ifdef HAS_DIRTYTRACKING_ROTATION
PixmapSyncDirtyHelper(dirty);
@@ -595,8 +595,8 @@ redisplay_dirty(PixmapDirtyUpdatePtr dir
#endif
radeon_cs_flush_indirect(src_scrn);
- if (dirty->slave_dst->master_pixmap)
- DamageRegionProcessPending(&dirty->slave_dst->drawable);
+ if (dirty->secondary_dst->primary_pixmap)
+ DamageRegionProcessPending(&dirty->secondary_dst->drawable);
out:
DamageEmpty(dirty->damage);
@@ -613,12 +613,12 @@ radeon_prime_scanout_update_abort(xf86Cr
void
radeon_sync_shared_pixmap(PixmapDirtyUpdatePtr dirty)
{
- ScreenPtr master_screen = radeon_dirty_master(dirty);
+ ScreenPtr primary_screen = radeon_dirty_primary(dirty);
PixmapDirtyUpdatePtr ent;
RegionPtr region;
- xorg_list_for_each_entry(ent, &master_screen->pixmap_dirty_list, ent) {
- if (!radeon_dirty_src_equals(dirty, ent->slave_dst))
+ xorg_list_for_each_entry(ent, &primary_screen->pixmap_dirty_list, ent) {
+ if (!radeon_dirty_src_equals(dirty, ent->secondary_dst))
continue;
region = dirty_region(ent);
@@ -631,45 +631,45 @@ radeon_sync_shared_pixmap(PixmapDirtyUpd
#if HAS_SYNC_SHARED_PIXMAP
static Bool
-master_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
+primary_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
{
- ScreenPtr master_screen = radeon_dirty_master(dirty);
-
- return !!master_screen->SyncSharedPixmap;
+ ScreenPtr primary_screen = radeon_dirty_primary(dirty);
+
+ return !!primary_screen->SyncSharedPixmap;
}
static Bool
-slave_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
+secondary_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
{
- ScreenPtr slave_screen = dirty->slave_dst->drawable.pScreen;
-
- return !!slave_screen->SyncSharedPixmap;
+ ScreenPtr secondary_screen = dirty->secondary_dst->drawable.pScreen;
+
+ return !!secondary_screen->SyncSharedPixmap;
}
static void
call_sync_shared_pixmap(PixmapDirtyUpdatePtr dirty)
{
- ScreenPtr master_screen = radeon_dirty_master(dirty);
-
- master_screen->SyncSharedPixmap(dirty);
+ ScreenPtr primary_screen = radeon_dirty_primary(dirty);
+
+ primary_screen->SyncSharedPixmap(dirty);
}
#else /* !HAS_SYNC_SHARED_PIXMAP */
static Bool
-master_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
+primary_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
{
- ScrnInfoPtr master_scrn = xf86ScreenToScrn(radeon_dirty_master(dirty));
-
- return master_scrn->driverName == scrn->driverName;
+ ScrnInfoPtr primary_scrn = xf86ScreenToScrn(radeon_dirty_primary(dirty));
+
+ return primary_scrn->driverName == scrn->driverName;
}
static Bool
-slave_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
+secondary_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
{
- ScrnInfoPtr slave_scrn = xf86ScreenToScrn(dirty->slave_dst->drawable.pScreen);
-
- return slave_scrn->driverName == scrn->driverName;
+ ScrnInfoPtr secondary_scrn = xf86ScreenToScrn(dirty->secondary_dst->drawable.pScreen);
+
+ return secondary_scrn->driverName == scrn->driverName;
}
static void
@@ -684,12 +684,12 @@ call_sync_shared_pixmap(PixmapDirtyUpdat
static xf86CrtcPtr
radeon_prime_dirty_to_crtc(PixmapDirtyUpdatePtr dirty)
{
- ScreenPtr screen = dirty->slave_dst->drawable.pScreen;
+ ScreenPtr screen = dirty->secondary_dst->drawable.pScreen;
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
int c;
- /* Find the CRTC which is scanning out from this slave pixmap */
+ /* Find the CRTC which is scanning out from this secondary pixmap */
for (c = 0; c < xf86_config->num_crtc; c++) {
xf86CrtcPtr xf86_crtc = xf86_config->crtc[c];
drmmode_crtc_private_ptr drmmode_crtc = xf86_crtc->driver_private;
@@ -714,7 +714,7 @@ radeon_prime_scanout_do_update(xf86CrtcP
if (radeon_dirty_src_equals(dirty, drmmode_crtc->prime_scanout_pixmap)) {
RegionPtr region;
- if (master_has_sync_shared_pixmap(scrn, dirty))
+ if (primary_has_sync_shared_pixmap(scrn, dirty))
call_sync_shared_pixmap(dirty);
region = dirty_region(dirty);
@@ -727,7 +727,7 @@ radeon_prime_scanout_do_update(xf86CrtcP
radeon_cs_flush_indirect(scrn);
RegionCopy(&drmmode_crtc->scanout_last_region, region);
RegionTranslate(region, -crtc->x, -crtc->y);
- dirty->slave_dst = drmmode_crtc->scanout[scanout_id].pixmap;
+ dirty->secondary_dst = drmmode_crtc->scanout[scanout_id].pixmap;
}
redisplay_dirty(dirty, region);
@@ -754,7 +754,7 @@ radeon_prime_scanout_update_handler(xf86
static void
radeon_prime_scanout_update(PixmapDirtyUpdatePtr dirty)
{
- ScreenPtr screen = dirty->slave_dst->drawable.pScreen;
+ ScreenPtr screen = dirty->secondary_dst->drawable.pScreen;
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
RADEONEntPtr pRADEONEnt = RADEONEntPriv(scrn);
xf86CrtcPtr xf86_crtc = radeon_prime_dirty_to_crtc(dirty);
@@ -818,7 +818,7 @@ radeon_prime_scanout_update(PixmapDirtyU
static void
radeon_prime_scanout_flip(PixmapDirtyUpdatePtr ent)
{
- ScreenPtr screen = ent->slave_dst->drawable.pScreen;
+ ScreenPtr screen = ent->secondary_dst->drawable.pScreen;
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
RADEONEntPtr pRADEONEnt = RADEONEntPriv(scrn);
xf86CrtcPtr crtc = radeon_prime_dirty_to_crtc(ent);
@@ -893,11 +893,11 @@ radeon_dirty_update(ScrnInfoPtr scrn)
if (screen->isGPU) {
PixmapDirtyUpdatePtr region_ent = ent;
- if (master_has_sync_shared_pixmap(scrn, ent)) {
- ScreenPtr master_screen = radeon_dirty_master(ent);
-
- xorg_list_for_each_entry(region_ent, &master_screen->pixmap_dirty_list, ent) {
- if (radeon_dirty_src_equals(ent, region_ent->slave_dst))
+ if (primary_has_sync_shared_pixmap(scrn, ent)) {
+ ScreenPtr primary_screen = radeon_dirty_primary(ent);
+
+ xorg_list_for_each_entry(region_ent, &primary_screen->pixmap_dirty_list, ent) {
+ if (radeon_dirty_src_equals(ent, region_ent->secondary_dst))
break;
}
}
@@ -921,7 +921,7 @@ radeon_dirty_update(ScrnInfoPtr scrn)
RegionDestroy(region);
} else {
- if (slave_has_sync_shared_pixmap(scrn, ent))
+ if (secondary_has_sync_shared_pixmap(scrn, ent))
continue;
Home |
Main Index |
Thread Index |
Old Index