Subversion Repositories Kolibri OS

Rev

Rev 1221 | Rev 1321 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1221 Rev 1268
Line 105... Line 105...
105
	if (rdev->is_atom_bios)
105
	if (rdev->is_atom_bios)
106
		radeon_atom_output_lock(encoder, true);
106
		radeon_atom_output_lock(encoder, true);
107
	else
107
	else
108
		radeon_combios_output_lock(encoder, true);
108
		radeon_combios_output_lock(encoder, true);
109
	radeon_legacy_lvds_dpms(encoder, DRM_MODE_DPMS_OFF);
109
	radeon_legacy_lvds_dpms(encoder, DRM_MODE_DPMS_OFF);
110
 
-
 
111
	radeon_encoder_set_active_device(encoder);
-
 
112
}
110
}
Line 113... Line 111...
113
 
111
 
114
static void radeon_legacy_lvds_commit(struct drm_encoder *encoder)
112
static void radeon_legacy_lvds_commit(struct drm_encoder *encoder)
115
{
113
{
Line 190... Line 188...
190
					  struct drm_display_mode *mode,
188
					  struct drm_display_mode *mode,
191
					  struct drm_display_mode *adjusted_mode)
189
					  struct drm_display_mode *adjusted_mode)
192
{
190
{
193
	struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
191
	struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
Line -... Line 192...
-
 
192
 
-
 
193
	/* set the active encoder to connector routing */
194
 
194
	radeon_encoder_set_active_device(encoder);
Line 195... Line 195...
195
	drm_mode_set_crtcinfo(adjusted_mode, 0);
195
	drm_mode_set_crtcinfo(adjusted_mode, 0);
196
 
196
 
Line 216... Line 216...
216
 
216
 
217
static bool radeon_legacy_primary_dac_mode_fixup(struct drm_encoder *encoder,
217
static bool radeon_legacy_primary_dac_mode_fixup(struct drm_encoder *encoder,
218
						 struct drm_display_mode *mode,
218
						 struct drm_display_mode *mode,
219
						 struct drm_display_mode *adjusted_mode)
219
						 struct drm_display_mode *adjusted_mode)
220
{
-
 
-
 
220
{
-
 
221
	/* set the active encoder to connector routing */
221
 
222
	radeon_encoder_set_active_device(encoder);
Line 222... Line 223...
222
	drm_mode_set_crtcinfo(adjusted_mode, 0);
223
	drm_mode_set_crtcinfo(adjusted_mode, 0);
223
 
224
 
Line 270... Line 271...
270
	if (rdev->is_atom_bios)
271
	if (rdev->is_atom_bios)
271
		radeon_atom_output_lock(encoder, true);
272
		radeon_atom_output_lock(encoder, true);
272
	else
273
	else
273
		radeon_combios_output_lock(encoder, true);
274
		radeon_combios_output_lock(encoder, true);
274
	radeon_legacy_primary_dac_dpms(encoder, DRM_MODE_DPMS_OFF);
275
	radeon_legacy_primary_dac_dpms(encoder, DRM_MODE_DPMS_OFF);
275
	radeon_encoder_set_active_device(encoder);
-
 
276
}
276
}
Line 277... Line 277...
277
 
277
 
278
static void radeon_legacy_primary_dac_commit(struct drm_encoder *encoder)
278
static void radeon_legacy_primary_dac_commit(struct drm_encoder *encoder)
279
{
279
{
Line 466... Line 466...
466
	if (rdev->is_atom_bios)
466
	if (rdev->is_atom_bios)
467
		radeon_atom_output_lock(encoder, true);
467
		radeon_atom_output_lock(encoder, true);
468
	else
468
	else
469
		radeon_combios_output_lock(encoder, true);
469
		radeon_combios_output_lock(encoder, true);
470
	radeon_legacy_tmds_int_dpms(encoder, DRM_MODE_DPMS_OFF);
470
	radeon_legacy_tmds_int_dpms(encoder, DRM_MODE_DPMS_OFF);
471
	radeon_encoder_set_active_device(encoder);
-
 
472
}
471
}
Line 473... Line 472...
473
 
472
 
474
static void radeon_legacy_tmds_int_commit(struct drm_encoder *encoder)
473
static void radeon_legacy_tmds_int_commit(struct drm_encoder *encoder)
475
{
474
{
Line 541... Line 540...
541
		   (RADEON_FP_CRTC_DONT_SHADOW_VPAR |
540
		   (RADEON_FP_CRTC_DONT_SHADOW_VPAR |
542
		    RADEON_FP_CRTC_DONT_SHADOW_HEND));
541
		    RADEON_FP_CRTC_DONT_SHADOW_HEND));
Line 543... Line 542...
543
 
542
 
Line -... Line 543...
-
 
543
    fp_gen_cntl &= ~(RADEON_FP_FPON | RADEON_FP_TMDS_EN);
-
 
544
 
-
 
545
    fp_gen_cntl &= ~(RADEON_FP_RMX_HVSYNC_CONTROL_EN |
-
 
546
		     RADEON_FP_DFP_SYNC_SEL |
-
 
547
		     RADEON_FP_CRT_SYNC_SEL |
-
 
548
		     RADEON_FP_CRTC_LOCK_8DOT |
-
 
549
		     RADEON_FP_USE_SHADOW_EN |
-
 
550
		     RADEON_FP_CRTC_USE_SHADOW_VEND |
544
    fp_gen_cntl &= ~(RADEON_FP_FPON | RADEON_FP_TMDS_EN);
551
		     RADEON_FP_CRT_SYNC_ALT);
545
 
552
 
546
    if (1) /*  FIXME rgbBits == 8 */
553
    if (1) /*  FIXME rgbBits == 8 */
547
	    fp_gen_cntl |= RADEON_FP_PANEL_FORMAT;  /* 24 bit format */
554
	    fp_gen_cntl |= RADEON_FP_PANEL_FORMAT;  /* 24 bit format */
Line 554... Line 561...
554
		    if (radeon_encoder->rmx_type != RMX_OFF)
561
		    if (radeon_encoder->rmx_type != RMX_OFF)
555
			    fp_gen_cntl |= R200_FP_SOURCE_SEL_RMX;
562
			    fp_gen_cntl |= R200_FP_SOURCE_SEL_RMX;
556
		    else
563
		    else
557
			    fp_gen_cntl |= R200_FP_SOURCE_SEL_CRTC1;
564
			    fp_gen_cntl |= R200_FP_SOURCE_SEL_CRTC1;
558
	    } else
565
	    } else
559
		    fp_gen_cntl |= RADEON_FP_SEL_CRTC1;
566
		    fp_gen_cntl &= ~RADEON_FP_SEL_CRTC2;
560
    } else {
567
    } else {
561
	    if (ASIC_IS_R300(rdev) || rdev->family == CHIP_R200) {
568
	    if (ASIC_IS_R300(rdev) || rdev->family == CHIP_R200) {
562
		    fp_gen_cntl &= ~R200_FP_SOURCE_SEL_MASK;
569
		    fp_gen_cntl &= ~R200_FP_SOURCE_SEL_MASK;
563
		    fp_gen_cntl |= R200_FP_SOURCE_SEL_CRTC2;
570
		    fp_gen_cntl |= R200_FP_SOURCE_SEL_CRTC2;
564
	    } else
571
	    } else
Line 591... Line 598...
591
 
598
 
592
static bool radeon_legacy_tmds_ext_mode_fixup(struct drm_encoder *encoder,
599
static bool radeon_legacy_tmds_ext_mode_fixup(struct drm_encoder *encoder,
593
					      struct drm_display_mode *mode,
600
					      struct drm_display_mode *mode,
594
					      struct drm_display_mode *adjusted_mode)
601
					      struct drm_display_mode *adjusted_mode)
595
{
-
 
-
 
602
{
-
 
603
	/* set the active encoder to connector routing */
596
 
604
	radeon_encoder_set_active_device(encoder);
Line 597... Line 605...
597
	drm_mode_set_crtcinfo(adjusted_mode, 0);
605
	drm_mode_set_crtcinfo(adjusted_mode, 0);
598
 
606
 
Line 634... Line 642...
634
	if (rdev->is_atom_bios)
642
	if (rdev->is_atom_bios)
635
		radeon_atom_output_lock(encoder, true);
643
		radeon_atom_output_lock(encoder, true);
636
	else
644
	else
637
		radeon_combios_output_lock(encoder, true);
645
		radeon_combios_output_lock(encoder, true);
638
	radeon_legacy_tmds_ext_dpms(encoder, DRM_MODE_DPMS_OFF);
646
	radeon_legacy_tmds_ext_dpms(encoder, DRM_MODE_DPMS_OFF);
639
	radeon_encoder_set_active_device(encoder);
-
 
640
}
647
}
Line 641... Line 648...
641
 
648
 
642
static void radeon_legacy_tmds_ext_commit(struct drm_encoder *encoder)
649
static void radeon_legacy_tmds_ext_commit(struct drm_encoder *encoder)
643
{
650
{
Line 733... Line 740...
733
 
740
 
734
static bool radeon_legacy_tv_dac_mode_fixup(struct drm_encoder *encoder,
741
static bool radeon_legacy_tv_dac_mode_fixup(struct drm_encoder *encoder,
735
					    struct drm_display_mode *mode,
742
					    struct drm_display_mode *mode,
736
					    struct drm_display_mode *adjusted_mode)
743
					    struct drm_display_mode *adjusted_mode)
737
{
-
 
-
 
744
{
-
 
745
	/* set the active encoder to connector routing */
738
 
746
	radeon_encoder_set_active_device(encoder);
Line 739... Line 747...
739
	drm_mode_set_crtcinfo(adjusted_mode, 0);
747
	drm_mode_set_crtcinfo(adjusted_mode, 0);
740
 
748
 
Line 837... Line 845...
837
	if (rdev->is_atom_bios)
845
	if (rdev->is_atom_bios)
838
		radeon_atom_output_lock(encoder, true);
846
		radeon_atom_output_lock(encoder, true);
839
	else
847
	else
840
		radeon_combios_output_lock(encoder, true);
848
		radeon_combios_output_lock(encoder, true);
841
	radeon_legacy_tv_dac_dpms(encoder, DRM_MODE_DPMS_OFF);
849
	radeon_legacy_tv_dac_dpms(encoder, DRM_MODE_DPMS_OFF);
842
	radeon_encoder_set_active_device(encoder);
-
 
843
}
850
}
Line 844... Line 851...
844
 
851
 
845
static void radeon_legacy_tv_dac_commit(struct drm_encoder *encoder)
852
static void radeon_legacy_tv_dac_commit(struct drm_encoder *encoder)
846
{
853
{