14562236bSHarry Wentland /* 24562236bSHarry Wentland * Copyright 2012-15 Advanced Micro Devices, Inc. 34562236bSHarry Wentland * 44562236bSHarry Wentland * Permission is hereby granted, free of charge, to any person obtaining a 54562236bSHarry Wentland * copy of this software and associated documentation files (the "Software"), 64562236bSHarry Wentland * to deal in the Software without restriction, including without limitation 74562236bSHarry Wentland * the rights to use, copy, modify, merge, publish, distribute, sublicense, 84562236bSHarry Wentland * and/or sell copies of the Software, and to permit persons to whom the 94562236bSHarry Wentland * Software is furnished to do so, subject to the following conditions: 104562236bSHarry Wentland * 114562236bSHarry Wentland * The above copyright notice and this permission notice shall be included in 124562236bSHarry Wentland * all copies or substantial portions of the Software. 134562236bSHarry Wentland * 144562236bSHarry Wentland * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 154562236bSHarry Wentland * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 164562236bSHarry Wentland * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 174562236bSHarry Wentland * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 184562236bSHarry Wentland * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 194562236bSHarry Wentland * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 204562236bSHarry Wentland * OTHER DEALINGS IN THE SOFTWARE. 214562236bSHarry Wentland * 224562236bSHarry Wentland * Authors: AMD 234562236bSHarry Wentland * 244562236bSHarry Wentland */ 254562236bSHarry Wentland 264562236bSHarry Wentland #ifndef __DAL_COMMAND_TABLE_H__ 274562236bSHarry Wentland #define __DAL_COMMAND_TABLE_H__ 284562236bSHarry Wentland 294562236bSHarry Wentland struct bios_parser; 304562236bSHarry Wentland struct bp_encoder_control; 314562236bSHarry Wentland 324562236bSHarry Wentland struct cmd_tbl { 334562236bSHarry Wentland enum bp_result (*dig_encoder_control)( 344562236bSHarry Wentland struct bios_parser *bp, 354562236bSHarry Wentland struct bp_encoder_control *control); 364562236bSHarry Wentland enum bp_result (*encoder_control_dig1)( 374562236bSHarry Wentland struct bios_parser *bp, 384562236bSHarry Wentland struct bp_encoder_control *control); 394562236bSHarry Wentland enum bp_result (*encoder_control_dig2)( 404562236bSHarry Wentland struct bios_parser *bp, 414562236bSHarry Wentland struct bp_encoder_control *control); 424562236bSHarry Wentland enum bp_result (*transmitter_control)( 434562236bSHarry Wentland struct bios_parser *bp, 444562236bSHarry Wentland struct bp_transmitter_control *control); 454562236bSHarry Wentland enum bp_result (*set_pixel_clock)( 464562236bSHarry Wentland struct bios_parser *bp, 474562236bSHarry Wentland struct bp_pixel_clock_parameters *bp_params); 484562236bSHarry Wentland enum bp_result (*enable_spread_spectrum_on_ppll)( 494562236bSHarry Wentland struct bios_parser *bp, 504562236bSHarry Wentland struct bp_spread_spectrum_parameters *bp_params, 514562236bSHarry Wentland bool enable); 524562236bSHarry Wentland enum bp_result (*adjust_display_pll)( 534562236bSHarry Wentland struct bios_parser *bp, 544562236bSHarry Wentland struct bp_adjust_pixel_clock_parameters *bp_params); 554562236bSHarry Wentland enum bp_result (*dac1_encoder_control)( 564562236bSHarry Wentland struct bios_parser *bp, 574562236bSHarry Wentland bool enable, 584562236bSHarry Wentland uint32_t pixel_clock, 594562236bSHarry Wentland uint8_t dac_standard); 604562236bSHarry Wentland enum bp_result (*dac2_encoder_control)( 614562236bSHarry Wentland struct bios_parser *bp, 624562236bSHarry Wentland bool enable, 634562236bSHarry Wentland uint32_t pixel_clock, 644562236bSHarry Wentland uint8_t dac_standard); 654562236bSHarry Wentland enum bp_result (*dac1_output_control)( 664562236bSHarry Wentland struct bios_parser *bp, 674562236bSHarry Wentland bool enable); 684562236bSHarry Wentland enum bp_result (*dac2_output_control)( 694562236bSHarry Wentland struct bios_parser *bp, 704562236bSHarry Wentland bool enable); 714562236bSHarry Wentland enum bp_result (*set_crtc_timing)( 724562236bSHarry Wentland struct bios_parser *bp, 734562236bSHarry Wentland struct bp_hw_crtc_timing_parameters *bp_params); 744562236bSHarry Wentland enum bp_result (*enable_crtc)( 754562236bSHarry Wentland struct bios_parser *bp, 764562236bSHarry Wentland enum controller_id controller_id, 774562236bSHarry Wentland bool enable); 784562236bSHarry Wentland enum bp_result (*enable_crtc_mem_req)( 794562236bSHarry Wentland struct bios_parser *bp, 804562236bSHarry Wentland enum controller_id controller_id, 814562236bSHarry Wentland bool enable); 824562236bSHarry Wentland enum bp_result (*program_clock)( 834562236bSHarry Wentland struct bios_parser *bp, 844562236bSHarry Wentland struct bp_pixel_clock_parameters *bp_params); 854562236bSHarry Wentland enum bp_result (*external_encoder_control)( 864562236bSHarry Wentland struct bios_parser *bp, 874562236bSHarry Wentland struct bp_external_encoder_control *cntl); 884562236bSHarry Wentland enum bp_result (*enable_disp_power_gating)( 894562236bSHarry Wentland struct bios_parser *bp, 904562236bSHarry Wentland enum controller_id crtc_id, 914562236bSHarry Wentland enum bp_pipe_control_action action); 924562236bSHarry Wentland enum bp_result (*set_dce_clock)( 934562236bSHarry Wentland struct bios_parser *bp, 944562236bSHarry Wentland struct bp_set_dce_clock_parameters *bp_params); 954562236bSHarry Wentland }; 964562236bSHarry Wentland 974562236bSHarry Wentland void dal_bios_parser_init_cmd_tbl(struct bios_parser *bp); 984562236bSHarry Wentland 994562236bSHarry Wentland #endif 100