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 4398
Line 169... Line 169...
169
 
169
 
170
static void intel_enable_dvo(struct intel_encoder *encoder)
170
static void intel_enable_dvo(struct intel_encoder *encoder)
171
{
171
{
172
	struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
172
	struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
-
 
173
	struct intel_dvo *intel_dvo = enc_to_dvo(encoder);
173
	struct intel_dvo *intel_dvo = enc_to_dvo(encoder);
174
	struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
174
	u32 dvo_reg = intel_dvo->dev.dvo_reg;
175
	u32 dvo_reg = intel_dvo->dev.dvo_reg;
Line 175... Line 176...
175
	u32 temp = I915_READ(dvo_reg);
176
	u32 temp = I915_READ(dvo_reg);
176
 
177
 
-
 
178
		I915_WRITE(dvo_reg, temp | DVO_ENABLE);
-
 
179
		I915_READ(dvo_reg);
-
 
180
	intel_dvo->dev.dev_ops->mode_set(&intel_dvo->dev,
-
 
181
					 &crtc->config.requested_mode,
177
		I915_WRITE(dvo_reg, temp | DVO_ENABLE);
182
					 &crtc->config.adjusted_mode);
178
		I915_READ(dvo_reg);
183
 
Line 179... Line 184...
179
	intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, true);
184
	intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, true);
180
}
185
}
181
 
186
 
182
/* Special dpms function to support cloning between dvo/sdvo/crt. */
187
/* Special dpms function to support cloning between dvo/sdvo/crt. */
183
static void intel_dvo_dpms(struct drm_connector *connector, int mode)
188
static void intel_dvo_dpms(struct drm_connector *connector, int mode)
-
 
189
{
Line 184... Line 190...
184
{
190
	struct intel_dvo *intel_dvo = intel_attached_dvo(connector);
185
	struct intel_dvo *intel_dvo = intel_attached_dvo(connector);
191
	struct drm_crtc *crtc;
186
	struct drm_crtc *crtc;
192
	struct intel_crtc_config *config;
Line 202... Line 208...
202
	}
208
	}
Line 203... Line 209...
203
 
209
 
204
	/* We call connector dpms manually below in case pipe dpms doesn't
210
	/* We call connector dpms manually below in case pipe dpms doesn't
205
	 * change due to cloning. */
211
	 * change due to cloning. */
-
 
212
	if (mode == DRM_MODE_DPMS_ON) {
-
 
213
		config = &to_intel_crtc(crtc)->config;
206
	if (mode == DRM_MODE_DPMS_ON) {
214
 
Line 207... Line 215...
207
		intel_dvo->base.connectors_active = true;
215
		intel_dvo->base.connectors_active = true;
Line -... Line 216...
-
 
216
 
-
 
217
		intel_crtc_update_dpms(crtc);
-
 
218
 
-
 
219
		intel_dvo->dev.dev_ops->mode_set(&intel_dvo->dev,
208
 
220
						 &config->requested_mode,
209
		intel_crtc_update_dpms(crtc);
221
						 &config->adjusted_mode);
210
 
222
 
Line 211... Line 223...
211
		intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, true);
223
		intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, true);
Line 297... Line 309...
297
	case DVOC:
309
	case DVOC:
298
		dvo_srcdim_reg = DVOC_SRCDIM;
310
		dvo_srcdim_reg = DVOC_SRCDIM;
299
		break;
311
		break;
300
	}
312
	}
Line 301... Line -...
301
 
-
 
302
	intel_dvo->dev.dev_ops->mode_set(&intel_dvo->dev,
-
 
303
					 &crtc->config.requested_mode,
-
 
304
					 adjusted_mode);
-
 
305
 
313
 
306
	/* Save the data order, since I don't know what it should be set to. */
314
	/* Save the data order, since I don't know what it should be set to. */
307
	dvo_val = I915_READ(dvo_reg) &
315
	dvo_val = I915_READ(dvo_reg) &
308
		  (DVO_PRESERVE_MASK | DVO_DATA_ORDER_GBRG);
316
		  (DVO_PRESERVE_MASK | DVO_DATA_ORDER_GBRG);
309
	dvo_val |= DVO_DATA_ORDER_FP | DVO_BORDER_ENABLE |
317
	dvo_val |= DVO_DATA_ORDER_FP | DVO_BORDER_ENABLE |