Lines Matching full:encoder

100 	struct drm_encoder *encoder = &radeon_encoder->base;  in atombios_set_backlight_level()  local
136 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_LCD_BLOFF, 0, 0); in atombios_set_backlight_level()
138 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL, 0, 0); in atombios_set_backlight_level()
139 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_LCD_BLON, 0, 0); in atombios_set_backlight_level()
166 struct radeon_encoder *radeon_encoder = pdata->encoder; in radeon_atom_backlight_update_status()
176 struct radeon_encoder *radeon_encoder = pdata->encoder; in radeon_atom_backlight_get_brightness()
239 pdata->encoder = radeon_encoder; in radeon_atom_backlight_init()
296 static bool radeon_atom_mode_fixup(struct drm_encoder *encoder, in radeon_atom_mode_fixup() argument
300 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_mode_fixup()
301 struct drm_device *dev = encoder->dev; in radeon_atom_mode_fixup()
304 /* set the active encoder to connector routing */ in radeon_atom_mode_fixup()
305 radeon_encoder_set_active_device(encoder); in radeon_atom_mode_fixup()
319 radeon_panel_mode_fixup(encoder, adjusted_mode); in radeon_atom_mode_fixup()
331 radeon_panel_mode_fixup(encoder, adjusted_mode); in radeon_atom_mode_fixup()
336 (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE))) { in radeon_atom_mode_fixup()
337 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_atom_mode_fixup()
345 atombios_dac_setup(struct drm_encoder *encoder, int action) in atombios_dac_setup() argument
347 struct drm_device *dev = encoder->dev; in atombios_dac_setup()
349 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_dac_setup()
397 atombios_tv_setup(struct drm_encoder *encoder, int action) in atombios_tv_setup() argument
399 struct drm_device *dev = encoder->dev; in atombios_tv_setup()
401 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_tv_setup()
452 static u8 radeon_atom_get_bpc(struct drm_encoder *encoder) in radeon_atom_get_bpc() argument
456 if (encoder->crtc) { in radeon_atom_get_bpc()
457 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in radeon_atom_get_bpc()
486 atombios_dvo_setup(struct drm_encoder *encoder, int action) in atombios_dvo_setup() argument
488 struct drm_device *dev = encoder->dev; in atombios_dvo_setup()
490 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_dvo_setup()
511 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dvo_setup()
523 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dvo_setup()
537 args.dvo_v4.ucBitPerColor = radeon_atom_get_bpc(encoder); in atombios_dvo_setup()
558 atombios_digital_setup(struct drm_encoder *encoder, int action) in atombios_digital_setup() argument
560 struct drm_device *dev = encoder->dev; in atombios_digital_setup()
562 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_digital_setup()
572 if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) in atombios_digital_setup()
614 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_digital_setup()
653 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_digital_setup()
671 atombios_get_encoder_mode(struct drm_encoder *encoder) in atombios_get_encoder_mode() argument
673 struct drm_device *dev = encoder->dev; in atombios_get_encoder_mode()
675 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_get_encoder_mode()
681 if (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE) in atombios_get_encoder_mode()
689 connector = radeon_get_connector_for_encoder(encoder); in atombios_get_encoder_mode()
691 * the connectors tied to the encoder. in atombios_get_encoder_mode()
694 connector = radeon_get_connector_for_encoder_init(encoder); in atombios_get_encoder_mode()
777 * DIG Encoder/Transmitter Setup
782 * - 2 DIG encoder blocks.
789 * - 2 DIG encoder blocks.
795 * - 6 DIG encoder blocks.
807 * - 2 DIG encoder blocks.
815 * crtc -> dig encoder -> UNIPHY/LVTMA (1 or 2 links)
831 atombios_dig_encoder_setup2(struct drm_encoder *encoder, int action, int panel_mode, int enc_overri… in atombios_dig_encoder_setup2() argument
833 struct drm_device *dev = encoder->dev; in atombios_dig_encoder_setup2()
835 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_dig_encoder_setup2()
837 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in atombios_dig_encoder_setup2()
855 /* no dig encoder assigned */ in atombios_dig_encoder_setup2()
882 args.v1.ucEncoderMode = atombios_get_encoder_mode(encoder); in atombios_dig_encoder_setup2()
886 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_encoder_setup2()
919 args.v3.ucEncoderMode = atombios_get_encoder_mode(encoder); in atombios_dig_encoder_setup2()
923 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_encoder_setup2()
934 args.v3.ucBitPerColor = radeon_atom_get_bpc(encoder); in atombios_dig_encoder_setup2()
942 args.v4.ucEncoderMode = atombios_get_encoder_mode(encoder); in atombios_dig_encoder_setup2()
946 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_encoder_setup2()
966 args.v4.ucBitPerColor = radeon_atom_get_bpc(encoder); in atombios_dig_encoder_setup2()
987 atombios_dig_encoder_setup(struct drm_encoder *encoder, int action, int panel_mode) in atombios_dig_encoder_setup() argument
989 atombios_dig_encoder_setup2(encoder, action, panel_mode, -1); in atombios_dig_encoder_setup()
1001 atombios_dig_transmitter_setup2(struct drm_encoder *encoder, int action, uint8_t lane_num, uint8_t … in atombios_dig_transmitter_setup2() argument
1003 struct drm_device *dev = encoder->dev; in atombios_dig_transmitter_setup2()
1005 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_dig_transmitter_setup2()
1021 connector = radeon_get_connector_for_encoder_init(encoder); in atombios_dig_transmitter_setup2()
1022 /* just needed to avoid bailing in the encoder check. the encoder in atombios_dig_transmitter_setup2()
1027 connector = radeon_get_connector_for_encoder(encoder); in atombios_dig_transmitter_setup2()
1042 if (encoder->crtc) { in atombios_dig_transmitter_setup2()
1043 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in atombios_dig_transmitter_setup2()
1047 /* no dig encoder assigned */ in atombios_dig_transmitter_setup2()
1051 if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder))) in atombios_dig_transmitter_setup2()
1087 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1103 !radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) { in atombios_dig_transmitter_setup2()
1130 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1144 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1172 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1186 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1194 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1231 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1245 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1253 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1293 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1329 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1334 args.v5.ucDigMode = atombios_get_encoder_mode(encoder); in atombios_dig_transmitter_setup2()
1368 atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t lane_num, uint8_t l… in atombios_dig_transmitter_setup() argument
1370 atombios_dig_transmitter_setup2(encoder, action, lane_num, lane_set, -1); in atombios_dig_transmitter_setup()
1423 atombios_external_encoder_setup(struct drm_encoder *encoder, in atombios_external_encoder_setup() argument
1427 struct drm_device *dev = encoder->dev; in atombios_external_encoder_setup()
1429 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_external_encoder_setup()
1441 connector = radeon_get_connector_for_encoder_init(encoder); in atombios_external_encoder_setup()
1443 connector = radeon_get_connector_for_encoder(encoder); in atombios_external_encoder_setup()
1471 args.v1.sDigEncoder.ucEncoderMode = atombios_get_encoder_mode(encoder); in atombios_external_encoder_setup()
1477 } else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_external_encoder_setup()
1488 args.v3.sExtEncoder.ucEncoderMode = atombios_get_encoder_mode(encoder); in atombios_external_encoder_setup()
1496 } else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_external_encoder_setup()
1511 args.v3.sExtEncoder.ucBitPerColor = radeon_atom_get_bpc(encoder); in atombios_external_encoder_setup()
1526 atombios_yuv_setup(struct drm_encoder *encoder, bool enable) in atombios_yuv_setup() argument
1528 struct drm_device *dev = encoder->dev; in atombios_yuv_setup()
1530 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_yuv_setup()
1531 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in atombios_yuv_setup()
1563 radeon_atom_encoder_dpms_avivo(struct drm_encoder *encoder, int mode) in radeon_atom_encoder_dpms_avivo() argument
1565 struct drm_device *dev = encoder->dev; in radeon_atom_encoder_dpms_avivo()
1567 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_encoder_dpms_avivo()
1650 radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode) in radeon_atom_encoder_dpms_dig() argument
1652 struct drm_device *dev = encoder->dev; in radeon_atom_encoder_dpms_dig()
1654 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_encoder_dpms_dig()
1655 struct drm_encoder *ext_encoder = radeon_get_external_encoder(encoder); in radeon_atom_encoder_dpms_dig()
1657 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_atom_encoder_dpms_dig()
1678 dig->panel_mode = radeon_dp_get_panel_mode(encoder, connector); in radeon_atom_encoder_dpms_dig()
1680 /* setup and enable the encoder */ in radeon_atom_encoder_dpms_dig()
1681 atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_SETUP, 0); in radeon_atom_encoder_dpms_dig()
1682 atombios_dig_encoder_setup(encoder, in radeon_atom_encoder_dpms_dig()
1687 atombios_external_encoder_setup(encoder, ext_encoder, in radeon_atom_encoder_dpms_dig()
1691 /* setup and enable the encoder */ in radeon_atom_encoder_dpms_dig()
1692 atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_SETUP, 0); in radeon_atom_encoder_dpms_dig()
1694 /* setup and enable the encoder and transmitter */ in radeon_atom_encoder_dpms_dig()
1695 atombios_dig_encoder_setup(encoder, ATOM_ENABLE, 0); in radeon_atom_encoder_dpms_dig()
1696 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_SETUP, 0, 0); in radeon_atom_encoder_dpms_dig()
1698 if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) { in radeon_atom_encoder_dpms_dig()
1706 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0); in radeon_atom_encoder_dpms_dig()
1707 if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) { in radeon_atom_encoder_dpms_dig()
1709 radeon_dp_link_train(encoder, connector); in radeon_atom_encoder_dpms_dig()
1711 atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_ON, 0); in radeon_atom_encoder_dpms_dig()
1717 atombios_dig_transmitter_setup(encoder, in radeon_atom_encoder_dpms_dig()
1721 atombios_external_encoder_setup(encoder, ext_encoder, ATOM_ENABLE); in radeon_atom_encoder_dpms_dig()
1728 if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) in radeon_atom_encoder_dpms_dig()
1729 atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_OFF, 0); in radeon_atom_encoder_dpms_dig()
1732 atombios_external_encoder_setup(encoder, ext_encoder, ATOM_DISABLE); in radeon_atom_encoder_dpms_dig()
1734 atombios_dig_transmitter_setup(encoder, in radeon_atom_encoder_dpms_dig()
1737 if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && in radeon_atom_encoder_dpms_dig()
1742 atombios_dig_transmitter_setup(encoder, in radeon_atom_encoder_dpms_dig()
1745 /* disable the encoder and transmitter */ in radeon_atom_encoder_dpms_dig()
1746 atombios_dig_transmitter_setup(encoder, in radeon_atom_encoder_dpms_dig()
1748 atombios_dig_encoder_setup(encoder, ATOM_DISABLE, 0); in radeon_atom_encoder_dpms_dig()
1750 if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) { in radeon_atom_encoder_dpms_dig()
1764 radeon_atom_encoder_dpms(struct drm_encoder *encoder, int mode) in radeon_atom_encoder_dpms() argument
1766 struct drm_device *dev = encoder->dev; in radeon_atom_encoder_dpms()
1768 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_encoder_dpms()
1769 int encoder_mode = atombios_get_encoder_mode(encoder); in radeon_atom_encoder_dpms()
1771 DRM_DEBUG_KMS("encoder dpms %d to mode %d, devices %08x, active_devices %08x\n", in radeon_atom_encoder_dpms()
1778 radeon_audio_dpms(encoder, mode); in radeon_atom_encoder_dpms()
1789 radeon_atom_encoder_dpms_avivo(encoder, mode); in radeon_atom_encoder_dpms()
1796 radeon_atom_encoder_dpms_dig(encoder, mode); in radeon_atom_encoder_dpms()
1802 atombios_dvo_setup(encoder, ATOM_ENABLE); in radeon_atom_encoder_dpms()
1807 atombios_dvo_setup(encoder, ATOM_DISABLE); in radeon_atom_encoder_dpms()
1811 radeon_atom_encoder_dpms_dig(encoder, mode); in radeon_atom_encoder_dpms()
1813 radeon_atom_encoder_dpms_avivo(encoder, mode); in radeon_atom_encoder_dpms()
1820 atombios_dac_setup(encoder, ATOM_ENABLE); in radeon_atom_encoder_dpms()
1825 atombios_dac_setup(encoder, ATOM_DISABLE); in radeon_atom_encoder_dpms()
1829 radeon_atom_encoder_dpms_avivo(encoder, mode); in radeon_atom_encoder_dpms()
1835 radeon_atombios_encoder_dpms_scratch_regs(encoder, (mode == DRM_MODE_DPMS_ON) ? true : false); in radeon_atom_encoder_dpms()
1845 atombios_set_encoder_crtc_source(struct drm_encoder *encoder) in atombios_set_encoder_crtc_source() argument
1847 struct drm_device *dev = encoder->dev; in atombios_set_encoder_crtc_source()
1849 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_set_encoder_crtc_source()
1850 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in atombios_set_encoder_crtc_source()
1913 if (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE) { in atombios_set_encoder_crtc_source()
1914 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in atombios_set_encoder_crtc_source()
1921 args.v2.ucEncodeMode = atombios_get_encoder_mode(encoder); in atombios_set_encoder_crtc_source()
1925 args.v2.ucEncodeMode = atombios_get_encoder_mode(encoder); in atombios_set_encoder_crtc_source()
1989 radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); in atombios_set_encoder_crtc_source()
1993 atombios_apply_encoder_quirks(struct drm_encoder *encoder, in atombios_apply_encoder_quirks() argument
1996 struct drm_device *dev = encoder->dev; in atombios_apply_encoder_quirks()
1998 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_apply_encoder_quirks()
1999 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in atombios_apply_encoder_quirks()
2047 int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder, int fe_idx) in radeon_atom_pick_dig_encoder() argument
2049 struct drm_device *dev = encoder->dev; in radeon_atom_pick_dig_encoder()
2051 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in radeon_atom_pick_dig_encoder()
2052 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_pick_dig_encoder()
2126 * On DCE32 any encoder can drive any block so usually just use crtc id, in radeon_atom_pick_dig_encoder()
2144 if (encoder == test_encoder) in radeon_atom_pick_dig_encoder()
2159 DRM_ERROR("LVDS required digital encoder 2 but it was in use - stealing\n"); in radeon_atom_pick_dig_encoder()
2168 DRM_ERROR("Got encoder index incorrect - returning 0\n"); in radeon_atom_pick_dig_encoder()
2172 DRM_ERROR("chosen encoder in use %d\n", enc_idx); in radeon_atom_pick_dig_encoder()
2183 struct drm_encoder *encoder; in radeon_atom_encoder_init() local
2185 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { in radeon_atom_encoder_init()
2186 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_encoder_init()
2187 struct drm_encoder *ext_encoder = radeon_get_external_encoder(encoder); in radeon_atom_encoder_init()
2195 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_INIT, 0, 0); in radeon_atom_encoder_init()
2202 atombios_external_encoder_setup(encoder, ext_encoder, in radeon_atom_encoder_init()
2208 radeon_atom_encoder_mode_set(struct drm_encoder *encoder, in radeon_atom_encoder_mode_set() argument
2212 struct drm_device *dev = encoder->dev; in radeon_atom_encoder_mode_set()
2214 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_encoder_mode_set()
2215 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_atom_encoder_mode_set()
2221 radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF); in radeon_atom_encoder_mode_set()
2225 atombios_yuv_setup(encoder, true); in radeon_atom_encoder_mode_set()
2227 atombios_yuv_setup(encoder, false); in radeon_atom_encoder_mode_set()
2235 atombios_digital_setup(encoder, PANEL_ENCODER_ACTION_ENABLE); in radeon_atom_encoder_mode_set()
2247 atombios_dvo_setup(encoder, ATOM_ENABLE); in radeon_atom_encoder_mode_set()
2253 atombios_dac_setup(encoder, ATOM_ENABLE); in radeon_atom_encoder_mode_set()
2256 atombios_tv_setup(encoder, ATOM_ENABLE); in radeon_atom_encoder_mode_set()
2258 atombios_tv_setup(encoder, ATOM_DISABLE); in radeon_atom_encoder_mode_set()
2263 atombios_apply_encoder_quirks(encoder, adjusted_mode); in radeon_atom_encoder_mode_set()
2265 encoder_mode = atombios_get_encoder_mode(encoder); in radeon_atom_encoder_mode_set()
2269 radeon_audio_mode_set(encoder, adjusted_mode); in radeon_atom_encoder_mode_set()
2273 atombios_dac_load_detect(struct drm_encoder *encoder, struct drm_connector *connector) in atombios_dac_load_detect() argument
2275 struct drm_device *dev = encoder->dev; in atombios_dac_load_detect()
2277 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_dac_load_detect()
2322 radeon_atom_dac_detect(struct drm_encoder *encoder, struct drm_connector *connector) in radeon_atom_dac_detect() argument
2324 struct drm_device *dev = encoder->dev; in radeon_atom_dac_detect()
2326 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_dac_detect()
2330 if (!atombios_dac_load_detect(encoder, connector)) { in radeon_atom_dac_detect()
2363 radeon_atom_dig_detect(struct drm_encoder *encoder, struct drm_connector *connector) in radeon_atom_dig_detect() argument
2365 struct drm_device *dev = encoder->dev; in radeon_atom_dig_detect()
2367 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_dig_detect()
2369 struct drm_encoder *ext_encoder = radeon_get_external_encoder(encoder); in radeon_atom_dig_detect()
2382 atombios_external_encoder_setup(encoder, ext_encoder, in radeon_atom_dig_detect()
2410 radeon_atom_ext_encoder_setup_ddc(struct drm_encoder *encoder) in radeon_atom_ext_encoder_setup_ddc() argument
2412 struct drm_encoder *ext_encoder = radeon_get_external_encoder(encoder); in radeon_atom_ext_encoder_setup_ddc()
2416 atombios_external_encoder_setup(encoder, ext_encoder, in radeon_atom_ext_encoder_setup_ddc()
2421 static void radeon_atom_encoder_prepare(struct drm_encoder *encoder) in radeon_atom_encoder_prepare() argument
2423 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_atom_encoder_prepare()
2424 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_encoder_prepare()
2425 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_atom_encoder_prepare()
2429 (radeon_encoder_get_dp_bridge_encoder_id(encoder) != in radeon_atom_encoder_prepare()
2435 dig->dig_encoder = radeon_atom_pick_dig_encoder(encoder, -1); in radeon_atom_encoder_prepare()
2446 radeon_atom_output_lock(encoder, true); in radeon_atom_encoder_prepare()
2462 atombios_set_encoder_crtc_source(encoder); in radeon_atom_encoder_prepare()
2465 dce8_program_fmt(encoder); in radeon_atom_encoder_prepare()
2467 dce4_program_fmt(encoder); in radeon_atom_encoder_prepare()
2469 dce3_program_fmt(encoder); in radeon_atom_encoder_prepare()
2471 avivo_program_fmt(encoder); in radeon_atom_encoder_prepare()
2474 static void radeon_atom_encoder_commit(struct drm_encoder *encoder) in radeon_atom_encoder_commit() argument
2477 radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_ON); in radeon_atom_encoder_commit()
2478 radeon_atom_output_lock(encoder, false); in radeon_atom_encoder_commit()
2481 static void radeon_atom_encoder_disable(struct drm_encoder *encoder) in radeon_atom_encoder_disable() argument
2483 struct drm_device *dev = encoder->dev; in radeon_atom_encoder_disable()
2485 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_encoder_disable()
2490 * the encoder if it's in use by another connector in radeon_atom_encoder_disable()
2504 radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF); in radeon_atom_encoder_disable()
2511 atombios_digital_setup(encoder, PANEL_ENCODER_ACTION_DISABLE); in radeon_atom_encoder_disable()
2523 atombios_dvo_setup(encoder, ATOM_DISABLE); in radeon_atom_encoder_disable()
2529 atombios_dac_setup(encoder, ATOM_DISABLE); in radeon_atom_encoder_disable()
2531 atombios_tv_setup(encoder, ATOM_DISABLE); in radeon_atom_encoder_disable()
2536 if (radeon_encoder_is_digital(encoder)) { in radeon_atom_encoder_disable()
2537 if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) { in radeon_atom_encoder_disable()
2539 radeon_hdmi_enable(rdev, encoder, false); in radeon_atom_encoder_disable()
2541 if (atombios_get_encoder_mode(encoder) != ATOM_ENCODER_MODE_DP_MST) { in radeon_atom_encoder_disable()
2552 static void radeon_atom_ext_prepare(struct drm_encoder *encoder) in radeon_atom_ext_prepare() argument
2557 static void radeon_atom_ext_commit(struct drm_encoder *encoder) in radeon_atom_ext_commit() argument
2563 radeon_atom_ext_mode_set(struct drm_encoder *encoder, in radeon_atom_ext_mode_set() argument
2570 static void radeon_atom_ext_disable(struct drm_encoder *encoder) in radeon_atom_ext_disable() argument
2576 radeon_atom_ext_dpms(struct drm_encoder *encoder, int mode) in radeon_atom_ext_dpms() argument
2609 void radeon_enc_destroy(struct drm_encoder *encoder) in radeon_enc_destroy() argument
2611 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_enc_destroy()
2615 drm_encoder_cleanup(encoder); in radeon_enc_destroy()
2665 struct drm_encoder *encoder; in radeon_add_atom_encoder() local
2669 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { in radeon_add_atom_encoder()
2670 radeon_encoder = to_radeon_encoder(encoder); in radeon_add_atom_encoder()
2683 encoder = &radeon_encoder->base; in radeon_add_atom_encoder()
2686 encoder->possible_crtcs = 0x1; in radeon_add_atom_encoder()
2690 encoder->possible_crtcs = 0x3; in radeon_add_atom_encoder()
2693 encoder->possible_crtcs = 0xf; in radeon_add_atom_encoder()
2696 encoder->possible_crtcs = 0x3f; in radeon_add_atom_encoder()
2717 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2721 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2725 drm_encoder_helper_add(encoder, &radeon_atom_dig_helper_funcs); in radeon_add_atom_encoder()
2728 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2731 drm_encoder_helper_add(encoder, &radeon_atom_dac_helper_funcs); in radeon_add_atom_encoder()
2736 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2739 drm_encoder_helper_add(encoder, &radeon_atom_dac_helper_funcs); in radeon_add_atom_encoder()
2751 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2755 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2759 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2763 drm_encoder_helper_add(encoder, &radeon_atom_dig_helper_funcs); in radeon_add_atom_encoder()
2777 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2780 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2783 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2785 drm_encoder_helper_add(encoder, &radeon_atom_ext_helper_funcs); in radeon_add_atom_encoder()