[Intel-gfx] [PATCH] drm/i915/pages: some more unsigned long conversions
Chris Wilson
chris at chris-wilson.co.uk
Fri Apr 17 09:43:40 UTC 2020
Quoting Matthew Auld (2020-04-17 10:30:46)
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
> index 54ee658bb168..0399940fff94 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
> @@ -236,7 +236,7 @@ struct drm_i915_gem_object {
>
> struct i915_gem_object_page_iter {
> struct scatterlist *sg_pos;
> - unsigned int sg_idx; /* in pages, but 32bit eek! */
> + unsigned long sg_idx; /* in pages */
iirc sg_idx is still unsigned int.
Could you keep this and idx as int but add some GEM_BUG_ON(overflows_type)
Hmm, or probably better would be overflows_type(sg->len) which is I
think the trouble iirc.
-Chris
More information about the Intel-gfx
mailing list