[Intel-gfx] [PATCH v3 04/21] drm/i915/region: support volatile objects
Chris Wilson
chris at chris-wilson.co.uk
Tue Oct 8 09:10:59 UTC 2019
Quoting Matthew Auld (2019-10-04 18:04:35)
> diff --git a/drivers/gpu/drm/i915/intel_memory_region.h b/drivers/gpu/drm/i915/intel_memory_region.h
> index 29b86ca17dd9..323270a1ef67 100644
> --- a/drivers/gpu/drm/i915/intel_memory_region.h
> +++ b/drivers/gpu/drm/i915/intel_memory_region.h
> @@ -52,6 +52,11 @@ struct intel_memory_region {
> unsigned int type;
> unsigned int instance;
> unsigned int id;
> +
> + /* Protects access to objects and purgeable */
> + struct mutex obj_lock;
> + struct list_head objects;
> + struct list_head purgeable;
Looks good. Minor suggestion would to be wrap this in a sub-struct,
struct {
struct mutex mutex; /* Protects access to objects */
struct list_head list; /* yeah, not the best */
struct list_head purgeable;
} objects;
> };
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
More information about the Intel-gfx
mailing list