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]
Date:   Mon, 17 Apr 2023 11:26:29 +0200
From:   AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>
To:     Yunfei Dong <yunfei.dong@...iatek.com>,
        Chen-Yu Tsai <wenst@...omium.org>,
        Nicolas Dufresne <nicolas@...fresne.ca>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        Benjamin Gaignard <benjamin.gaignard@...labora.com>,
        NĂ­colas F . R . A . Prado 
        <nfraprado@...labora.com>
Cc:     Matthias Brugger <matthias.bgg@...il.com>,
        Hsin-Yi Wang <hsinyi@...omium.org>,
        Fritz Koenig <frkoenig@...omium.org>,
        Daniel Vetter <daniel@...ll.ch>,
        Steve Cho <stevecho@...omium.org>, linux-media@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org,
        Project_Global_Chrome_Upstream_Group@...iatek.com
Subject: Re: [PATCH 2/6] media: mediatek: vcodec: add the definition of
 decoder status

Il 17/04/23 07:48, Yunfei Dong ha scritto:
> Adding the status used to separate different decoder period for
> core hardware.
> 
> Signed-off-by: Yunfei Dong <yunfei.dong@...iatek.com>
> ---
>   drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h b/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h
> index a5d44bc97c16..19508be08566 100644
> --- a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h
> +++ b/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h
> @@ -21,6 +21,13 @@ struct mtk_vcodec_ctx;
>   struct mtk_vcodec_dev;
>   typedef int (*core_decode_cb_t)(struct vdec_lat_buf *lat_buf);
>   
> +/* current context isn't work */
> +#define CONTEXT_LIST_EMPTY           (0)
> +/* queued to the core work list */
> +#define CONTEXT_LIST_QUEUED          (1)
> +/* context decode done */
> +#define CONTEXT_LIST_DEC_DONE        (2)

I would prefer an enumeration instead; you can keep the documentation for those
status signals with kerneldoc on the new enum.

/**
  * enum core_ctx_status - Context decode status for core hardware
  * @CONTEXT_LIST_EMPTY:    No buffer queued on Core HW (must always be 0)
  * @CONTEXT_LIST_QUEUED:   Buffer queued to the core work list
  * @CONTEXT_LIST_DEC_DONE: Context decode done
  */
enum core_ctx_status {
	CONTEXT_LIST_EMPTY = 0,
	CONTEXT_LIST_QUEUED,
	CONTEXT_LIST_DEC_DONE,
}

Moreover, since this is a rather simple addition, please squash this commit with
patch [3/6] where you actually also introduce the actual usage of the new enum.

Cheers,
Angelo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ