[igt-dev] [RFC i-g-t 06/11] Enable protected session and protected buffers in rendercopy

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 3 23:55:35 UTC 2021


Quoting Alan Previn (2021-03-02 22:53:29)
> 1. In _gen9_render_op, check if the incoming batchbuffer
>    was marked with pxp enabled. If so, insert MI_SET_APPID
>    along with PIPE_CONTROL instructions at the start and
>    end of the rendering operation in the command buffer.
> 
> 2. The two PIPE_CONTROLs will enable protected memory
>    at the start of the batch and disabling protected
>    memory at the end of it. These PIPE_CONTROLs require a
>    Post-Sync operation with a write to memory.
> 
> 3. In order to satisfy #2, _gen9_render_op shall
>    allocate and pin a bo that is referenced by the
>    PIPE_CONTROL PostSync write to memory.

Or, just have the caller do 1-3 once for its protected context.
Call it something like intel_bb_enable_pxp(), intel_bb_set_pxp if it
should be reversible.

> +       if (ibb->pxp.enabled) {
> +               gem_sync(ibb->i915, fenceb.handle);

No implicit syncs, ever. That will hide too may issues.
-Chris


More information about the igt-dev mailing list