mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
DCE-KMD: dce-ipc.c: Remove simple wrappers
- This is a follow-up CL to address a comment in
I55594d8e34c3b572129119d1f7240cde76cf37bd
- This change will remove below simple static wrappers
from dce-ipc.c and directly call the corresponding OS functions.
- _dce_ipc_get_next_write_buff()
- _dce_ipc_get_next_read_buff()
JIRA TDS-16126
Change-Id: Ie8c08ace75f3c6e14e803c6aeccdf43a0c27f3fa
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3257965
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2019-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <dce.h>
|
||||
@@ -417,25 +417,6 @@ void dce_ipc_channel_reset(struct tegra_dce *d, u32 ch_type)
|
||||
dce_os_mutex_unlock(&ch->lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* dce_ipc_get_next_write_buff - waits for the next write frame.
|
||||
*
|
||||
* @ch : Pointer to the pertinent channel.
|
||||
*
|
||||
* Return : 0 if successful
|
||||
*/
|
||||
static int _dce_ipc_get_next_write_buff(struct dce_ipc_channel *ch)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
if (ch != NULL)
|
||||
err = dce_os_ivc_get_next_write_frame(&ch->d_ivc, &ch->obuff);
|
||||
else
|
||||
err = -EINVAL;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/**
|
||||
* dce_ipc_send_message - Sends messages over ipc.
|
||||
*
|
||||
@@ -457,7 +438,7 @@ int dce_ipc_send_message(struct tegra_dce *d, u32 ch_type,
|
||||
|
||||
dce_os_trace_ivc_send_req_received(d, ch);
|
||||
|
||||
ret = _dce_ipc_get_next_write_buff(ch);
|
||||
ret = dce_os_ivc_get_next_write_frame(&ch->d_ivc, &ch->obuff);
|
||||
if (ret) {
|
||||
dce_os_err(ch->d, "Error getting next free buf to write");
|
||||
goto out;
|
||||
@@ -479,25 +460,6 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* dce_ipc_get_next_read_buff - waits for the next write frame.
|
||||
*
|
||||
* @ch : Pointer to the pertinent channel.
|
||||
*
|
||||
* Return : 0 if successful
|
||||
*/
|
||||
static int _dce_ipc_get_next_read_buff(struct dce_ipc_channel *ch)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
if (ch != NULL)
|
||||
err = dce_os_ivc_get_next_read_frame(&ch->d_ivc, &ch->ibuff);
|
||||
else
|
||||
err = -EINVAL;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/**
|
||||
* dce_ipc_read_message - Reads messages over ipc.
|
||||
*
|
||||
@@ -518,7 +480,7 @@ int dce_ipc_read_message(struct tegra_dce *d, u32 ch_type,
|
||||
|
||||
dce_os_trace_ivc_receive_req_received(d, ch);
|
||||
|
||||
ret = _dce_ipc_get_next_read_buff(ch);
|
||||
ret = dce_os_ivc_get_next_read_frame(&ch->d_ivc, &ch->ibuff);
|
||||
if (ret) {
|
||||
dce_os_debug(ch->d, "No Msg to read");
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user