Skip to contentSkip to conversation

drm/i915: remove redundant warnings

PATCH In review Matthew Auld 3 participants 3 messages Dec 2, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: remove redundant warnings

If we've gotten this far then we must have already checked if the vma can fit into the vm when we inserted the mm node, and in turn must have also checked for the overflow.

---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +0 -9
index 02fb063302bf..a3c17a04b883 100644
@@ -1304,15 +1304,6 @@ static int gen8_alloc_va_range_3lvl(struct i915_address_space *vm,
 	uint32_t pdpes = I915_PDPES_PER_PDP(dev_priv);
 	int ret;
 
-	/* Wrap is never okay since we can only represent 48b, and we don't
-	 * actually use the other side of the canonical address space.
-	 */
-	if (WARN_ON(start + length < start))
-		return -ENODEV;
-
-	if (WARN_ON(start + length > vm->total))
-		return -ENODEV;
-
 	ret = alloc_gen8_temp_bitmaps(&new_page_dirs, &new_page_tables, pdpes);
 	if (ret)
 		return ret;
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 6 lines · Matthew Auld

If we've gotten this far then we must have already checked if the vma can fit into the vm when we inserted the mm node, and in turn must have also checked for the overflow.

The sanitychecks are a reasonable idea, since the result can be catastrophic - but they are rather piecemeal and not desired in production (just CI, and we want some really abusive test cases, of which we already have a small selection).

I'd rather see these become GEM_BUG_ON (or GEM_WARN_ON) and more complete coverage of the callbacks. i915_vma_bind() would give complete coverage with minimal testing.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

✓ Fi.CI.BAT: success for drm/i915: remove redundant warnings

In reply to Matthew Auld
== Series Details ==

== Series Details ==

Series: drm/i915: remove redundant warnings
URL : https://patchwork.freedesktop.org/series/16273/
State : success

== Summary ==

Series 16273v1 drm/i915: remove redundant warnings
https://patchwork.freedesktop.org/api/1.0/series/16273/revisions/1/mbox/

fi-bdw-5557u     total:245  pass:230  dwarn:0   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:245  pass:205  dwarn:0   dfail:0   fail:0   skip:40 
fi-byt-j1900     total:245  pass:217  dwarn:0   dfail:0   fail:0   skip:28 
fi-byt-n2820     total:245  pass:213  dwarn:0   dfail:0   fail:0   skip:32 
fi-hsw-4770      total:245  pass:225  dwarn:0   dfail:0   fail:0   skip:20 
fi-hsw-4770r     total:245  pass:225  dwarn:0   dfail:0   fail:0   skip:20 
fi-ilk-650       total:245  pass:192  dwarn:0   dfail:0   fail:0   skip:53 
fi-ivb-3520m     total:245  pass:223  dwarn:0   dfail:0   fail:0   skip:22 
fi-ivb-3770      total:245  pass:223  dwarn:0   dfail:0   fail:0   skip:22 
fi-kbl-7500u     total:245  pass:223  dwarn:0   dfail:0   fail:0   skip:22 
fi-skl-6260u     total:245  pass:231  dwarn:0   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:245  pass:224  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6700k     total:245  pass:223  dwarn:1   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:245  pass:231  dwarn:0   dfail:0   fail:0   skip:14 
fi-snb-2520m     total:245  pass:213  dwarn:0   dfail:0   fail:0   skip:32 
fi-snb-2600      total:245  pass:212  dwarn:0   dfail:0   fail:0   skip:33 

273202788eba907049316b3ccc2f4d1fd30aff1d drm-tip: 2016y-12m-02d-11h-27m-42s UTC integration manifest 2ad35df drm/i915: remove redundant warnings

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3172/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx