drm/xe: Convert xe_pm_runtime_{get, put} to void and protect from recursion
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Fri, 1 Mar 2024 18:05:25 +0000 (13:05 -0500)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 4 Mar 2024 17:47:10 +0000 (12:47 -0500)
commit5c9da9fc64a1a6745175c7e77c3a0021a32560a5
tree1f0eea1ada3bfe3335aa319c4655e5b63867e393
parentd6b4137822a1f8d1a6676c18dff551b394557b65
drm/xe: Convert xe_pm_runtime_{get, put} to void and protect from recursion

With mem_access going away and pm_runtime getting called instead,
we need to protect these against recursions.

The put is asynchronous so there's no need to block it. However, for a
proper balance, we need to ensure that the references are taken and
restored regardless of the flow. So, let's convert them all to void and
use some direct linux/pm_runtime functions.

v2: Rebased and update commit message (Matt).

Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240301180526.643505-3-rodrigo.vivi@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_pm.c
drivers/gpu/drm/xe/xe_pm.h