lkml.org 
[lkml]   [2023]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v9 1/6] media: verisilicon: Do not set context src/dst formats in reset functions
From
Hi,

On 12.04.2023 18:40, Benjamin Gaignard wrote:
>
> Le 12/04/2023 à 18:14, Marek Szyprowski a écrit :
>> Hi,
>>
>> On 20.02.2023 11:48, Benjamin Gaignard wrote:
>>> Setting context source and destination formats should only be done
>>> in hantro_set_fmt_out() and hantro_set_fmt_cap() after check that
>>> the targeted queue is not busy.
>>> Remove these calls from hantro_reset_encoded_fmt() and
>>> hantro_reset_raw_fmt() to clean the driver.
>>>
>>> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
>> This patch landed recently in linux-next as commit db6f68b51e5c ("media:
>> verisilicon: Do not set context src/dst formats in reset functions").
>
> Hi,
>
> I do not have this board up and running with Hantro encoder but
> I think the attached patch may solve the issue.
> Could you tell me if it works ?

Yep, it fixes the issue.

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>


It looks that the code could be a bit more cleaned up, as with the
attached patch, there is such construction:

        if (coded) {
                pix_mp->num_planes = 1;
                vpu_fmt = fmt;
        } else if (ctx->is_encoder) {
                vpu_fmt = fmt;
        } else {
                vpu_fmt = fmt;
                /*
                 * Width/height on the CAPTURE end of a decoder are
ignored and
                 * replaced by the OUTPUT ones.
                 */
                pix_mp->width = ctx->src_fmt.width;
                pix_mp->height = ctx->src_fmt.height;
        }

Common 'vpu_fmt = fmt' can be moved out of the above if-else block.


Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland

\
 
 \ /
  Last update: 2023-04-12 19:13    [W:0.055 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site