Skip to content

Commit

Permalink
media: test-drivers: drop vb2_ops_wait_prepare/finish
Browse files Browse the repository at this point in the history
Since commit 8878598 ("media: vb2: use lock if wait_prepare/finish
are NULL") it is no longer needed to set the wait_prepare/finish
vb2_ops callbacks as long as the lock field in vb2_queue is set.

Since the vb2_ops_wait_prepare/finish callbacks already rely on that field,
we can safely drop these callbacks.

This simplifies the code and this is a step towards the goal of deleting
these callbacks.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
  • Loading branch information
Hans Verkuil committed Oct 28, 2024
1 parent 1d8aaa8 commit d01e5a4
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 28 deletions.
2 changes: 0 additions & 2 deletions drivers/media/test-drivers/vicodec/vicodec-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1688,8 +1688,6 @@ static const struct vb2_ops vicodec_qops = {
.buf_request_complete = vicodec_buf_request_complete,
.start_streaming = vicodec_start_streaming,
.stop_streaming = vicodec_stop_streaming,
.wait_prepare = vb2_ops_wait_prepare,
.wait_finish = vb2_ops_wait_finish,
};

static int queue_init(void *priv, struct vb2_queue *src_vq,
Expand Down
2 changes: 0 additions & 2 deletions drivers/media/test-drivers/vim2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,8 +1100,6 @@ static const struct vb2_ops vim2m_qops = {
.buf_queue = vim2m_buf_queue,
.start_streaming = vim2m_start_streaming,
.stop_streaming = vim2m_stop_streaming,
.wait_prepare = vb2_ops_wait_prepare,
.wait_finish = vb2_ops_wait_finish,
.buf_request_complete = vim2m_buf_request_complete,
};

Expand Down
6 changes: 0 additions & 6 deletions drivers/media/test-drivers/vimc/vimc-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,6 @@ static const struct vb2_ops vimc_capture_qops = {
.buf_queue = vimc_capture_buf_queue,
.queue_setup = vimc_capture_queue_setup,
.buf_prepare = vimc_capture_buffer_prepare,
/*
* Since q->lock is set we can use the standard
* vb2_ops_wait_prepare/finish helper functions.
*/
.wait_prepare = vb2_ops_wait_prepare,
.wait_finish = vb2_ops_wait_finish,
};

static const struct media_entity_operations vimc_capture_mops = {
Expand Down
2 changes: 0 additions & 2 deletions drivers/media/test-drivers/visl/visl-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,8 +732,6 @@ static const struct vb2_ops visl_qops = {
.buf_queue = visl_buf_queue,
.start_streaming = visl_start_streaming,
.stop_streaming = visl_stop_streaming,
.wait_prepare = vb2_ops_wait_prepare,
.wait_finish = vb2_ops_wait_finish,
.buf_request_complete = visl_buf_request_complete,
};

Expand Down
2 changes: 0 additions & 2 deletions drivers/media/test-drivers/vivid/vivid-meta-cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ const struct vb2_ops vivid_meta_cap_qops = {
.start_streaming = meta_cap_start_streaming,
.stop_streaming = meta_cap_stop_streaming,
.buf_request_complete = meta_cap_buf_request_complete,
.wait_prepare = vb2_ops_wait_prepare,
.wait_finish = vb2_ops_wait_finish,
};

int vidioc_enum_fmt_meta_cap(struct file *file, void *priv,
Expand Down
2 changes: 0 additions & 2 deletions drivers/media/test-drivers/vivid/vivid-meta-out.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ const struct vb2_ops vivid_meta_out_qops = {
.start_streaming = meta_out_start_streaming,
.stop_streaming = meta_out_stop_streaming,
.buf_request_complete = meta_out_buf_request_complete,
.wait_prepare = vb2_ops_wait_prepare,
.wait_finish = vb2_ops_wait_finish,
};

int vidioc_enum_fmt_meta_out(struct file *file, void *priv,
Expand Down
2 changes: 0 additions & 2 deletions drivers/media/test-drivers/vivid/vivid-sdr-cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,6 @@ const struct vb2_ops vivid_sdr_cap_qops = {
.start_streaming = sdr_cap_start_streaming,
.stop_streaming = sdr_cap_stop_streaming,
.buf_request_complete = sdr_cap_buf_request_complete,
.wait_prepare = vb2_ops_wait_prepare,
.wait_finish = vb2_ops_wait_finish,
};

int vivid_sdr_enum_freq_bands(struct file *file, void *fh,
Expand Down
2 changes: 0 additions & 2 deletions drivers/media/test-drivers/vivid/vivid-touch-cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ const struct vb2_ops vivid_touch_cap_qops = {
.start_streaming = touch_cap_start_streaming,
.stop_streaming = touch_cap_stop_streaming,
.buf_request_complete = touch_cap_buf_request_complete,
.wait_prepare = vb2_ops_wait_prepare,
.wait_finish = vb2_ops_wait_finish,
};

int vivid_enum_fmt_tch(struct file *file, void *priv, struct v4l2_fmtdesc *f)
Expand Down
2 changes: 0 additions & 2 deletions drivers/media/test-drivers/vivid/vivid-vbi-cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,6 @@ const struct vb2_ops vivid_vbi_cap_qops = {
.start_streaming = vbi_cap_start_streaming,
.stop_streaming = vbi_cap_stop_streaming,
.buf_request_complete = vbi_cap_buf_request_complete,
.wait_prepare = vb2_ops_wait_prepare,
.wait_finish = vb2_ops_wait_finish,
};

int vidioc_g_fmt_vbi_cap(struct file *file, void *priv,
Expand Down
2 changes: 0 additions & 2 deletions drivers/media/test-drivers/vivid/vivid-vbi-out.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ const struct vb2_ops vivid_vbi_out_qops = {
.start_streaming = vbi_out_start_streaming,
.stop_streaming = vbi_out_stop_streaming,
.buf_request_complete = vbi_out_buf_request_complete,
.wait_prepare = vb2_ops_wait_prepare,
.wait_finish = vb2_ops_wait_finish,
};

int vidioc_g_fmt_vbi_out(struct file *file, void *priv,
Expand Down
2 changes: 0 additions & 2 deletions drivers/media/test-drivers/vivid/vivid-vid-cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@ const struct vb2_ops vivid_vid_cap_qops = {
.start_streaming = vid_cap_start_streaming,
.stop_streaming = vid_cap_stop_streaming,
.buf_request_complete = vid_cap_buf_request_complete,
.wait_prepare = vb2_ops_wait_prepare,
.wait_finish = vb2_ops_wait_finish,
};

/*
Expand Down
2 changes: 0 additions & 2 deletions drivers/media/test-drivers/vivid/vivid-vid-out.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ const struct vb2_ops vivid_vid_out_qops = {
.start_streaming = vid_out_start_streaming,
.stop_streaming = vid_out_stop_streaming,
.buf_request_complete = vid_out_buf_request_complete,
.wait_prepare = vb2_ops_wait_prepare,
.wait_finish = vb2_ops_wait_finish,
};

/*
Expand Down

0 comments on commit d01e5a4

Please sign in to comment.