linux/drivers/gpu/drm/amd/amdgpu/ta_secureDisplay_if.h

/*
 * Copyright 2019 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.
 *
 */

#ifndef _TA_SECUREDISPLAY_IF_H
#define _TA_SECUREDISPLAY_IF_H

/** Secure Display related enumerations */
/**********************************************************/

/** @enum ta_securedisplay_command
 *    Secure Display Command ID
 */
enum ta_securedisplay_command {};

/** @enum ta_securedisplay_status
 *    Secure Display status returns in shared buffer status
 */
enum ta_securedisplay_status {};

/** @enum ta_securedisplay_phy_ID
 *    Physical ID number to use for reading corresponding DIO Scratch register for ROI
 */
enum  ta_securedisplay_phy_ID {};

/** @enum ta_securedisplay_ta_query_cmd_ret
 *    A predefined specific reteurn value which is 0xAB only used to validate
 *    communication to Secure Display TA is functional.
 *    This value is used to validate whether TA is responding successfully
 */
enum ta_securedisplay_ta_query_cmd_ret {};

/** @enum ta_securedisplay_buffer_size
 *    I2C Buffer size which contains 8 bytes of ROI  (X start, X end, Y start, Y end)
 *    and 6 bytes of CRC( R,G,B) and 1  byte for physical ID
 */
enum ta_securedisplay_buffer_size {};

/** Input/output structures for Secure Display commands */
/**********************************************************/
/**
 * Input structures
 */

/** @struct ta_securedisplay_send_roi_crc_input
 *    Physical ID to determine which DIO scratch register should be used to get ROI
 */
struct ta_securedisplay_send_roi_crc_input {};

/** @union ta_securedisplay_cmd_input
 *    Input buffer
 */
ta_securedisplay_cmd_input;

/**
 * Output structures
 */

/** @struct ta_securedisplay_query_ta_output
 *  Output buffer format for query TA whether TA is responding used only for validation purpose
 */
struct ta_securedisplay_query_ta_output {};

/** @struct ta_securedisplay_send_roi_crc_output
 *  Output buffer format for send ROI CRC command which will pass I2c buffer created inside TA
 *  and used to write to I2C used only for validation purpose
 */
struct ta_securedisplay_send_roi_crc_output {};

/** @union ta_securedisplay_cmd_output
 *    Output buffer
 */
ta_securedisplay_cmd_output;

/** @struct ta_securedisplay_cmd
*    Secure display command which is shared buffer memory
*/
struct ta_securedisplay_cmd {};

#endif   //_TA_SECUREDISPLAY_IF_H