Skip to content

Commit 9aca641

Browse files
Lijo Lazaralexdeucher
authored andcommitted
drm/amdgpu: Move xgmi status to interface header
These definitions are used by user APIs. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Asad Kamal <asad.kamal@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 044f8d3 commit 9aca641

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242

4343
#define XGMI_STATE_DISABLE 0xD1
4444
#define XGMI_STATE_LS0 0x81
45-
#define XGMI_LINK_ACTIVE 1
46-
#define XGMI_LINK_INACTIVE 0
4745

4846
static DEFINE_MUTEX(xgmi_mutex);
4947

@@ -365,9 +363,9 @@ int amdgpu_get_xgmi_link_status(struct amdgpu_device *adev, int global_link_num)
365363
return -ENOLINK;
366364

367365
if ((xgmi_state_reg_val & 0xFF) == XGMI_STATE_LS0)
368-
return XGMI_LINK_ACTIVE;
366+
return AMDGPU_XGMI_LINK_ACTIVE;
369367

370-
return XGMI_LINK_INACTIVE;
368+
return AMDGPU_XGMI_LINK_INACTIVE;
371369
}
372370

373371
/**

drivers/gpu/drm/amd/include/kgd_pp_interface.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1829,4 +1829,9 @@ struct amdgpu_partition_metrics_v1_1 {
18291829
struct gpu_metrics_attr metrics_attrs[];
18301830
};
18311831

1832+
enum amdgpu_xgmi_link_status {
1833+
AMDGPU_XGMI_LINK_INACTIVE = 0,
1834+
AMDGPU_XGMI_LINK_ACTIVE = 1,
1835+
};
1836+
18321837
#endif

0 commit comments

Comments
 (0)