mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 17:55:05 +03:00
1. Add mechanism(s) to trigger syncpoint fence scan when syncpoint increment UMD called. Following methods are added. - METHOD-1: Check fence expire in user context when syncpoint increment UMD API is called. - METHOD-2: Add tasklet based mechanism that schedule tasklet to scan for syncpoint fence expiry. This also improve signaling latency. METHOD-1 is enabled by default, to enable METHOD-2 define MACRO "HOST1X_EMU_SYNC_INC_TASKLET". 2. Add interface "host1x_syncpt_fence_scan()" that can be called from client interrupt handler to initiate syncpoint fence scan. Jira HOSTX-5527 Change-Id: I4d5a0ba9fd67042d824a1df2794b316831001dc4 Signed-off-by: amitabhd <amitabhd@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3267144 Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com> Reviewed-by: Sanif Veeras <sveeras@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: Leslin Varghese <lvarghese@nvidia.com>
65 lines
1.5 KiB
C
65 lines
1.5 KiB
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
// SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
#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;
|
|
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);
|
|
|
|
/**
|
|
* Description: Check if syncpoint fence expired
|
|
*/
|
|
void host1x_poll_irq_check_syncpt_fence(struct host1x_syncpt *sp);
|
|
#endif
|