linux/drivers/gpu/drm/amd/display/dc/dml2/display_mode_lib_defines.h

/* SPDX-License-Identifier: MIT */
/*
 * Copyright 2023 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: AMD
 *
 */

#ifndef __DISPLAY_MODE_LIB_DEFINES_H__
#define __DISPLAY_MODE_LIB_DEFINES_H__

#define DCN_DML__DML_STANDALONE
#define DCN_DML__DML_STANDALONE__1
#define DCN_DML__PRESENT
#define DCN_DML__PRESENT__1
#define DCN_DML__NUM_PLANE
#define DCN_DML__NUM_PLANE__8
#define DCN_DML__NUM_CURSOR
#define DCN_DML__NUM_CURSOR__1
#define DCN_DML__NUM_PWR_STATE
#define DCN_DML__NUM_PWR_STATE__30
#define DCN_DML__VM_PRESENT
#define DCN_DML__VM_PRESENT__1
#define DCN_DML__HOST_VM_PRESENT
#define DCN_DML__HOST_VM_PRESENT__1
#define DCN_DML__DWB

#include "dml_depedencies.h"

#include "dml_logging.h"
#include "dml_assert.h"

// To enable a lot of debug msg
#define __DML_VBA_DEBUG__
#define __DML_VBA_ENABLE_INLINE_CHECK_
#define __DML_VBA_MIN_VSTARTUP__
#define __DML_ARB_TO_RET_DELAY__
#define __DML_MIN_DCFCLK_FACTOR__
#define __DML_MAX_VRATIO_PRE__
#define __DML_MAX_VRATIO_PRE_OTO__
#define __DML_MAX_VRATIO_PRE_ENHANCE_PREFETCH_ACC__
#define __DML_NUM_PLANES__
#define __DML_NUM_CURSORS__
#define __DML_DPP_INVALID__
#define __DML_NUM_DMB__
#define __DML_PIPE_NO_PLANE__

#define __DML_MAX_STATE_ARRAY_SIZE__

// Compilation define
#define __DML_DLL_EXPORT__

dml_int_t;   // int is 32-bit in C/C++, but Integer datatype is 16-bit in VBA. this should map to Long in VBA
dml_uint_t;
dml_float_t;

// Note: bool is 8-bit in C/C++, but Boolean is 16-bit in VBA, use "short" in C/C++ DLL so the struct work when vba uses DLL
// Or the VBA side don't use Boolean, just use "Byte", then C side can use bool
dml_bool_t;

#endif