BR, Aaron Liu
> -----Original Message----- > From: Koenig, Christian <[email protected]> > Sent: Friday, November 15, 2019 8:50 PM > To: Huang, Ray <[email protected]>; Liu, Aaron <[email protected]> > Cc: [email protected]; Deucher, Alexander > <[email protected]>; Olsak, Marek <[email protected]>; > Liu, Leo <[email protected]>; Tuikov, Luben <[email protected]> > Subject: Re: [PATCH 07/12] amdgpu: using IB flags for TMZ or non-TMZ > > Am 15.11.19 um 10:32 schrieb Huang Rui: > > On Fri, Nov 15, 2019 at 11:34:50AM +0800, Liu, Aaron wrote: > >> In kernel, cs->in.flags is used for TMZ. Hence libdrm should transfer > >> the flag to kernel. > >> > >> Signed-off-by: Aaron Liu <[email protected]> > >> --- > >> amdgpu/amdgpu.h | 4 +++- > >> amdgpu/amdgpu_cs.c | 4 ++++ > >> 2 files changed, 7 insertions(+), 1 deletion(-) > >> > >> diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h index > f45f9f7..aee3f3d > >> 100644 > >> --- a/amdgpu/amdgpu.h > >> +++ b/amdgpu/amdgpu.h > >> @@ -342,7 +342,9 @@ struct amdgpu_cs_fence_info { > >> * \sa amdgpu_cs_submit() > >> */ > >> struct amdgpu_cs_request { > >> - /** Specify flags with additional information */ > >> + /** Specify flags with additional information > >> + * 0-normal, 1-tmz > >> + */ > >> uint64_t flags; > >> > >> /** Specify HW IP block type to which to send the IB. */ diff > >> --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c index > >> 437c4a4..6f70771 100644 > >> --- a/amdgpu/amdgpu_cs.c > >> +++ b/amdgpu/amdgpu_cs.c > >> @@ -254,6 +254,10 @@ static int > amdgpu_cs_submit_one(amdgpu_context_handle context, > >> memset(&cs, 0, sizeof(cs)); > >> cs.in.chunks = (uint64_t)(uintptr_t)chunk_array; > >> cs.in.ctx_id = context->id; > >> + /* in kernel, _pad is used as flags > >> + * #define AMDGPU_CS_FLAGS_SECURE (1 << 0) > >> + */ > >> + cs.in._pad = (uint32_t)ibs_request->flags; > > _pad is not good here. Because it's used to pass the flags to input param. > > > > It's better to rename "_pad" in drm_amdgpu_cs_in as "flags" here. > > Actually I don't think we need that stuff altogether, please sync up with > Marek on this. > > As far asI know the whole amdgpu_cs_submit interface was deprecated in > favor of the new amdgpu_cs_submit_raw() interface. Christian, Marek, In addition to syncobj_command_submission_helper uses amdgpu_cs_submit_raw, the other test suites still use older interface(amdgpu_cs_submit). We'd better to reorganize the relevant codes. This does not make much sense to only modify one call. > Regards, > Christian. > > > > > Thanks, > > Ray > > > >> if (ibs_request->resources) > >> cs.in.bo_list_handle = ibs_request->resources->handle; > >> cs.in.num_chunks = ibs_request->number_of_ibs; > >> -- > >> 2.7.4 > >> _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
