mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
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:
committed by
Laxman Dewangan
parent
9734cc0d92
commit
381919e9c3
@@ -350,6 +350,16 @@ static int submit_get_syncpt(struct tegra_drm_context *context, struct host1x_jo
|
||||
job->syncpt = host1x_syncpt_get(sp);
|
||||
job->syncpt_incrs = args->syncpt.increments;
|
||||
|
||||
if (args->flags & DRM_TEGRA_SUBMIT_SECONDARY_SYNCPT) {
|
||||
sp = xa_load(syncpoints, args->secondary_syncpt_id);
|
||||
if (!sp) {
|
||||
SUBMIT_ERR(context, "secondary syncpt was not allocated");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
job->secondary_syncpt = host1x_syncpt_get(sp);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -532,6 +542,11 @@ int tegra_drm_ioctl_channel_submit(struct drm_device *drm, void *data,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (args->flags & !(DRM_TEGRA_SUBMIT_SECONDARY_SYNCPT)) {
|
||||
SUBMIT_ERR(context, "invalid flags '%#x'", args->flags);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
if (args->syncobj_in) {
|
||||
struct dma_fence *fence;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user