drm/tegra: Add support for secondary syncpoint

Add support for secondary (non-job tracking) syncpoint used for
NVENC slice encoding.

Bug 3589873

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I80204c23486dd476c6b67a3897934f301833c7f5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2729281
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Mikko Perttunen
2022-06-15 14:42:09 +03:00
committed by Laxman Dewangan
parent 7d90780d49
commit 0955b8b8a5
3 changed files with 8 additions and 0 deletions

View File

@@ -217,6 +217,8 @@ static int channel_submit(struct host1x_job *job)
syncval = host1x_syncpt_incr_max(sp, user_syncpt_incrs);
host1x_hw_syncpt_assign_to_channel(host, sp, ch);
if (job->secondary_syncpt)
host1x_hw_syncpt_assign_to_channel(host, job->secondary_syncpt, ch);
job->syncpt_end = syncval;

View File

@@ -290,6 +290,9 @@ struct host1x_job {
u32 syncpt_incrs;
u32 syncpt_end;
/* Non-job tracking related syncpoint */
struct host1x_syncpt *secondary_syncpt;
/* Completion waiter ref */
void *waiter;

View File

@@ -95,6 +95,9 @@ static void job_free(struct kref *ref)
if (job->syncpt)
host1x_syncpt_put(job->syncpt);
if (job->secondary_syncpt)
host1x_syncpt_put(job->secondary_syncpt);
kfree(job);
}