mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 17:55:05 +03:00
Once we complete EVENT_ID_DCE_BOOT_COMPLETE_RECEIVED event handling, it doesn't reset the complition variable. Which causes dce_wait_interruptible to exit early without waiting in next cycle. This patch fixes the same by resetting complition variable after use for EVENT_ID_DCE_BOOT_COMPLETE_RECEIVED. Bug 4167219 Change-Id: Id9b9047fa0e293f8616e23a5c8b4b1bacf233934 Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2927740 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Arun Swain <arswain@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
35 lines
890 B
C
35 lines
890 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2019-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
*/
|
|
|
|
#ifndef DCE_WORKER_H
|
|
#define DCE_WORKER_H
|
|
|
|
#include <dce-cond.h>
|
|
#include <dce-lock.h>
|
|
#include <dce-thread.h>
|
|
|
|
struct tegra_dce;
|
|
|
|
#define DCE_WAIT_BOOT_COMPLETE 0
|
|
#define DCE_WAIT_BOOT_CMD 1
|
|
#define DCE_WAIT_ADMIN_IPC 2
|
|
#define DCE_WAIT_SC7_ENTER 3
|
|
#define DCE_WAIT_LOG 4
|
|
#define DCE_MAX_WAIT 5
|
|
|
|
struct dce_wait_cond {
|
|
atomic_t complete;
|
|
struct dce_cond cond_wait;
|
|
};
|
|
|
|
int dce_work_cond_sw_resource_init(struct tegra_dce *d);
|
|
void dce_work_cond_sw_resource_deinit(struct tegra_dce *d);
|
|
void dce_schedule_boot_complete_wait_worker(struct tegra_dce *d);
|
|
int dce_wait_interruptible(struct tegra_dce *d, u32 msg_id);
|
|
void dce_wakeup_interruptible(struct tegra_dce *d, u32 msg_id);
|
|
void dce_cond_wait_reset(struct tegra_dce *d, u32 msg_id);
|
|
|
|
#endif
|