Skip to content

Commit 3ac96ad

Browse files
evelikov-workXinfengZhang
authored andcommitted
x11: allow disabling DRI3 via LIBVA_DRI3_DISABLE env var
There are some corner cases where DRI3 does not work correctly. While bug reports are appreciated, this enables users to get back to their machines in meaningful way - aka w/o having to rebuild libva. Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
1 parent a4fa218 commit 3ac96ad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

va/x11/va_x11.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,10 @@ static VAStatus va_DisplayContextGetDriverNames(
211211
char **drivers, unsigned *num_drivers
212212
)
213213
{
214-
VAStatus vaStatus;
214+
VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN;
215215

216-
vaStatus = va_DRI3_GetDriverNames(pDisplayContext, drivers, num_drivers);
216+
if (!getenv("LIBVA_DRI3_DISABLE"))
217+
vaStatus = va_DRI3_GetDriverNames(pDisplayContext, drivers, num_drivers);
217218
if (vaStatus != VA_STATUS_SUCCESS)
218219
vaStatus = va_DRI2_GetDriverNames(pDisplayContext, drivers, num_drivers);
219220
#ifdef HAVE_NVCTRL

0 commit comments

Comments
 (0)