1*b843c749SSergey Zigachev /* 2*b843c749SSergey Zigachev * Copyright 2014 Advanced Micro Devices, Inc. 3*b843c749SSergey Zigachev * 4*b843c749SSergey Zigachev * Permission is hereby granted, free of charge, to any person obtaining a 5*b843c749SSergey Zigachev * copy of this software and associated documentation files (the "Software"), 6*b843c749SSergey Zigachev * to deal in the Software without restriction, including without limitation 7*b843c749SSergey Zigachev * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8*b843c749SSergey Zigachev * and/or sell copies of the Software, and to permit persons to whom the 9*b843c749SSergey Zigachev * Software is furnished to do so, subject to the following conditions: 10*b843c749SSergey Zigachev * 11*b843c749SSergey Zigachev * The above copyright notice and this permission notice shall be included in 12*b843c749SSergey Zigachev * all copies or substantial portions of the Software. 13*b843c749SSergey Zigachev * 14*b843c749SSergey Zigachev * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15*b843c749SSergey Zigachev * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16*b843c749SSergey Zigachev * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17*b843c749SSergey Zigachev * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18*b843c749SSergey Zigachev * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19*b843c749SSergey Zigachev * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20*b843c749SSergey Zigachev * OTHER DEALINGS IN THE SOFTWARE. 21*b843c749SSergey Zigachev * 22*b843c749SSergey Zigachev */ 23*b843c749SSergey Zigachev 24*b843c749SSergey Zigachev #ifndef __ATOMBIOS_ENCODER_H__ 25*b843c749SSergey Zigachev #define __ATOMBIOS_ENCODER_H__ 26*b843c749SSergey Zigachev 27*b843c749SSergey Zigachev u8 28*b843c749SSergey Zigachev amdgpu_atombios_encoder_get_backlight_level_from_reg(struct amdgpu_device *adev); 29*b843c749SSergey Zigachev void 30*b843c749SSergey Zigachev amdgpu_atombios_encoder_set_backlight_level_to_reg(struct amdgpu_device *adev, 31*b843c749SSergey Zigachev u8 backlight_level); 32*b843c749SSergey Zigachev u8 33*b843c749SSergey Zigachev amdgpu_atombios_encoder_get_backlight_level(struct amdgpu_encoder *amdgpu_encoder); 34*b843c749SSergey Zigachev void 35*b843c749SSergey Zigachev amdgpu_atombios_encoder_set_backlight_level(struct amdgpu_encoder *amdgpu_encoder, 36*b843c749SSergey Zigachev u8 level); 37*b843c749SSergey Zigachev void amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder *amdgpu_encoder, 38*b843c749SSergey Zigachev struct drm_connector *drm_connector); 39*b843c749SSergey Zigachev void 40*b843c749SSergey Zigachev amdgpu_atombios_encoder_fini_backlight(struct amdgpu_encoder *amdgpu_encoder); 41*b843c749SSergey Zigachev bool amdgpu_atombios_encoder_is_digital(struct drm_encoder *encoder); 42*b843c749SSergey Zigachev bool amdgpu_atombios_encoder_mode_fixup(struct drm_encoder *encoder, 43*b843c749SSergey Zigachev const struct drm_display_mode *mode, 44*b843c749SSergey Zigachev struct drm_display_mode *adjusted_mode); 45*b843c749SSergey Zigachev int amdgpu_atombios_encoder_get_encoder_mode(struct drm_encoder *encoder); 46*b843c749SSergey Zigachev void 47*b843c749SSergey Zigachev amdgpu_atombios_encoder_setup_dig_encoder(struct drm_encoder *encoder, 48*b843c749SSergey Zigachev int action, int panel_mode); 49*b843c749SSergey Zigachev void 50*b843c749SSergey Zigachev amdgpu_atombios_encoder_setup_dig_transmitter(struct drm_encoder *encoder, int action, 51*b843c749SSergey Zigachev uint8_t lane_num, uint8_t lane_set); 52*b843c749SSergey Zigachev bool 53*b843c749SSergey Zigachev amdgpu_atombios_encoder_set_edp_panel_power(struct drm_connector *connector, 54*b843c749SSergey Zigachev int action); 55*b843c749SSergey Zigachev void 56*b843c749SSergey Zigachev amdgpu_atombios_encoder_dpms(struct drm_encoder *encoder, int mode); 57*b843c749SSergey Zigachev void 58*b843c749SSergey Zigachev amdgpu_atombios_encoder_set_crtc_source(struct drm_encoder *encoder); 59*b843c749SSergey Zigachev void 60*b843c749SSergey Zigachev amdgpu_atombios_encoder_init_dig(struct amdgpu_device *adev); 61*b843c749SSergey Zigachev enum drm_connector_status 62*b843c749SSergey Zigachev amdgpu_atombios_encoder_dac_detect(struct drm_encoder *encoder, 63*b843c749SSergey Zigachev struct drm_connector *connector); 64*b843c749SSergey Zigachev enum drm_connector_status 65*b843c749SSergey Zigachev amdgpu_atombios_encoder_dig_detect(struct drm_encoder *encoder, 66*b843c749SSergey Zigachev struct drm_connector *connector); 67*b843c749SSergey Zigachev void 68*b843c749SSergey Zigachev amdgpu_atombios_encoder_setup_ext_encoder_ddc(struct drm_encoder *encoder); 69*b843c749SSergey Zigachev void 70*b843c749SSergey Zigachev amdgpu_atombios_encoder_set_bios_scratch_regs(struct drm_connector *connector, 71*b843c749SSergey Zigachev struct drm_encoder *encoder, 72*b843c749SSergey Zigachev bool connected); 73*b843c749SSergey Zigachev struct amdgpu_encoder_atom_dig * 74*b843c749SSergey Zigachev amdgpu_atombios_encoder_get_lcd_info(struct amdgpu_encoder *encoder); 75*b843c749SSergey Zigachev struct amdgpu_encoder_atom_dig * 76*b843c749SSergey Zigachev amdgpu_atombios_encoder_get_dig_info(struct amdgpu_encoder *amdgpu_encoder); 77*b843c749SSergey Zigachev 78*b843c749SSergey Zigachev #endif 79