diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-05 10:37:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-05 10:37:15 -0400 |
commit | caa552358eb3de5d1cb0f473e92c91d8a875b7f3 (patch) | |
tree | d7c4fe4275c615c118031577ce7b946c8ee2ec06 | |
parent | b7fece1be8b1556dd06b5871b055282a54193e17 (diff) | |
parent | 68c78bd67bd6f868474ac75d98ea7d6ebf28d2e7 (diff) |
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
- i915 fixes: a few display regressions
- vmwgfx: possible loop forever fix
- nouveau: one userspace interface fix
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
drm/nouveau/core: don't leak oclass type bits to user
drm/i915: Fix lock dropping in intel_tv_detect()
drm/i915: handle G45/GM45 pulse detection connected state.
drm/vmwgfx: Fix a potential infinite spin waiting for fifo idle
drm/vmwgfx: Fix an incorrect OOM return value
drm/i915: Remove bogus __init annotation from DMI callbacks
drm/i915: don't warn if backlight unexpectedly enabled
drm/i915: Move intel_ddi_set_vc_payload_alloc(false) to haswell_crtc_disable()
drm/i915: fix plane/cursor handling when runtime suspended
drm/i915: Ignore VBT backlight presence check on Acer C720 (4005U)
-rw-r--r-- | drivers/gpu/drm/i915/intel_bios.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_crt.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 34 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 55 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_panel.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_tv.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/core/parent.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 3 |
10 files changed, 90 insertions, 41 deletions
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index a66955037e4e..eee79e1c3222 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c | |||
@@ -1123,7 +1123,7 @@ init_vbt_defaults(struct drm_i915_private *dev_priv) | |||
1123 | } | 1123 | } |
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | static int __init intel_no_opregion_vbt_callback(const struct dmi_system_id *id) | 1126 | static int intel_no_opregion_vbt_callback(const struct dmi_system_id *id) |
1127 | { | 1127 | { |
1128 | DRM_DEBUG_KMS("Falling back to manually reading VBT from " | 1128 | DRM_DEBUG_KMS("Falling back to manually reading VBT from " |
1129 | "VBIOS ROM for %s\n", | 1129 | "VBIOS ROM for %s\n", |
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index e8abfce40976..9212e6504e0f 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c | |||
@@ -804,7 +804,7 @@ static const struct drm_encoder_funcs intel_crt_enc_funcs = { | |||
804 | .destroy = intel_encoder_destroy, | 804 | .destroy = intel_encoder_destroy, |
805 | }; | 805 | }; |
806 | 806 | ||
807 | static int __init intel_no_crt_dmi_callback(const struct dmi_system_id *id) | 807 | static int intel_no_crt_dmi_callback(const struct dmi_system_id *id) |
808 | { | 808 | { |
809 | DRM_INFO("Skipping CRT initialization for %s\n", id->ident); | 809 | DRM_INFO("Skipping CRT initialization for %s\n", id->ident); |
810 | return 1; | 810 | return 1; |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index d074d704f458..d8324c69fa86 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -2233,6 +2233,15 @@ intel_pin_and_fence_fb_obj(struct drm_device *dev, | |||
2233 | if (need_vtd_wa(dev) && alignment < 256 * 1024) | 2233 | if (need_vtd_wa(dev) && alignment < 256 * 1024) |
2234 | alignment = 256 * 1024; | 2234 | alignment = 256 * 1024; |
2235 | 2235 | ||
2236 | /* | ||
2237 | * Global gtt pte registers are special registers which actually forward | ||
2238 | * writes to a chunk of system memory. Which means that there is no risk | ||
2239 | * that the register values disappear as soon as we call | ||
2240 | * intel_runtime_pm_put(), so it is correct to wrap only the | ||
2241 | * pin/unpin/fence and not more. | ||
2242 | */ | ||
2243 | intel_runtime_pm_get(dev_priv); | ||
2244 | |||
2236 | dev_priv->mm.interruptible = false; | 2245 | dev_priv->mm.interruptible = false; |
2237 | ret = i915_gem_object_pin_to_display_plane(obj, alignment, pipelined); | 2246 | ret = i915_gem_object_pin_to_display_plane(obj, alignment, pipelined); |
2238 | if (ret) | 2247 | if (ret) |
@@ -2250,12 +2259,14 @@ intel_pin_and_fence_fb_obj(struct drm_device *dev, | |||
2250 | i915_gem_object_pin_fence(obj); | 2259 | i915_gem_object_pin_fence(obj); |
2251 | 2260 | ||
2252 | dev_priv->mm.interruptible = true; | 2261 | dev_priv->mm.interruptible = true; |
2262 | intel_runtime_pm_put(dev_priv); | ||
2253 | return 0; | 2263 | return 0; |
2254 | 2264 | ||
2255 | err_unpin: | 2265 | err_unpin: |
2256 | i915_gem_object_unpin_from_display_plane(obj); | 2266 | i915_gem_object_unpin_from_display_plane(obj); |
2257 | err_interruptible: | 2267 | err_interruptible: |
2258 | dev_priv->mm.interruptible = true; | 2268 | dev_priv->mm.interruptible = true; |
2269 | intel_runtime_pm_put(dev_priv); | ||
2259 | return ret; | 2270 | return ret; |
2260 | } | 2271 | } |
2261 | 2272 | ||
@@ -4188,10 +4199,6 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc) | |||
4188 | intel_set_pch_fifo_underrun_reporting(dev, pipe, false); | 4199 | intel_set_pch_fifo_underrun_reporting(dev, pipe, false); |
4189 | 4200 | ||
4190 | intel_disable_pipe(dev_priv, pipe); | 4201 | intel_disable_pipe(dev_priv, pipe); |
4191 | |||
4192 | if (intel_crtc->config.dp_encoder_is_mst) | ||
4193 | intel_ddi_set_vc_payload_alloc(crtc, false); | ||
4194 | |||
4195 | ironlake_pfit_disable(intel_crtc); | 4202 | ironlake_pfit_disable(intel_crtc); |
4196 | 4203 | ||
4197 | for_each_encoder_on_crtc(dev, crtc, encoder) | 4204 | for_each_encoder_on_crtc(dev, crtc, encoder) |
@@ -4256,6 +4263,9 @@ static void haswell_crtc_disable(struct drm_crtc *crtc) | |||
4256 | intel_set_pch_fifo_underrun_reporting(dev, TRANSCODER_A, false); | 4263 | intel_set_pch_fifo_underrun_reporting(dev, TRANSCODER_A, false); |
4257 | intel_disable_pipe(dev_priv, pipe); | 4264 | intel_disable_pipe(dev_priv, pipe); |
4258 | 4265 | ||
4266 | if (intel_crtc->config.dp_encoder_is_mst) | ||
4267 | intel_ddi_set_vc_payload_alloc(crtc, false); | ||
4268 | |||
4259 | intel_ddi_disable_transcoder_func(dev_priv, cpu_transcoder); | 4269 | intel_ddi_disable_transcoder_func(dev_priv, cpu_transcoder); |
4260 | 4270 | ||
4261 | ironlake_pfit_disable(intel_crtc); | 4271 | ironlake_pfit_disable(intel_crtc); |
@@ -8240,6 +8250,15 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc, | |||
8240 | goto fail_locked; | 8250 | goto fail_locked; |
8241 | } | 8251 | } |
8242 | 8252 | ||
8253 | /* | ||
8254 | * Global gtt pte registers are special registers which actually | ||
8255 | * forward writes to a chunk of system memory. Which means that | ||
8256 | * there is no risk that the register values disappear as soon | ||
8257 | * as we call intel_runtime_pm_put(), so it is correct to wrap | ||
8258 | * only the pin/unpin/fence and not more. | ||
8259 | */ | ||
8260 | intel_runtime_pm_get(dev_priv); | ||
8261 | |||
8243 | /* Note that the w/a also requires 2 PTE of padding following | 8262 | /* Note that the w/a also requires 2 PTE of padding following |
8244 | * the bo. We currently fill all unused PTE with the shadow | 8263 | * the bo. We currently fill all unused PTE with the shadow |
8245 | * page and so we should always have valid PTE following the | 8264 | * page and so we should always have valid PTE following the |
@@ -8252,16 +8271,20 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc, | |||
8252 | ret = i915_gem_object_pin_to_display_plane(obj, alignment, NULL); | 8271 | ret = i915_gem_object_pin_to_display_plane(obj, alignment, NULL); |
8253 | if (ret) { | 8272 | if (ret) { |
8254 | DRM_DEBUG_KMS("failed to move cursor bo into the GTT\n"); | 8273 | DRM_DEBUG_KMS("failed to move cursor bo into the GTT\n"); |
8274 | intel_runtime_pm_put(dev_priv); | ||
8255 | goto fail_locked; | 8275 | goto fail_locked; |
8256 | } | 8276 | } |
8257 | 8277 | ||
8258 | ret = i915_gem_object_put_fence(obj); | 8278 | ret = i915_gem_object_put_fence(obj); |
8259 | if (ret) { | 8279 | if (ret) { |
8260 | DRM_DEBUG_KMS("failed to release fence for cursor"); | 8280 | DRM_DEBUG_KMS("failed to release fence for cursor"); |
8281 | intel_runtime_pm_put(dev_priv); | ||
8261 | goto fail_unpin; | 8282 | goto fail_unpin; |
8262 | } | 8283 | } |
8263 | 8284 | ||
8264 | addr = i915_gem_obj_ggtt_offset(obj); | 8285 | addr = i915_gem_obj_ggtt_offset(obj); |
8286 | |||
8287 | intel_runtime_pm_put(dev_priv); | ||
8265 | } else { | 8288 | } else { |
8266 | int align = IS_I830(dev) ? 16 * 1024 : 256; | 8289 | int align = IS_I830(dev) ? 16 * 1024 : 256; |
8267 | ret = i915_gem_object_attach_phys(obj, align); | 8290 | ret = i915_gem_object_attach_phys(obj, align); |
@@ -12481,6 +12504,9 @@ static struct intel_quirk intel_quirks[] = { | |||
12481 | /* Acer C720 and C720P Chromebooks (Celeron 2955U) have backlights */ | 12504 | /* Acer C720 and C720P Chromebooks (Celeron 2955U) have backlights */ |
12482 | { 0x0a06, 0x1025, 0x0a11, quirk_backlight_present }, | 12505 | { 0x0a06, 0x1025, 0x0a11, quirk_backlight_present }, |
12483 | 12506 | ||
12507 | /* Acer C720 Chromebook (Core i3 4005U) */ | ||
12508 | { 0x0a16, 0x1025, 0x0a11, quirk_backlight_present }, | ||
12509 | |||
12484 | /* Toshiba CB35 Chromebook (Celeron 2955U) */ | 12510 | /* Toshiba CB35 Chromebook (Celeron 2955U) */ |
12485 | { 0x0a06, 0x1179, 0x0a88, quirk_backlight_present }, | 12511 | { 0x0a06, 0x1179, 0x0a88, quirk_backlight_present }, |
12486 | 12512 | ||
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 67cfed6d911a..81d7681faa63 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -3661,24 +3661,12 @@ ironlake_dp_detect(struct intel_dp *intel_dp) | |||
3661 | return intel_dp_detect_dpcd(intel_dp); | 3661 | return intel_dp_detect_dpcd(intel_dp); |
3662 | } | 3662 | } |
3663 | 3663 | ||
3664 | static enum drm_connector_status | 3664 | static int g4x_digital_port_connected(struct drm_device *dev, |
3665 | g4x_dp_detect(struct intel_dp *intel_dp) | 3665 | struct intel_digital_port *intel_dig_port) |
3666 | { | 3666 | { |
3667 | struct drm_device *dev = intel_dp_to_dev(intel_dp); | ||
3668 | struct drm_i915_private *dev_priv = dev->dev_private; | 3667 | struct drm_i915_private *dev_priv = dev->dev_private; |
3669 | struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp); | ||
3670 | uint32_t bit; | 3668 | uint32_t bit; |
3671 | 3669 | ||
3672 | /* Can't disconnect eDP, but you can close the lid... */ | ||
3673 | if (is_edp(intel_dp)) { | ||
3674 | enum drm_connector_status status; | ||
3675 | |||
3676 | status = intel_panel_detect(dev); | ||
3677 | if (status == connector_status_unknown) | ||
3678 | status = connector_status_connected; | ||
3679 | return status; | ||
3680 | } | ||
3681 | |||
3682 | if (IS_VALLEYVIEW(dev)) { | 3670 | if (IS_VALLEYVIEW(dev)) { |
3683 | switch (intel_dig_port->port) { | 3671 | switch (intel_dig_port->port) { |
3684 | case PORT_B: | 3672 | case PORT_B: |
@@ -3691,7 +3679,7 @@ g4x_dp_detect(struct intel_dp *intel_dp) | |||
3691 | bit = PORTD_HOTPLUG_LIVE_STATUS_VLV; | 3679 | bit = PORTD_HOTPLUG_LIVE_STATUS_VLV; |
3692 | break; | 3680 | break; |
3693 | default: | 3681 | default: |
3694 | return connector_status_unknown; | 3682 | return -EINVAL; |
3695 | } | 3683 | } |
3696 | } else { | 3684 | } else { |
3697 | switch (intel_dig_port->port) { | 3685 | switch (intel_dig_port->port) { |
@@ -3705,11 +3693,36 @@ g4x_dp_detect(struct intel_dp *intel_dp) | |||
3705 | bit = PORTD_HOTPLUG_LIVE_STATUS_G4X; | 3693 | bit = PORTD_HOTPLUG_LIVE_STATUS_G4X; |
3706 | break; | 3694 | break; |
3707 | default: | 3695 | default: |
3708 | return connector_status_unknown; | 3696 | return -EINVAL; |
3709 | } | 3697 | } |
3710 | } | 3698 | } |
3711 | 3699 | ||
3712 | if ((I915_READ(PORT_HOTPLUG_STAT) & bit) == 0) | 3700 | if ((I915_READ(PORT_HOTPLUG_STAT) & bit) == 0) |
3701 | return 0; | ||
3702 | return 1; | ||
3703 | } | ||
3704 | |||
3705 | static enum drm_connector_status | ||
3706 | g4x_dp_detect(struct intel_dp *intel_dp) | ||
3707 | { | ||
3708 | struct drm_device *dev = intel_dp_to_dev(intel_dp); | ||
3709 | struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp); | ||
3710 | int ret; | ||
3711 | |||
3712 | /* Can't disconnect eDP, but you can close the lid... */ | ||
3713 | if (is_edp(intel_dp)) { | ||
3714 | enum drm_connector_status status; | ||
3715 | |||
3716 | status = intel_panel_detect(dev); | ||
3717 | if (status == connector_status_unknown) | ||
3718 | status = connector_status_connected; | ||
3719 | return status; | ||
3720 | } | ||
3721 | |||
3722 | ret = g4x_digital_port_connected(dev, intel_dig_port); | ||
3723 | if (ret == -EINVAL) | ||
3724 | return connector_status_unknown; | ||
3725 | else if (ret == 0) | ||
3713 | return connector_status_disconnected; | 3726 | return connector_status_disconnected; |
3714 | 3727 | ||
3715 | return intel_dp_detect_dpcd(intel_dp); | 3728 | return intel_dp_detect_dpcd(intel_dp); |
@@ -4066,8 +4079,14 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd) | |||
4066 | intel_display_power_get(dev_priv, power_domain); | 4079 | intel_display_power_get(dev_priv, power_domain); |
4067 | 4080 | ||
4068 | if (long_hpd) { | 4081 | if (long_hpd) { |
4069 | if (!ibx_digital_port_connected(dev_priv, intel_dig_port)) | 4082 | |
4070 | goto mst_fail; | 4083 | if (HAS_PCH_SPLIT(dev)) { |
4084 | if (!ibx_digital_port_connected(dev_priv, intel_dig_port)) | ||
4085 | goto mst_fail; | ||
4086 | } else { | ||
4087 | if (g4x_digital_port_connected(dev, intel_dig_port) != 1) | ||
4088 | goto mst_fail; | ||
4089 | } | ||
4071 | 4090 | ||
4072 | if (!intel_dp_get_dpcd(intel_dp)) { | 4091 | if (!intel_dp_get_dpcd(intel_dp)) { |
4073 | goto mst_fail; | 4092 | goto mst_fail; |
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 881361c0f27e..fdf40267249c 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -538,7 +538,7 @@ static const struct drm_encoder_funcs intel_lvds_enc_funcs = { | |||
538 | .destroy = intel_encoder_destroy, | 538 | .destroy = intel_encoder_destroy, |
539 | }; | 539 | }; |
540 | 540 | ||
541 | static int __init intel_no_lvds_dmi_callback(const struct dmi_system_id *id) | 541 | static int intel_no_lvds_dmi_callback(const struct dmi_system_id *id) |
542 | { | 542 | { |
543 | DRM_INFO("Skipping LVDS initialization for %s\n", id->ident); | 543 | DRM_INFO("Skipping LVDS initialization for %s\n", id->ident); |
544 | return 1; | 544 | return 1; |
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index 59b028f0b1e8..8e374449c6b5 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c | |||
@@ -801,7 +801,7 @@ static void pch_enable_backlight(struct intel_connector *connector) | |||
801 | 801 | ||
802 | cpu_ctl2 = I915_READ(BLC_PWM_CPU_CTL2); | 802 | cpu_ctl2 = I915_READ(BLC_PWM_CPU_CTL2); |
803 | if (cpu_ctl2 & BLM_PWM_ENABLE) { | 803 | if (cpu_ctl2 & BLM_PWM_ENABLE) { |
804 | WARN(1, "cpu backlight already enabled\n"); | 804 | DRM_DEBUG_KMS("cpu backlight already enabled\n"); |
805 | cpu_ctl2 &= ~BLM_PWM_ENABLE; | 805 | cpu_ctl2 &= ~BLM_PWM_ENABLE; |
806 | I915_WRITE(BLC_PWM_CPU_CTL2, cpu_ctl2); | 806 | I915_WRITE(BLC_PWM_CPU_CTL2, cpu_ctl2); |
807 | } | 807 | } |
@@ -845,7 +845,7 @@ static void i9xx_enable_backlight(struct intel_connector *connector) | |||
845 | 845 | ||
846 | ctl = I915_READ(BLC_PWM_CTL); | 846 | ctl = I915_READ(BLC_PWM_CTL); |
847 | if (ctl & BACKLIGHT_DUTY_CYCLE_MASK_PNV) { | 847 | if (ctl & BACKLIGHT_DUTY_CYCLE_MASK_PNV) { |
848 | WARN(1, "backlight already enabled\n"); | 848 | DRM_DEBUG_KMS("backlight already enabled\n"); |
849 | I915_WRITE(BLC_PWM_CTL, 0); | 849 | I915_WRITE(BLC_PWM_CTL, 0); |
850 | } | 850 | } |
851 | 851 | ||
@@ -876,7 +876,7 @@ static void i965_enable_backlight(struct intel_connector *connector) | |||
876 | 876 | ||
877 | ctl2 = I915_READ(BLC_PWM_CTL2); | 877 | ctl2 = I915_READ(BLC_PWM_CTL2); |
878 | if (ctl2 & BLM_PWM_ENABLE) { | 878 | if (ctl2 & BLM_PWM_ENABLE) { |
879 | WARN(1, "backlight already enabled\n"); | 879 | DRM_DEBUG_KMS("backlight already enabled\n"); |
880 | ctl2 &= ~BLM_PWM_ENABLE; | 880 | ctl2 &= ~BLM_PWM_ENABLE; |
881 | I915_WRITE(BLC_PWM_CTL2, ctl2); | 881 | I915_WRITE(BLC_PWM_CTL2, ctl2); |
882 | } | 882 | } |
@@ -910,7 +910,7 @@ static void vlv_enable_backlight(struct intel_connector *connector) | |||
910 | 910 | ||
911 | ctl2 = I915_READ(VLV_BLC_PWM_CTL2(pipe)); | 911 | ctl2 = I915_READ(VLV_BLC_PWM_CTL2(pipe)); |
912 | if (ctl2 & BLM_PWM_ENABLE) { | 912 | if (ctl2 & BLM_PWM_ENABLE) { |
913 | WARN(1, "backlight already enabled\n"); | 913 | DRM_DEBUG_KMS("backlight already enabled\n"); |
914 | ctl2 &= ~BLM_PWM_ENABLE; | 914 | ctl2 &= ~BLM_PWM_ENABLE; |
915 | I915_WRITE(VLV_BLC_PWM_CTL2(pipe), ctl2); | 915 | I915_WRITE(VLV_BLC_PWM_CTL2(pipe), ctl2); |
916 | } | 916 | } |
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 32186a656816..c69d3ce1b3d6 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c | |||
@@ -1311,6 +1311,7 @@ intel_tv_detect(struct drm_connector *connector, bool force) | |||
1311 | { | 1311 | { |
1312 | struct drm_display_mode mode; | 1312 | struct drm_display_mode mode; |
1313 | struct intel_tv *intel_tv = intel_attached_tv(connector); | 1313 | struct intel_tv *intel_tv = intel_attached_tv(connector); |
1314 | enum drm_connector_status status; | ||
1314 | int type; | 1315 | int type; |
1315 | 1316 | ||
1316 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] force=%d\n", | 1317 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] force=%d\n", |
@@ -1328,16 +1329,19 @@ intel_tv_detect(struct drm_connector *connector, bool force) | |||
1328 | if (intel_get_load_detect_pipe(connector, &mode, &tmp, &ctx)) { | 1329 | if (intel_get_load_detect_pipe(connector, &mode, &tmp, &ctx)) { |
1329 | type = intel_tv_detect_type(intel_tv, connector); | 1330 | type = intel_tv_detect_type(intel_tv, connector); |
1330 | intel_release_load_detect_pipe(connector, &tmp); | 1331 | intel_release_load_detect_pipe(connector, &tmp); |
1332 | status = type < 0 ? | ||
1333 | connector_status_disconnected : | ||
1334 | connector_status_connected; | ||
1331 | } else | 1335 | } else |
1332 | return connector_status_unknown; | 1336 | status = connector_status_unknown; |
1333 | 1337 | ||
1334 | drm_modeset_drop_locks(&ctx); | 1338 | drm_modeset_drop_locks(&ctx); |
1335 | drm_modeset_acquire_fini(&ctx); | 1339 | drm_modeset_acquire_fini(&ctx); |
1336 | } else | 1340 | } else |
1337 | return connector->status; | 1341 | return connector->status; |
1338 | 1342 | ||
1339 | if (type < 0) | 1343 | if (status != connector_status_connected) |
1340 | return connector_status_disconnected; | 1344 | return status; |
1341 | 1345 | ||
1342 | intel_tv->type = type; | 1346 | intel_tv->type = type; |
1343 | intel_tv_find_better_format(connector); | 1347 | intel_tv_find_better_format(connector); |
diff --git a/drivers/gpu/drm/nouveau/core/core/parent.c b/drivers/gpu/drm/nouveau/core/core/parent.c index 8701968a9743..30a2911878f8 100644 --- a/drivers/gpu/drm/nouveau/core/core/parent.c +++ b/drivers/gpu/drm/nouveau/core/core/parent.c | |||
@@ -86,7 +86,7 @@ nouveau_parent_lclass(struct nouveau_object *parent, u32 *lclass, int size) | |||
86 | sclass = nv_parent(parent)->sclass; | 86 | sclass = nv_parent(parent)->sclass; |
87 | while (sclass) { | 87 | while (sclass) { |
88 | if (++nr < size) | 88 | if (++nr < size) |
89 | lclass[nr] = sclass->oclass->handle; | 89 | lclass[nr] = sclass->oclass->handle & 0xffff; |
90 | sclass = sclass->sclass; | 90 | sclass = sclass->sclass; |
91 | } | 91 | } |
92 | 92 | ||
@@ -96,7 +96,7 @@ nouveau_parent_lclass(struct nouveau_object *parent, u32 *lclass, int size) | |||
96 | if (engine && (oclass = engine->sclass)) { | 96 | if (engine && (oclass = engine->sclass)) { |
97 | while (oclass->ofuncs) { | 97 | while (oclass->ofuncs) { |
98 | if (++nr < size) | 98 | if (++nr < size) |
99 | lclass[nr] = oclass->handle; | 99 | lclass[nr] = oclass->handle & 0xffff; |
100 | oclass++; | 100 | oclass++; |
101 | } | 101 | } |
102 | } | 102 | } |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c index 7bfdaa163a33..36b871686d3c 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | |||
@@ -450,11 +450,11 @@ static int vmw_cmd_res_reloc_add(struct vmw_private *dev_priv, | |||
450 | res, | 450 | res, |
451 | id_loc - sw_context->buf_start); | 451 | id_loc - sw_context->buf_start); |
452 | if (unlikely(ret != 0)) | 452 | if (unlikely(ret != 0)) |
453 | goto out_err; | 453 | return ret; |
454 | 454 | ||
455 | ret = vmw_resource_val_add(sw_context, res, &node); | 455 | ret = vmw_resource_val_add(sw_context, res, &node); |
456 | if (unlikely(ret != 0)) | 456 | if (unlikely(ret != 0)) |
457 | goto out_err; | 457 | return ret; |
458 | 458 | ||
459 | if (res_type == vmw_res_context && dev_priv->has_mob && | 459 | if (res_type == vmw_res_context && dev_priv->has_mob && |
460 | node->first_usage) { | 460 | node->first_usage) { |
@@ -468,13 +468,13 @@ static int vmw_cmd_res_reloc_add(struct vmw_private *dev_priv, | |||
468 | 468 | ||
469 | ret = vmw_resource_context_res_add(dev_priv, sw_context, res); | 469 | ret = vmw_resource_context_res_add(dev_priv, sw_context, res); |
470 | if (unlikely(ret != 0)) | 470 | if (unlikely(ret != 0)) |
471 | goto out_err; | 471 | return ret; |
472 | node->staged_bindings = | 472 | node->staged_bindings = |
473 | kzalloc(sizeof(*node->staged_bindings), GFP_KERNEL); | 473 | kzalloc(sizeof(*node->staged_bindings), GFP_KERNEL); |
474 | if (node->staged_bindings == NULL) { | 474 | if (node->staged_bindings == NULL) { |
475 | DRM_ERROR("Failed to allocate context binding " | 475 | DRM_ERROR("Failed to allocate context binding " |
476 | "information.\n"); | 476 | "information.\n"); |
477 | goto out_err; | 477 | return -ENOMEM; |
478 | } | 478 | } |
479 | INIT_LIST_HEAD(&node->staged_bindings->list); | 479 | INIT_LIST_HEAD(&node->staged_bindings->list); |
480 | } | 480 | } |
@@ -482,8 +482,7 @@ static int vmw_cmd_res_reloc_add(struct vmw_private *dev_priv, | |||
482 | if (p_val) | 482 | if (p_val) |
483 | *p_val = node; | 483 | *p_val = node; |
484 | 484 | ||
485 | out_err: | 485 | return 0; |
486 | return ret; | ||
487 | } | 486 | } |
488 | 487 | ||
489 | 488 | ||
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c index 6ccd993e26bf..6eae14d2a3f7 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | |||
@@ -180,8 +180,9 @@ void vmw_fifo_release(struct vmw_private *dev_priv, struct vmw_fifo_state *fifo) | |||
180 | 180 | ||
181 | mutex_lock(&dev_priv->hw_mutex); | 181 | mutex_lock(&dev_priv->hw_mutex); |
182 | 182 | ||
183 | vmw_write(dev_priv, SVGA_REG_SYNC, SVGA_SYNC_GENERIC); | ||
183 | while (vmw_read(dev_priv, SVGA_REG_BUSY) != 0) | 184 | while (vmw_read(dev_priv, SVGA_REG_BUSY) != 0) |
184 | vmw_write(dev_priv, SVGA_REG_SYNC, SVGA_SYNC_GENERIC); | 185 | ; |
185 | 186 | ||
186 | dev_priv->last_read_seqno = ioread32(fifo_mem + SVGA_FIFO_FENCE); | 187 | dev_priv->last_read_seqno = ioread32(fifo_mem + SVGA_FIFO_FENCE); |
187 | 188 | ||