[Intel-xe] [PATCH v12 08/13] drm/xe/display: use mem_access underneath

Matthew Auld matthew.auld at intel.com
Thu Jun 29 09:19:11 UTC 2023


On 28/06/2023 10:51, Gupta, Anshuman wrote:
> 
> 
>> -----Original Message-----
>> From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of
>> Matthew Auld
>> Sent: Monday, June 26, 2023 4:21 PM
>> To: intel-xe at lists.freedesktop.org
>> Subject: [Intel-xe] [PATCH v12 08/13] drm/xe/display: use mem_access
>> underneath
>>
>> There are places in the display code (i915) doing mmio access.
>>
>> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
>> ---
>>   drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
>> b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
>> index 59bf1d4a61d6..7a43f3af1796 100644
>> --- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
>> +++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
>> @@ -151,6 +151,7 @@ static inline bool intel_runtime_pm_get(struct
>> xe_runtime_pm *pm)
>>   		xe_pm_runtime_put(xe);
>>   		return false;
>>   	}
>> +	xe_device_mem_access_get(xe);
>>   	return true;
>>   }
>>
>> @@ -158,14 +159,14 @@ static inline bool
>> intel_runtime_pm_get_if_in_use(struct xe_runtime_pm *pm)  {
>>   	struct xe_device *xe = container_of(pm, struct xe_device,
>> runtime_pm);
>>
>> -	return xe_pm_runtime_get_if_active(xe);
>> +	return xe_device_mem_access_get_if_ongoing(xe);
>>   }
>>
>>   static inline void intel_runtime_pm_put_unchecked(struct xe_runtime_pm
>> *pm)  {
>>   	struct xe_device *xe = container_of(pm, struct xe_device,
>> runtime_pm);
>>
>> -	xe_pm_runtime_put(xe);
>> +	xe_device_mem_access_put(xe);
> This patch does not remove xe_pm_runtime_get() from intel_runtime_pm_get() but removes
> xe_pm_runtime_put() here. It will be unbalanced dev usage_count.

Indeed. Thanks for catching.

> Thanks,
> Anshuman Gupta.
>>   }
>>
>>   static inline void intel_runtime_pm_put(struct xe_runtime_pm *pm, bool
>> wakeref)
>> --
>> 2.41.0
> 


More information about the Intel-xe mailing list