Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2015 Advanced Micro Devices, Inc.
0003  *
0004  * Permission is hereby granted, free of charge, to any person obtaining a
0005  * copy of this software and associated documentation files (the "Software"),
0006  * to deal in the Software without restriction, including without limitation
0007  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
0008  * and/or sell copies of the Software, and to permit persons to whom the
0009  * Software is furnished to do so, subject to the following conditions:
0010  *
0011  * The above copyright notice and this permission notice shall be included in
0012  * all copies or substantial portions of the Software.
0013  *
0014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
0017  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
0018  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
0019  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0020  * OTHER DEALINGS IN THE SOFTWARE.
0021  *
0022  * Authors: AMD
0023  *
0024  */
0025 
0026 #ifndef __DC_LINK_HWSS_H__
0027 #define __DC_LINK_HWSS_H__
0028 
0029 /* include basic type headers only */
0030 #include "dc_dp_types.h"
0031 #include "signal_types.h"
0032 #include "grph_object_id.h"
0033 #include "fixed31_32.h"
0034 
0035 /* forward declare dc core types */
0036 struct dc_link;
0037 struct link_resource;
0038 struct pipe_ctx;
0039 struct encoder_set_dp_phy_pattern_param;
0040 struct link_mst_stream_allocation_table;
0041 
0042 struct link_hwss_ext {
0043     /* function pointers below may require to check for NULL if caller
0044      * considers missing implementation as expected in some cases or none
0045      * critical to be investigated immediately
0046      * *********************************************************************
0047      */
0048     void (*set_hblank_min_symbol_width)(struct pipe_ctx *pipe_ctx,
0049             const struct dc_link_settings *link_settings,
0050             struct fixed31_32 throttled_vcp_size);
0051     void (*set_throttled_vcp_size)(struct pipe_ctx *pipe_ctx,
0052             struct fixed31_32 throttled_vcp_size);
0053     void (*enable_dp_link_output)(struct dc_link *link,
0054             const struct link_resource *link_res,
0055             enum signal_type signal,
0056             enum clock_source_id clock_source,
0057             const struct dc_link_settings *link_settings);
0058     void (*disable_dp_link_output)(struct dc_link *link,
0059             const struct link_resource *link_res,
0060             enum signal_type signal);
0061     void (*set_dp_link_test_pattern)(struct dc_link *link,
0062             const struct link_resource *link_res,
0063             struct encoder_set_dp_phy_pattern_param *tp_params);
0064     void (*set_dp_lane_settings)(struct dc_link *link,
0065             const struct link_resource *link_res,
0066             const struct dc_link_settings *link_settings,
0067             const struct dc_lane_settings lane_settings[LANE_COUNT_DP_MAX]);
0068     void (*update_stream_allocation_table)(struct dc_link *link,
0069             const struct link_resource *link_res,
0070             const struct link_mst_stream_allocation_table *table);
0071 };
0072 
0073 struct link_hwss {
0074     struct link_hwss_ext ext;
0075 
0076     /* function pointers below MUST be assigned to all types of link_hwss
0077      * *********************************************************************
0078      */
0079     void (*setup_stream_encoder)(struct pipe_ctx *pipe_ctx);
0080     void (*reset_stream_encoder)(struct pipe_ctx *pipe_ctx);
0081     void (*setup_stream_attribute)(struct pipe_ctx *pipe_ctx);
0082 };
0083 #endif /* __DC_LINK_HWSS_H__ */
0084