[PATCH] drm/xe/display: fix i915_gem_object_is_shmem() wrapper

Matthew Auld matthew.auld at intel.com
Fri Feb 9 09:54:16 UTC 2024


On 09/02/2024 08:39, Kandpal, Suraj wrote:
>> Subject: [PATCH] drm/xe/display: fix i915_gem_object_is_shmem() wrapper
>>
>> shmem ensures the memory is cleared on allocation, however here we are
>> using TTM, which doesn't natively support shmem (other than for swap), but
>> instead just allocates normal system memory. And we only zero such memory
>> for userspace allocations. In the case of intel_fbdev we are missing the
>> memset_io().
>>
> 
> LGTM
> Reviewed-by: Suraj Kandpal <suraj.kandpal at intel.com>

Thanks. Going to push with Fixes: 44e694958b95 ("drm/xe/display: 
Implement display support"), since this appears to fix display 
corruption seen with fbdev.

> 
>> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
>> ---
>>   drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/compat-i915-
>> headers/gem/i915_gem_object.h b/drivers/gpu/drm/xe/compat-i915-
>> headers/gem/i915_gem_object.h
>> index 68d9f6116bdf..777c20ceabab 100644
>> --- a/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h
>> +++ b/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h
>> @@ -10,7 +10,7 @@
>>
>>   #include "xe_bo.h"
>>
>> -#define i915_gem_object_is_shmem(obj) ((obj)->flags &
>> XE_BO_CREATE_SYSTEM_BIT)
>> +#define i915_gem_object_is_shmem(obj) (0) /* We don't use shmem */
>>
>>   static inline dma_addr_t i915_gem_object_get_dma_address(const struct
>> xe_bo *bo, pgoff_t n)  {
>> --
>> 2.43.0
> 


More information about the Intel-xe mailing list