/**
 * @file hv_comm_MemoryConfig.h
 * @brief Header file of ddr config.
 *
 * @verbatim
 * ==============================================================================
 *                        ##### How to use #####
 * ==============================================================================
 *
 *
 @ endverbatim
 *
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2023-04-18
 */
#ifndef __HV_COMM_MEMORY_CONFIG_H__
#define __HV_COMM_MEMORY_CONFIG_H__
#include "hv_comm_DataType.h"
#include "hv_chip_Memory.h"
#include "ProjectConfig.h"
#include "../Panel/inc/PanelConfig.h"



UINT32 Hv_Board_Memory_CalculateOsdBlendSize(VOID);
UINT32 Hv_Board_Memory_CalculateOsdRotationSize(VOID);
UINT32 Hv_Board_Memory_CalculateOsdGraphicSize(VOID);

/*************************************************
******************PART POSITION*******************
**************************************************/
UINT32  Hv_Board_Memory_CalDemuraSize(VOID);
UINT32  Hv_Board_Memory_CalODSize(VOID);

#define HV_MEMORY_CONFIG_DMURA_DDR_START                    (HV_MEMORY_CONFIG_OSD_DDR_START+HV_MEMORY_CONFIG_OSD_DDR_SIZE)
#define HV_MEMORY_CONFIG_OSD_BLEND_DDR_START                (HV_MEMORY_CONFIG_DMURA_DDR_START+Hv_Board_Memory_CalDemuraSize())
#define HV_MEMORY_CONFIG_OSD_BLEND_DMA_DDR_START            VIRT_TO_PHY(HV_MEMORY_CONFIG_OSD_BLEND_DDR_START)
#define HV_MEMORY_CONFIG_OSD_ROTATION_DDR_START             (HV_MEMORY_CONFIG_OSD_BLEND_DDR_START+Hv_Board_Memory_CalculateOsdBlendSize())
#define HV_MEMORY_CONFIG_OSD_ROTATION_DMA_DDR_START         VIRT_TO_PHY(HV_MEMORY_CONFIG_OSD_ROTATION_DDR_START)
#define HV_MEMORY_CONFIG_OSD_GRAPHIC_DDR_START              (HV_MEMORY_CONFIG_OSD_ROTATION_DDR_START+Hv_Board_Memory_CalculateOsdRotationSize())
#define HV_MEMORY_CONFIG_OSD_GRAPHIC_DMA_DDR_START          VIRT_TO_PHY(HV_MEMORY_CONFIG_OSD_GRAPHIC_DDR_START)

/* osd & od 共存 */
//#define HV_MEMORY_CONFIG_OD_DDR_START        (HV_MEMORY_CONFIG_OSD_GRAPHIC_DDR_START+Hv_Board_Memory_CalculateOsdGraphicSize())
/* osd & od 不共存 */
#define HV_MEMORY_CONFIG_OD_DDR_START                       (HV_MEMORY_CONFIG_DMURA_DDR_START+Hv_Board_Memory_CalDemuraSize())
#define HV_MEMORY_CONFIG_OD_DMA_DDR_START                   VIRT_TO_PHY(HV_MEMORY_CONFIG_OD_DDR_START)

#endif
