Commit ae2e2013 authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher

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: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarKevin Wang <Kevin1.Wang@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e15da5a4
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
#include "atom.h" #include "atom.h"
#include "atombios.h" #include "atombios.h"
#define get_index_into_master_table(master_table, table_name) (offsetof(struct master_table, table_name) / sizeof(uint16_t))
bool amdgpu_atomfirmware_gpu_supports_virtualization(struct amdgpu_device *adev) bool amdgpu_atomfirmware_gpu_supports_virtualization(struct amdgpu_device *adev)
{ {
int index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1, int index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1,
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#ifndef __AMDGPU_ATOMFIRMWARE_H__ #ifndef __AMDGPU_ATOMFIRMWARE_H__
#define __AMDGPU_ATOMFIRMWARE_H__ #define __AMDGPU_ATOMFIRMWARE_H__
#define get_index_into_master_table(master_table, table_name) (offsetof(struct master_table, table_name) / sizeof(uint16_t))
bool amdgpu_atomfirmware_gpu_supports_virtualization(struct amdgpu_device *adev); bool amdgpu_atomfirmware_gpu_supports_virtualization(struct amdgpu_device *adev);
void amdgpu_atomfirmware_scratch_regs_init(struct amdgpu_device *adev); void amdgpu_atomfirmware_scratch_regs_init(struct amdgpu_device *adev);
int amdgpu_atomfirmware_allocate_fb_scratch(struct amdgpu_device *adev); int amdgpu_atomfirmware_allocate_fb_scratch(struct amdgpu_device *adev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment