lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <69a90fd7-e76a-4257-8263-57d333b60dad@samsung.com>
Date:   Wed, 12 Apr 2023 18:53:32 +0200
From:   Marek Szyprowski <m.szyprowski@...sung.com>
To:     Benjamin Gaignard <benjamin.gaignard@...labora.com>,
        ezequiel@...guardiasur.com.ar, p.zabel@...gutronix.de,
        mchehab@...nel.org, shawnguo@...nel.org, s.hauer@...gutronix.de,
        kernel@...gutronix.de, festevam@...il.com, linux-imx@....com,
        hverkuil-cisco@...all.nl, nicolas.dufresne@...labora.co.uk,
        robert.mader@...labora.com
Cc:     linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        kernel@...labora.com
Subject: Re: [PATCH v9 1/6] media: verisilicon: Do not set context src/dst
 formats in reset functions

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@...labora.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@...sung.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ