diff options
author | Huang Rui <ray.huang@amd.com> | 2018-12-14 04:09:08 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-03-19 16:03:55 -0400 |
commit | ae2e20136417f58d37a37c747cb6e12a2650bbd5 (patch) | |
tree | 003cf08c71f31f831579dbc717cab11d43792482 | |
parent | e15da5a4b08a94ef63630c85197dabd1c8a88b36 (diff) |
drm/amdgpu: move get_index_into_master_table macro into atomfirmware header
This patchs move get_index_into_master_table macro into atomfirmware header for
future use on smu.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <Kevin1.Wang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c index 46ffbc8469df..ea917d640688 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | |||
@@ -28,8 +28,6 @@ | |||
28 | #include "atom.h" | 28 | #include "atom.h" |
29 | #include "atombios.h" | 29 | #include "atombios.h" |
30 | 30 | ||
31 | #define get_index_into_master_table(master_table, table_name) (offsetof(struct master_table, table_name) / sizeof(uint16_t)) | ||
32 | |||
33 | bool amdgpu_atomfirmware_gpu_supports_virtualization(struct amdgpu_device *adev) | 31 | bool amdgpu_atomfirmware_gpu_supports_virtualization(struct amdgpu_device *adev) |
34 | { | 32 | { |
35 | int index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1, | 33 | int index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1, |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h index 20f158fd3b76..f8ea77d4e863 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h | |||
@@ -24,6 +24,8 @@ | |||
24 | #ifndef __AMDGPU_ATOMFIRMWARE_H__ | 24 | #ifndef __AMDGPU_ATOMFIRMWARE_H__ |
25 | #define __AMDGPU_ATOMFIRMWARE_H__ | 25 | #define __AMDGPU_ATOMFIRMWARE_H__ |
26 | 26 | ||
27 | #define get_index_into_master_table(master_table, table_name) (offsetof(struct master_table, table_name) / sizeof(uint16_t)) | ||
28 | |||
27 | bool amdgpu_atomfirmware_gpu_supports_virtualization(struct amdgpu_device *adev); | 29 | bool amdgpu_atomfirmware_gpu_supports_virtualization(struct amdgpu_device *adev); |
28 | void amdgpu_atomfirmware_scratch_regs_init(struct amdgpu_device *adev); | 30 | void amdgpu_atomfirmware_scratch_regs_init(struct amdgpu_device *adev); |
29 | int amdgpu_atomfirmware_allocate_fb_scratch(struct amdgpu_device *adev); | 31 | int amdgpu_atomfirmware_allocate_fb_scratch(struct amdgpu_device *adev); |