[RFC 16/34] drm/xe: Removing extra mem_access protection from runtime pm
Matthew Auld
matthew.auld at intel.com
Mon Feb 5 11:23:11 UTC 2024
On 26/01/2024 20:30, Rodrigo Vivi wrote:
> This is not needed any longer, now that we have all the protection
> in place with the runtime pm itself.
>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> ---
> drivers/gpu/drm/xe/xe_device.c | 8 --------
> drivers/gpu/drm/xe/xe_device.h | 1 -
> drivers/gpu/drm/xe/xe_pm.c | 3 ---
> 3 files changed, 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index ab41202ecaf8..1711d9064ecc 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -673,14 +673,6 @@ u32 xe_device_ccs_bytes(struct xe_device *xe, u64 size)
> DIV_ROUND_UP_ULL(size, NUM_BYTES_PER_CCS_BYTE(xe)) : 0;
> }
>
> -bool xe_device_mem_access_ongoing(struct xe_device *xe)
> -{
> - if (xe_pm_read_callback_task(xe) != NULL)
> - return true;
> -
> - return atomic_read(&xe->mem_access.ref);
> -}
> -
> /**
> * xe_device_assert_mem_access - Inspect the current runtime_pm state.
> * @xe: xe device instance
> diff --git a/drivers/gpu/drm/xe/xe_device.h b/drivers/gpu/drm/xe/xe_device.h
> index 270124da1e00..74074939d157 100644
> --- a/drivers/gpu/drm/xe/xe_device.h
> +++ b/drivers/gpu/drm/xe/xe_device.h
> @@ -146,7 +146,6 @@ bool xe_device_mem_access_get_if_ongoing(struct xe_device *xe);
> void xe_device_mem_access_put(struct xe_device *xe);
>
> void xe_device_assert_mem_access(struct xe_device *xe);
> -bool xe_device_mem_access_ongoing(struct xe_device *xe);
>
> static inline bool xe_device_in_fault_mode(struct xe_device *xe)
> {
> diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
> index d98f4bb3ad02..967d3dc0ded5 100644
> --- a/drivers/gpu/drm/xe/xe_pm.c
> +++ b/drivers/gpu/drm/xe/xe_pm.c
> @@ -281,9 +281,6 @@ int xe_pm_runtime_suspend(struct xe_device *xe)
> u8 id;
> int err = 0;
>
> - if (xe->d3cold.allowed && xe_device_mem_access_ongoing(xe))
> - return -EBUSY;
Note that this is always impossible. If access_ongoing is true here
something is very broken. Not sure what the point of this is. Maybe
reword the commit message?
> -
> /* Disable access_ongoing asserts and prevent recursive pm calls */
> xe_pm_write_callback_task(xe, current);
>
More information about the Intel-xe
mailing list