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_lvds.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_lvds.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index b8af94a5be39..c3b4da7895ed 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -92,6 +92,7 @@ static void intel_lvds_get_config(struct intel_encoder *encoder, | |||
92 | struct drm_device *dev = encoder->base.dev; | 92 | struct drm_device *dev = encoder->base.dev; |
93 | struct drm_i915_private *dev_priv = dev->dev_private; | 93 | struct drm_i915_private *dev_priv = dev->dev_private; |
94 | u32 lvds_reg, tmp, flags = 0; | 94 | u32 lvds_reg, tmp, flags = 0; |
95 | int dotclock; | ||
95 | 96 | ||
96 | if (HAS_PCH_SPLIT(dev)) | 97 | if (HAS_PCH_SPLIT(dev)) |
97 | lvds_reg = PCH_LVDS; | 98 | lvds_reg = PCH_LVDS; |
@@ -116,6 +117,13 @@ static void intel_lvds_get_config(struct intel_encoder *encoder, | |||
116 | 117 | ||
117 | pipe_config->gmch_pfit.control |= tmp & PANEL_8TO6_DITHER_ENABLE; | 118 | pipe_config->gmch_pfit.control |= tmp & PANEL_8TO6_DITHER_ENABLE; |
118 | } | 119 | } |
120 | |||
121 | dotclock = pipe_config->port_clock; | ||
122 | |||
123 | if (HAS_PCH_SPLIT(dev_priv->dev)) | ||
124 | ironlake_check_encoder_dotclock(pipe_config, dotclock); | ||
125 | |||
126 | pipe_config->adjusted_mode.crtc_clock = dotclock; | ||
119 | } | 127 | } |
120 | 128 | ||
121 | /* The LVDS pin pair needs to be on before the DPLLs are enabled. | 129 | /* The LVDS pin pair needs to be on before the DPLLs are enabled. |
@@ -198,7 +206,8 @@ static void intel_enable_lvds(struct intel_encoder *encoder) | |||
198 | { | 206 | { |
199 | struct drm_device *dev = encoder->base.dev; | 207 | struct drm_device *dev = encoder->base.dev; |
200 | struct intel_lvds_encoder *lvds_encoder = to_lvds_encoder(&encoder->base); | 208 | struct intel_lvds_encoder *lvds_encoder = to_lvds_encoder(&encoder->base); |
201 | struct intel_crtc *intel_crtc = to_intel_crtc(encoder->base.crtc); | 209 | struct intel_connector *intel_connector = |
210 | &lvds_encoder->attached_connector->base; | ||
202 | struct drm_i915_private *dev_priv = dev->dev_private; | 211 | struct drm_i915_private *dev_priv = dev->dev_private; |
203 | u32 ctl_reg, stat_reg; | 212 | u32 ctl_reg, stat_reg; |
204 | 213 | ||
@@ -217,13 +226,15 @@ static void intel_enable_lvds(struct intel_encoder *encoder) | |||
217 | if (wait_for((I915_READ(stat_reg) & PP_ON) != 0, 1000)) | 226 | if (wait_for((I915_READ(stat_reg) & PP_ON) != 0, 1000)) |
218 | DRM_ERROR("timed out waiting for panel to power on\n"); | 227 | DRM_ERROR("timed out waiting for panel to power on\n"); |
219 | 228 | ||
220 | intel_panel_enable_backlight(dev, intel_crtc->pipe); | 229 | intel_panel_enable_backlight(intel_connector); |
221 | } | 230 | } |
222 | 231 | ||
223 | static void intel_disable_lvds(struct intel_encoder *encoder) | 232 | static void intel_disable_lvds(struct intel_encoder *encoder) |
224 | { | 233 | { |
225 | struct drm_device *dev = encoder->base.dev; | 234 | struct drm_device *dev = encoder->base.dev; |
226 | struct intel_lvds_encoder *lvds_encoder = to_lvds_encoder(&encoder->base); | 235 | struct intel_lvds_encoder *lvds_encoder = to_lvds_encoder(&encoder->base); |
236 | struct intel_connector *intel_connector = | ||
237 | &lvds_encoder->attached_connector->base; | ||
227 | struct drm_i915_private *dev_priv = dev->dev_private; | 238 | struct drm_i915_private *dev_priv = dev->dev_private; |
228 | u32 ctl_reg, stat_reg; | 239 | u32 ctl_reg, stat_reg; |
229 | 240 | ||
@@ -235,7 +246,7 @@ static void intel_disable_lvds(struct intel_encoder *encoder) | |||
235 | stat_reg = PP_STATUS; | 246 | stat_reg = PP_STATUS; |
236 | } | 247 | } |
237 | 248 | ||
238 | intel_panel_disable_backlight(dev); | 249 | intel_panel_disable_backlight(intel_connector); |
239 | 250 | ||
240 | I915_WRITE(ctl_reg, I915_READ(ctl_reg) & ~POWER_TARGET_ON); | 251 | I915_WRITE(ctl_reg, I915_READ(ctl_reg) & ~POWER_TARGET_ON); |
241 | if (wait_for((I915_READ(stat_reg) & PP_ON) == 0, 1000)) | 252 | if (wait_for((I915_READ(stat_reg) & PP_ON) == 0, 1000)) |
@@ -466,7 +477,6 @@ static void intel_lvds_destroy(struct drm_connector *connector) | |||
466 | 477 | ||
467 | intel_panel_fini(&lvds_connector->base.panel); | 478 | intel_panel_fini(&lvds_connector->base.panel); |
468 | 479 | ||
469 | drm_sysfs_connector_remove(connector); | ||
470 | drm_connector_cleanup(connector); | 480 | drm_connector_cleanup(connector); |
471 | kfree(connector); | 481 | kfree(connector); |
472 | } | 482 | } |
@@ -802,7 +812,8 @@ static bool lvds_is_present_in_vbt(struct drm_device *dev, | |||
802 | return true; | 812 | return true; |
803 | 813 | ||
804 | for (i = 0; i < dev_priv->vbt.child_dev_num; i++) { | 814 | for (i = 0; i < dev_priv->vbt.child_dev_num; i++) { |
805 | struct child_device_config *child = dev_priv->vbt.child_dev + i; | 815 | union child_device_config *uchild = dev_priv->vbt.child_dev + i; |
816 | struct old_child_dev_config *child = &uchild->old; | ||
806 | 817 | ||
807 | /* If the device type is not LFP, continue. | 818 | /* If the device type is not LFP, continue. |
808 | * We have to check both the new identifiers as well as the | 819 | * We have to check both the new identifiers as well as the |
@@ -956,11 +967,11 @@ void intel_lvds_init(struct drm_device *dev) | |||
956 | } | 967 | } |
957 | } | 968 | } |
958 | 969 | ||
959 | lvds_encoder = kzalloc(sizeof(struct intel_lvds_encoder), GFP_KERNEL); | 970 | lvds_encoder = kzalloc(sizeof(*lvds_encoder), GFP_KERNEL); |
960 | if (!lvds_encoder) | 971 | if (!lvds_encoder) |
961 | return; | 972 | return; |
962 | 973 | ||
963 | lvds_connector = kzalloc(sizeof(struct intel_lvds_connector), GFP_KERNEL); | 974 | lvds_connector = kzalloc(sizeof(*lvds_connector), GFP_KERNEL); |
964 | if (!lvds_connector) { | 975 | if (!lvds_connector) { |
965 | kfree(lvds_encoder); | 976 | kfree(lvds_encoder); |
966 | return; | 977 | return; |