Skip to content

Commit 3df2ae1

Browse files
stefan11111metux
authored andcommitted
xfree86: loader: Ignore abi mismatch for the proprietary nvidia DDX
This is a proprietary DDX driver made by nvidia. We can't rebuild it against Xlibre, so the abi check would always fail. Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
1 parent 7f575dd commit 3df2ae1

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

hw/xfree86/loader/loader.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ LoaderUnload(const char *name, void *handle)
148148

149149
unsigned long LoaderOptions = 0;
150150

151+
Bool is_nvidia_proprietary = FALSE;
152+
151153
void
152154
LoaderSetOptions(unsigned long opts)
153155
{
@@ -157,7 +159,8 @@ LoaderSetOptions(unsigned long opts)
157159
Bool
158160
LoaderShouldIgnoreABI(void)
159161
{
160-
return (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL) != 0;
162+
/* The nvidia proprietary DDX driver calls this deprecated function */
163+
return is_nvidia_proprietary || (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL);
161164
}
162165

163166
int

hw/xfree86/loader/loader.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ extern const ModuleVersions LoaderVersionInfo;
7070

7171
extern unsigned long LoaderOptions;
7272

73+
extern Bool is_nvidia_proprietary;
74+
7375
/* Internal Functions */
7476
void *LoaderOpen(const char *, int *);
7577

hw/xfree86/loader/loadmod.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,9 @@ LoadModule(const char *module, void *options, const XF86ModReqInfo *modreq,
672672

673673
LogMessageVerb(X_INFO, 3, "LoadModule: \"%s\"", module);
674674

675+
/* Ignore abi check for the nvidia proprietary DDX driver */
676+
is_nvidia_proprietary = !memcmp(module, "nvidia", sizeof("nvidia"));
677+
675678
patterns = InitPatterns(NULL);
676679
name = LoaderGetCanonicalName(module, patterns);
677680
noncanonical = (name && strcmp(module, name) != 0);

0 commit comments

Comments
 (0)