Skip to contentSkip to conversation

drm/i915: remove extraneous VGA power domain put calls

PATCH In review Imre Deak 3 participants 3 messages Apr 25, 2014 – May 6, 2014

Subsystems (2)
lore
Share & tools
lore

Imre Deak

author
#0 lore raw

PATCH 1/1 drm/i915: remove extraneous VGA power domain put calls

In recent dmesg logs reported for unrelated issues I noticed some power domain WARNs caused by the following.

The workaround

commit ce352550327b394f3072a07c9cd9d27af9276f15

Author: Ville Syrjälä <[email protected]>
Date:   Fri Sep 20 10:14:23 2013 +0300

drm/i915: Fix unclaimed register access due to delayed VGA memory disable

and following fixup of it

commit a14853206517b0c8102accbc77401805a0dbdb9e

Author: Ville Syrjälä <[email protected]>
Date:   Mon Sep 16 17:38:34 2013 +0300

drm/i915: Move power well init earlier during driver load

was partially reverted by

commit 7f16e5c1416070dc590dd333a2d677700046a4ab
Merge: 9d1cb91 5e01dc7
Author: Daniel Vetter <[email protected]>
Date: Mon Nov 4 16:28:47 2013 +0100

Merge tag 'v3.12' into drm-intel-next

but kept the power domain put calls on the error path.

I think for now we can keep things as-is (not reintroduce the w/a) and just fix the error path, since
- nobody complained seeing this issue
- according to Ville someone is reworking the VGA arbitration scheme at the moment and when that's ready we have to rethink this part anyway

So fix this by just removing the put calls from the error path as well.

---
 drivers/gpu/drm/i915/i915_dma.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +3 -6
index 0b38f88..4a13523 100644
@@ -1339,7 +1339,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
 
 	ret = i915_gem_init(dev);
 	if (ret)
-		goto cleanup_power;
+		goto cleanup_irq;
 
 	INIT_WORK(&dev_priv->console_resume_work, intel_console_resume);
 
@@ -1348,10 +1348,8 @@ static int i915_load_modeset_init(struct drm_device *dev)
 	/* Always safe in the mode setting case. */
 	/* FIXME: do pre/post-mode set stuff in core KMS code */
 	dev->vblank_disable_allowed = true;
-	if (INTEL_INFO(dev)->num_pipes == 0) {
-		intel_display_power_put(dev_priv, POWER_DOMAIN_VGA);
+	if (INTEL_INFO(dev)->num_pipes == 0)
 		return 0;
-	}
 
 	ret = intel_fbdev_init(dev);
 	if (ret)
@@ -1386,8 +1384,7 @@ cleanup_gem:
 	mutex_unlock(&dev->struct_mutex);
 	WARN_ON(dev_priv->mm.aliasing_ppgtt);
 	drm_mm_takedown(&dev_priv->gtt.base.mm);
-cleanup_power:
-	intel_display_power_put(dev_priv, POWER_DOMAIN_VGA);
+cleanup_irq:
 	drm_irq_uninstall(dev);
 cleanup_gem_stolen:
 	i915_gem_cleanup_stolen(dev);
Signature · 6 lines
1.8.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 36 lines · Imre Deak

In recent dmesg logs reported for unrelated issues I noticed some power domain WARNs caused by the following.

The workaround

commit ce352550327b394f3072a07c9cd9d27af9276f15

Author: Ville Syrjälä <[email protected]>
Date:   Fri Sep 20 10:14:23 2013 +0300

drm/i915: Fix unclaimed register access due to delayed VGA memory disable

and following fixup of it

commit a14853206517b0c8102accbc77401805a0dbdb9e

Author: Ville Syrjälä <[email protected]>
Date:   Mon Sep 16 17:38:34 2013 +0300

drm/i915: Move power well init earlier during driver load

was partially reverted by

commit 7f16e5c1416070dc590dd333a2d677700046a4ab
Merge: 9d1cb91 5e01dc7
Author: Daniel Vetter <[email protected]>
Date: Mon Nov 4 16:28:47 2013 +0100

Merge tag 'v3.12' into drm-intel-next

but kept the power domain put calls on the error path.

I think for now we can keep things as-is (not reintroduce the w/a) and just fix the error path, since
- nobody complained seeing this issue
- according to Ville someone is reworking the VGA arbitration scheme at the moment and when that's ready we have to rethink this part anyway

Quoted 3 lines

So fix this by just removing the put calls from the error path as well.

Quoted 46 lines
---
 drivers/gpu/drm/i915/i915_dma.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +3 -6
index 0b38f88..4a13523 100644
@@ -1339,7 +1339,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
 
 	ret = i915_gem_init(dev);
 	if (ret)
-		goto cleanup_power;
+		goto cleanup_irq;
 
 	INIT_WORK(&dev_priv->console_resume_work, intel_console_resume);
 
@@ -1348,10 +1348,8 @@ static int i915_load_modeset_init(struct drm_device *dev)
 	/* Always safe in the mode setting case. */
 	/* FIXME: do pre/post-mode set stuff in core KMS code */
 	dev->vblank_disable_allowed = true;
-	if (INTEL_INFO(dev)->num_pipes == 0) {
-		intel_display_power_put(dev_priv, POWER_DOMAIN_VGA);
+	if (INTEL_INFO(dev)->num_pipes == 0)
 		return 0;
-	}
 
 	ret = intel_fbdev_init(dev);
 	if (ret)
@@ -1386,8 +1384,7 @@ cleanup_gem:
 	mutex_unlock(&dev->struct_mutex);
 	WARN_ON(dev_priv->mm.aliasing_ppgtt);
 	drm_mm_takedown(&dev_priv->gtt.base.mm);
-cleanup_power:
-	intel_display_power_put(dev_priv, POWER_DOMAIN_VGA);
+cleanup_irq:
 	drm_irq_uninstall(dev);
 cleanup_gem_stolen:
 	i915_gem_cleanup_stolen(dev);
Signature · 6 lines
1.8.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä
Intel OTC
#2 lore raw
Quoted 37 lines · Ville Syrjälä
Quoted 36 lines · Imre Deak

In recent dmesg logs reported for unrelated issues I noticed some power domain WARNs caused by the following.

The workaround

commit ce352550327b394f3072a07c9cd9d27af9276f15

Author: Ville Syrjälä <[email protected]>
Date:   Fri Sep 20 10:14:23 2013 +0300

drm/i915: Fix unclaimed register access due to delayed VGA memory disable

and following fixup of it

commit a14853206517b0c8102accbc77401805a0dbdb9e

Author: Ville Syrjälä <[email protected]>
Date:   Mon Sep 16 17:38:34 2013 +0300

drm/i915: Move power well init earlier during driver load

was partially reverted by

commit 7f16e5c1416070dc590dd333a2d677700046a4ab
Merge: 9d1cb91 5e01dc7
Author: Daniel Vetter <[email protected]>
Date: Mon Nov 4 16:28:47 2013 +0100

Merge tag 'v3.12' into drm-intel-next

but kept the power domain put calls on the error path.

I think for now we can keep things as-is (not reintroduce the w/a) and just fix the error path, since
- nobody complained seeing this issue
- according to Ville someone is reworking the VGA arbitration scheme at the moment and when that's ready we have to rethink this part anyway

Quoted 5 lines
Quoted 3 lines

So fix this by just removing the put calls from the error path as well.

Oops, forgotten to mention that this one is merged to dinq. -Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch