mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-25 10:42:21 +03:00
nvdla: kmd: add support for stride signal action
NVDEV_FENCE_SIGNAL_STRIDE fence action translates to ACTION_INCREMENT_SEM firmware action. Jira DLA-4445 Change-Id: Idb537ea784614d031f66c570359dbc7dd74374af Signed-off-by: Arvind M <am@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2548309 Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com> Reviewed-by: Anup Mahindre <amahindre@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Laxman Dewangan
parent
9bf2e99b45
commit
c7692f6826
@@ -86,6 +86,7 @@
|
||||
|
||||
/* write actions */
|
||||
#define ACTION_WRITE_SEM 0x80U
|
||||
#define ACTION_INCREMENT_SEM 0x82U
|
||||
#define ACTION_WRITE_TS_SEM 0x83U
|
||||
#define ACTION_WRITE_TIMESTAMP 0x87U
|
||||
#define ACTION_WRITE_GOS 0xA0U
|
||||
@@ -211,10 +212,10 @@ struct dla_action_opcode {
|
||||
/**
|
||||
* Semaphore action structure
|
||||
*
|
||||
* OPCODE = 0x90/0x80/0x92/0x83
|
||||
* OPCODE = 0x90/0x80/0x92/0x83/0x82
|
||||
*
|
||||
* @address: Address to read or write value
|
||||
* @value: Value to compare
|
||||
* @address: Address to read/write/increment value
|
||||
* @value: Value to compare/write/increment
|
||||
*/
|
||||
struct dla_action_semaphore {
|
||||
uint64_t address;
|
||||
|
||||
@@ -857,9 +857,15 @@ static int nvdla_fill_signal_fence_action(struct nvdla_task *task,
|
||||
break;
|
||||
}
|
||||
|
||||
next = add_fence_action(next, ACTION_WRITE_SEM,
|
||||
dma_addr + fence->semaphore_offset,
|
||||
fence->semaphore_value);
|
||||
if (fence->action == NVDEV_FENCE_SIGNAL_STRIDE) {
|
||||
next = add_fence_action(next, ACTION_INCREMENT_SEM,
|
||||
dma_addr + fence->semaphore_offset,
|
||||
fence->semaphore_value);
|
||||
} else {
|
||||
next = add_fence_action(next, ACTION_WRITE_SEM,
|
||||
dma_addr + fence->semaphore_offset,
|
||||
fence->semaphore_value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NVDEV_FENCE_TYPE_SEMAPHORE_TS: {
|
||||
@@ -1194,7 +1200,8 @@ static int nvdla_fill_preactions(struct nvdla_task *task)
|
||||
/* fill all preactions signals */
|
||||
for (i = 0; i < task->num_prefences; i++) {
|
||||
/* update action */
|
||||
if (task->prefences[i].action != NVDEV_FENCE_SIGNAL)
|
||||
if ((task->prefences[i].action != NVDEV_FENCE_SIGNAL) &&
|
||||
(task->prefences[i].action != NVDEV_FENCE_SIGNAL_STRIDE))
|
||||
continue;
|
||||
|
||||
err = nvdla_fill_signal_fence_action(task,
|
||||
|
||||
Reference in New Issue
Block a user