Files
linux-nv-oot/drivers/gpu/host1x-emu/poll.h
amitabhd 872cead7b6 host1x: Emulated Syncpoint KMD Driver
1. Update Host1x-Syncpt
   - add syncpt-list in syncpoint-pool structure.
   - add exported "host1x-syncpt-*" interface and supporting private interface.
2. Update Host1x-NvHost
   - add support for nvhost-syncpt and nvhost-client interface and supporting private interface.
   - falcon and pm interface not supported
3. Update Host1x-Fence
   - add exported "host1x-fence-*" interface and supporting private interface.
4. Add Host1x-Poll
   - Per Pool polling workequeue created
   - add poll supporting private interface.
5. Add new IOCTL

Jira HOSTX-5514

Change-Id: I187fa7ed89a3479e51b79f9d8d438ede75e1a36a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3136834
Tested-by: Amitabh Dutta <amitabhd@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Amitabh Dutta <amitabhd@nvidia.com>
2025-07-24 10:18:57 +00:00

62 lines
1.4 KiB
C

/*
* SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __HOST1X_EMU_POLL_H
#define __HOST1X_EMU_POLL_H
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/timekeeping.h>
struct host1x;
struct host1x_syncpt_fence;
struct host1x_fence_list {
spinlock_t lock;
struct list_head list;
};
struct host1x_syncpt_list {
spinlock_t lock;
struct list_head list;
};
/**
* Description: Initialize host1x syncpoint and pool for polling
*
*/
int host1x_poll_init(struct host1x *host);
/**
* Description: Deinitialize host1x syncpoint and pool for polling
*/
void host1x_poll_deinit(struct host1x *host);
/**
* Description: Enable host1x syncpoint pool polling
*/
void host1x_poll_start(struct host1x *host);
/**
* Description: Disable host1x syncpoint pool polling
*/
void host1x_poll_stop(struct host1x *host);
/**
* Description: Polling Thread Handler
*/
void host1x_poll_handle_timeout(struct host1x *host, unsigned int id, ktime_t ts);
/**
* Description: Add fence to syncpoint object fence-list
*/
void host1x_poll_add_fence_locked(struct host1x *host, struct host1x_syncpt_fence *fence);
/**
* Description: Remove fence from syncpoint object fence-list
*/
bool host1x_poll_remove_fence(struct host1x *host, struct host1x_syncpt_fence *fence);
#endif