diff options
author | David Francis <David.Francis@amd.com> | 2018-11-26 13:14:14 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-11-26 15:54:38 -0500 |
commit | 7349a3afaaea4600be86b2663a3b9e775f9590eb (patch) | |
tree | c6e9fcb6c8d1943173941aee85e1819eaf715cdf /drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | |
parent | c1ee92f94ce3b9aa72524f861dea67882d02ad34 (diff) |
drm/amd: update ATIF functions in AMD ACPI header
The ACPI interface in AMD was a few years out of date
and contained some unused and deprecated functions
Remove functions: Select Active Displays, Get Lid State,
Get TV Standard, Set TV Standard, Get Panel Expansion Mode,
Set Panel Expansion Mode, Get Graphics Device Types
Add functions: Query Backlight Transfer Characteristics,
Ready To Undock Notification
Changed functions: Get System Parameters,
Get System BIOS Requests
All changes are right from the standard
ATI ACPI Control Methods V0.44
Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c index 7f0afc526419..471266901d1b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | |||
@@ -41,28 +41,21 @@ struct amdgpu_atif_notification_cfg { | |||
41 | }; | 41 | }; |
42 | 42 | ||
43 | struct amdgpu_atif_notifications { | 43 | struct amdgpu_atif_notifications { |
44 | bool display_switch; | ||
45 | bool expansion_mode_change; | ||
46 | bool thermal_state; | 44 | bool thermal_state; |
47 | bool forced_power_state; | 45 | bool forced_power_state; |
48 | bool system_power_state; | 46 | bool system_power_state; |
49 | bool display_conf_change; | ||
50 | bool px_gfx_switch; | ||
51 | bool brightness_change; | 47 | bool brightness_change; |
52 | bool dgpu_display_event; | 48 | bool dgpu_display_event; |
49 | bool gpu_package_power_limit; | ||
53 | }; | 50 | }; |
54 | 51 | ||
55 | struct amdgpu_atif_functions { | 52 | struct amdgpu_atif_functions { |
56 | bool system_params; | 53 | bool system_params; |
57 | bool sbios_requests; | 54 | bool sbios_requests; |
58 | bool select_active_disp; | ||
59 | bool lid_state; | ||
60 | bool get_tv_standard; | ||
61 | bool set_tv_standard; | ||
62 | bool get_panel_expansion_mode; | ||
63 | bool set_panel_expansion_mode; | ||
64 | bool temperature_change; | 55 | bool temperature_change; |
65 | bool graphics_device_types; | 56 | bool query_backlight_transfer_characteristics; |
57 | bool ready_to_undock; | ||
58 | bool external_gpu_information; | ||
66 | }; | 59 | }; |
67 | 60 | ||
68 | struct amdgpu_atif { | 61 | struct amdgpu_atif { |
@@ -137,15 +130,12 @@ static union acpi_object *amdgpu_atif_call(struct amdgpu_atif *atif, | |||
137 | */ | 130 | */ |
138 | static void amdgpu_atif_parse_notification(struct amdgpu_atif_notifications *n, u32 mask) | 131 | static void amdgpu_atif_parse_notification(struct amdgpu_atif_notifications *n, u32 mask) |
139 | { | 132 | { |
140 | n->display_switch = mask & ATIF_DISPLAY_SWITCH_REQUEST_SUPPORTED; | ||
141 | n->expansion_mode_change = mask & ATIF_EXPANSION_MODE_CHANGE_REQUEST_SUPPORTED; | ||
142 | n->thermal_state = mask & ATIF_THERMAL_STATE_CHANGE_REQUEST_SUPPORTED; | 133 | n->thermal_state = mask & ATIF_THERMAL_STATE_CHANGE_REQUEST_SUPPORTED; |
143 | n->forced_power_state = mask & ATIF_FORCED_POWER_STATE_CHANGE_REQUEST_SUPPORTED; | 134 | n->forced_power_state = mask & ATIF_FORCED_POWER_STATE_CHANGE_REQUEST_SUPPORTED; |
144 | n->system_power_state = mask & ATIF_SYSTEM_POWER_SOURCE_CHANGE_REQUEST_SUPPORTED; | 135 | n->system_power_state = mask & ATIF_SYSTEM_POWER_SOURCE_CHANGE_REQUEST_SUPPORTED; |
145 | n->display_conf_change = mask & ATIF_DISPLAY_CONF_CHANGE_REQUEST_SUPPORTED; | ||
146 | n->px_gfx_switch = mask & ATIF_PX_GFX_SWITCH_REQUEST_SUPPORTED; | ||
147 | n->brightness_change = mask & ATIF_PANEL_BRIGHTNESS_CHANGE_REQUEST_SUPPORTED; | 136 | n->brightness_change = mask & ATIF_PANEL_BRIGHTNESS_CHANGE_REQUEST_SUPPORTED; |
148 | n->dgpu_display_event = mask & ATIF_DGPU_DISPLAY_EVENT_SUPPORTED; | 137 | n->dgpu_display_event = mask & ATIF_DGPU_DISPLAY_EVENT_SUPPORTED; |
138 | n->gpu_package_power_limit = mask & ATIF_GPU_PACKAGE_POWER_LIMIT_REQUEST_SUPPORTED; | ||
149 | } | 139 | } |
150 | 140 | ||
151 | /** | 141 | /** |
@@ -162,14 +152,11 @@ static void amdgpu_atif_parse_functions(struct amdgpu_atif_functions *f, u32 mas | |||
162 | { | 152 | { |
163 | f->system_params = mask & ATIF_GET_SYSTEM_PARAMETERS_SUPPORTED; | 153 | f->system_params = mask & ATIF_GET_SYSTEM_PARAMETERS_SUPPORTED; |
164 | f->sbios_requests = mask & ATIF_GET_SYSTEM_BIOS_REQUESTS_SUPPORTED; | 154 | f->sbios_requests = mask & ATIF_GET_SYSTEM_BIOS_REQUESTS_SUPPORTED; |
165 | f->select_active_disp = mask & ATIF_SELECT_ACTIVE_DISPLAYS_SUPPORTED; | ||
166 | f->lid_state = mask & ATIF_GET_LID_STATE_SUPPORTED; | ||
167 | f->get_tv_standard = mask & ATIF_GET_TV_STANDARD_FROM_CMOS_SUPPORTED; | ||
168 | f->set_tv_standard = mask & ATIF_SET_TV_STANDARD_IN_CMOS_SUPPORTED; | ||
169 | f->get_panel_expansion_mode = mask & ATIF_GET_PANEL_EXPANSION_MODE_FROM_CMOS_SUPPORTED; | ||
170 | f->set_panel_expansion_mode = mask & ATIF_SET_PANEL_EXPANSION_MODE_IN_CMOS_SUPPORTED; | ||
171 | f->temperature_change = mask & ATIF_TEMPERATURE_CHANGE_NOTIFICATION_SUPPORTED; | 155 | f->temperature_change = mask & ATIF_TEMPERATURE_CHANGE_NOTIFICATION_SUPPORTED; |
172 | f->graphics_device_types = mask & ATIF_GET_GRAPHICS_DEVICE_TYPES_SUPPORTED; | 156 | f->query_backlight_transfer_characteristics = |
157 | mask & ATIF_QUERY_BACKLIGHT_TRANSFER_CHARACTERISTICS_SUPPORTED; | ||
158 | f->ready_to_undock = mask & ATIF_READY_TO_UNDOCK_NOTIFICATION_SUPPORTED; | ||
159 | f->external_gpu_information = mask & ATIF_GET_EXTERNAL_GPU_INFORMATION_SUPPORTED; | ||
173 | } | 160 | } |
174 | 161 | ||
175 | /** | 162 | /** |