1 /* 2 * Copyright 2012-15 Advanced Micro Devices, Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included in 12 * all copies or substantial portions of the Software. 13 * 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 * OTHER DEALINGS IN THE SOFTWARE. 21 * 22 * Authors: AMD 23 * 24 */ 25 26 #ifndef __DAL_DDC_SERVICE_H__ 27 #define __DAL_DDC_SERVICE_H__ 28 29 #include "link.h" 30 31 #define AUX_POWER_UP_WA_DELAY 500 32 #define I2C_OVER_AUX_DEFER_WA_DELAY 70 33 #define DPVGA_DONGLE_AUX_DEFER_WA_DELAY 40 34 #define I2C_OVER_AUX_DEFER_WA_DELAY_1MS 1 35 #define LINK_AUX_DEFAULT_LTTPR_TIMEOUT_PERIOD 3200 /*us*/ 36 #define LINK_AUX_DEFAULT_TIMEOUT_PERIOD 552 /*us*/ 37 38 #define EDID_SEGMENT_SIZE 256 39 40 void set_ddc_transaction_type( 41 struct ddc_service *ddc, 42 enum ddc_transaction_type type); 43 44 bool try_to_configure_aux_timeout(struct ddc_service *ddc, 45 uint32_t timeout); 46 47 void write_scdc_data( 48 struct ddc_service *ddc_service, 49 uint32_t pix_clk, 50 bool lte_340_scramble); 51 52 void read_scdc_data( 53 struct ddc_service *ddc_service); 54 55 void set_dongle_type(struct ddc_service *ddc, 56 enum display_dongle_type dongle_type); 57 58 struct ddc *get_ddc_pin(struct ddc_service *ddc_service); 59 60 #endif /* __DAL_DDC_SERVICE_H__ */ 61 62