[PATCH 1/8] drm/amdgpu: fix VMHUB order to match the hardware

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

 



On 04/04/2017 03:23 AM, Alex Deucher wrote:
> On Mon, Apr 3, 2017 at 8:39 AM, Christian König <deathsimple at vodafone.de> wrote:
>> From: Christian König <christian.koenig at amd.com>
>>
>> Match our defines with what the hw uses.
>>
>> Signed-off-by: Christian König <christian.koenig at amd.com>
>
> Patches 1-4, 6-7:
> Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

With the Alex's comments.
Patches 1~7:
Reviewed-by: Junwei Zhang <Jerry.Zhang at amd.com>

(Although it looks they were already landed)

Jerry

>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu.h   |  4 ++--
>>   drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 12 +++---------
>>   2 files changed, 5 insertions(+), 11 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> index 86fba1a..c156534 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> @@ -126,8 +126,8 @@ extern int amdgpu_param_buf_per_se;
>>
>>   /* max number of VMHUB */
>>   #define AMDGPU_MAX_VMHUBS                      2
>> -#define AMDGPU_MMHUB                           0
>> -#define AMDGPU_GFXHUB                          1
>> +#define AMDGPU_GFXHUB                          0
>> +#define AMDGPU_MMHUB                           1
>>
>>   /* hardcode that limit for now */
>>   #define AMDGPU_VA_RESERVED_SIZE                        (8 << 20)
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> index df69aae..8dd99b2 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> @@ -129,8 +129,7 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
>>                                  struct amdgpu_irq_src *source,
>>                                  struct amdgpu_iv_entry *entry)
>>   {
>> -       struct amdgpu_vmhub *gfxhub = &adev->vmhub[AMDGPU_GFXHUB];
>> -       struct amdgpu_vmhub *mmhub = &adev->vmhub[AMDGPU_MMHUB];
>> +       struct amdgpu_vmhub *hub = &adev->vmhub[entry->vm_id_src];
>>          uint32_t status = 0;
>>          u64 addr;
>>
>> @@ -138,13 +137,8 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
>>          addr |= ((u64)entry->src_data[1] & 0xf) << 44;
>>
>>          if (!amdgpu_sriov_vf(adev)) {
>> -               if (entry->vm_id_src) {
>> -                       status = RREG32(mmhub->vm_l2_pro_fault_status);
>> -                       WREG32_P(mmhub->vm_l2_pro_fault_cntl, 1, ~1);
>> -               } else {
>> -                       status = RREG32(gfxhub->vm_l2_pro_fault_status);
>> -                       WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1);
>> -               }
>> +               status = RREG32(hub->vm_l2_pro_fault_status);
>> +               WREG32_P(hub->vm_l2_pro_fault_cntl, 1, ~1);
>>          }
>>
>>          if (printk_ratelimit()) {
>> --
>> 2.5.0
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>


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

  Powered by Linux