gpu: host1x: Restore host1x_fence_extract

host1x_fence_extract is currently not in upstream due to no upstream
callers, but nvgpu needs it, so restore it here for now.

JIRA LS-128

Change-Id: Ie2ccf6380e4bf506378a04bc8fd894c7ca7414c6
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2653093
GVS: Gerrit_Virtual_Submit
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
This commit is contained in:
Mikko Perttunen
2021-09-02 15:19:41 +03:00
committed by Laxman Dewangan
parent 65b76aee13
commit 45652ce93f
2 changed files with 17 additions and 0 deletions

View File

@@ -168,3 +168,19 @@ struct dma_fence *host1x_fence_create(struct host1x_syncpt *sp, u32 threshold)
return &fence->base; return &fence->base;
} }
EXPORT_SYMBOL(host1x_fence_create); EXPORT_SYMBOL(host1x_fence_create);
int host1x_fence_extract(struct dma_fence *fence, u32 *id, u32 *threshold)
{
struct host1x_syncpt_fence *f;
if (fence->ops != &host1x_syncpt_fence_ops)
return -EINVAL;
f = container_of(fence, struct host1x_syncpt_fence, base);
*id = f->sp->id;
*threshold = f->threshold;
return 0;
}
EXPORT_SYMBOL(host1x_fence_extract);

View File

@@ -219,6 +219,7 @@ void host1x_syncpt_release_vblank_reservation(struct host1x_client *client,
u32 syncpt_id); u32 syncpt_id);
struct dma_fence *host1x_fence_create(struct host1x_syncpt *sp, u32 threshold); struct dma_fence *host1x_fence_create(struct host1x_syncpt *sp, u32 threshold);
int host1x_fence_extract(struct dma_fence *fence, u32 *id, u32 *threshold);
/* /*
* host1x channel * host1x channel