mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
media: iris: Add codec specific check for VP9 decoder drain handling
Add a codec specific for the VP9 decoder to ensure that a non-null buffer is sent to the firmware during drain. The firmware enforces a check for VP9 decoder that the number of buffers queued and dequeued on the output plane should match. When a null buffer is sent, the firmware does not return a response for it, leading to a count mismatch and an assertion failure from the firmware. Acked-by: Vikash Garodia <quic_vgarodia@quicinc.com> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Tested-by: Vikash Garodia <quic_vgarodia@quicinc.com> # on sa8775p-ride Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
committed by
Hans Verkuil
parent
e1f5d32608
commit
478c447861
@@ -401,6 +401,8 @@ static int iris_hfi_gen1_session_drain(struct iris_inst *inst, u32 plane)
|
||||
ip_pkt.shdr.hdr.pkt_type = HFI_CMD_SESSION_EMPTY_BUFFER;
|
||||
ip_pkt.shdr.session_id = inst->session_id;
|
||||
ip_pkt.flags = HFI_BUFFERFLAG_EOS;
|
||||
if (inst->codec == V4L2_PIX_FMT_VP9)
|
||||
ip_pkt.packet_buffer = 0xdeadb000;
|
||||
|
||||
return iris_hfi_queue_cmd_write(inst->core, &ip_pkt, ip_pkt.shdr.hdr.size);
|
||||
}
|
||||
|
||||
@@ -348,6 +348,10 @@ static void iris_hfi_gen1_session_etb_done(struct iris_inst *inst, void *packet)
|
||||
struct iris_buffer *buf = NULL;
|
||||
bool found = false;
|
||||
|
||||
/* EOS buffer sent via drain won't be in v4l2 buffer list */
|
||||
if (pkt->packet_buffer == 0xdeadb000)
|
||||
return;
|
||||
|
||||
v4l2_m2m_for_each_src_buf_safe(m2m_ctx, m2m_buffer, n) {
|
||||
buf = to_iris_buffer(&m2m_buffer->vb);
|
||||
if (buf->index == pkt->input_tag) {
|
||||
|
||||
Reference in New Issue
Block a user