Re: [PATCH v3 04/21] drm/i915/region: support volatile objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux