//<MStar Software>
//******************************************************************************
// MStar Software
// Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved.
// All software, firmware and related documentation herein ("MStar Software") are
// intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by
// law, including, but not limited to, copyright law and international treaties.
// Any use, modification, reproduction, retransmission, or republication of all
// or part of MStar Software is expressly prohibited, unless prior written
// permission has been granted by MStar.
//
// By accessing, browsing and/or using MStar Software, you acknowledge that you
// have read, understood, and agree, to be bound by below terms ("Terms") and to
// comply with all applicable laws and regulations:
//
// 1. MStar shall retain any and all right, ownership and interest to MStar
//    Software and any modification/derivatives thereof.
//    No right, ownership, or interest to MStar Software and any
//    modification/derivatives thereof is transferred to you under Terms.
//
// 2. You understand that MStar Software might include, incorporate or be
//    supplied together with third party`s software and the use of MStar
//    Software may require additional licenses from third parties.
//    Therefore, you hereby agree it is your sole responsibility to separately
//    obtain any and all third party right and license necessary for your use of
//    such third party`s software.
//
// 3. MStar Software and any modification/derivatives thereof shall be deemed as
//    MStar`s confidential information and you agree to keep MStar`s
//    confidential information in strictest confidence and not disclose to any
//    third party.
//
// 4. MStar Software is provided on an "AS IS" basis without warranties of any
//    kind. Any warranties are hereby expressly disclaimed by MStar, including
//    without limitation, any warranties of merchantability, non-infringement of
//    intellectual property rights, fitness for a particular purpose, error free
//    and in conformity with any international standard.  You agree to waive any
//    claim against MStar for any loss, damage, cost or expense that you may
//    incur related to your use of MStar Software.
//    In no event shall MStar be liable for any direct, indirect, incidental or
//    consequential damages, including without limitation, lost of profit or
//    revenues, lost or damage of data, and unauthorized system use.
//    You agree that this Section 4 shall still apply without being affected
//    even if MStar Software has been modified by MStar in accordance with your
//    request or instruction for your use, except otherwise agreed by both
//    parties in writing.
//
// 5. If requested, MStar may from time to time provide technical supports or
//    services in relation with MStar Software to you for your use of
//    MStar Software in conjunction with your or your customer`s product
//    ("Services").
//    You understand and agree that, except otherwise agreed by both parties in
//    writing, Services are provided on an "AS IS" basis and the warranty
//    disclaimer set forth in Section 4 above shall apply.
//
// 6. Nothing contained herein shall be construed as by implication, estoppels
//    or otherwise:
//    (a) conferring any license or right to use MStar name, trademark, service
//        mark, symbol or any other identification;
//    (b) obligating MStar or any of its affiliates to furnish any person,
//        including without limitation, you and your customers, any assistance
//        of any kind whatsoever, or any information; or
//    (c) conferring any license or right under any intellectual property right.
//
// 7. These terms shall be governed by and construed in accordance with the laws
//    of Taiwan, R.O.C., excluding its conflict of law rules.
//    Any and all dispute arising out hereof or related hereto shall be finally
//    settled by arbitration referred to the Chinese Arbitration Association,
//    Taipei in accordance with the ROC Arbitration Law and the Arbitration
//    Rules of the Association by three (3) arbitrators appointed in accordance
//    with the said Rules.
//    The place of arbitration shall be in Taipei, Taiwan and the language shall
//    be English.
//    The arbitration award shall be final and binding to both parties.
//
//******************************************************************************
//////////////////////////////////////////////////////////////////////////////////////////////////
//
// @file   mdrv_xc_io.h
// @brief  XC KMD Driver Interface
// @author MStar Semiconductor Inc.
//////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef _MDRV_XC_IO_H
#define _MDRV_XC_IO_H

//=============================================================================
// Includs
//=============================================================================
#include "mdrv_xc_st.h"
//=============================================================================
// Defines
//=============================================================================
//IO Ctrl defines:
#define MDRV_XC_IOC_SET_HDR_TYPE_NR                  (0)
#define MDRV_XC_IOC_GET_HDR_TYPE_NR                  (1)
#define MDRV_XC_IOC_SET_INPUT_SOURCE_TYPE_NR         (2)
#define MDRV_XC_IOC_GET_INPUT_SOURCE_TYPE_NR         (3)
#define MDRV_XC_IOC_SET_OPEN_METADATA_INFO_NR        (4)
#define MDRV_XC_IOC_SET_3DLUT_INFO_NR                (5)
#define MDRV_XC_IOC_SET_SHMEM_INFO_NR                (6)
#define MDRV_XC_IOC_ENABLE_HDR_NR                    (7)
#define MDRV_XC_IOC_SET_HDR_WINDOW_NR                (8)
#define MDRV_XC_IOC_CONFIG_AUTO_DOWNLOAD_NR          (9)
#define MDRV_XC_IOC_WRITE_AUTO_DOWNLOAD_NR           (10)
#define MDRV_XC_IOC_FIRE_AUTO_DOWNLOAD_NR            (11)
#define MDRV_XC_IOC_GET_AUTO_DOWNLOAD_CAPS_NR        (12)
#define MDRV_XC_IOC_SET_COLOR_FORMAT_NR              (13)
#define MDRV_XC_IOC_MLOAD_INIT_NR                    (14)
#define MDRV_XC_IOC_MLOAD_ENABLE_NR                  (15)
#define MDRV_XC_IOC_MLOAD_GETSTATUS_NR               (16)
#define MDRV_XC_IOC_MLOAD_WRT_CMD_NR                 (17)
#define MDRV_XC_IOC_MLOAD_FIRE_NR                    (18)
#define MDRV_XC_IOC_MLOAD_WRT_CMD_NONXC_NR           (19)
#define MDRV_XC_IOC_MLOAD_SET_IP_TRIG_P_NR           (20)
#define MDRV_XC_IOC_MLOAD_GET_IP_TRIG_P_NR           (21)
#define MDRV_XC_IOC_MLOAD_SET_TRIG_SYNC_NR           (22)
#define MDRV_XC_IOC_DS_GET_DSFORCE_INDEX_SUPPORT_NR  (23)
#define MDRV_XC_IOC_DS_SET_DSINDEX_SOURCE_SELECT_NR  (24)
#define MDRV_XC_IOC_DS_SET_DSFORCE_INDEX_NR          (25)
#define MDRV_XC_IOC_DS_SET_DYNAMICSCALING_NR         (26)
#define MDRV_XC_IOC_DS_SET_DYNAMICSCALING_FLAG_NR    (27)
#define MDRV_XC_IOC_DS_GET_DS_STATUS_NR              (28)
#define MDRV_XC_IOC_DS_ENABLE_IPM_TUNE_AFTER_DS_NR   (29)
#define MDRV_XC_IOC_DS_WRITE_SWDS_CMD_NR             (30)
#define MDRV_XC_IOC_DS_ADD_NULL_CMD_NR               (31)
#define MDRV_XC_IOC_DS_SET_CLIENT_NR                 (32)
#define MDRV_XC_IOC_DS_GET_SUPPORT_INDEX_NUM_NR      (33)
#define MDRV_XC_IOC_CFDCONCTRL_NR                    (34)
#define MDRV_XC_IOC_DLCCHANGECURVE_NR                (35)
#define MDRV_XC_IOC_DLCONOFFINFO_NR                  (36)
#define MDRV_XC_IOC_DLCBLECHANGECURVE_NR             (37)
#define MDRV_XC_IOC_DLCBLEONOFFINFO_NR               (38)
#define MDRV_XC_IOC_DLCGETHISTOGRAMINFO_NR           (39)
#define MDRV_XC_IOC_DLCSETDLCINITINFO_NR             (40)
#define MDRV_XC_IOC_DLCSETTMOINFO_NR                 (41)
#define MDRV_XC_IOC_DLCSETHDRINFO_NR                 (42)
#define MDRV_XC_IOC_DS_WRITE_SWDS_NONXC_CMD_NR       (43)
#define MDRV_XC_IOC_DS_GET_INDEX_NR                  (44)
#define MDRV_XC_IOC_DS_FIRE_INDEX_NR                 (45)
#define MDRV_XC_IOC_SET_DSHDRINFO_NR                 (46)
#define MDRV_XC_IOC_DS_WRITE_SWDS_CMD_MASK_NR        (47)
#define MDRV_XC_IOC_GET_CFD_SUPPORT_STATUS_NR        (48)
#define MDRV_XC_IOC_SET_SWDR_INFO_NR                 (49)
#define MDRV_XC_IOC_GET_SWDR_INFO_NR                 (50)
#define MDRV_XC_IOC_DLCSETVRADDRESS_NR               (51)
#define MDRV_XC_IOC_SET_SWDR_INPUT_NR                (52)
#define MDRV_XC_IOC_SET_DSINFO_NR                    (53)
#define MDRV_XC_IOC_GET_DSINFO_NR                    (54)
#define MDRV_XC_IOC_SET_PQBIN_PATH_NR                (55)
#define MDRV_XC_IOC_SET_HSYSETTING_NR                (56)
#define MDRV_XC_IOC_GET_HSYSETTING_NR                (57)
#define MDRV_XC_IOC_GET_HSYADJRANGE_NR               (58)
#define MDRV_XC_IOC_GET_FOD_INFO_NR                  (59)
#define MDRV_XC_IOC_GET_RGB_HISTOGRAM_NR             (60)
#define MDRV_XC_IOC_SET_DEFLICKER_CONTROL_NR         (61)
#define MDRV_XC_IOC_SET_MEMORY_ADDRESS_NR            (62)
#define MDRV_XC_IOC_ENABLE_ABF_NR                    (63)
#define MDRV_XC_IOC_SET_FRAME_INFO_NR                (64)
#define MDRV_XC_IOC_SET_HDMI_SHMEM_INFO_NR           (65)
#define MDRV_XC_IOC_MLOAD_FIRE_EXT_NR                (66)
#define MDRV_XC_IOC_MLOAD_WRT_CMD_EXT_NR             (67)
#define MDRV_XC_IOC_MLOAD_MULTIWINFIRE_NR            (68)
#define MDRV_XC_IOC_MLOAD_MULTIWINRESET_NR           (69)
#define MDRV_XC_IOC_MLOAD_READ_CMD_NR                (70)
#define MDRV_XC_IOC_VR_READBYTE_NR                   (71)
#define MDRV_XC_IOC_VR_R2BYTE_NR                     (72)
#define MDRV_XC_IOC_VR_R2BYTEMASK_NR                 (73)
#define MDRV_XC_IOC_VR_WRITEBYTE_NR                  (74)
#define MDRV_XC_IOC_VR_W2BYTE_NR                     (75)
#define MDRV_XC_IOC_VR_W2BYTEMASK_NR                 (76)
#define MDRV_XC_IOC_PQ_GAMMA_IN_INIT_NR              (77)
#define MDRV_XC_IOC_PQ_GAMMA_NR                      (78)
#define MDRV_XC_IOC_PQ_RGB_PATTERN_NR                (79)
#define MDRV_XC_IOC_PQ_BLUE_STRETCH_NR               (80)
#define MDRV_XC_IOC_SET_H_NONLINEAR_SCALING_NR       (81)
#define MDRV_XC_IOC_EVENT_TRIGGER_NR                 (82)
#define MDRV_XC_IOC_SET_EVENT_TRIGGER_NR             (83)
#define MDRV_XC_IOC_DLCGETHISTOGRAMMINMAX_NR         (84)
#define MDRV_XC_IOC_DLCGETLUMICOUNTSUM_NR            (85)
#define MDRV_XC_IOC_DLCGETLUMACURVE16_NR             (86)
#define MDRV_XC_IOC_WRITE_ADL_AND_FIRE_NR            (87)
#define MDRV_XC_IOC_ML_CMDS_NR                       (88)
#define MDRV_XC_IOC_ML_CMD_NR                        (89)
#define MDRV_XC_IOC_DS_WRITE_SWDS_CMD_EXT_NR         (90)
#define MDRV_XC_IOC_DS_WRITE_SWDS_NONXC_CMD_EXT_NR   (91)
#define MDRV_XC_IOC_DS_WRITE_SWDS_CMD_MASK_EXT_NR    (92)
#define MDRV_XC_IOC_DS_ADD_NULL_CMD_EXT_NR           (93)
#define MDRV_XC_IOC_DS_SET_DYNAMICSCALING_FLAG_EXT_NR    (94)
#define MDRV_XC_IOC_DS_FIRE_INDEX_EXT_NR             (95)
#define MDRV_XC_IOC_DS_GET_DS_STATUS_EXT_NR          (96)
#define MDRV_XC_IOC_DS_SET_CLIENT_EXT_NR             (97)
#define MDRV_XC_IOC_XC_INIT_NR                       (98)
#define MDRV_XC_IOC_DPU_SETMODSETTING_NR             (99)
#define MDRV_XC_IOC_DPU_GETMODSTATUS_NR              (100)
#define MDRV_XC_IOC_HSE_INIT_NR                      (101)
#define MDRV_XC_IOC_HSE_CONTROL_NR                   (102)
#define MDRV_XC_IOC_GET_EMPACKET_NR                  (103)
#define MDRV_XC_IOC_DS_SET_DSFORCE_INDEX_EXT_NR      (104)
#define MDRV_XC_IOC_SET_EVENT_NR                     (105)
#define MDRV_XC_IOC_DS_GET_CMD_COUNT_EXT_NR          (106)
#define MDRV_XC_IOC_ENABLE_PICTURE_MODE_WRITING_NR   (107)
#define MDRV_XC_IOC_MAX_NR                           (108)

// use 'x' as magic number
#define MDRV_XC_IOC_MAGIC      ('x')
#define MDRV_XC_IOC_SET_HDR_TYPE                     _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_HDR_TYPE_NR, EN_KDRV_XC_HDR_TYPE)
#define MDRV_XC_IOC_GET_HDR_TYPE                     _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_GET_HDR_TYPE_NR, EN_KDRV_XC_HDR_TYPE)
#define MDRV_XC_IOC_SET_INPUT_SOURCE_TYPE            _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_INPUT_SOURCE_TYPE_NR, EN_KDRV_XC_INPUT_SOURCE_TYPE)
#define MDRV_XC_IOC_GET_INPUT_SOURCE_TYPE            _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_GET_INPUT_SOURCE_TYPE_NR, EN_KDRV_XC_INPUT_SOURCE_TYPE)
#define MDRV_XC_IOC_SET_OPEN_METADATA_INFO           _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_OPEN_METADATA_INFO_NR, ST_KDRV_XC_OPEN_METADATA_INFO)
#define MDRV_XC_IOC_SET_3DLUT_INFO                   _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_3DLUT_INFO_NR, ST_KDRV_XC_3DLUT_INFO)
#define MDRV_XC_IOC_SET_SHMEM_INFO                   _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_SHMEM_INFO_NR, ST_KDRV_XC_SHARE_MEMORY_INFO)
#define MDRV_XC_IOC_ENABLE_HDR                       _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_ENABLE_HDR_NR, MS_BOOL)
#define MDRV_XC_IOC_SET_HDR_WINDOW                   _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_HDR_WINDOW_NR, ST_KDRV_XC_WINDOW_INFO)
#define MDRV_XC_IOC_CONFIG_AUTO_DOWNLOAD             _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_CONFIG_AUTO_DOWNLOAD_NR, ST_KDRV_XC_AUTODOWNLOAD_CONFIG_INFO)
#define MDRV_XC_IOC_WRITE_AUTO_DOWNLOAD              _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_WRITE_AUTO_DOWNLOAD_NR, ST_KDRV_XC_AUTODOWNLOAD_DATA_INFO)
#define MDRV_XC_IOC_FIRE_AUTO_DOWNLOAD               _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_FIRE_AUTO_DOWNLOAD_NR, EN_KDRV_XC_AUTODOWNLOAD_CLIENT)
#define MDRV_XC_IOC_GET_AUTO_DOWNLOAD_CAPS           _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_GET_AUTO_DOWNLOAD_CAPS_NR, ST_KDRV_XC_AUTODOWNLOAD_CLIENT_SUPPORTED_CAPS)
#define MDRV_XC_IOC_SET_COLOR_FORMAT                 _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_COLOR_FORMAT_NR, EN_KDRV_XC_HDR_COLOR_FORMAT)
#define MDRV_XC_IOC_MLOAD_INIT                       _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_MLOAD_INIT_NR, ST_KDRV_MLOAD_INIT)
#define MDRV_XC_IOC_MLOAD_ENABLE                     _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_MLOAD_ENABLE_NR, ST_KDRV_MLOAD_ENABLE)
#define MDRV_XC_IOC_MLOAD_GETSTATUS                  _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_MLOAD_GETSTATUS_NR, ST_KDRV_MLOAD_GETSTATUS)
#define MDRV_XC_IOC_MLOAD_WRT_CMD                    _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_MLOAD_WRT_CMD_NR, ST_KDRV_MLOAD_WRT_CMD)
#define MDRV_XC_IOC_MLOAD_FIRE                       _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_MLOAD_FIRE_NR, ST_KDRV_MLOAD_FIRE)
#define MDRV_XC_IOC_MLOAD_WRT_CMD_NONXC              _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_MLOAD_WRT_CMD_NONXC_NR, ST_KDRV_MLOAD_WRT_CMD_NONXC)
#define MDRV_XC_IOC_MLOAD_SET_IP_TRIG_P              _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_MLOAD_SET_IP_TRIG_P_NR, ST_KDRV_MLOAD_SET_IP_TRIG_P)
#define MDRV_XC_IOC_MLOAD_GET_IP_TRIG_P              _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_MLOAD_GET_IP_TRIG_P_NR, ST_KDRV_MLOAD_GET_IP_TRIG_P)
#define MDRV_XC_IOC_MLOAD_SET_TRIG_SYNC              _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_MLOAD_SET_TRIG_SYNC_NR, EN_MLOAD_TRIG_SYNC)
#define MDRV_XC_IOC_CFDCONCTRL                       _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_CFDCONCTRL_NR, ST_KDRV_XC_CFD_CONTROL_INFO)
#define MDRV_XC_IOC_DLCCHANGECURVE                   _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DLCCHANGECURVE_NR, ST_KDRV_XC_DLC_INFO)
#define MDRV_XC_IOC_DLCONOFFINFO                     _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DLCONOFFINFO_NR, MS_BOOL)
#define MDRV_XC_IOC_DLCBLECHANGECURVE                _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DLCBLECHANGECURVE_NR, ST_KDRV_XC_DLC_BLE_INFO)
#define MDRV_XC_IOC_DLCBLEONOFFINFO                  _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DLCBLEONOFFINFO_NR, MS_BOOL)
#define MDRV_XC_IOC_DLCGETHISTOGRAMINFO              _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DLCGETHISTOGRAMINFO_NR, ST_KDRV_DLC_GET_HIST32INFO)
#define MDRV_XC_IOC_DLCGETHISTOGRAMMINMAX            _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DLCGETHISTOGRAMMINMAX_NR, ST_KDRV_DLC_GET_HISTMINMAX)
#define MDRV_XC_IOC_DLCGETLUMICOUNTSUM               _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DLCGETLUMICOUNTSUM_NR, ST_KDRV_DLC_GET_LUMICOUNT)
#define MDRV_XC_IOC_DLCGETLIMACURVE16                _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DLCGETLUMACURVE16_NR, ST_KDRV_DLC_GET_LUMACURVE16)
#define MDRV_XC_IOC_DLCSETDLCINITINFO                _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DLCSETDLCINITINFO_NR, ST_KDRV_XC_DLC_INIT_INFO)
#define MDRV_XC_IOC_DLCSETTMOINFO                    _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DLCSETTMOINFO_NR, ST_KDRV_XC_TMO_INFO)
#define MDRV_XC_IOC_DLCSETVRADDRESS                  _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DLCSETVRADDRESS_NR, ST_KDRV_XC_DLC_SET_VR_ADDRESS)
#define MDRV_XC_IOC_DS_GET_DSFORCE_INDEX_SUPPORT     _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_GET_DSFORCE_INDEX_SUPPORT_NR, ST_KDRV_DS_GET_DSForceIndexSupported)
#define MDRV_XC_IOC_DS_SET_DSINDEX_SOURCE_SELECT     _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_SET_DSINDEX_SOURCE_SELECT_NR, ST_KDRV_DS_SET_DSIndexSourceSelect)
#define MDRV_XC_IOC_DS_SET_DSFORCE_INDEX             _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_SET_DSFORCE_INDEX_NR, ST_KDRV_DS_SET_DSForceIndex)
#define MDRV_XC_IOC_DS_SET_DYNAMICSCALING            _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_SET_DYNAMICSCALING_NR, ST_KDRV_DS_SetDynamicScaling)
#define MDRV_XC_IOC_DS_SET_DYNAMICSCALING_FLAG       _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_SET_DYNAMICSCALING_FLAG_NR, ST_KDRV_DS_SET_DynamicScalingFlag)
#define MDRV_XC_IOC_DS_GET_DS_STATUS                 _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_GET_DS_STATUS_NR, ST_KDRV_DS_GetDynamicScalingStatus)
#define MDRV_XC_IOC_DS_ENABLE_IPM_TUNE_AFTER_DS      _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_ENABLE_IPM_TUNE_AFTER_DS_NR, ST_KDRV_DS_EnableIPMTuneAfterDS)
#define MDRV_XC_IOC_DS_WRITE_SWDS_CMD                _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_WRITE_SWDS_CMD_NR, ST_KDRV_DS_WriteSWDSCommand)
#define MDRV_XC_IOC_DS_ADD_NULL_CMD                  _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_ADD_NULL_CMD_NR, ST_KDRV_DS_Add_NullCommand)
#define MDRV_XC_IOC_DS_SET_CLIENT                    _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_SET_CLIENT_NR, ST_KDRV_DS_SET_CLIENT)
#define MDRV_XC_IOC_DS_GET_SUPPORT_INDEX_NUM         _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_GET_SUPPORT_INDEX_NUM_NR, ST_KDRV_DS_GET_SUPPORT_INDEX_NUM)
#define MDRV_XC_IOC_DS_WRITE_SWDS_NONXC_CMD          _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_WRITE_SWDS_NONXC_CMD_NR, ST_KDRV_DS_WriteSWDSCommandNonXC)
#define MDRV_XC_IOC_DS_GET_INDEX                     _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_GET_INDEX_NR, ST_KDRV_DS_GET_INDEX_INFO)
#define MDRV_XC_IOC_DS_FIRE_INDEX                    _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_FIRE_INDEX_NR, ST_KDRV_DS_FIRE_INDEX_INFO)
#define MDRV_XC_IOC_SET_DSHDRINFO                    _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_DSHDRINFO_NR, ST_KDRV_XC_DS_HDRInfo)
#define MDRV_XC_IOC_DS_WRITE_SWDS_CMD_MASK           _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_WRITE_SWDS_CMD_MASK_NR, ST_KDRV_DS_WriteSWDSCommand_Mask)
#define MDRV_XC_IOC_GET_CFD_SUPPORT_STATUS           _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_GET_CFD_SUPPORT_STATUS_NR, MS_BOOL)
#define MDRV_XC_IOC_SET_SWDR_INFO                    _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_SWDR_INFO_NR, ST_KDRV_XC_SWDR_INFO)
#define MDRV_XC_IOC_GET_SWDR_INFO                    _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_GET_SWDR_INFO_NR, ST_KDRV_XC_SWDR_INFO)
#define MDRV_XC_IOC_SET_SWDR_INPUT                   _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_SWDR_INPUT_NR, ST_KDRV_XC_SWDR_INPUT)
#define MDRV_XC_IOC_SET_DSINFO                       _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_DSINFO_NR, ST_KDRV_SET_XC_DS_Info)
#define MDRV_XC_IOC_GET_DSINFO                       _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_GET_DSINFO_NR, ST_KDRV_GET_XC_DS_Info)
#define MDRV_XC_IOC_SET_PQBIN_PATH                   _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_PQBIN_PATH_NR, ST_KDRV_XC_SET_PQBINPATH)
#define MDRV_XC_IOC_SET_HSYSETTING                   _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_HSYSETTING_NR, ST_KDRV_XC_HSY_SETTING_INFO)
#define MDRV_XC_IOC_GET_HSYSETTING                   _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_GET_HSYSETTING_NR, ST_KDRV_XC_HSY_SETTING_INFO)
#define MDRV_XC_IOC_GET_HSYADJRANGE                  _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_GET_HSYADJRANGE_NR, ST_KDRV_XC_HSY_ADJ_RANGE_INFO)
#define MDRV_XC_IOC_GET_FOD_INFO                     _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_GET_FOD_INFO_NR, ST_KDRV_XC_FOD_INFO)
#define MDRV_XC_IOC_GET_RGB_HISTOGRAM                _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_GET_RGB_HISTOGRAM_NR, ST_KDRV_XC_RGBHistogram)
#define MDRV_XC_IOC_SET_DEFLICKER_CONTROL            _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_DEFLICKER_CONTROL_NR, ST_KDRV_PQ_DEFLICKER)
#define MDRV_XC_IOC_SET_MEMORY_ADDRESS               _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_MEMORY_ADDRESS_NR, ST_KDRV_XC_MEMORY_INFO)
#define MDRV_XC_IOC_ENABLE_ABF                       _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_ENABLE_ABF_NR, MS_BOOL)
#define MDRV_XC_IOC_SET_FRAME_INFO                   _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_FRAME_INFO_NR, ST_KDRV_XC_FRAME_INFO)
#define MDRV_XC_IOC_SET_HDMI_SHMEM_INFO              _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_HDMI_SHMEM_INFO_NR, ST_KDRV_HDMI_SHARE_MEMORY_INFO)
#define MDRV_XC_IOC_MLOAD_FIRE_EXT                   _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_MLOAD_FIRE_EXT_NR, ST_KDRV_XC_MLOAD_FIRE_EXT)
#define MDRV_XC_IOC_MLOAD_WRT_CMD_EXT                _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_MLOAD_WRT_CMD_EXT_NR, ST_KDRV_XC_MLOAD_WRT_CMD_EXT)
#define MDRV_XC_IOC_MLOAD_MULTIWINFIRE               _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_MLOAD_MULTIWINFIRE_NR, ST_KDRV_XC_MLOAD_MULTIWINFIRE)
#define MDRV_XC_IOC_MLOAD_MULTIWINREST               _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_MLOAD_MULTIWINRESET_NR, ST_KDRV_XC_MLOAD_MULTIWINRESET)
#define MDRV_XC_IOC_MLOAD_READ_CMD                   _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_MLOAD_READ_CMD_NR, ST_KDRV_XC_MLOAD_READ_CMD)
#define MDRV_XC_IOC_VR_READBYTE                      _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_VR_READBYTE_NR,   ST_KDRV_XC_VR_READBYTE)
#define MDRV_XC_IOC_VR_R2BYTE                        _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_VR_R2BYTE_NR,     ST_KDRV_XC_VR_R2BYTE)
#define MDRV_XC_IOC_VR_R2BYTEMASK                    _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_VR_R2BYTEMASK_NR, ST_KDRV_XC_VR_R2BYTEMASK)
#define MDRV_XC_IOC_VR_WRITEBYTE                     _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_VR_WRITEBYTE_NR,  ST_KDRV_XC_VR_WRITEBYTE)
#define MDRV_XC_IOC_VR_W2BYTE                        _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_VR_W2BYTE_NR,     ST_KDRV_XC_VR_W2BYTE)
#define MDRV_XC_IOC_VR_W2BYTEMASK                    _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_VR_W2BYTEMASK_NR, ST_KDRV_XC_VR_W2BYTEMASK)
#define MDRV_XC_IOC_PQ_GAMMA_IN_INIT                 _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_PQ_GAMMA_IN_INIT_NR, ST_KDRV_XC_PQ_GAMMA_IN)
#define MDRV_XC_IOC_PQ_GAMMA                         _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_PQ_GAMMA_NR, ST_KDRV_XC_PQ_GAMMA_IN)
#define MDRV_XC_IOC_PQ_RGB_PATTERN                   _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_PQ_RGB_PATTERN_NR, ST_KDRV_XC_PQ_RGB_PATTERN_IN)
#define MDRV_XC_IOC_PQ_BLUE_STRETCH                  _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_PQ_BLUE_STRETCH_NR, ST_KDRV_XC_PQ_BLUE_STRETCH_IN)
#define MDRV_XC_IOC_SET_H_NONLINEAR_SCALING          _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_H_NONLINEAR_SCALING_NR, ST_KDRV_XC_PQ_NONLINEARSCALING_API_PARAM_IN)
#define MDRV_XC_IOC_EVENT_TRIGGER                    _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_EVENT_TRIGGER_NR, ST_KDRV_XC_EVENT_MISC)
#define MDRV_XC_IOC_SET_EVENT_TRIGGER                _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_EVENT_TRIGGER_NR, ST_KDRV_XC_EVENT_MISC)
#define MDRV_XC_IOC_WRITE_ADL_AND_FIRE               _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_WRITE_ADL_AND_FIRE_NR, ST_KDRV_XC_AUTODOWNLOAD_TABLE)
#define MDRV_XC_IOC_ML_CMDS                          _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_ML_CMDS_NR, ST_KDRV_XC_ML_CMDS_TABLE)
#define MDRV_XC_IOC_ML_CMD                           _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_ML_CMD_NR, ST_KDRV_XC_ML_CMD_TABLE)
#define MDRV_XC_IOC_DS_WRITE_SWDS_CMD_EXT            _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_WRITE_SWDS_CMD_EXT_NR, ST_KDRV_DS_WriteSWDSCommand_EXT)
#define MDRV_XC_IOC_DS_WRITE_SWDS_NONXC_CMD_EXT      _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_WRITE_SWDS_NONXC_CMD_EXT_NR, ST_KDRV_DS_WriteSWDSCommandNonXC_EXT)
#define MDRV_XC_IOC_DS_WRITE_SWDS_CMD_MASK_EXT       _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_WRITE_SWDS_CMD_MASK_EXT_NR, ST_KDRV_DS_WriteSWDSCommand_Mask_EXT)
#define MDRV_XC_IOC_DS_ADD_NULL_CMD_EXT              _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_ADD_NULL_CMD_EXT_NR, ST_KDRV_DS_Add_NullCommand_EXT)
#define MDRV_XC_IOC_DS_SET_DYNAMICSCALING_FLAG_EXT   _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_SET_DYNAMICSCALING_FLAG_EXT_NR, ST_KDRV_DS_SET_DynamicScalingFlag_EXT)
#define MDRV_XC_IOC_DS_FIRE_INDEX_EXT                _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_FIRE_INDEX_EXT_NR, ST_KDRV_DS_FIRE_INDEX_INFO_EXT)
#define MDRV_XC_IOC_DS_GET_DS_STATUS_EXT             _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_GET_DS_STATUS_EXT_NR, ST_KDRV_DS_GetDynamicScalingStatus_EXT)
#define MDRV_XC_IOC_DS_SET_CLIENT_EXT                _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_SET_CLIENT_EXT_NR, ST_KDRV_DS_SET_CLIENT_EXT)
#define MDRV_XC_IOC_DPU_SETMODSETTING                _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DPU_SETMODSETTING_NR, ST_KDRV_XC_DPU_SETTING)
#define MDRV_XC_IOC_DPU_GETMODSTATUS                 _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DPU_GETMODSTATUS_NR, ST_KDRV_XC_DPU_STATUS)
#define MDRV_XC_IOC_XC_INIT                          _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_XC_INIT_NR, MS_BOOL)
#define MDRV_XC_IOC_HSE_INIT                         _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_HSE_INIT_NR, ST_KDRV_XC_HSE_INFO)
#define MDRV_XC_IOC_HSE_CONTROL                      _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_HSE_CONTROL_NR, MS_BOOL)
#define MDRV_XC_IOC_GET_EMPACKET                     _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_GET_EMPACKET_NR, ST_KDRV_XC_EMP_INFO)
#define MDRV_XC_IOC_DS_SET_DSFORCE_INDEX_EXT         _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_SET_DSFORCE_INDEX_EXT_NR, ST_KDRV_DS_SET_DSForceIndex_EXT)
#define MDRV_XC_IOC_SET_EVENT                        _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_SET_EVENT_NR, ST_KDRV_XC_EVENT)
#define MDRV_XC_IOC_DS_GET_DS_CMD_COUNT_EXT          _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_DS_GET_CMD_COUNT_EXT_NR, ST_KDRV_DS_GET_CMD_COUNT_EXT)
#define MDRV_XC_IOC_ENABLE_PICTURE_MODE_WRITING      _IOWR(MDRV_XC_IOC_MAGIC, MDRV_XC_IOC_ENABLE_PICTURE_MODE_WRITING_NR, MS_BOOL)
#endif //_MDRV_XC_IO_H
