Subversion Repositories Kolibri OS

Rev

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

Rev 4104 Rev 4280
Line 80... Line 80...
80
		*pipe = PORT_TO_PIPE(tmp);
80
		*pipe = PORT_TO_PIPE(tmp);
Line 81... Line 81...
81
 
81
 
82
	return true;
82
	return true;
Line 83... Line 83...
83
}
83
}
84
 
-
 
85
static void intel_crt_get_config(struct intel_encoder *encoder,
84
 
86
				 struct intel_crtc_config *pipe_config)
85
static unsigned int intel_crt_get_flags(struct intel_encoder *encoder)
87
{
86
{
88
	struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
87
	struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
Line 99... Line 98...
99
	if (tmp & ADPA_VSYNC_ACTIVE_HIGH)
98
	if (tmp & ADPA_VSYNC_ACTIVE_HIGH)
100
		flags |= DRM_MODE_FLAG_PVSYNC;
99
		flags |= DRM_MODE_FLAG_PVSYNC;
101
	else
100
	else
102
		flags |= DRM_MODE_FLAG_NVSYNC;
101
		flags |= DRM_MODE_FLAG_NVSYNC;
Line -... Line 102...
-
 
102
 
-
 
103
	return flags;
-
 
104
}
-
 
105
 
-
 
106
static void intel_crt_get_config(struct intel_encoder *encoder,
-
 
107
				 struct intel_crtc_config *pipe_config)
103
 
108
{
-
 
109
	pipe_config->adjusted_mode.flags |= intel_crt_get_flags(encoder);
-
 
110
}
-
 
111
 
-
 
112
static void hsw_crt_get_config(struct intel_encoder *encoder,
-
 
113
			       struct intel_crtc_config *pipe_config)
-
 
114
{
-
 
115
	intel_ddi_get_config(encoder, pipe_config);
-
 
116
 
-
 
117
	pipe_config->adjusted_mode.flags &= ~(DRM_MODE_FLAG_PHSYNC |
-
 
118
					      DRM_MODE_FLAG_NHSYNC |
-
 
119
					      DRM_MODE_FLAG_PVSYNC |
-
 
120
					      DRM_MODE_FLAG_NVSYNC);
104
	pipe_config->adjusted_mode.flags |= flags;
121
	pipe_config->adjusted_mode.flags |= intel_crt_get_flags(encoder);
Line 105... Line 122...
105
}
122
}
106
 
123
 
107
/* Note: The caller is required to filter out dpms modes not supported by the
124
/* Note: The caller is required to filter out dpms modes not supported by the
Line 774... Line 791...
774
 
791
 
775
	crt->base.compute_config = intel_crt_compute_config;
792
	crt->base.compute_config = intel_crt_compute_config;
776
	crt->base.mode_set = intel_crt_mode_set;
793
	crt->base.mode_set = intel_crt_mode_set;
777
	crt->base.disable = intel_disable_crt;
794
	crt->base.disable = intel_disable_crt;
-
 
795
	crt->base.enable = intel_enable_crt;
-
 
796
	if (IS_HASWELL(dev))
-
 
797
		crt->base.get_config = hsw_crt_get_config;
778
	crt->base.enable = intel_enable_crt;
798
	else
779
	crt->base.get_config = intel_crt_get_config;
799
	crt->base.get_config = intel_crt_get_config;
780
	if (I915_HAS_HOTPLUG(dev))
800
	if (I915_HAS_HOTPLUG(dev))
781
		crt->base.hpd_pin = HPD_CRT;
801
		crt->base.hpd_pin = HPD_CRT;
782
	if (HAS_DDI(dev))
802
	if (HAS_DDI(dev))