[PATCH i-g-t 2/3] lib/xe/xe_mmio: Fix assertion logic in xe_mmio_vf_access_init

Bernatowicz, Marcin marcin.bernatowicz at linux.intel.com
Wed Sep 11 14:50:08 UTC 2024


Hi,

On 9/9/2024 5:48 PM, Kamil Konieczny wrote:
> Hi Marcin,
> On 2024-09-04 at 10:47:00 +0200, Marcin Bernatowicz wrote:
>> Ensure igt_mmio is not null before proceeding.
>>
> 
> Please change order of patches in patchseries, first fixes
> then addition of new test(s). Or this can be changed at merge
> or I could merge patches 2/3 and 3/3 first?

Please ignore the test patch. We need just the fixes to be merged.

> 
>> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>
>> Cc: Piotr Piórkowski <piotr.piorkowski at intel.com>
>> Cc: Lukasz Laguna <lukasz.laguna at intel.com>
>> Cc: Adam Miszczak <adam.miszczak at linux.intel.com>
>> Cc: Jakub Kolakowski <jakub1.kolakowski at intel.com>
>> Cc: K V P Satyanarayana <satyanarayana.k.v.p at intel.com>
>> Cc: C V Narasimha <narasimha.c.v at intel.com>
>> ---
>>   lib/xe/xe_mmio.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/xe/xe_mmio.c b/lib/xe/xe_mmio.c
>> index 57526d7cb..3e42b2e1c 100644
>> --- a/lib/xe/xe_mmio.c
>> +++ b/lib/xe/xe_mmio.c
>> @@ -25,7 +25,7 @@ void xe_mmio_vf_access_init(int pf_fd, int vf_id, struct xe_mmio *mmio)
>>   
>>   	intel_mmio_use_pci_bar(&mmio->intel_mmio, pci_dev);
>>   
>> -	igt_assert(!mmio->intel_mmio.igt_mmio);
>> +	igt_assert(mmio->intel_mmio.igt_mmio);
> 
> Good catch, there is also "bool safe" in that struct,
> it could help to document the meaning of this field.

I guess it has to do with

* @safe: use safe register access tables

description to intel_register_access_init

> 
> LGTM
> Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> 
Thanks for review
Marcin
>>   
>>   	mmio->fd = pf_fd;
>>   	mmio->intel_mmio.safe = false;
>> -- 
>> 2.31.1
>>



More information about the igt-dev mailing list