[Intel-xe] [PATCH v2 3/3] drm/xe: Avoid any races around ccs_mode update
Niranjana Vishwanathapura
niranjana.vishwanathapura at intel.com
Sat Dec 2 02:37:38 UTC 2023
On Fri, Dec 01, 2023 at 09:59:22PM +0100, Andi Shyti wrote:
>Hi Niranjana,
>
>...
>
>> + /** @clients: drm clients info */
>> + struct {
>> + /** @lock: Protects drm clients info */
>> + spinlock_t lock;
>
>is this a refcount at the end of the day?
>
It is not a refcount in the sense that there is nothing to
release/free once count reaches 0.
It is just a mechanism to not allow ccs_mode changes if
there are any active drm clients, to keep things simple.
Note that there is an EU debugger RFC series which uses
a xarray of all drm clients. Once that lands, we could
just check if that array has any elements in them instead
of maintaining a separate count.
Niranjana
>Andi
More information about the Intel-xe
mailing list