Files
linux-nv-oot/drivers/platform/tegra/dce/dce-debug-perf.c
anupamg 71f130a999 DCE-KMD: Address admin buffer sync access issue
- I2b8a24f9044bc08e10e5ff8cbf0c3f51fa53ff53 change introduced
  an issue of concurrent accesses of admin message buffer
  by different admin channel clients.

- This change will fix this issue by adding set of buffers per admin
  channel client.

- When a admin channel client wants to use a buffer it will
  have to request using it's client ID.
  Buffer will be granted only if at least one buffer for that client
  is not in use.

- Admin channel clients must release the buffer once done with the
  usage so that it's available for other accesses by the same client.

- Do we need a mutex to protect this array?
    1) There's no issue if different clients are trying to get/put
       buffers concurrently since each query will operate on
       separate per client array.
    2) We've an assumption that none of the clients will be active
       during init. This is also documented as part of function
       documentation.
    3) Will we ever have a usecase where a same client does
       get/put concurrently?
    4) Is it possible for a client to be active during de-init?

- If answer to 3 or 4 is yes then we still need a mutex to protect
  the buffers.
    - Currently we've assumed that there woudn't be concurrent
      operations during init/deinit and on same client so
      we're not introducing any mutex.

JIRA TDS-16126

Change-Id: I2ab640dc7c8ee6dedc9179dbb726368c3cb7d65f
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3249307
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
2025-07-24 10:19:12 +00:00

17 KiB