

#ifndef __MT53_SIMPLE_H__
#define __MT53_SIMPLE_H__

#ifdef __KERNEL__
#include "x_typedef.h"
#endif

#define MAX_IMGRZ_NUM  2

#ifndef ASSERT
    #ifdef _DEBUG_
        #include <assert.h>
        #define ASSERT(x)               assert((x))
    #else
        #define ASSERT(x)
    #endif  // _DEBUG_
#endif  // ASSERT
#ifndef UN_USED
#define UN_USED(X) (void)X
#endif

typedef struct
{
    UINT32 u4Cmd;
    union {
    unsigned long ulArg;
    unsigned long long u8Padding;
    };
}SIMPLE_CMD_T;

typedef struct
{
    UINT32 u4Width;
    UINT32 u4Height;
    UINT32 u4Pitch;
}FBM_BUFFER_INFO_T;

typedef struct
{
    UINT32 u4VdpChannel;
    UINT32 u4ImgrzIdMask;
}IMGRZ_ID_MASK_T;

typedef struct
{
    union {
    unsigned long ulAddr;
    unsigned long long u8Padding;
    };
    UINT32 u4Width;
    UINT32 u4Height;
    UINT32 u4Pitch;
}SWDEC_BUFFER_T;

typedef struct
{
    union {
    unsigned long ulSrcAddr;
    unsigned long long u8Padding;
    };
    uint8_t ucFbId;
    BOOL bComplete;
}COMPLETE_BUFFER_T;

typedef struct
{
    COMPLETE_BUFFER_T completeBuffers[MAX_IMGRZ_NUM];
}CONVERT_RESULT_T;

typedef struct
{
    UINT32 u4NumTypes;
    uint64_t u8Types;
    UINT32 u4MaxLuminance;
    UINT32 u4MaxAverageLuminance;
    UINT32 u4MinLuminance;
}HDR_CAPABILITIES_T;

/* ioctls
   0x53 is 'S'                              */
#define SIMPLE_VDP_CMD_START             0x5310
#define SIMPLE_VDP_CONVERT_INIT          0x5311
#define SIMPLE_VDP_CONVERT_DEINIT        0x5312
#define SIMPLE_VDP_CONVERT_FORMAT        0x5313
#define SIMPLE_VDP_SET_IMGRZ_ID_MASK     0x5314
#define SIMPLE_VDP_PIN_MEM               0x5315
#define SIMPLE_VDP_GET_COMPLETE          0x5316
#define SIMPLE_VDP_DISPLAY               0x5317
#define SIMPLE_VDP_BUFFER_UNMAP          0x5318
#define SIMPLE_VDP_CMD_END               0x531f
#define SIMPLE_PANEL_CMD_START           0x5320
#define SIMPLE_PANEL_POWER               0x5321
#define SIMPLE_PANEL_CMD_END             0x532f
#define SIMPLE_HDR_CMD_START             0x5330
#define SIMPLE_HDR_GET_CAPABILITIES      0x5331
#define SIMPLE_HDR_CMD_END               0x533f

#define SIMPLE_TEST_IO                   0x53aa

//extern VOID Mt53Simple_InitDevice(VOID);
#ifdef __KERNEL__
extern INT32 mt53simple_init(void);
extern INT32 mt53simple_ioctl(unsigned long ulArg);
#endif

#endif
