[Intel-gfx] [PATCH v5 05/11] drm/i915/dsb: Check DSB engine status.

Animesh Manna animesh.manna at intel.com
Tue Sep 10 07:32:16 UTC 2019



On 9/10/2019 8:44 AM, Sharma, Shashank wrote:
>
>> -----Original Message-----
>> From: Manna, Animesh
>> Sent: Monday, September 9, 2019 10:27 PM
>> To: Sharma, Shashank <shashank.sharma at intel.com>; intel-
>> gfx at lists.freedesktop.org
>> Cc: Thierry, Michel <michel.thierry at intel.com>; Nikula, Jani <jani.nikula at intel.com>;
>> Vivi, Rodrigo <rodrigo.vivi at intel.com>
>> Subject: Re: [PATCH v5 05/11] drm/i915/dsb: Check DSB engine status.
>>
>>
>>
>> On 9/9/2019 6:43 PM, Sharma, Shashank wrote:
>>> On 9/7/2019 4:37 PM, Animesh Manna wrote:
>>>> +#define _DSBSL_INSTANCE_BASE        0x70B00
>>>> +#define DSBSL_INSTANCE(pipe, id)    (_DSBSL_INSTANCE_BASE + \
>>>> +                     (pipe) * 0x1000 + (id) * 100)
>>> Why is pipe in () ?
>> mmio offset per DSB depend on pipe and dsb-id (3 DSB per pipe.) offset of PIPE_A
>> DSB1-> 70B00 offset of PIPE_B DSB1-> 71B00 and so on...
>>
> The question here is why is the 'pipe' in braces ? why is it '(pipe)', instead of 'pipe'. I don’t see a reason.
Just followed general macro definition rule, am I missing anything.
for example: #define double(x) x*2
double(2+3) will give wrong result if we do not define as
#define double(x) (x)*2

Regards,
Animesh
>   
> - Shashank
>> Regards,
>> Animesh



More information about the Intel-gfx mailing list