Projects
Mega:24.03:SP1:Everything
libdrm
_service:tar_scm:libdrm-2.4.109-sw.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:libdrm-2.4.109-sw.patch of Package libdrm
diff --git a/include/drm/drm_sarea.h b/include/drm/drm_sarea.h index 93025be..60b979a 100644 --- a/include/drm/drm_sarea.h +++ b/include/drm/drm_sarea.h @@ -39,7 +39,9 @@ extern "C" { #endif /* SAREA area needs to be at least a page */ -#if defined(__alpha__) +#if defined(__sw_64__) +#define SAREA_MAX 0x2000U +#elif defined(__alpha__) #define SAREA_MAX 0x2000U #elif defined(__mips__) #define SAREA_MAX 0x4000U diff --git a/xf86drm.c b/xf86drm.c index 7a7a23f..6daaaf7 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -1119,7 +1119,7 @@ static int drmOpenByBusid(const char *busid, int type) sv.drm_dd_major = -1; /* Don't care */ sv.drm_dd_minor = -1; /* Don't care */ if (drmSetInterfaceVersion(fd, &sv)) { -#ifndef __alpha__ +#ifndef __sw_64__ pci_domain_ok = 0; #endif sv.drm_di_major = 1; diff --git a/xf86drm.h b/xf86drm.h index 4c79a65..a8d3ad4 100644 --- a/xf86drm.h +++ b/xf86drm.h @@ -382,6 +382,34 @@ typedef struct _drmSetVersion { "r" (new)); \ } while (0) +#elif defined(__sw_64__) +#define DRM_CAS(lock, old, new, ret) \ + do{ \ + int tmp, old32; \ + int tmp1; \ + __asm__ __volatile__( \ + " addw $31, %6, %4\n" \ + " ldi %1, %3\n" \ + "1: lldw %0, 0(%1)\n" \ + " cmpeq %0, %4, %2\n" \ + " wr_f %2\n" \ + " mov %5, %0\n" \ + " lstw %0, 0(%1)\n" \ + " rd_f %0\n" \ + " beq %2, 2f\n" \ + " beq %0, 3f\n" \ + " memb\n" \ + "2: cmpeq %2, 0, %2\n" \ + ".subsection 2\n" \ + "3: br 1b\n" \ + ".previous" \ + : "=&r"(tmp),"=&r"(tmp1), "=&r"(ret), \ + "=m"(__drm_dummy_lock(lock)), \ + "=&r"(old32) \ + : "r"(new), "r"(old) \ + : "memory"); \ + } while (0) + #elif defined(__alpha__) #define DRM_CAS(lock, old, new, ret) \ @@ -511,7 +539,9 @@ do { register unsigned int __old __asm("o0"); \ #define DRM_CAS(lock,old,new,ret) do { ret=1; } while (0) /* FAST LOCK FAILS */ #endif -#if defined(__alpha__) +#if defined(__sw_64__) +#define DRM_CAS_RESULT(_result) long _result +#elif defined(__alpha__) #define DRM_CAS_RESULT(_result) long _result #elif defined(__powerpc__) #define DRM_CAS_RESULT(_result) int _result
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2