From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Dikshita Agarwal <quic_dikshita@quicinc.com>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
linux-media@vger.kernel.org, stanimir.k.varbanov@gmail.com,
quic_vgarodia@quicinc.com, agross@kernel.org,
andersson@kernel.org, mchehab@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 4/4] venus: return P010 as preferred format for 10 bit decode
Date: Fri, 5 May 2023 14:03:52 +0300 [thread overview]
Message-ID: <af78ea4f-94b8-84dc-47ee-ae00c40a0ee9@linaro.org> (raw)
In-Reply-To: <b5fa8e0a-1663-e386-cffe-e7feb16d8733@quicinc.com>
On 05/05/2023 12:03, Dikshita Agarwal wrote:
>
> On 5/4/2023 10:50 PM, Konrad Dybcio wrote:
>>
>> On 4.05.2023 12:36, Dikshita Agarwal wrote:
>>> If bit depth is detected as 10 bit by firmware, return
>>> P010 as preferred decoder format to the client.
>>>
>>> Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
>>> ---
>>> drivers/media/platform/qcom/venus/vdec.c | 7 ++++++-
>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/media/platform/qcom/venus/vdec.c
>>> b/drivers/media/platform/qcom/venus/vdec.c
>>> index 69f7f6e..ed11dc2 100644
>>> --- a/drivers/media/platform/qcom/venus/vdec.c
>>> +++ b/drivers/media/platform/qcom/venus/vdec.c
>>> @@ -1468,8 +1468,13 @@ static void vdec_event_change(struct
>>> venus_inst *inst,
>>> inst->out_width = ev_data->width;
>>> inst->out_height = ev_data->height;
>>> - if (inst->bit_depth != ev_data->bit_depth)
>>> + if (inst->bit_depth != ev_data->bit_depth) {
>>> inst->bit_depth = ev_data->bit_depth;
>>> + if (inst->bit_depth == VIDC_BITDEPTH_10)
>>> + inst->fmt_cap = &vdec_formats[3];
>>> + else
>>> + inst->fmt_cap = &vdec_formats[0];
>> This doesn't scale and is very error-prone, please enumerate the
>> entries and assign it using the enumerator, like:
>>
>> enum {
>> VDEC_FORMAT_FOO,
>> ...
>> };
>>
>> ... vdec_formats[] = {
>> [VDEC_FORMAT_FOO] = { foo, bar, baz }
>> }
>>
>> Konrad
>
> I agree, this can be improved but I would prefer making that change as
> separate patch.
Good!
>
> As this is not only related to HDR 10 decoding, there are other places
> in the code which will require similar change.
Please fix them first. Adding more cruft is not a good way to go.
>
> Thanks,
>
> Dikshita
>
>>> + }
>>> if (inst->pic_struct != ev_data->pic_struct)
>>> inst->pic_struct = ev_data->pic_struct;
--
With best wishes
Dmitry
next prev parent reply other threads:[~2023-05-05 11:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-04 10:36 [PATCH 0/4] venus: add support for 10 bit decoding Dikshita Agarwal
2023-05-04 10:36 ` [PATCH 1/4] venus: add support for V4L2_PIX_FMT_P010 color format Dikshita Agarwal
2023-05-04 17:18 ` Konrad Dybcio
2023-05-04 10:36 ` [PATCH 2/4] venus: update calculation for dpb buffers Dikshita Agarwal
2023-05-04 17:29 ` Konrad Dybcio
2023-05-04 17:30 ` Konrad Dybcio
2023-05-04 10:36 ` [PATCH 3/4] venus: add handling of bit depth change from firmwar Dikshita Agarwal
2023-05-04 17:32 ` Konrad Dybcio
2023-05-04 10:36 ` [PATCH 4/4] venus: return P010 as preferred format for 10 bit decode Dikshita Agarwal
2023-05-04 17:20 ` Konrad Dybcio
2023-05-05 9:03 ` Dikshita Agarwal
2023-05-05 10:42 ` Konrad Dybcio
2023-05-05 11:03 ` Dmitry Baryshkov [this message]
2023-05-04 13:49 ` [PATCH 0/4] venus: add support for 10 bit decoding Bryan O'Donoghue
2023-05-04 13:51 ` Bryan O'Donoghue
2023-05-04 14:04 ` Vikash Garodia
2023-05-04 14:28 ` Bryan O'Donoghue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=af78ea4f-94b8-84dc-47ee-ae00c40a0ee9@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=quic_dikshita@quicinc.com \
--cc=quic_vgarodia@quicinc.com \
--cc=stanimir.k.varbanov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox