Skip to contentSkip to conversation

drm/vmwgfx: fix warning if config intel iommu is off.

PATCH In review Dave Airlie 2 participants 2 messages Nov 8, 2013 – Dec 3, 2013

Subsystems (3)
lore
Share & tools
lore

Dave Airlie

author maintainer
#0 lore raw

PATCH 1/1 drm/vmwgfx: fix warning if config intel iommu is off.

From: Dave Airlie <[email protected]>

Though I'm not really happy with how ugly this code is now.

---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +2 -0
index 0b5c781..ba1f8f1 100644
@@ -482,7 +482,9 @@ static int vmw_dma_select_mode(struct vmw_private *dev_priv)
 		dev_priv->map_mode = vmw_dma_map_populate;
 #endif
 
+#ifdef CONFIG_INTEL_IOMMU
 out_fixup:
+#endif
 	if (dev_priv->map_mode == vmw_dma_map_populate &&
 	    vmw_restrict_iommu)
 		dev_priv->map_mode = vmw_dma_map_bind;
Signature · 1 line
1.8.3.1
#1 lore raw

Hi, Dave, I'm sorry I missed this one.

(but the warning is shut up with another patch).

I agree this code is ugly, (and has become even uglier). I'll put on my todo list to find a way to do this more cleanly...

/Thomas

Quoted 23 lines · Dave Airlie

From: Dave Airlie <[email protected]>

Though I'm not really happy with how ugly this code is now.

---
  drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +2 -0
index 0b5c781..ba1f8f1 100644
@@ -482,7 +482,9 @@ static int vmw_dma_select_mode(struct vmw_private *dev_priv)
  		dev_priv->map_mode = vmw_dma_map_populate;
  #endif
 
+#ifdef CONFIG_INTEL_IOMMU
  out_fixup:
+#endif
  	if (dev_priv->map_mode == vmw_dma_map_populate &&
  	    vmw_restrict_iommu)
  		dev_priv->map_mode = vmw_dma_map_bind;