Lines Matching refs:amdgpu_encoder
67 amdgpu_atombios_encoder_get_backlight_level(struct amdgpu_encoder *amdgpu_encoder) in amdgpu_atombios_encoder_get_backlight_level() argument
69 struct drm_device *dev = amdgpu_encoder->base.dev; in amdgpu_atombios_encoder_get_backlight_level()
79 amdgpu_atombios_encoder_set_backlight_level(struct amdgpu_encoder *amdgpu_encoder, in amdgpu_atombios_encoder_set_backlight_level() argument
82 struct drm_encoder *encoder = &amdgpu_encoder->base; in amdgpu_atombios_encoder_set_backlight_level()
83 struct drm_device *dev = amdgpu_encoder->base.dev; in amdgpu_atombios_encoder_set_backlight_level()
90 if ((amdgpu_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) && in amdgpu_atombios_encoder_set_backlight_level()
91 amdgpu_encoder->enc_priv) { in amdgpu_atombios_encoder_set_backlight_level()
92 dig = amdgpu_encoder->enc_priv; in amdgpu_atombios_encoder_set_backlight_level()
96 switch (amdgpu_encoder->encoder_id) { in amdgpu_atombios_encoder_set_backlight_level()
138 struct amdgpu_encoder *amdgpu_encoder = pdata->encoder; in amdgpu_atombios_encoder_update_backlight_status() local
140 amdgpu_atombios_encoder_set_backlight_level(amdgpu_encoder, in amdgpu_atombios_encoder_update_backlight_status()
150 struct amdgpu_encoder *amdgpu_encoder = pdata->encoder; in amdgpu_atombios_encoder_get_backlight_brightness() local
151 struct drm_device *dev = amdgpu_encoder->base.dev; in amdgpu_atombios_encoder_get_backlight_brightness()
162 void amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder *amdgpu_encoder, in amdgpu_atombios_encoder_init_backlight() argument
165 struct drm_device *dev = amdgpu_encoder->base.dev; in amdgpu_atombios_encoder_init_backlight()
181 if (!amdgpu_encoder->enc_priv) in amdgpu_atombios_encoder_init_backlight()
208 pdata->encoder = amdgpu_encoder; in amdgpu_atombios_encoder_init_backlight()
212 dig = amdgpu_encoder->enc_priv; in amdgpu_atombios_encoder_init_backlight()
229 amdgpu_atombios_encoder_fini_backlight(struct amdgpu_encoder *amdgpu_encoder) in amdgpu_atombios_encoder_fini_backlight() argument
231 struct drm_device *dev = amdgpu_encoder->base.dev; in amdgpu_atombios_encoder_fini_backlight()
236 if (!amdgpu_encoder->enc_priv) in amdgpu_atombios_encoder_fini_backlight()
245 dig = amdgpu_encoder->enc_priv; in amdgpu_atombios_encoder_fini_backlight()
262 void amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder *encoder) in amdgpu_atombios_encoder_init_backlight()
266 void amdgpu_atombios_encoder_fini_backlight(struct amdgpu_encoder *encoder) in amdgpu_atombios_encoder_fini_backlight()
274 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_is_digital() local
275 switch (amdgpu_encoder->encoder_id) { in amdgpu_atombios_encoder_is_digital()
291 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_mode_fixup() local
307 if (amdgpu_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT)) in amdgpu_atombios_encoder_mode_fixup()
309 else if (amdgpu_encoder->rmx_type != RMX_OFF) in amdgpu_atombios_encoder_mode_fixup()
312 if ((amdgpu_encoder->active_device & (ATOM_DEVICE_DFP_SUPPORT | ATOM_DEVICE_LCD_SUPPORT)) || in amdgpu_atombios_encoder_mode_fixup()
326 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_setup_dac() local
332 switch (amdgpu_encoder->encoder_id) { in amdgpu_atombios_encoder_setup_dac()
345 args.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_dac()
389 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_setup_dvo() local
406 if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dvo()
414 args.dvo.sDVOEncoder.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_dvo()
418 if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dvo()
424 args.dvo_v3.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_dvo()
430 args.dvo_v4.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_dvo()
449 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_get_encoder_mode() local
459 if ((amdgpu_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_DVO1) || in amdgpu_atombios_encoder_get_encoder_mode()
460 (amdgpu_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1)) in amdgpu_atombios_encoder_get_encoder_mode()
580 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_setup_dig_encoder() local
581 struct amdgpu_encoder_atom_dig *dig = amdgpu_encoder->enc_priv; in amdgpu_atombios_encoder_setup_dig_encoder()
614 args.v1.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_dig_encoder()
622 else if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_encoder()
629 switch (amdgpu_encoder->encoder_id) { in amdgpu_atombios_encoder_setup_dig_encoder()
649 args.v3.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_dig_encoder()
657 else if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_encoder()
669 args.v4.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_dig_encoder()
677 else if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_encoder()
714 amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_encoder()
719 cpu_to_le32(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_dig_encoder()
769 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_setup_dig_transmitter() local
770 struct amdgpu_encoder_atom_dig *dig = amdgpu_encoder->enc_priv; in amdgpu_atombios_encoder_setup_dig_transmitter()
819 switch (amdgpu_encoder->encoder_id) { in amdgpu_atombios_encoder_setup_dig_transmitter()
850 else if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_transmitter()
851 args.v1.usPixelClock = cpu_to_le16((amdgpu_encoder->pixel_clock / 2) / 10); in amdgpu_atombios_encoder_setup_dig_transmitter()
853 args.v1.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_dig_transmitter()
864 (amdgpu_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_UNIPHY)) { in amdgpu_atombios_encoder_setup_dig_transmitter()
866 !amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) { in amdgpu_atombios_encoder_setup_dig_transmitter()
890 else if (amdgpu_encoder->devices & (ATOM_DEVICE_DFP_SUPPORT)) { in amdgpu_atombios_encoder_setup_dig_transmitter()
893 if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_transmitter()
907 else if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_transmitter()
908 args.v2.usPixelClock = cpu_to_le16((amdgpu_encoder->pixel_clock / 2) / 10); in amdgpu_atombios_encoder_setup_dig_transmitter()
910 args.v2.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_dig_transmitter()
917 switch (amdgpu_encoder->encoder_id) { in amdgpu_atombios_encoder_setup_dig_transmitter()
932 } else if (amdgpu_encoder->devices & (ATOM_DEVICE_DFP_SUPPORT)) { in amdgpu_atombios_encoder_setup_dig_transmitter()
935 if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_transmitter()
949 else if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_transmitter()
950 args.v3.usPixelClock = cpu_to_le16((amdgpu_encoder->pixel_clock / 2) / 10); in amdgpu_atombios_encoder_setup_dig_transmitter()
952 args.v3.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_dig_transmitter()
957 else if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_transmitter()
977 switch (amdgpu_encoder->encoder_id) { in amdgpu_atombios_encoder_setup_dig_transmitter()
991 else if (amdgpu_encoder->devices & (ATOM_DEVICE_DFP_SUPPORT)) { in amdgpu_atombios_encoder_setup_dig_transmitter()
994 if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_transmitter()
1008 else if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_transmitter()
1009 args.v4.usPixelClock = cpu_to_le16((amdgpu_encoder->pixel_clock / 2) / 10); in amdgpu_atombios_encoder_setup_dig_transmitter()
1011 args.v4.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_dig_transmitter()
1016 else if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_transmitter()
1039 switch (amdgpu_encoder->encoder_id) { in amdgpu_atombios_encoder_setup_dig_transmitter()
1053 else if (amdgpu_encoder->devices & (ATOM_DEVICE_DFP_SUPPORT)) { in amdgpu_atombios_encoder_setup_dig_transmitter()
1056 if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_transmitter()
1065 args.v5.usSymClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_dig_transmitter()
1067 switch (amdgpu_encoder->encoder_id) { in amdgpu_atombios_encoder_setup_dig_transmitter()
1092 else if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_transmitter()
1106 else if (amdgpu_encoder->devices & (ATOM_DEVICE_DFP_SUPPORT)) { in amdgpu_atombios_encoder_setup_dig_transmitter()
1122 args.v6.ulSymClock = cpu_to_le32(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_dig_transmitter()
1124 switch (amdgpu_encoder->encoder_id) { in amdgpu_atombios_encoder_setup_dig_transmitter()
1149 else if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_dig_transmitter()
1232 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_setup_external_encoder() local
1233 struct amdgpu_encoder *ext_amdgpu_encoder = to_amdgpu_encoder(ext_encoder); in amdgpu_atombios_encoder_setup_external_encoder()
1273 args.v1.sDigEncoder.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_external_encoder()
1281 } else if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_external_encoder()
1291 args.v3.sExtEncoder.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10); in amdgpu_atombios_encoder_setup_external_encoder()
1301 } else if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock)) in amdgpu_atombios_encoder_setup_external_encoder()
1333 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_setup_dig() local
1335 struct amdgpu_encoder_atom_dig *dig = amdgpu_encoder->enc_priv; in amdgpu_atombios_encoder_setup_dig()
1377 if (amdgpu_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) in amdgpu_atombios_encoder_setup_dig()
1378 amdgpu_atombios_encoder_set_backlight_level(amdgpu_encoder, dig->backlight_level); in amdgpu_atombios_encoder_setup_dig()
1388 if (amdgpu_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) in amdgpu_atombios_encoder_setup_dig()
1412 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_dpms() local
1415 amdgpu_encoder->encoder_id, mode, amdgpu_encoder->devices, in amdgpu_atombios_encoder_dpms()
1416 amdgpu_encoder->active_device); in amdgpu_atombios_encoder_dpms()
1417 switch (amdgpu_encoder->encoder_id) { in amdgpu_atombios_encoder_dpms()
1473 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_set_crtc_source() local
1491 switch (amdgpu_encoder->encoder_id) { in amdgpu_atombios_encoder_set_crtc_source()
1498 if (amdgpu_encoder->devices & ATOM_DEVICE_LCD1_SUPPORT) in amdgpu_atombios_encoder_set_crtc_source()
1510 if (amdgpu_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT)) in amdgpu_atombios_encoder_set_crtc_source()
1512 else if (amdgpu_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT)) in amdgpu_atombios_encoder_set_crtc_source()
1519 if (amdgpu_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT)) in amdgpu_atombios_encoder_set_crtc_source()
1521 else if (amdgpu_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT)) in amdgpu_atombios_encoder_set_crtc_source()
1539 } else if (amdgpu_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) { in amdgpu_atombios_encoder_set_crtc_source()
1544 switch (amdgpu_encoder->encoder_id) { in amdgpu_atombios_encoder_set_crtc_source()
1550 dig = amdgpu_encoder->enc_priv; in amdgpu_atombios_encoder_set_crtc_source()
1579 if (amdgpu_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT)) in amdgpu_atombios_encoder_set_crtc_source()
1581 else if (amdgpu_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT)) in amdgpu_atombios_encoder_set_crtc_source()
1587 if (amdgpu_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT)) in amdgpu_atombios_encoder_set_crtc_source()
1589 else if (amdgpu_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT)) in amdgpu_atombios_encoder_set_crtc_source()
1607 } else if (amdgpu_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) { in amdgpu_atombios_encoder_set_crtc_source()
1613 switch (amdgpu_encoder->encoder_id) { in amdgpu_atombios_encoder_set_crtc_source()
1619 dig = amdgpu_encoder->enc_priv; in amdgpu_atombios_encoder_set_crtc_source()
1648 if (amdgpu_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT)) in amdgpu_atombios_encoder_set_crtc_source()
1650 else if (amdgpu_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT)) in amdgpu_atombios_encoder_set_crtc_source()
1656 if (amdgpu_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT)) in amdgpu_atombios_encoder_set_crtc_source()
1658 else if (amdgpu_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT)) in amdgpu_atombios_encoder_set_crtc_source()
1683 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_init_dig() local
1686 switch (amdgpu_encoder->encoder_id) { in amdgpu_atombios_encoder_init_dig()
1708 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_dac_load_detect() local
1711 if (amdgpu_encoder->devices & (ATOM_DEVICE_TV_SUPPORT | in amdgpu_atombios_encoder_dac_load_detect()
1725 if ((amdgpu_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_DAC1) || in amdgpu_atombios_encoder_dac_load_detect()
1726 (amdgpu_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1)) in amdgpu_atombios_encoder_dac_load_detect()
1758 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_dac_detect() local
1769 DRM_DEBUG_KMS("Bios 0 scratch %x %08x\n", bios_0_scratch, amdgpu_encoder->devices); in amdgpu_atombios_encoder_dac_detect()
1797 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_dig_detect() local
1814 DRM_DEBUG_KMS("Bios 0 scratch %x %08x\n", bios_0_scratch, amdgpu_encoder->devices); in amdgpu_atombios_encoder_dig_detect()
1857 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); in amdgpu_atombios_encoder_set_bios_scratch_regs() local
1864 if ((amdgpu_encoder->devices & ATOM_DEVICE_LCD1_SUPPORT) && in amdgpu_atombios_encoder_set_bios_scratch_regs()
1878 if ((amdgpu_encoder->devices & ATOM_DEVICE_CRT1_SUPPORT) && in amdgpu_atombios_encoder_set_bios_scratch_regs()
1892 if ((amdgpu_encoder->devices & ATOM_DEVICE_CRT2_SUPPORT) && in amdgpu_atombios_encoder_set_bios_scratch_regs()
1906 if ((amdgpu_encoder->devices & ATOM_DEVICE_DFP1_SUPPORT) && in amdgpu_atombios_encoder_set_bios_scratch_regs()
1920 if ((amdgpu_encoder->devices & ATOM_DEVICE_DFP2_SUPPORT) && in amdgpu_atombios_encoder_set_bios_scratch_regs()
1934 if ((amdgpu_encoder->devices & ATOM_DEVICE_DFP3_SUPPORT) && in amdgpu_atombios_encoder_set_bios_scratch_regs()
1948 if ((amdgpu_encoder->devices & ATOM_DEVICE_DFP4_SUPPORT) && in amdgpu_atombios_encoder_set_bios_scratch_regs()
1962 if ((amdgpu_encoder->devices & ATOM_DEVICE_DFP5_SUPPORT) && in amdgpu_atombios_encoder_set_bios_scratch_regs()
1976 if ((amdgpu_encoder->devices & ATOM_DEVICE_DFP6_SUPPORT) && in amdgpu_atombios_encoder_set_bios_scratch_regs()
2002 amdgpu_atombios_encoder_get_lcd_info(struct amdgpu_encoder *encoder) in amdgpu_atombios_encoder_get_lcd_info()
2142 amdgpu_atombios_encoder_get_dig_info(struct amdgpu_encoder *amdgpu_encoder) in amdgpu_atombios_encoder_get_dig_info() argument
2144 int encoder_enum = (amdgpu_encoder->encoder_enum & ENUM_ID_MASK) >> ENUM_ID_SHIFT; in amdgpu_atombios_encoder_get_dig_info()