[PATCH] drm/amd/amdgpu: Add PCI info to gca_config debugfs

Alex Deucher alexdeucher at gmail.com
Wed Jan 18 18:40:03 UTC 2017


On Wed, Jan 18, 2017 at 1:25 PM, Tom St Denis <tstdenis82 at gmail.com> wrote:
> So we can determine which device the entry is before connecting
> a display.
>
> Signed-off-by: Tom St Denis <tom.stdenis at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 28681286d57c..8640f9216d93 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2967,7 +2967,7 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,
>                 return -ENOMEM;
>
>         /* version, increment each time something is added */
> -       config[no_regs++] = 2;
> +       config[no_regs++] = 3;
>         config[no_regs++] = adev->gfx.config.max_shader_engines;
>         config[no_regs++] = adev->gfx.config.max_tile_pipes;
>         config[no_regs++] = adev->gfx.config.max_cu_per_sh;
> @@ -3001,6 +3001,12 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,
>         config[no_regs++] = adev->family;
>         config[no_regs++] = adev->external_rev_id;
>
> +       /* rev==3 */
> +       config[no_regs++] = adev->pdev->device;
> +       config[no_regs++] = adev->pdev->revision;
> +       config[no_regs++] = adev->pdev->subsystem_device;
> +       config[no_regs++] = adev->pdev->subsystem_vendor;

For completeness, please add pdev->revision as well.  With that:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> +
>         while (size && (*pos < no_regs * 4)) {
>                 uint32_t value;
>
> --
> 2.11.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list