[igt-dev] [PATCH i-g-t 09/17] Add subtest to copy raw source to protected dest

Teres Alexis, Alan Previn alan.previn.teres.alexis at intel.com
Sat Jun 5 01:30:15 UTC 2021


On Fri, 2021-06-04 at 09:22 -0400, Rodrigo Vivi wrote:
> On Tue, May 18, 2021 at 03:33:36AM -0700, Alan Previn wrote:
> > Add subtest to 3d-copy raw source buffer (with
> > known readible content) to a destination buffer
> > marked as protected with a protected session using
> > default session keys. The destination buffer is
> > verified to be different from the source (when
> > read via CPU) because its encrypted.
> > 
> > Signed-off-by: Alan Previn <alan.previn.teres.alexis at intel.com>
> > ---
> >  tests/i915/gem_pxp.c | 55
> > ++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 55 insertions(+)
> > 
> > diff --git a/tests/i915/gem_pxp.c b/tests/i915/gem_pxp.c
> > index b1415efc..5a29024a 100644
> > --- a/tests/i915/gem_pxp.c
> > +++ b/tests/i915/gem_pxp.c
> > @@ -376,7 +376,9 @@ static uint32_t alloc_and_fill_dest_buff(int
> > i915, bool protected, uint32_t size
> >  #define TSTSURF_STRIDE      (TSTSURF_WIDTH*TSTSURF_BYTESPP)
> >  #define TSTSURF_SIZE        (TSTSURF_STRIDE*TSTSURF_HEIGHT)
> >  #define TSTSURF_FILLCOLOR1  0xfaceface
> > +#define TSTSURF_FILLCOLOR2  0xdeaddead
> >  #define TSTSURF_INITCOLOR1  0x12341234
> > +#define TSTSURF_INITCOLOR2  0x56785678
> 
> I couldn't understand why we can't simply reuse the ones who were
> there
> already, but anyway:
> 

Since this operation required me to start with a raw-src, then encrypt
it once to a dest-buf and then reuse that dest-buf as another source in
a second render operation, i wanted to ensure that none of the initial
color values of that second operation happenned to be the same as the
first operation. This is to avoid the event of stale data from re-used
memory not cleared properly (a bug we want to catch?) and missing it as
we setup the buffers for the second render.

We could perhaps forgo FILLCOLOR2 but since you gave the rv-b, I'm
assuming i can skip this.

Thanks again btw.

> 
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> 
> 



More information about the igt-dev mailing list