Commit 1d8aaa8
committed
media: videobuf2-core: update vb2_thread if wait_finish/prepare are NULL
The vb2_thread is used for DVB support. This will queue and dequeue buffers
automatically.
It calls wait_finish/prepare around vb2_core_dqbuf() and vb2_core_qbuf(),
but that assumes all drivers have these ops set. But that will change
due to commit 8878598 ("media: vb2: use lock if wait_prepare/finish
are NULL").
So instead just check if the callback is available, and if not, use
q->lock, just as __vb2_wait_for_done_vb() does.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>1 parent c9ec6f1 commit 1d8aaa8
1 file changed
+20
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3218 | 3218 | | |
3219 | 3219 | | |
3220 | 3220 | | |
3221 | | - | |
3222 | | - | |
| 3221 | + | |
| 3222 | + | |
| 3223 | + | |
| 3224 | + | |
| 3225 | + | |
3223 | 3226 | | |
3224 | | - | |
| 3227 | + | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
3225 | 3232 | | |
3226 | 3233 | | |
3227 | 3234 | | |
| |||
3233 | 3240 | | |
3234 | 3241 | | |
3235 | 3242 | | |
3236 | | - | |
3237 | 3243 | | |
3238 | 3244 | | |
3239 | | - | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
3240 | 3250 | | |
3241 | | - | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
3242 | 3256 | | |
3243 | 3257 | | |
3244 | 3258 | | |
| |||
0 commit comments