Files
linux-nv-oot/drivers/platform/tegra/dce/include/dce-hsp-t234.h
anupamg f03b71480a DCE-KMD: Add new DCE OS interface: types.h
- This change will add new DCE OS interface for types.h.

- This DCE OS interface layer will act as entry point to OS layer
  from core DCE-KMD code.

- The intended usage is as follows.
    - DCE-KMD core will include respective OS header file from
      DCE OS interface.
        Eg. In dce-fsm.c
            #include <dce-os-types.h>
    - DCE OS interface will further include OS specific files
        Eg. In dce-os-types.h
            #include <os-types.h>
    - OS specific files will reside in respective OS specific paths.
        Eg. for Linux the path will be
            kernel/nvidia-oot/../dce/os/include/linux/os-types.h
        For HVRTOS the path will be
            display/server/os/include/hvrtos/os-types.h
    - The OS specific paths will be directly included in respective
      OS makefiles during compilation so that we don't need to use
      ifdefs within DCE OS interface layer.

- This is first change to follow this convention for types.h.
  We will have follow-up CLs to follow this suite for all other
  OS dependencies for DCE-KMD.

JIRA TDS-16126

Change-Id: Ied7bee6eac5de9134b973e74020df200707afa10
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3224052
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
2025-07-24 10:19:12 +00:00

55 lines
1.9 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#ifndef DCE_HSP_T234_H
#define DCE_HSP_T234_H
#include <dce-os-types.h>
struct tegra_dce;
#define DCE_MAX_HSP_T234 1
#define DCE_MAX_NO_SS_T234 4
#define DCE_MAX_NO_SMB_T234 8
#define DCE_MAX_HSP_IE_T234 8
/**
* DCE HSP Shared Semaphore Utility functions. Description
* can be found with function definitions.
*/
u32 dce_ss_get_state_t234(struct tegra_dce *d, u8 hsp_id, u8 id);
void dce_ss_set_t234(struct tegra_dce *d, u8 bpos, u8 hsp_id, u8 id);
void dce_ss_clear_t234(struct tegra_dce *d, u8 bpos, u8 hsp_id, u8 id);
/**
* DCE HSP Shared Mailbox Utility functions. Description
* can be found with function definitions.
*/
void dce_smb_set_t234(struct tegra_dce *d, u32 val, u8 hsp_id, u8 id);
void dce_smb_set_full_ie_t234(struct tegra_dce *d, bool en, u8 hsp_id, u8 id);
u32 dce_smb_read_full_ie_t234(struct tegra_dce *d, u8 hsp_id, u8 id);
void dce_smb_set_empty_ie_t234(struct tegra_dce *d, bool en, u8 hsp_id, u8 id);
u32 dce_smb_read_t234(struct tegra_dce *d, u8 hsp_id, u8 id);
u32 dce_hsp_ie_read_t234(struct tegra_dce *d, u8 hsp_id, u8 id);
void dce_hsp_ie_write_t234(struct tegra_dce *d, u32 val, u8 hsp_id, u8 id);
u32 dce_hsp_ir_read_t234(struct tegra_dce *d, u8 hsp_id);
#define DCE_HSP_INIT_T234(hsp) \
({ \
hsp.ss_get_state = dce_ss_get_state_t234; \
hsp.ss_set = dce_ss_set_t234; \
hsp.ss_clear = dce_ss_clear_t234; \
hsp.smb_set = dce_smb_set_t234; \
hsp.smb_set_full_ie = dce_smb_set_full_ie_t234; \
hsp.smb_read_full_ie = dce_smb_read_full_ie_t234; \
hsp.smb_set_empty_ie = dce_smb_set_empty_ie_t234; \
hsp.smb_read = dce_smb_read_t234; \
hsp.hsp_ie_read = dce_hsp_ie_read_t234; \
hsp.hsp_ie_write = dce_hsp_ie_write_t234; \
hsp.hsp_ir_read = dce_hsp_ir_read_t234; \
})
#endif