Re: [PATCH 4/5] drm/amdgpu: Expose hive adev list and xgmi_mutex

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

 



On Wed, Nov 21, 2018 at 1:11 PM Andrey Grodzovsky
<andrey.grodzovsky@xxxxxxx> wrote:
>
> It's needed for device reset of entire hive.
>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@xxxxxxx>

Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h      | 2 ++
>  drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 7 ++++++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 3e5bede..4ef5f7a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -1227,8 +1227,10 @@ long amdgpu_kms_compat_ioctl(struct file *filp, unsigned int cmd,
>   * functions used by amdgpu_xgmi.c
>   */
>
> +extern struct mutex xgmi_mutex;
>  struct amdgpu_hive_info;
>
> +struct list_head *amdgpu_xgmi_get_adev_list_handle(struct amdgpu_hive_info *hive);
>  struct amdgpu_hive_info *amdgpu_get_xgmi_hive(struct amdgpu_device *adev);
>  int amdgpu_xgmi_update_topology(struct amdgpu_hive_info *hive);
>  int amdgpu_xgmi_add_device(struct amdgpu_device *adev);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> index 23e4e16..e483e60 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> @@ -26,7 +26,7 @@
>  #include "amdgpu_psp.h"
>
>
> -static DEFINE_MUTEX(xgmi_mutex);
> +DEFINE_MUTEX(xgmi_mutex);
>
>  #define AMDGPU_MAX_XGMI_HIVE                   8
>  #define AMDGPU_MAX_XGMI_DEVICE_PER_HIVE                4
> @@ -41,6 +41,11 @@ struct amdgpu_hive_info {
>  static struct amdgpu_hive_info xgmi_hives[AMDGPU_MAX_XGMI_HIVE];
>  static unsigned hive_count = 0;
>
> +struct list_head *amdgpu_xgmi_get_adev_list_handle(struct amdgpu_hive_info *hive)
> +{
> +       return &hive->device_list;
> +}
> +
>  struct amdgpu_hive_info *amdgpu_get_xgmi_hive(struct amdgpu_device *adev)
>  {
>         int i;
> --
> 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