Lines Matching full:encoder

46 static void radeon_legacy_encoder_disable(struct drm_encoder *encoder)  in radeon_legacy_encoder_disable()  argument
48 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_legacy_encoder_disable()
51 encoder_funcs = encoder->helper_private; in radeon_legacy_encoder_disable()
52 encoder_funcs->dpms(encoder, DRM_MODE_DPMS_OFF); in radeon_legacy_encoder_disable()
56 static void radeon_legacy_lvds_update(struct drm_encoder *encoder, int mode) in radeon_legacy_lvds_update() argument
58 struct drm_device *dev = encoder->dev; in radeon_legacy_lvds_update()
60 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_legacy_lvds_update()
139 radeon_atombios_encoder_dpms_scratch_regs(encoder, (mode == DRM_MODE_DPMS_ON) ? true : false); in radeon_legacy_lvds_update()
141 radeon_combios_encoder_dpms_scratch_regs(encoder, (mode == DRM_MODE_DPMS_ON) ? true : false); in radeon_legacy_lvds_update()
145 static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode) in radeon_legacy_lvds_dpms() argument
147 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_legacy_lvds_dpms()
148 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_legacy_lvds_dpms()
161 radeon_legacy_lvds_update(encoder, mode); in radeon_legacy_lvds_dpms()
164 static void radeon_legacy_lvds_prepare(struct drm_encoder *encoder) in radeon_legacy_lvds_prepare() argument
166 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_legacy_lvds_prepare()
169 radeon_atom_output_lock(encoder, true); in radeon_legacy_lvds_prepare()
171 radeon_combios_output_lock(encoder, true); in radeon_legacy_lvds_prepare()
172 radeon_legacy_lvds_dpms(encoder, DRM_MODE_DPMS_OFF); in radeon_legacy_lvds_prepare()
175 static void radeon_legacy_lvds_commit(struct drm_encoder *encoder) in radeon_legacy_lvds_commit() argument
177 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_legacy_lvds_commit()
179 radeon_legacy_lvds_dpms(encoder, DRM_MODE_DPMS_ON); in radeon_legacy_lvds_commit()
181 radeon_atom_output_lock(encoder, false); in radeon_legacy_lvds_commit()
183 radeon_combios_output_lock(encoder, false); in radeon_legacy_lvds_commit()
186 static void radeon_legacy_lvds_mode_set(struct drm_encoder *encoder, in radeon_legacy_lvds_mode_set() argument
190 struct drm_device *dev = encoder->dev; in radeon_legacy_lvds_mode_set()
192 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in radeon_legacy_lvds_mode_set()
193 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_legacy_lvds_mode_set()
207 atombios_digital_setup(encoder, PANEL_ENCODER_ACTION_ENABLE); in radeon_legacy_lvds_mode_set()
251 radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); in radeon_legacy_lvds_mode_set()
253 radeon_combios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); in radeon_legacy_lvds_mode_set()
256 static bool radeon_legacy_mode_fixup(struct drm_encoder *encoder, in radeon_legacy_mode_fixup() argument
260 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_legacy_mode_fixup()
262 /* set the active encoder to connector routing */ in radeon_legacy_mode_fixup()
263 radeon_encoder_set_active_device(encoder); in radeon_legacy_mode_fixup()
268 radeon_panel_mode_fixup(encoder, adjusted_mode); in radeon_legacy_mode_fixup()
345 struct radeon_encoder *radeon_encoder = pdata->encoder; in radeon_legacy_backlight_update_status()
356 struct radeon_encoder *radeon_encoder = pdata->encoder; in radeon_legacy_backlight_get_brightness()
415 pdata->encoder = radeon_encoder; in radeon_legacy_backlight_init()
496 static void radeon_lvds_enc_destroy(struct drm_encoder *encoder) in radeon_lvds_enc_destroy() argument
498 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_lvds_enc_destroy()
504 drm_encoder_cleanup(encoder); in radeon_lvds_enc_destroy()
512 static void radeon_legacy_primary_dac_dpms(struct drm_encoder *encoder, int mode) in radeon_legacy_primary_dac_dpms() argument
514 struct drm_device *dev = encoder->dev; in radeon_legacy_primary_dac_dpms()
548 radeon_atombios_encoder_dpms_scratch_regs(encoder, (mode == DRM_MODE_DPMS_ON) ? true : false); in radeon_legacy_primary_dac_dpms()
550 radeon_combios_encoder_dpms_scratch_regs(encoder, (mode == DRM_MODE_DPMS_ON) ? true : false); in radeon_legacy_primary_dac_dpms()
554 static void radeon_legacy_primary_dac_prepare(struct drm_encoder *encoder) in radeon_legacy_primary_dac_prepare() argument
556 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_legacy_primary_dac_prepare()
559 radeon_atom_output_lock(encoder, true); in radeon_legacy_primary_dac_prepare()
561 radeon_combios_output_lock(encoder, true); in radeon_legacy_primary_dac_prepare()
562 radeon_legacy_primary_dac_dpms(encoder, DRM_MODE_DPMS_OFF); in radeon_legacy_primary_dac_prepare()
565 static void radeon_legacy_primary_dac_commit(struct drm_encoder *encoder) in radeon_legacy_primary_dac_commit() argument
567 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_legacy_primary_dac_commit()
569 radeon_legacy_primary_dac_dpms(encoder, DRM_MODE_DPMS_ON); in radeon_legacy_primary_dac_commit()
572 radeon_atom_output_lock(encoder, false); in radeon_legacy_primary_dac_commit()
574 radeon_combios_output_lock(encoder, false); in radeon_legacy_primary_dac_commit()
577 static void radeon_legacy_primary_dac_mode_set(struct drm_encoder *encoder, in radeon_legacy_primary_dac_mode_set() argument
581 struct drm_device *dev = encoder->dev; in radeon_legacy_primary_dac_mode_set()
583 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in radeon_legacy_primary_dac_mode_set()
584 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_legacy_primary_dac_mode_set()
629 radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); in radeon_legacy_primary_dac_mode_set()
631 radeon_combios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); in radeon_legacy_primary_dac_mode_set()
634 static enum drm_connector_status radeon_legacy_primary_dac_detect(struct drm_encoder *encoder, in radeon_legacy_primary_dac_detect() argument
637 struct drm_device *dev = encoder->dev; in radeon_legacy_primary_dac_detect()
646 * everyone happy report the encoder as always connected. in radeon_legacy_primary_dac_detect()
724 static void radeon_legacy_tmds_int_dpms(struct drm_encoder *encoder, int mode) in radeon_legacy_tmds_int_dpms() argument
726 struct drm_device *dev = encoder->dev; in radeon_legacy_tmds_int_dpms()
745 radeon_atombios_encoder_dpms_scratch_regs(encoder, (mode == DRM_MODE_DPMS_ON) ? true : false); in radeon_legacy_tmds_int_dpms()
747 radeon_combios_encoder_dpms_scratch_regs(encoder, (mode == DRM_MODE_DPMS_ON) ? true : false); in radeon_legacy_tmds_int_dpms()
751 static void radeon_legacy_tmds_int_prepare(struct drm_encoder *encoder) in radeon_legacy_tmds_int_prepare() argument
753 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_legacy_tmds_int_prepare()
756 radeon_atom_output_lock(encoder, true); in radeon_legacy_tmds_int_prepare()
758 radeon_combios_output_lock(encoder, true); in radeon_legacy_tmds_int_prepare()
759 radeon_legacy_tmds_int_dpms(encoder, DRM_MODE_DPMS_OFF); in radeon_legacy_tmds_int_prepare()
762 static void radeon_legacy_tmds_int_commit(struct drm_encoder *encoder) in radeon_legacy_tmds_int_commit() argument
764 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_legacy_tmds_int_commit()
766 radeon_legacy_tmds_int_dpms(encoder, DRM_MODE_DPMS_ON); in radeon_legacy_tmds_int_commit()
769 radeon_atom_output_lock(encoder, true); in radeon_legacy_tmds_int_commit()
771 radeon_combios_output_lock(encoder, true); in radeon_legacy_tmds_int_commit()
774 static void radeon_legacy_tmds_int_mode_set(struct drm_encoder *encoder, in radeon_legacy_tmds_int_mode_set() argument
778 struct drm_device *dev = encoder->dev; in radeon_legacy_tmds_int_mode_set()
780 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in radeon_legacy_tmds_int_mode_set()
781 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_legacy_tmds_int_mode_set()
869 radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); in radeon_legacy_tmds_int_mode_set()
871 radeon_combios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); in radeon_legacy_tmds_int_mode_set()
888 static void radeon_legacy_tmds_ext_dpms(struct drm_encoder *encoder, int mode) in radeon_legacy_tmds_ext_dpms() argument
890 struct drm_device *dev = encoder->dev; in radeon_legacy_tmds_ext_dpms()
911 radeon_atombios_encoder_dpms_scratch_regs(encoder, (mode == DRM_MODE_DPMS_ON) ? true : false); in radeon_legacy_tmds_ext_dpms()
913 radeon_combios_encoder_dpms_scratch_regs(encoder, (mode == DRM_MODE_DPMS_ON) ? true : false); in radeon_legacy_tmds_ext_dpms()
917 static void radeon_legacy_tmds_ext_prepare(struct drm_encoder *encoder) in radeon_legacy_tmds_ext_prepare() argument
919 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_legacy_tmds_ext_prepare()
922 radeon_atom_output_lock(encoder, true); in radeon_legacy_tmds_ext_prepare()
924 radeon_combios_output_lock(encoder, true); in radeon_legacy_tmds_ext_prepare()
925 radeon_legacy_tmds_ext_dpms(encoder, DRM_MODE_DPMS_OFF); in radeon_legacy_tmds_ext_prepare()
928 static void radeon_legacy_tmds_ext_commit(struct drm_encoder *encoder) in radeon_legacy_tmds_ext_commit() argument
930 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_legacy_tmds_ext_commit()
931 radeon_legacy_tmds_ext_dpms(encoder, DRM_MODE_DPMS_ON); in radeon_legacy_tmds_ext_commit()
934 radeon_atom_output_lock(encoder, false); in radeon_legacy_tmds_ext_commit()
936 radeon_combios_output_lock(encoder, false); in radeon_legacy_tmds_ext_commit()
939 static void radeon_legacy_tmds_ext_mode_set(struct drm_encoder *encoder, in radeon_legacy_tmds_ext_mode_set() argument
943 struct drm_device *dev = encoder->dev; in radeon_legacy_tmds_ext_mode_set()
945 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in radeon_legacy_tmds_ext_mode_set()
946 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_legacy_tmds_ext_mode_set()
953 atombios_dvo_setup(encoder, ATOM_ENABLE); in radeon_legacy_tmds_ext_mode_set()
979 if (!radeon_combios_external_tmds_setup(encoder)) in radeon_legacy_tmds_ext_mode_set()
980 radeon_external_tmds_setup(encoder); in radeon_legacy_tmds_ext_mode_set()
1003 radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); in radeon_legacy_tmds_ext_mode_set()
1005 radeon_combios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); in radeon_legacy_tmds_ext_mode_set()
1008 static void radeon_ext_tmds_enc_destroy(struct drm_encoder *encoder) in radeon_ext_tmds_enc_destroy() argument
1010 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_ext_tmds_enc_destroy()
1013 drm_encoder_cleanup(encoder); in radeon_ext_tmds_enc_destroy()
1031 static void radeon_legacy_tv_dac_dpms(struct drm_encoder *encoder, int mode) in radeon_legacy_tv_dac_dpms() argument
1033 struct drm_device *dev = encoder->dev; in radeon_legacy_tv_dac_dpms()
1035 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_legacy_tv_dac_dpms()
1116 radeon_atombios_encoder_dpms_scratch_regs(encoder, (mode == DRM_MODE_DPMS_ON) ? true : false); in radeon_legacy_tv_dac_dpms()
1118 radeon_combios_encoder_dpms_scratch_regs(encoder, (mode == DRM_MODE_DPMS_ON) ? true : false); in radeon_legacy_tv_dac_dpms()
1122 static void radeon_legacy_tv_dac_prepare(struct drm_encoder *encoder) in radeon_legacy_tv_dac_prepare() argument
1124 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_legacy_tv_dac_prepare()
1127 radeon_atom_output_lock(encoder, true); in radeon_legacy_tv_dac_prepare()
1129 radeon_combios_output_lock(encoder, true); in radeon_legacy_tv_dac_prepare()
1130 radeon_legacy_tv_dac_dpms(encoder, DRM_MODE_DPMS_OFF); in radeon_legacy_tv_dac_prepare()
1133 static void radeon_legacy_tv_dac_commit(struct drm_encoder *encoder) in radeon_legacy_tv_dac_commit() argument
1135 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_legacy_tv_dac_commit()
1137 radeon_legacy_tv_dac_dpms(encoder, DRM_MODE_DPMS_ON); in radeon_legacy_tv_dac_commit()
1140 radeon_atom_output_lock(encoder, true); in radeon_legacy_tv_dac_commit()
1142 radeon_combios_output_lock(encoder, true); in radeon_legacy_tv_dac_commit()
1145 static void radeon_legacy_tv_dac_mode_set(struct drm_encoder *encoder, in radeon_legacy_tv_dac_mode_set() argument
1149 struct drm_device *dev = encoder->dev; in radeon_legacy_tv_dac_mode_set()
1151 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in radeon_legacy_tv_dac_mode_set()
1152 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_legacy_tv_dac_mode_set()
1290 radeon_legacy_tv_mode_set(encoder, mode, adjusted_mode); in radeon_legacy_tv_dac_mode_set()
1293 radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); in radeon_legacy_tv_dac_mode_set()
1295 radeon_combios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); in radeon_legacy_tv_dac_mode_set()
1299 static bool r300_legacy_tv_detect(struct drm_encoder *encoder, in r300_legacy_tv_detect() argument
1302 struct drm_device *dev = encoder->dev; in r300_legacy_tv_detect()
1370 static bool radeon_legacy_tv_detect(struct drm_encoder *encoder, in radeon_legacy_tv_detect() argument
1373 struct drm_device *dev = encoder->dev; in radeon_legacy_tv_detect()
1380 return r300_legacy_tv_detect(encoder, connector); in radeon_legacy_tv_detect()
1434 static bool radeon_legacy_ext_dac_detect(struct drm_encoder *encoder, in radeon_legacy_ext_dac_detect() argument
1437 struct drm_device *dev = encoder->dev; in radeon_legacy_ext_dac_detect()
1524 static enum drm_connector_status radeon_legacy_tv_dac_detect(struct drm_encoder *encoder, in radeon_legacy_tv_dac_detect() argument
1527 struct drm_device *dev = encoder->dev; in radeon_legacy_tv_dac_detect()
1533 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_legacy_tv_dac_detect()
1538 /* find out if crtc2 is in use or if this encoder is using it */ in radeon_legacy_tv_dac_detect()
1542 if (encoder->crtc != crtc) { in radeon_legacy_tv_dac_detect()
1556 tv_detect = radeon_legacy_tv_detect(encoder, connector); in radeon_legacy_tv_dac_detect()
1562 /* don't probe if the encoder is being used for something else not CRT related */ in radeon_legacy_tv_dac_detect()
1570 if (radeon_legacy_ext_dac_detect(encoder, connector)) in radeon_legacy_tv_dac_detect()
1691 static struct radeon_encoder_int_tmds *radeon_legacy_get_tmds_info(struct radeon_encoder *encoder) in radeon_legacy_get_tmds_info() argument
1693 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_tmds_info()
1704 ret = radeon_atombios_get_tmds_info(encoder, tmds); in radeon_legacy_get_tmds_info()
1706 ret = radeon_legacy_get_tmds_info_from_combios(encoder, tmds); in radeon_legacy_get_tmds_info()
1709 radeon_legacy_get_tmds_info_from_table(encoder, tmds); in radeon_legacy_get_tmds_info()
1714 …tic struct radeon_encoder_ext_tmds *radeon_legacy_get_ext_tmds_info(struct radeon_encoder *encoder) in radeon_legacy_get_ext_tmds_info() argument
1716 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_ext_tmds_info()
1729 ret = radeon_legacy_get_ext_tmds_info_from_combios(encoder, tmds); in radeon_legacy_get_ext_tmds_info()
1732 radeon_legacy_get_ext_tmds_info_from_table(encoder, tmds); in radeon_legacy_get_ext_tmds_info()
1741 struct drm_encoder *encoder; in radeon_add_legacy_encoder() local
1745 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { in radeon_add_legacy_encoder()
1746 radeon_encoder = to_radeon_encoder(encoder); in radeon_add_legacy_encoder()
1759 encoder = &radeon_encoder->base; in radeon_add_legacy_encoder()
1761 encoder->possible_crtcs = 0x1; in radeon_add_legacy_encoder()
1763 encoder->possible_crtcs = 0x3; in radeon_add_legacy_encoder()
1774 encoder->possible_crtcs = 0x1; in radeon_add_legacy_encoder()
1775 drm_encoder_init(dev, encoder, &radeon_legacy_lvds_enc_funcs, in radeon_add_legacy_encoder()
1777 drm_encoder_helper_add(encoder, &radeon_legacy_lvds_helper_funcs); in radeon_add_legacy_encoder()
1785 drm_encoder_init(dev, encoder, &radeon_legacy_tmds_int_enc_funcs, in radeon_add_legacy_encoder()
1787 drm_encoder_helper_add(encoder, &radeon_legacy_tmds_int_helper_funcs); in radeon_add_legacy_encoder()
1791 drm_encoder_init(dev, encoder, &radeon_legacy_primary_dac_enc_funcs, in radeon_add_legacy_encoder()
1793 drm_encoder_helper_add(encoder, &radeon_legacy_primary_dac_helper_funcs); in radeon_add_legacy_encoder()
1800 drm_encoder_init(dev, encoder, &radeon_legacy_tv_dac_enc_funcs, in radeon_add_legacy_encoder()
1802 drm_encoder_helper_add(encoder, &radeon_legacy_tv_dac_helper_funcs); in radeon_add_legacy_encoder()
1809 drm_encoder_init(dev, encoder, &radeon_legacy_tmds_ext_enc_funcs, in radeon_add_legacy_encoder()
1811 drm_encoder_helper_add(encoder, &radeon_legacy_tmds_ext_helper_funcs); in radeon_add_legacy_encoder()