diff mbox

[3/4] drm/i915: Add debug info for failed MSI enabling

Message ID 1454071949-24677-3-git-send-email-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Imre Deak Jan. 29, 2016, 12:52 p.m. UTC
While not being able to enable MSI interrupts may be a normal
circumstance, for debugging it may still be a useful information, so
emit an info about this.

Caught by Coverity.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/i915_dma.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

David Weinehall Jan. 29, 2016, 1:58 p.m. UTC | #1
On Fri, Jan 29, 2016 at 02:52:28PM +0200, Imre Deak wrote:
> While not being able to enable MSI interrupts may be a normal
> circumstance, for debugging it may still be a useful information, so
> emit an info about this.
> 
> Caught by Coverity.
> 
> Signed-off-by: Imre Deak <imre.deak@intel.com>

Reviewed-by: David Weinehall <david.weinehall@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_dma.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index db9b0c6..fd3a6d2 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -1078,8 +1078,10 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
>  	 * be lost or delayed, but we use them anyways to avoid
>  	 * stuck interrupts on some machines.
>  	 */
> -	if (!IS_I945G(dev) && !IS_I945GM(dev))
> -		pci_enable_msi(dev->pdev);
> +	if (!IS_I945G(dev) && !IS_I945GM(dev)) {
> +		if (pci_enable_msi(dev->pdev) < 0)
> +			DRM_DEBUG_DRIVER("can't enable MSI");
> +	}
>  
>  	intel_device_info_runtime_init(dev);
>  
> -- 
> 2.5.0
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index db9b0c6..fd3a6d2 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1078,8 +1078,10 @@  int i915_driver_load(struct drm_device *dev, unsigned long flags)
 	 * be lost or delayed, but we use them anyways to avoid
 	 * stuck interrupts on some machines.
 	 */
-	if (!IS_I945G(dev) && !IS_I945GM(dev))
-		pci_enable_msi(dev->pdev);
+	if (!IS_I945G(dev) && !IS_I945GM(dev)) {
+		if (pci_enable_msi(dev->pdev) < 0)
+			DRM_DEBUG_DRIVER("can't enable MSI");
+	}
 
 	intel_device_info_runtime_init(dev);