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

amdgpu vaapi failure due to dma_resv_locking_ctx returning 0 #32

Closed
valpackett opened this issue Sep 30, 2020 · 4 comments
Closed

amdgpu vaapi failure due to dma_resv_locking_ctx returning 0 #32

valpackett opened this issue Sep 30, 2020 · 4 comments
Labels
amdgpu amdgpu related problems

Comments

@valpackett
Copy link
Contributor

valpackett commented Sep 30, 2020

Finally got around to debugging the video acceleration on Vega again. (HEVC encoding was working, H264 encoding and ALL decoding broke at some point)

Turns out this "double check" is failing:

/* Double check that the BO is reserved by this CS */
if (dma_resv_locking_ctx((*bo)->tbo.base.resv) != &parser->ticket)
return -EINVAL;

because the dma_resv_locking_ctx(..) result is zero. Everything is working fine when the return is replaced with a printf.


how to reproduce: easiest command is avcstreamoutdemo (from libva utils) but it won't really be successful (still some assertion failure) when it's working, just the amdgpu error would disappear.

mpv -v --hwdec=vaapi some-thing.mp4 (mp4 either h264 or hevc if vainfo lists hevc) should start working when fixed

@valpackett
Copy link
Contributor Author

Looking a bit deeper..

dma_resv_locking_ctx == READ_ONCE(obj->lock.ctx)
struct dma_resv *obj -> struct ww_mutex lock
struct ww_acquire_ctx {
};
struct ww_mutex {
	struct mutex base;
	struct cv condvar;
	struct ww_acquire_ctx *ctx;
};

there is no 'ctx =' in ww_mutex.h, seems like nothing ever sets that field. ww_mutex_lock(_interruptible) just ignores the ctx argument! I'll try setting it there.

@valpackett
Copy link
Contributor Author

@evadot evadot added the amdgpu amdgpu related problems label Oct 5, 2020
@evadot
Copy link
Contributor

evadot commented Oct 5, 2020

So this can be closed now that it's commited ?

@valpackett
Copy link
Contributor Author

Yep

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

No branches or pull requests

2 participants