Re: [PATCH v3 8/9] mailbox: mediatek: Add CMDQ secure mailbox driver

From: Jason-JH Lin (林睿祥)
Date: Wed Dec 27 2023 - 02:21:14 EST


Hi CK,

Thanks for the reviews.

On Tue, 2023-12-26 at 09:18 +0000, CK Hu (胡俊光) wrote:
> Hi, Jason:
>
> On Fri, 2023-12-22 at 12:52 +0800, Jason-JH.Lin wrote:
> > To support secure video path feature, GCE have to read/write
> > registgers
> > in the secure world. GCE will enable the secure access permission
> > to
> > the
> > HW who wants to access the secure content buffer.
> >
> > Add CMDQ secure mailbox driver to make CMDQ client user is able to
> > sending their HW settings to the secure world. So that GCE can
> > execute
> > all instructions to configure HW in the secure world.
> >
> > Signed-off-by: Jason-JH.Lin <jason-jh.lin@xxxxxxxxxxxx>
> > ---
>
> [snip]
>
> > +
> > +/**
> > + * struct iwc_cmdq_command_t - structure for excuting cmdq task in
> > secure world.
> > + * @thread: GCE secure thread index to execute command.
> > + * @scenario: scenario to execute command.
> > + * @priority: priority of GCE secure thread.
> > + * @cmd_size: command size used in command buffer.
> > + * @eng_flag: HW engine flag need to enable protection
> > configuration.
> > + * @va_base: command buffer
> > + * @wait_cookie: index in thread's task list, it should be
> > (nextCookie - 1).
> > + * @reset_exec: reset HW thread.
> > + * @caller_pid: pid of client module.
> > + * @caller_name: name of client module.
> > + * @metadata: metadata structure for converting a list of secure
> > buffer address.
> > + * @extension: extension HW engine flag to be protcted in secure
> > world.
> > + * @readback_pa: readback buffer pa.
> > + * @normal_task_handle: handle to reference task in normal world.
> > + * @mdp_extension: extension MDP HW engine flag to be protcted in
> > secure world.
> > + * @readback_engs: array of readback engines parameters.
> > + * @readback_cnt: count of readback_engs array.
> > + */
> > +struct iwc_cmdq_command_t {
> > + /* basic execution data */
> > + u32 thread;
> > + u32 scenario;
> > + u32 priority;
> > + u32 cmd_size;
> > + u64 eng_flag;
> > + u32 va_base[CMDQ_IWC_MAX_CMD_LENGTH];
> > +
> > + /* exec order data */
> > + u32 wait_cookie;
> > + bool reset_exec;
> > +
> > + /* client info */
> > + s32 caller_pid;
>
> Useless, drop it.
>
> > + char caller_name[CMDQ_IWC_CLIENT_NAME];
>
> Ditto.
>
> > +
> > + /* metadata */
> > + struct iwc_cmdq_metadata_t metadata;
> > +
> > + /* client extension bits */
> > + u64 extension;
>
> Ditto.
>
> > + u64 readback_pa;
>
> Ditto.
>
> > +
> > + /* debug */
> > + u64 normal_task_handle;
> > +
> > + /* SVP HDR */
> > + u32 mdp_extension;
>
> Ditto.
>
> > + struct readback_engine readback_engs[CMDQ_MAX_READBACK_ENG];
>
> Ditto.
>
> > + u32 readback_cnt;
>
> Ditto.
>
> Regards,
> CK
>

OK, I'll drop them.

Regards,
Jason-JH.Lin

> > +};
> > +