Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes

Daniel writes:
Just a few small things to fix regressions, somehow all patches from Jani:
- Fix dpms confusion about which platforms support intermediate modes on
vga.
- Revert the "ignore vbt for eDP bpc" patch, it breaks machines. This will
annoy mbp retina owners again, but windows machines seem to _really_
depend upon this. We can try to quirk the mbp retinas again in 3.8 and
backport the patch.
- Fix connector leaks when the sdvo setup failed, resulted in an OOPS
later on when trying to probe that connector (with it's encoder kfree'd
already).

* 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
drm/i915: do not ignore eDP bpc settings from vbt
drm/i915/sdvo: clean up connectors on intel_sdvo_init() failures
drm/i915/crt: fix DPMS standby and suspend mode handling

+31 -4
+1 -1
drivers/gpu/drm/i915/intel_crt.c
··· 143 143 int old_dpms; 144 144 145 145 /* PCH platforms and VLV only support on/off. */ 146 - if (INTEL_INFO(dev)->gen < 5 && mode != DRM_MODE_DPMS_ON) 146 + if (INTEL_INFO(dev)->gen >= 5 && mode != DRM_MODE_DPMS_ON) 147 147 mode = DRM_MODE_DPMS_OFF; 148 148 149 149 if (mode == connector->dpms)
+11
drivers/gpu/drm/i915/intel_display.c
··· 3841 3841 } 3842 3842 } 3843 3843 3844 + if (intel_encoder->type == INTEL_OUTPUT_EDP) { 3845 + /* Use VBT settings if we have an eDP panel */ 3846 + unsigned int edp_bpc = dev_priv->edp.bpp / 3; 3847 + 3848 + if (edp_bpc < display_bpc) { 3849 + DRM_DEBUG_KMS("clamping display bpc (was %d) to eDP (%d)\n", display_bpc, edp_bpc); 3850 + display_bpc = edp_bpc; 3851 + } 3852 + continue; 3853 + } 3854 + 3844 3855 /* 3845 3856 * HDMI is either 12 or 8, so if the display lets 10bpc sneak 3846 3857 * through, clamp it down. (Note: >12bpc will be caught below.)
+19 -3
drivers/gpu/drm/i915/intel_sdvo.c
··· 2382 2382 return true; 2383 2383 } 2384 2384 2385 + static void intel_sdvo_output_cleanup(struct intel_sdvo *intel_sdvo) 2386 + { 2387 + struct drm_device *dev = intel_sdvo->base.base.dev; 2388 + struct drm_connector *connector, *tmp; 2389 + 2390 + list_for_each_entry_safe(connector, tmp, 2391 + &dev->mode_config.connector_list, head) { 2392 + if (intel_attached_encoder(connector) == &intel_sdvo->base) 2393 + intel_sdvo_destroy(connector); 2394 + } 2395 + } 2396 + 2385 2397 static bool intel_sdvo_tv_create_property(struct intel_sdvo *intel_sdvo, 2386 2398 struct intel_sdvo_connector *intel_sdvo_connector, 2387 2399 int type) ··· 2717 2705 intel_sdvo->caps.output_flags) != true) { 2718 2706 DRM_DEBUG_KMS("SDVO output failed to setup on %s\n", 2719 2707 SDVO_NAME(intel_sdvo)); 2720 - goto err; 2708 + /* Output_setup can leave behind connectors! */ 2709 + goto err_output; 2721 2710 } 2722 2711 2723 2712 /* Only enable the hotplug irq if we need it, to work around noisy ··· 2731 2718 2732 2719 /* Set the input timing to the screen. Assume always input 0. */ 2733 2720 if (!intel_sdvo_set_target_input(intel_sdvo)) 2734 - goto err; 2721 + goto err_output; 2735 2722 2736 2723 if (!intel_sdvo_get_input_pixel_clock_range(intel_sdvo, 2737 2724 &intel_sdvo->pixel_clock_min, 2738 2725 &intel_sdvo->pixel_clock_max)) 2739 - goto err; 2726 + goto err_output; 2740 2727 2741 2728 DRM_DEBUG_KMS("%s device VID/DID: %02X:%02X.%02X, " 2742 2729 "clock range %dMHz - %dMHz, " ··· 2755 2742 intel_sdvo->caps.output_flags & 2756 2743 (SDVO_OUTPUT_TMDS1 | SDVO_OUTPUT_RGB1) ? 'Y' : 'N'); 2757 2744 return true; 2745 + 2746 + err_output: 2747 + intel_sdvo_output_cleanup(intel_sdvo); 2758 2748 2759 2749 err: 2760 2750 drm_encoder_cleanup(&intel_encoder->base);