18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright 2014 Advanced Micro Devices, Inc.
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a
58c2ecf20Sopenharmony_ci * copy of this software and associated documentation files (the "Software"),
68c2ecf20Sopenharmony_ci * to deal in the Software without restriction, including without limitation
78c2ecf20Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense,
88c2ecf20Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the
98c2ecf20Sopenharmony_ci * Software is furnished to do so, subject to the following conditions:
108c2ecf20Sopenharmony_ci *
118c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice shall be included in
128c2ecf20Sopenharmony_ci * all copies or substantial portions of the Software.
138c2ecf20Sopenharmony_ci *
148c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
158c2ecf20Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
168c2ecf20Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
178c2ecf20Sopenharmony_ci * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
188c2ecf20Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
198c2ecf20Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
208c2ecf20Sopenharmony_ci * OTHER DEALINGS IN THE SOFTWARE.
218c2ecf20Sopenharmony_ci *
228c2ecf20Sopenharmony_ci */
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci#ifndef __ATOMBIOS_ENCODER_H__
258c2ecf20Sopenharmony_ci#define __ATOMBIOS_ENCODER_H__
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ciu8
288c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_get_backlight_level_from_reg(struct amdgpu_device *adev);
298c2ecf20Sopenharmony_civoid
308c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_set_backlight_level_to_reg(struct amdgpu_device *adev,
318c2ecf20Sopenharmony_ci						   u8 backlight_level);
328c2ecf20Sopenharmony_ciu8
338c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_get_backlight_level(struct amdgpu_encoder *amdgpu_encoder);
348c2ecf20Sopenharmony_civoid
358c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_set_backlight_level(struct amdgpu_encoder *amdgpu_encoder,
368c2ecf20Sopenharmony_ci				     u8 level);
378c2ecf20Sopenharmony_civoid amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder *amdgpu_encoder,
388c2ecf20Sopenharmony_ci				     struct drm_connector *drm_connector);
398c2ecf20Sopenharmony_civoid
408c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_fini_backlight(struct amdgpu_encoder *amdgpu_encoder);
418c2ecf20Sopenharmony_cibool amdgpu_atombios_encoder_is_digital(struct drm_encoder *encoder);
428c2ecf20Sopenharmony_cibool amdgpu_atombios_encoder_mode_fixup(struct drm_encoder *encoder,
438c2ecf20Sopenharmony_ci				 const struct drm_display_mode *mode,
448c2ecf20Sopenharmony_ci				 struct drm_display_mode *adjusted_mode);
458c2ecf20Sopenharmony_ciint amdgpu_atombios_encoder_get_encoder_mode(struct drm_encoder *encoder);
468c2ecf20Sopenharmony_civoid
478c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_setup_dig_encoder(struct drm_encoder *encoder,
488c2ecf20Sopenharmony_ci				   int action, int panel_mode);
498c2ecf20Sopenharmony_civoid
508c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_setup_dig_transmitter(struct drm_encoder *encoder, int action,
518c2ecf20Sopenharmony_ci				       uint8_t lane_num, uint8_t lane_set);
528c2ecf20Sopenharmony_cibool
538c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_set_edp_panel_power(struct drm_connector *connector,
548c2ecf20Sopenharmony_ci				     int action);
558c2ecf20Sopenharmony_civoid
568c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_dpms(struct drm_encoder *encoder, int mode);
578c2ecf20Sopenharmony_civoid
588c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_set_crtc_source(struct drm_encoder *encoder);
598c2ecf20Sopenharmony_civoid
608c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_init_dig(struct amdgpu_device *adev);
618c2ecf20Sopenharmony_cienum drm_connector_status
628c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_dac_detect(struct drm_encoder *encoder,
638c2ecf20Sopenharmony_ci			    struct drm_connector *connector);
648c2ecf20Sopenharmony_cienum drm_connector_status
658c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_dig_detect(struct drm_encoder *encoder,
668c2ecf20Sopenharmony_ci			    struct drm_connector *connector);
678c2ecf20Sopenharmony_civoid
688c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_setup_ext_encoder_ddc(struct drm_encoder *encoder);
698c2ecf20Sopenharmony_civoid
708c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_set_bios_scratch_regs(struct drm_connector *connector,
718c2ecf20Sopenharmony_ci				       struct drm_encoder *encoder,
728c2ecf20Sopenharmony_ci				       bool connected);
738c2ecf20Sopenharmony_cistruct amdgpu_encoder_atom_dig *
748c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_get_lcd_info(struct amdgpu_encoder *encoder);
758c2ecf20Sopenharmony_cistruct amdgpu_encoder_atom_dig *
768c2ecf20Sopenharmony_ciamdgpu_atombios_encoder_get_dig_info(struct amdgpu_encoder *amdgpu_encoder);
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci#endif
79