Compare commits

...

2 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult 1905436b58 dri3: unexport VERIFY_DRI3_SYNCOBJ() macro
Not used by any drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-05 20:45:03 +02:00
Enrico Weigelt, metux IT consult ff8aa851d1 dri3: move dri3_syncobj_type to non-public header
The symbol isn't exported, thus not accessible to modules.
No need to keep it in public header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-05 19:03:42 +02:00
3 changed files with 13 additions and 16 deletions

View File

@ -23,15 +23,11 @@
#ifndef _DRI3_H_ #ifndef _DRI3_H_
#define _DRI3_H_ #define _DRI3_H_
#ifdef DRI3
#include <X11/extensions/dri3proto.h> #include <X11/extensions/dri3proto.h>
#include <randrstr.h> #include <randrstr.h>
#define DRI3_SCREEN_INFO_VERSION 4 #define DRI3_SCREEN_INFO_VERSION 4
extern RESTYPE dri3_syncobj_type;
struct dri3_syncobj struct dri3_syncobj
{ {
XID id; XID id;
@ -48,16 +44,6 @@ struct dri3_syncobj
void (*signaled_eventfd)(struct dri3_syncobj *syncobj, uint64_t point, int efd); void (*signaled_eventfd)(struct dri3_syncobj *syncobj, uint64_t point, int efd);
}; };
#define VERIFY_DRI3_SYNCOBJ(id, ptr, a)\
do {\
int rc = dixLookupResourceByType((void **)&(ptr), id,\
dri3_syncobj_type, client, a);\
if (rc != Success) {\
client->errorValue = id;\
return rc;\
}\
} while (0);
typedef int (*dri3_open_proc)(ScreenPtr screen, typedef int (*dri3_open_proc)(ScreenPtr screen,
RRProviderPtr provider, RRProviderPtr provider,
int *fd); int *fd);
@ -148,6 +134,4 @@ dri3_send_open_reply(ClientPtr client, int fd);
extern _X_EXPORT uint32_t extern _X_EXPORT uint32_t
drm_format_for_depth(uint32_t depth, uint32_t bpp); drm_format_for_depth(uint32_t depth, uint32_t bpp);
#endif
#endif /* _DRI3_H_ */ #endif /* _DRI3_H_ */

View File

@ -35,6 +35,8 @@
extern DevPrivateKeyRec dri3_screen_private_key; extern DevPrivateKeyRec dri3_screen_private_key;
extern RESTYPE dri3_syncobj_type;
typedef struct dri3_dmabuf_format { typedef struct dri3_dmabuf_format {
uint32_t format; uint32_t format;
uint32_t num_modifiers; uint32_t num_modifiers;
@ -62,6 +64,16 @@ typedef struct dri3_screen_priv {
real->mem = priv->mem; \ real->mem = priv->mem; \
} }
#define VERIFY_DRI3_SYNCOBJ(id, ptr, a)\
do {\
int rc = dixLookupResourceByType((void **)&(ptr), id,\
dri3_syncobj_type, client, a);\
if (rc != Success) {\
client->errorValue = id;\
return rc;\
}\
} while (0);
static inline dri3_screen_priv_ptr static inline dri3_screen_priv_ptr
dri3_screen_priv(ScreenPtr screen) dri3_screen_priv(ScreenPtr screen)
{ {

View File

@ -22,6 +22,7 @@
#include <dix-config.h> #include <dix-config.h>
#include "dix/dix_priv.h" #include "dix/dix_priv.h"
#include "dri3/dri3_priv.h"
#include "present_priv.h" #include "present_priv.h"
#include "randrstr_priv.h" #include "randrstr_priv.h"