[PATCH 3/3] drm/amdgpu: cleanup adjust_mc_addr handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 15.05.2017 um 05:06 schrieb zhoucm1:
> On 2017å¹´05æ??13æ?¥ 02:57, Felix Kuehling wrote:
>> [SNIP]
>>>   					amdgpu_vm_do_set_ptes(&params,
>>>   							      last_shadow,
>>> -							      pt_addr, count,
>>> -							      incr,
>>> -							      AMDGPU_PTE_VALID);
>>> +							      entry, count,
>>> +							      incr, 0);
>> [FK] For count >=3 this would result in an SDMA_OP_PTEPDE packet with
>> flags=0 and the flags included in the address. Could SDMA mask out the
>> flags bits from the address before it applies the flags? The SDMA 4.0
>> MAS includes pseudo code that looks like it wouldn't.
>
>         5.
>
>
>                   Generate PTE/PDE
>
> It would work like this in C pseudo code:
>
> For (i = 0; i < count; i++)
>
> {
>
> Write ( Mask | ( Initial Value + ( i * Increment ) ) ) to Dest Addr  
> // result is a 64 bit value
>
> Dest Addr += 8 bytes;
>
> }
>
> Yes, it wouldn't.
>
Well Felix is right with the point that this is actually at least a 
little bit ugly and not the intended use.

I will just keep setting the valid bit outside of that function.

Regards,
Christian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20170515/0d15756f/attachment-0001.html>


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux