diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-15 00:19:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-15 00:19:54 -0500 |
commit | 049ffa8ab33a63b3bff672d1a0ee6a35ad253fe8 (patch) | |
tree | 70f4c684818b1c9871fa800088427e40d260592e /drivers/gpu/drm/i915/intel_dvo.c | |
parent | c681427e5ca22925fcc1be76a2e260a11e0a8498 (diff) | |
parent | 0846c728e20a0cd1e43fb75a3015f3b176a26466 (diff) |
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie:
"This is a combo of -next and some -fixes that came in in the
intervening time.
Highlights:
New drivers:
ARM Armada driver for Marvell Armada 510 SOCs
Intel:
Broadwell initial support under a default off switch,
Stereo/3D HDMI mode support
Valleyview improvements
Displayport improvements
Haswell fixes
initial mipi dsi panel support
CRC support for debugging
build with CONFIG_FB=n
Radeon:
enable DPM on a number of GPUs by default
secondary GPU powerdown support
enable HDMI audio by default
Hawaii support
Nouveau:
dynamic pm code infrastructure reworked, does nothing major yet
GK208 modesetting support
MSI fixes, on by default again
PMPEG improvements
pageflipping fixes
GMA500:
minnowboard SDVO support
VMware:
misc fixes
MSM:
prime, plane and rendernodes support
Tegra:
rearchitected to put the drm driver into the drm subsystem.
HDMI and gr2d support for tegra 114 SoC
QXL:
oops fix, and multi-head fixes
DRM core:
sysfs lifetime fixes
client capability ioctl
further cleanups to device midlayer
more vblank timestamp fixes"
* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (789 commits)
drm/nouveau: do not map evicted vram buffers in nouveau_bo_vma_add
drm/nvc0-/gr: shift wrapping bug in nvc0_grctx_generate_r406800
drm/nouveau/pwr: fix missing mutex unlock in a failure path
drm/nv40/therm: fix slowing down fan when pstate undefined
drm/nv11-: synchronise flips to vblank, unless async flip requested
drm/nvc0-: remove nasty fifo swmthd hack for flip completion method
drm/nv10-: we no longer need to create nvsw object on user channels
drm/nouveau: always queue flips relative to kernel channel activity
drm/nouveau: there is no need to reserve/fence the new fb when flipping
drm/nouveau: when bailing out of a pushbuf ioctl, do not remove previous fence
drm/nouveau: allow nouveau_fence_ref() to be a noop
drm/nvc8/mc: msi rearm is via the nvc0 method
drm/ttm: Fix vma page_prot bit manipulation
drm/vmwgfx: Fix a couple of compile / sparse warnings and errors
drm/vmwgfx: Resource evict fixes
drm/edid: compare actual vrefresh for all modes for quirks
drm: shmob_drm: Convert to clk_prepare/unprepare
drm/nouveau: fix 32-bit build
drm/i915/opregion: fix build error on CONFIG_ACPI=n
Revert "drm/radeon/audio: don't set speaker allocation on DCE4+"
...
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dvo.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dvo.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c index 7fa7df546c1e..3c7736546856 100644 --- a/drivers/gpu/drm/i915/intel_dvo.c +++ b/drivers/gpu/drm/i915/intel_dvo.c | |||
@@ -153,6 +153,8 @@ static void intel_dvo_get_config(struct intel_encoder *encoder, | |||
153 | flags |= DRM_MODE_FLAG_NVSYNC; | 153 | flags |= DRM_MODE_FLAG_NVSYNC; |
154 | 154 | ||
155 | pipe_config->adjusted_mode.flags |= flags; | 155 | pipe_config->adjusted_mode.flags |= flags; |
156 | |||
157 | pipe_config->adjusted_mode.crtc_clock = pipe_config->port_clock; | ||
156 | } | 158 | } |
157 | 159 | ||
158 | static void intel_disable_dvo(struct intel_encoder *encoder) | 160 | static void intel_disable_dvo(struct intel_encoder *encoder) |
@@ -171,11 +173,16 @@ static void intel_enable_dvo(struct intel_encoder *encoder) | |||
171 | { | 173 | { |
172 | struct drm_i915_private *dev_priv = encoder->base.dev->dev_private; | 174 | struct drm_i915_private *dev_priv = encoder->base.dev->dev_private; |
173 | struct intel_dvo *intel_dvo = enc_to_dvo(encoder); | 175 | struct intel_dvo *intel_dvo = enc_to_dvo(encoder); |
176 | struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); | ||
174 | u32 dvo_reg = intel_dvo->dev.dvo_reg; | 177 | u32 dvo_reg = intel_dvo->dev.dvo_reg; |
175 | u32 temp = I915_READ(dvo_reg); | 178 | u32 temp = I915_READ(dvo_reg); |
176 | 179 | ||
177 | I915_WRITE(dvo_reg, temp | DVO_ENABLE); | 180 | I915_WRITE(dvo_reg, temp | DVO_ENABLE); |
178 | I915_READ(dvo_reg); | 181 | I915_READ(dvo_reg); |
182 | intel_dvo->dev.dev_ops->mode_set(&intel_dvo->dev, | ||
183 | &crtc->config.requested_mode, | ||
184 | &crtc->config.adjusted_mode); | ||
185 | |||
179 | intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, true); | 186 | intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, true); |
180 | } | 187 | } |
181 | 188 | ||
@@ -184,6 +191,7 @@ static void intel_dvo_dpms(struct drm_connector *connector, int mode) | |||
184 | { | 191 | { |
185 | struct intel_dvo *intel_dvo = intel_attached_dvo(connector); | 192 | struct intel_dvo *intel_dvo = intel_attached_dvo(connector); |
186 | struct drm_crtc *crtc; | 193 | struct drm_crtc *crtc; |
194 | struct intel_crtc_config *config; | ||
187 | 195 | ||
188 | /* dvo supports only 2 dpms states. */ | 196 | /* dvo supports only 2 dpms states. */ |
189 | if (mode != DRM_MODE_DPMS_ON) | 197 | if (mode != DRM_MODE_DPMS_ON) |
@@ -204,10 +212,16 @@ static void intel_dvo_dpms(struct drm_connector *connector, int mode) | |||
204 | /* We call connector dpms manually below in case pipe dpms doesn't | 212 | /* We call connector dpms manually below in case pipe dpms doesn't |
205 | * change due to cloning. */ | 213 | * change due to cloning. */ |
206 | if (mode == DRM_MODE_DPMS_ON) { | 214 | if (mode == DRM_MODE_DPMS_ON) { |
215 | config = &to_intel_crtc(crtc)->config; | ||
216 | |||
207 | intel_dvo->base.connectors_active = true; | 217 | intel_dvo->base.connectors_active = true; |
208 | 218 | ||
209 | intel_crtc_update_dpms(crtc); | 219 | intel_crtc_update_dpms(crtc); |
210 | 220 | ||
221 | intel_dvo->dev.dev_ops->mode_set(&intel_dvo->dev, | ||
222 | &config->requested_mode, | ||
223 | &config->adjusted_mode); | ||
224 | |||
211 | intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, true); | 225 | intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, true); |
212 | } else { | 226 | } else { |
213 | intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, false); | 227 | intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, false); |
@@ -267,11 +281,6 @@ static bool intel_dvo_compute_config(struct intel_encoder *encoder, | |||
267 | drm_mode_set_crtcinfo(adjusted_mode, 0); | 281 | drm_mode_set_crtcinfo(adjusted_mode, 0); |
268 | } | 282 | } |
269 | 283 | ||
270 | if (intel_dvo->dev.dev_ops->mode_fixup) | ||
271 | return intel_dvo->dev.dev_ops->mode_fixup(&intel_dvo->dev, | ||
272 | &pipe_config->requested_mode, | ||
273 | adjusted_mode); | ||
274 | |||
275 | return true; | 284 | return true; |
276 | } | 285 | } |
277 | 286 | ||
@@ -299,10 +308,6 @@ static void intel_dvo_mode_set(struct intel_encoder *encoder) | |||
299 | break; | 308 | break; |
300 | } | 309 | } |
301 | 310 | ||
302 | intel_dvo->dev.dev_ops->mode_set(&intel_dvo->dev, | ||
303 | &crtc->config.requested_mode, | ||
304 | adjusted_mode); | ||
305 | |||
306 | /* Save the data order, since I don't know what it should be set to. */ | 311 | /* Save the data order, since I don't know what it should be set to. */ |
307 | dvo_val = I915_READ(dvo_reg) & | 312 | dvo_val = I915_READ(dvo_reg) & |
308 | (DVO_PRESERVE_MASK | DVO_DATA_ORDER_GBRG); | 313 | (DVO_PRESERVE_MASK | DVO_DATA_ORDER_GBRG); |
@@ -370,7 +375,6 @@ static int intel_dvo_get_modes(struct drm_connector *connector) | |||
370 | 375 | ||
371 | static void intel_dvo_destroy(struct drm_connector *connector) | 376 | static void intel_dvo_destroy(struct drm_connector *connector) |
372 | { | 377 | { |
373 | drm_sysfs_connector_remove(connector); | ||
374 | drm_connector_cleanup(connector); | 378 | drm_connector_cleanup(connector); |
375 | kfree(connector); | 379 | kfree(connector); |
376 | } | 380 | } |
@@ -451,11 +455,11 @@ void intel_dvo_init(struct drm_device *dev) | |||
451 | int i; | 455 | int i; |
452 | int encoder_type = DRM_MODE_ENCODER_NONE; | 456 | int encoder_type = DRM_MODE_ENCODER_NONE; |
453 | 457 | ||
454 | intel_dvo = kzalloc(sizeof(struct intel_dvo), GFP_KERNEL); | 458 | intel_dvo = kzalloc(sizeof(*intel_dvo), GFP_KERNEL); |
455 | if (!intel_dvo) | 459 | if (!intel_dvo) |
456 | return; | 460 | return; |
457 | 461 | ||
458 | intel_connector = kzalloc(sizeof(struct intel_connector), GFP_KERNEL); | 462 | intel_connector = kzalloc(sizeof(*intel_connector), GFP_KERNEL); |
459 | if (!intel_connector) { | 463 | if (!intel_connector) { |
460 | kfree(intel_dvo); | 464 | kfree(intel_dvo); |
461 | return; | 465 | return; |