diff options
| author | Huang Rui <[email protected]> | 2019-08-08 12:05:15 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2020-04-28 20:20:28 +0000 |
| commit | cb5fae143d79d255251921066dbf8eae16383639 (patch) | |
| tree | 81b909fea5730ea98ebf919d7c47755e32025747 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
| parent | drm/amdgpu: expand the context control interface with trust flag (diff) | |
| download | kernel-cb5fae143d79d255251921066dbf8eae16383639.tar.gz kernel-cb5fae143d79d255251921066dbf8eae16383639.zip | |
drm/amdgpu: job is secure iff CS is secure (v5)
Mark a job as secure, if and only if the command
submission flag has the secure flag set.
v2: fix the null job pointer while in vmid 0
submission.
v3: Context --> Command submission.
v4: filling cs parser with cs->in.flags
v5: move the job secure flag setting out of amdgpu_cs_submit()
Signed-off-by: Huang Rui <[email protected]>
Signed-off-by: Luben Tuikov <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 3eee5c7d83e0..99de770a8e9f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -232,6 +232,8 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, union drm_amdgpu_cs if (ret) goto free_all_kdata; + p->job->secure = cs->in.flags & AMDGPU_CS_FLAGS_SECURE; + if (p->ctx->vram_lost_counter != p->job->vram_lost_counter) { ret = -ECANCELED; goto free_all_kdata; |
