gpu: host1x: utility for local<->global syncpt id conversion

Expose utilities for converting:
- Local syncpoint id to global syncpoint id
- Gobal syncpoint id to local syncpoint id

Bug 4793553
Jira HOSTX-5413

Change-Id: I956ef05a929547aaad4ecf0d1627a6e061618856
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3191230
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Santosh BS
2024-08-09 09:34:35 +00:00
committed by mobile promotions
parent 9dc14f1027
commit 8ad09fb980

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (c) 2009-2023, NVIDIA Corporation. All rights reserved.
* Copyright (c) 2009-2024, NVIDIA Corporation. All rights reserved.
*/
#ifndef __LINUX_HOST1X_H
@@ -218,6 +218,12 @@ static inline void host1x_bo_munmap(struct host1x_bo *bo, void *addr)
#define HOST1X_SYNCPT_HAS_BASE (1 << 1)
#define HOST1X_SYNCPT_GPU (1 << 2)
#define HOST1X_GLOBAL_TO_LOCAL_SYNCPOINT(global_syncpoint_id) \
(global_syncpoint_id & 0xFFFFFF)
#define HOST1X_LOCAL_TO_GLOBAL_SYNCPOINT(local_syncpoint_id, instance) \
((instance << 24) | (local_syncpoint_id))
struct host1x_syncpt_base;
struct host1x_syncpt;
struct host1x;