Re: [PATCH 5/7] drm/amdgpu: Call doorbell index init on device initialization

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

 



On Wed, Nov 21, 2018 at 5:00 PM Oak Zeng <ozeng@xxxxxxx> wrote:
>
> Change-Id: I2f004bbbe2565035460686f4fc16e86b77a2a9b5
> Signed-off-by: Oak Zeng <ozeng@xxxxxxx>
> Suggested-by: Felix Kuehling <Felix.Kuehling@xxxxxxx>
> Suggested-by: Alex Deucher <alexander.deucher@xxxxxxx>

I think it would be cleaner to call this in the soc files directly
(cik.c, vi.c, soc15.c in the set_ip_blocks() functions).  It keeps the
asic specific bits out of amdgpu_device.c.

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index cb06e68..a942a88 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -513,6 +513,13 @@ void amdgpu_device_pci_config_reset(struct amdgpu_device *adev)
>   */
>  static int amdgpu_device_doorbell_init(struct amdgpu_device *adev)
>  {
> +       if (adev->asic_type < CHIP_VEGA10)
> +               vi_doorbell_index_init(adev);
> +       else if (adev->asic_type == CHIP_VEGA10)
> +               vega10_doorbell_index_init(adev);
> +       else
> +               vega12_doorbell_index_init(adev);
> +
>         /* No doorbell on SI hardware generation */
>         if (adev->asic_type < CHIP_BONAIRE) {
>                 adev->doorbell.base = 0;
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
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