Lines Matching full:encoder
98 struct drm_encoder *encoder = &radeon_encoder->base; in atombios_set_backlight_level() local
134 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_LCD_BLOFF, 0, 0); in atombios_set_backlight_level()
136 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL, 0, 0); in atombios_set_backlight_level()
137 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_LCD_BLON, 0, 0); in atombios_set_backlight_level()
164 struct radeon_encoder *radeon_encoder = pdata->encoder; in radeon_atom_backlight_update_status()
174 struct radeon_encoder *radeon_encoder = pdata->encoder; in radeon_atom_backlight_get_brightness()
237 pdata->encoder = radeon_encoder; in radeon_atom_backlight_init()
294 static bool radeon_atom_mode_fixup(struct drm_encoder *encoder, in radeon_atom_mode_fixup() argument
298 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_mode_fixup()
299 struct drm_device *dev = encoder->dev; in radeon_atom_mode_fixup()
302 /* set the active encoder to connector routing */ in radeon_atom_mode_fixup()
303 radeon_encoder_set_active_device(encoder); in radeon_atom_mode_fixup()
317 radeon_panel_mode_fixup(encoder, adjusted_mode); in radeon_atom_mode_fixup()
329 radeon_panel_mode_fixup(encoder, adjusted_mode); in radeon_atom_mode_fixup()
334 (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE))) { in radeon_atom_mode_fixup()
335 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_atom_mode_fixup()
343 atombios_dac_setup(struct drm_encoder *encoder, int action) in atombios_dac_setup() argument
345 struct drm_device *dev = encoder->dev; in atombios_dac_setup()
347 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_dac_setup()
395 atombios_tv_setup(struct drm_encoder *encoder, int action) in atombios_tv_setup() argument
397 struct drm_device *dev = encoder->dev; in atombios_tv_setup()
399 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_tv_setup()
450 static u8 radeon_atom_get_bpc(struct drm_encoder *encoder) in radeon_atom_get_bpc() argument
454 if (encoder->crtc) { in radeon_atom_get_bpc()
455 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in radeon_atom_get_bpc()
484 atombios_dvo_setup(struct drm_encoder *encoder, int action) in atombios_dvo_setup() argument
486 struct drm_device *dev = encoder->dev; in atombios_dvo_setup()
488 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_dvo_setup()
509 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dvo_setup()
521 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dvo_setup()
535 args.dvo_v4.ucBitPerColor = radeon_atom_get_bpc(encoder); in atombios_dvo_setup()
556 atombios_digital_setup(struct drm_encoder *encoder, int action) in atombios_digital_setup() argument
558 struct drm_device *dev = encoder->dev; in atombios_digital_setup()
560 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_digital_setup()
570 if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) in atombios_digital_setup()
612 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_digital_setup()
651 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_digital_setup()
669 atombios_get_encoder_mode(struct drm_encoder *encoder) in atombios_get_encoder_mode() argument
671 struct drm_device *dev = encoder->dev; in atombios_get_encoder_mode()
673 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_get_encoder_mode()
679 if (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE) in atombios_get_encoder_mode()
687 connector = radeon_get_connector_for_encoder(encoder); in atombios_get_encoder_mode()
689 * the connectors tied to the encoder. in atombios_get_encoder_mode()
692 connector = radeon_get_connector_for_encoder_init(encoder); in atombios_get_encoder_mode()
775 * DIG Encoder/Transmitter Setup
780 * - 2 DIG encoder blocks.
787 * - 2 DIG encoder blocks.
793 * - 6 DIG encoder blocks.
805 * - 2 DIG encoder blocks.
813 * crtc -> dig encoder -> UNIPHY/LVTMA (1 or 2 links)
829 atombios_dig_encoder_setup2(struct drm_encoder *encoder, int action, int panel_mode, int enc_overri… in atombios_dig_encoder_setup2() argument
831 struct drm_device *dev = encoder->dev; in atombios_dig_encoder_setup2()
833 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_dig_encoder_setup2()
835 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in atombios_dig_encoder_setup2()
853 /* no dig encoder assigned */ in atombios_dig_encoder_setup2()
880 args.v1.ucEncoderMode = atombios_get_encoder_mode(encoder); in atombios_dig_encoder_setup2()
884 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_encoder_setup2()
917 args.v3.ucEncoderMode = atombios_get_encoder_mode(encoder); in atombios_dig_encoder_setup2()
921 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_encoder_setup2()
932 args.v3.ucBitPerColor = radeon_atom_get_bpc(encoder); in atombios_dig_encoder_setup2()
940 args.v4.ucEncoderMode = atombios_get_encoder_mode(encoder); in atombios_dig_encoder_setup2()
944 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_encoder_setup2()
964 args.v4.ucBitPerColor = radeon_atom_get_bpc(encoder); in atombios_dig_encoder_setup2()
985 atombios_dig_encoder_setup(struct drm_encoder *encoder, int action, int panel_mode) in atombios_dig_encoder_setup() argument
987 atombios_dig_encoder_setup2(encoder, action, panel_mode, -1); in atombios_dig_encoder_setup()
999 atombios_dig_transmitter_setup2(struct drm_encoder *encoder, int action, uint8_t lane_num, uint8_t … in atombios_dig_transmitter_setup2() argument
1001 struct drm_device *dev = encoder->dev; in atombios_dig_transmitter_setup2()
1003 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_dig_transmitter_setup2()
1019 connector = radeon_get_connector_for_encoder_init(encoder); in atombios_dig_transmitter_setup2()
1020 /* just needed to avoid bailing in the encoder check. the encoder in atombios_dig_transmitter_setup2()
1025 connector = radeon_get_connector_for_encoder(encoder); in atombios_dig_transmitter_setup2()
1040 if (encoder->crtc) { in atombios_dig_transmitter_setup2()
1041 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in atombios_dig_transmitter_setup2()
1045 /* no dig encoder assigned */ in atombios_dig_transmitter_setup2()
1049 if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder))) in atombios_dig_transmitter_setup2()
1085 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1101 !radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) { in atombios_dig_transmitter_setup2()
1128 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1142 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1170 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1184 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1192 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1229 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1243 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1251 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1291 if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1327 else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_dig_transmitter_setup2()
1332 args.v5.ucDigMode = atombios_get_encoder_mode(encoder); in atombios_dig_transmitter_setup2()
1366 atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t lane_num, uint8_t l… in atombios_dig_transmitter_setup() argument
1368 atombios_dig_transmitter_setup2(encoder, action, lane_num, lane_set, -1); in atombios_dig_transmitter_setup()
1421 atombios_external_encoder_setup(struct drm_encoder *encoder, in atombios_external_encoder_setup() argument
1425 struct drm_device *dev = encoder->dev; in atombios_external_encoder_setup()
1427 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_external_encoder_setup()
1439 connector = radeon_get_connector_for_encoder_init(encoder); in atombios_external_encoder_setup()
1441 connector = radeon_get_connector_for_encoder(encoder); in atombios_external_encoder_setup()
1469 args.v1.sDigEncoder.ucEncoderMode = atombios_get_encoder_mode(encoder); in atombios_external_encoder_setup()
1475 } else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_external_encoder_setup()
1486 args.v3.sExtEncoder.ucEncoderMode = atombios_get_encoder_mode(encoder); in atombios_external_encoder_setup()
1494 } else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock)) in atombios_external_encoder_setup()
1509 args.v3.sExtEncoder.ucBitPerColor = radeon_atom_get_bpc(encoder); in atombios_external_encoder_setup()
1524 atombios_yuv_setup(struct drm_encoder *encoder, bool enable) in atombios_yuv_setup() argument
1526 struct drm_device *dev = encoder->dev; in atombios_yuv_setup()
1528 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_yuv_setup()
1529 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in atombios_yuv_setup()
1561 radeon_atom_encoder_dpms_avivo(struct drm_encoder *encoder, int mode) in radeon_atom_encoder_dpms_avivo() argument
1563 struct drm_device *dev = encoder->dev; in radeon_atom_encoder_dpms_avivo()
1565 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_encoder_dpms_avivo()
1648 radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode) in radeon_atom_encoder_dpms_dig() argument
1650 struct drm_device *dev = encoder->dev; in radeon_atom_encoder_dpms_dig()
1652 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_encoder_dpms_dig()
1653 struct drm_encoder *ext_encoder = radeon_get_external_encoder(encoder); in radeon_atom_encoder_dpms_dig()
1655 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_atom_encoder_dpms_dig()
1676 dig->panel_mode = radeon_dp_get_panel_mode(encoder, connector); in radeon_atom_encoder_dpms_dig()
1678 /* setup and enable the encoder */ in radeon_atom_encoder_dpms_dig()
1679 atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_SETUP, 0); in radeon_atom_encoder_dpms_dig()
1680 atombios_dig_encoder_setup(encoder, in radeon_atom_encoder_dpms_dig()
1685 atombios_external_encoder_setup(encoder, ext_encoder, in radeon_atom_encoder_dpms_dig()
1689 /* setup and enable the encoder */ in radeon_atom_encoder_dpms_dig()
1690 atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_SETUP, 0); in radeon_atom_encoder_dpms_dig()
1692 /* setup and enable the encoder and transmitter */ in radeon_atom_encoder_dpms_dig()
1693 atombios_dig_encoder_setup(encoder, ATOM_ENABLE, 0); in radeon_atom_encoder_dpms_dig()
1694 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_SETUP, 0, 0); in radeon_atom_encoder_dpms_dig()
1696 if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) { in radeon_atom_encoder_dpms_dig()
1704 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0); in radeon_atom_encoder_dpms_dig()
1705 if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) { in radeon_atom_encoder_dpms_dig()
1707 radeon_dp_link_train(encoder, connector); in radeon_atom_encoder_dpms_dig()
1709 atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_ON, 0); in radeon_atom_encoder_dpms_dig()
1715 atombios_dig_transmitter_setup(encoder, in radeon_atom_encoder_dpms_dig()
1719 atombios_external_encoder_setup(encoder, ext_encoder, ATOM_ENABLE); in radeon_atom_encoder_dpms_dig()
1726 if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) in radeon_atom_encoder_dpms_dig()
1727 atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_OFF, 0); in radeon_atom_encoder_dpms_dig()
1730 atombios_external_encoder_setup(encoder, ext_encoder, ATOM_DISABLE); in radeon_atom_encoder_dpms_dig()
1732 atombios_dig_transmitter_setup(encoder, in radeon_atom_encoder_dpms_dig()
1735 if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && in radeon_atom_encoder_dpms_dig()
1740 atombios_dig_transmitter_setup(encoder, in radeon_atom_encoder_dpms_dig()
1743 /* disable the encoder and transmitter */ in radeon_atom_encoder_dpms_dig()
1744 atombios_dig_transmitter_setup(encoder, in radeon_atom_encoder_dpms_dig()
1746 atombios_dig_encoder_setup(encoder, ATOM_DISABLE, 0); in radeon_atom_encoder_dpms_dig()
1748 if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) { in radeon_atom_encoder_dpms_dig()
1762 radeon_atom_encoder_dpms(struct drm_encoder *encoder, int mode) in radeon_atom_encoder_dpms() argument
1764 struct drm_device *dev = encoder->dev; in radeon_atom_encoder_dpms()
1766 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_encoder_dpms()
1767 int encoder_mode = atombios_get_encoder_mode(encoder); in radeon_atom_encoder_dpms()
1769 DRM_DEBUG_KMS("encoder dpms %d to mode %d, devices %08x, active_devices %08x\n", in radeon_atom_encoder_dpms()
1776 radeon_audio_dpms(encoder, mode); in radeon_atom_encoder_dpms()
1787 radeon_atom_encoder_dpms_avivo(encoder, mode); in radeon_atom_encoder_dpms()
1794 radeon_atom_encoder_dpms_dig(encoder, mode); in radeon_atom_encoder_dpms()
1800 atombios_dvo_setup(encoder, ATOM_ENABLE); in radeon_atom_encoder_dpms()
1805 atombios_dvo_setup(encoder, ATOM_DISABLE); in radeon_atom_encoder_dpms()
1809 radeon_atom_encoder_dpms_dig(encoder, mode); in radeon_atom_encoder_dpms()
1811 radeon_atom_encoder_dpms_avivo(encoder, mode); in radeon_atom_encoder_dpms()
1818 atombios_dac_setup(encoder, ATOM_ENABLE); in radeon_atom_encoder_dpms()
1823 atombios_dac_setup(encoder, ATOM_DISABLE); in radeon_atom_encoder_dpms()
1827 radeon_atom_encoder_dpms_avivo(encoder, mode); in radeon_atom_encoder_dpms()
1833 radeon_atombios_encoder_dpms_scratch_regs(encoder, (mode == DRM_MODE_DPMS_ON) ? true : false); in radeon_atom_encoder_dpms()
1843 atombios_set_encoder_crtc_source(struct drm_encoder *encoder) in atombios_set_encoder_crtc_source() argument
1845 struct drm_device *dev = encoder->dev; in atombios_set_encoder_crtc_source()
1847 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_set_encoder_crtc_source()
1848 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in atombios_set_encoder_crtc_source()
1911 if (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE) { in atombios_set_encoder_crtc_source()
1912 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in atombios_set_encoder_crtc_source()
1919 args.v2.ucEncodeMode = atombios_get_encoder_mode(encoder); in atombios_set_encoder_crtc_source()
1923 args.v2.ucEncodeMode = atombios_get_encoder_mode(encoder); in atombios_set_encoder_crtc_source()
1987 radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); in atombios_set_encoder_crtc_source()
1991 atombios_apply_encoder_quirks(struct drm_encoder *encoder, in atombios_apply_encoder_quirks() argument
1994 struct drm_device *dev = encoder->dev; in atombios_apply_encoder_quirks()
1996 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_apply_encoder_quirks()
1997 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in atombios_apply_encoder_quirks()
2045 int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder, int fe_idx) in radeon_atom_pick_dig_encoder() argument
2047 struct drm_device *dev = encoder->dev; in radeon_atom_pick_dig_encoder()
2049 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in radeon_atom_pick_dig_encoder()
2050 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_pick_dig_encoder()
2124 * On DCE32 any encoder can drive any block so usually just use crtc id, in radeon_atom_pick_dig_encoder()
2141 if (encoder == test_encoder) in radeon_atom_pick_dig_encoder()
2156 DRM_ERROR("LVDS required digital encoder 2 but it was in use - stealing\n"); in radeon_atom_pick_dig_encoder()
2165 DRM_ERROR("Got encoder index incorrect - returning 0\n"); in radeon_atom_pick_dig_encoder()
2169 DRM_ERROR("chosen encoder in use %d\n", enc_idx); in radeon_atom_pick_dig_encoder()
2180 struct drm_encoder *encoder; in radeon_atom_encoder_init() local
2182 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { in radeon_atom_encoder_init()
2183 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_encoder_init()
2184 struct drm_encoder *ext_encoder = radeon_get_external_encoder(encoder); in radeon_atom_encoder_init()
2192 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_INIT, 0, 0); in radeon_atom_encoder_init()
2199 atombios_external_encoder_setup(encoder, ext_encoder, in radeon_atom_encoder_init()
2205 radeon_atom_encoder_mode_set(struct drm_encoder *encoder, in radeon_atom_encoder_mode_set() argument
2209 struct drm_device *dev = encoder->dev; in radeon_atom_encoder_mode_set()
2211 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_encoder_mode_set()
2212 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_atom_encoder_mode_set()
2218 radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF); in radeon_atom_encoder_mode_set()
2222 atombios_yuv_setup(encoder, true); in radeon_atom_encoder_mode_set()
2224 atombios_yuv_setup(encoder, false); in radeon_atom_encoder_mode_set()
2232 atombios_digital_setup(encoder, PANEL_ENCODER_ACTION_ENABLE); in radeon_atom_encoder_mode_set()
2244 atombios_dvo_setup(encoder, ATOM_ENABLE); in radeon_atom_encoder_mode_set()
2250 atombios_dac_setup(encoder, ATOM_ENABLE); in radeon_atom_encoder_mode_set()
2253 atombios_tv_setup(encoder, ATOM_ENABLE); in radeon_atom_encoder_mode_set()
2255 atombios_tv_setup(encoder, ATOM_DISABLE); in radeon_atom_encoder_mode_set()
2260 atombios_apply_encoder_quirks(encoder, adjusted_mode); in radeon_atom_encoder_mode_set()
2262 encoder_mode = atombios_get_encoder_mode(encoder); in radeon_atom_encoder_mode_set()
2266 radeon_audio_mode_set(encoder, adjusted_mode); in radeon_atom_encoder_mode_set()
2270 atombios_dac_load_detect(struct drm_encoder *encoder, struct drm_connector *connector) in atombios_dac_load_detect() argument
2272 struct drm_device *dev = encoder->dev; in atombios_dac_load_detect()
2274 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in atombios_dac_load_detect()
2319 radeon_atom_dac_detect(struct drm_encoder *encoder, struct drm_connector *connector) in radeon_atom_dac_detect() argument
2321 struct drm_device *dev = encoder->dev; in radeon_atom_dac_detect()
2323 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_dac_detect()
2327 if (!atombios_dac_load_detect(encoder, connector)) { in radeon_atom_dac_detect()
2360 radeon_atom_dig_detect(struct drm_encoder *encoder, struct drm_connector *connector) in radeon_atom_dig_detect() argument
2362 struct drm_device *dev = encoder->dev; in radeon_atom_dig_detect()
2364 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_dig_detect()
2366 struct drm_encoder *ext_encoder = radeon_get_external_encoder(encoder); in radeon_atom_dig_detect()
2379 atombios_external_encoder_setup(encoder, ext_encoder, in radeon_atom_dig_detect()
2407 radeon_atom_ext_encoder_setup_ddc(struct drm_encoder *encoder) in radeon_atom_ext_encoder_setup_ddc() argument
2409 struct drm_encoder *ext_encoder = radeon_get_external_encoder(encoder); in radeon_atom_ext_encoder_setup_ddc()
2413 atombios_external_encoder_setup(encoder, ext_encoder, in radeon_atom_ext_encoder_setup_ddc()
2418 static void radeon_atom_encoder_prepare(struct drm_encoder *encoder) in radeon_atom_encoder_prepare() argument
2420 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_atom_encoder_prepare()
2421 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_encoder_prepare()
2422 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_atom_encoder_prepare()
2426 (radeon_encoder_get_dp_bridge_encoder_id(encoder) != in radeon_atom_encoder_prepare()
2432 dig->dig_encoder = radeon_atom_pick_dig_encoder(encoder, -1); in radeon_atom_encoder_prepare()
2443 radeon_atom_output_lock(encoder, true); in radeon_atom_encoder_prepare()
2459 atombios_set_encoder_crtc_source(encoder); in radeon_atom_encoder_prepare()
2462 dce8_program_fmt(encoder); in radeon_atom_encoder_prepare()
2464 dce4_program_fmt(encoder); in radeon_atom_encoder_prepare()
2466 dce3_program_fmt(encoder); in radeon_atom_encoder_prepare()
2468 avivo_program_fmt(encoder); in radeon_atom_encoder_prepare()
2471 static void radeon_atom_encoder_commit(struct drm_encoder *encoder) in radeon_atom_encoder_commit() argument
2474 radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_ON); in radeon_atom_encoder_commit()
2475 radeon_atom_output_lock(encoder, false); in radeon_atom_encoder_commit()
2478 static void radeon_atom_encoder_disable(struct drm_encoder *encoder) in radeon_atom_encoder_disable() argument
2480 struct drm_device *dev = encoder->dev; in radeon_atom_encoder_disable()
2482 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_atom_encoder_disable()
2487 * the encoder if it's in use by another connector in radeon_atom_encoder_disable()
2501 radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF); in radeon_atom_encoder_disable()
2508 atombios_digital_setup(encoder, PANEL_ENCODER_ACTION_DISABLE); in radeon_atom_encoder_disable()
2520 atombios_dvo_setup(encoder, ATOM_DISABLE); in radeon_atom_encoder_disable()
2526 atombios_dac_setup(encoder, ATOM_DISABLE); in radeon_atom_encoder_disable()
2528 atombios_tv_setup(encoder, ATOM_DISABLE); in radeon_atom_encoder_disable()
2533 if (radeon_encoder_is_digital(encoder)) { in radeon_atom_encoder_disable()
2534 if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) { in radeon_atom_encoder_disable()
2536 radeon_hdmi_enable(rdev, encoder, false); in radeon_atom_encoder_disable()
2538 if (atombios_get_encoder_mode(encoder) != ATOM_ENCODER_MODE_DP_MST) { in radeon_atom_encoder_disable()
2549 static void radeon_atom_ext_prepare(struct drm_encoder *encoder) in radeon_atom_ext_prepare() argument
2554 static void radeon_atom_ext_commit(struct drm_encoder *encoder) in radeon_atom_ext_commit() argument
2560 radeon_atom_ext_mode_set(struct drm_encoder *encoder, in radeon_atom_ext_mode_set() argument
2567 static void radeon_atom_ext_disable(struct drm_encoder *encoder) in radeon_atom_ext_disable() argument
2573 radeon_atom_ext_dpms(struct drm_encoder *encoder, int mode) in radeon_atom_ext_dpms() argument
2606 void radeon_enc_destroy(struct drm_encoder *encoder) in radeon_enc_destroy() argument
2608 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_enc_destroy()
2612 drm_encoder_cleanup(encoder); in radeon_enc_destroy()
2662 struct drm_encoder *encoder; in radeon_add_atom_encoder() local
2666 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { in radeon_add_atom_encoder()
2667 radeon_encoder = to_radeon_encoder(encoder); in radeon_add_atom_encoder()
2680 encoder = &radeon_encoder->base; in radeon_add_atom_encoder()
2683 encoder->possible_crtcs = 0x1; in radeon_add_atom_encoder()
2687 encoder->possible_crtcs = 0x3; in radeon_add_atom_encoder()
2690 encoder->possible_crtcs = 0xf; in radeon_add_atom_encoder()
2693 encoder->possible_crtcs = 0x3f; in radeon_add_atom_encoder()
2714 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2718 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2722 drm_encoder_helper_add(encoder, &radeon_atom_dig_helper_funcs); in radeon_add_atom_encoder()
2725 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2728 drm_encoder_helper_add(encoder, &radeon_atom_dac_helper_funcs); in radeon_add_atom_encoder()
2733 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2736 drm_encoder_helper_add(encoder, &radeon_atom_dac_helper_funcs); in radeon_add_atom_encoder()
2748 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2752 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2756 drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, in radeon_add_atom_encoder()
2760 drm_encoder_helper_add(encoder, &radeon_atom_dig_helper_funcs); in radeon_add_atom_encoder()
2774 drm_encoder_init(dev, encoder, &radeon_atom_enc_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()
2782 drm_encoder_helper_add(encoder, &radeon_atom_ext_helper_funcs); in radeon_add_atom_encoder()