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

Zeng, Oak Oak.Zeng at amd.com
Mon Nov 26 16:20:36 UTC 2018


That is good idea. Will do it.

thanks,
Oak

From: Deucher, Alexander
Sent: Monday, November 26, 2018 11:02 AM
To: Zeng, Oak <Oak.Zeng at amd.com>; Alex Deucher <alexdeucher at gmail.com>
Cc: amd-gfx at lists.freedesktop.org
Subject: Re: [PATCH 5/7] drm/amdgpu: Call doorbell index init on device initialization


Maybe it would be better to add this as a callback to struct amdgpu_asic_funcs to avoid adding asic specific code to amdgpu_device.c



Alex

________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org<mailto:amd-gfx-bounces at lists.freedesktop.org>> on behalf of Deucher, Alexander <Alexander.Deucher at amd.com<mailto:Alexander.Deucher at amd.com>>
Sent: Monday, November 26, 2018 10:59:02 AM
To: Zeng, Oak; Alex Deucher
Cc: amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>
Subject: Re: [PATCH 5/7] drm/amdgpu: Call doorbell index init on device initialization


Ah, ok.  no problem.



Alex

________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org<mailto:amd-gfx-bounces at lists.freedesktop.org>> on behalf of Zeng, Oak <Oak.Zeng at amd.com<mailto:Oak.Zeng at amd.com>>
Sent: Monday, November 26, 2018 10:31:04 AM
To: Alex Deucher
Cc: amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>
Subject: RE: [PATCH 5/7] drm/amdgpu: Call doorbell index init on device initialization

Yes, that was my first version. But during debug, I found amdgpu_device_doorbell_init uses adev->doorbell_index.max_assignment which is initialized in *_doorbell_index_init. So I have to call *_doorbell_index_init before amdgpu_device_doorbell_init. *_set_ip_blocks() is too late.

In a later version, I moved calling of *_doorbell_index_init to the top of amdgpu_device_doorbell_init.

thanks,
Oak

-----Original Message-----
From: Alex Deucher <alexdeucher at gmail.com<mailto:alexdeucher at gmail.com>>
Sent: Sunday, November 25, 2018 1:43 PM
To: Zeng, Oak <Oak.Zeng at amd.com<mailto:Oak.Zeng at amd.com>>
Subject: Fwd: [PATCH 5/7] drm/amdgpu: Call doorbell index init on device initialization

---------- Forwarded message ---------
From: Alex Deucher <alexdeucher at gmail.com<mailto:alexdeucher at gmail.com>>
Date: Wed, Nov 21, 2018 at 11:21 AM
Subject: Re: [PATCH 5/7] drm/amdgpu: Call doorbell index init on device initialization
To: <ozeng at amd.com<mailto:ozeng at amd.com>>
Cc: amd-gfx list <amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>>, Oak Zeng <Oak.Zeng at amd.com<mailto:Oak.Zeng at amd.com>>


On Wed, Nov 21, 2018 at 10:52 AM Oak Zeng <ozeng at amd.com<mailto:ozeng at amd.com>> wrote:
>
> Change-Id: I2f004bbbe2565035460686f4fc16e86b77a2a9b5
> Signed-off-by: Oak Zeng <ozeng at amd.com<mailto:ozeng at amd.com>>
> Suggested-by: Felix Kuehling <Felix.Kuehling at amd.com<mailto:Felix.Kuehling at amd.com>>
> Suggested-by: Alex Deucher <alexander.deucher at amd.com<mailto:alexander.deucher at amd.com>>

I think it would be cleaner to add this to the *_set_ip_blocks() functions in cik.c, vi.c, and soc15.c so it aligns with the
*_reg_base_init() calls.

Alex

> ---
>  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 at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20181126/ffded23f/attachment-0001.html>


More information about the amd-gfx mailing list