Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x11: allow disabling DRI3 via LIBVA_DRI3_DISABLE env var #679

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

evelikov
Copy link
Contributor

@evelikov evelikov commented Feb 1, 2023

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.


@dvrogozh @XinfengZhang can we roll a 2.17.1 release with this fix? There is a PR incoming, which will be quiet large and evasive for a bugfix release.

Thanks o/

@XinfengZhang
Copy link
Contributor

yes, of course, if we merge it, we could cherry pick it to 2.17 branch , to have a hotfix release. but I am wondering whether it is a real fix. customer still need to manually set the env ...

@evelikov
Copy link
Contributor Author

evelikov commented Feb 2, 2023

This not a fix but a workaround that we want now. Mesa had an equivalent for years.

It serves people who want to (or need to) disable the DRI3 code path for testing or debugging purposes. Imagine a really weird bug gets reported tomorrow and fixing that requires months until it's actually hits a libva release. In the interim people can use the override to have working systems.

Copy link
Contributor

@dvrogozh dvrogozh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

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>
@XinfengZhang XinfengZhang merged commit d05ff3c into intel:master Feb 7, 2023
@evelikov evelikov deleted the dri3-envvar branch February 7, 2023 10:05
@zhmars
Copy link

zhmars commented Feb 15, 2023

Hi, could we consider adding similar changes to va_DisplayContextGetNumCandidates()? Without this, hardware video decoding on chromium still broken in my test.

diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c
index a612c20..81cc972 100644
--- a/va/x11/va_x11.c
+++ b/va/x11/va_x11.c
@@ -195,9 +195,10 @@ static VAStatus va_DisplayContextGetNumCandidates(
     int *num_candidates
 )
 {
-    VAStatus vaStatus;
+    VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN;

-    vaStatus = va_DRI3_GetNumCandidates(pDisplayContext, num_candidates);
+    if (!getenv("LIBVA_DRI3_DISABLE"))
+        vaStatus = va_DRI3_GetNumCandidates(pDisplayContext, num_candidates);
     if (vaStatus != VA_STATUS_SUCCESS)
         vaStatus = va_DRI2_GetNumCandidates(pDisplayContext, num_candidates);

@evelikov
Copy link
Contributor Author

Indeed good point - opened #689 with details. Thanks o/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants