aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2018-06-25 21:09:04 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-07-05 17:38:57 -0400
commit102c16a0246d77043e555e1e5b5de316bc068cbc (patch)
treededf1633f31baed7e4696cc8057cc8cd40a7ce64 /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parent0c3d01744511f053c5f67737cb7a6a99c0216a84 (diff)
drm/amdgpu: Make struct amdgpu_atif private to amdgpu_acpi.c
Currently, there is nothing in amdgpu that actually uses these structs other than amdgpu_acpi.c. Additionally, since we're about to start saving the correct ACPI handle to use for calling ATIF in this struct this saves us from having to handle making sure that the acpi_handle (and by proxy, the type definition for acpi_handle and all of the other acpi headers) doesn't need to be included within the amdgpu_drv struct itself. This follows the example set by amdgpu_atpx_handler.c. Signed-off-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h40
1 files changed, 2 insertions, 38 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 86e4d8bd52a6..219fea72beeb 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -190,6 +190,7 @@ struct amdgpu_job;
190struct amdgpu_irq_src; 190struct amdgpu_irq_src;
191struct amdgpu_fpriv; 191struct amdgpu_fpriv;
192struct amdgpu_bo_va_mapping; 192struct amdgpu_bo_va_mapping;
193struct amdgpu_atif;
193 194
194enum amdgpu_cp_irq { 195enum amdgpu_cp_irq {
195 AMDGPU_CP_IRQ_GFX_EOP = 0, 196 AMDGPU_CP_IRQ_GFX_EOP = 0,
@@ -1278,43 +1279,6 @@ struct amdgpu_vram_scratch {
1278/* 1279/*
1279 * ACPI 1280 * ACPI
1280 */ 1281 */
1281struct amdgpu_atif_notification_cfg {
1282 bool enabled;
1283 int command_code;
1284};
1285
1286struct amdgpu_atif_notifications {
1287 bool display_switch;
1288 bool expansion_mode_change;
1289 bool thermal_state;
1290 bool forced_power_state;
1291 bool system_power_state;
1292 bool display_conf_change;
1293 bool px_gfx_switch;
1294 bool brightness_change;
1295 bool dgpu_display_event;
1296};
1297
1298struct amdgpu_atif_functions {
1299 bool system_params;
1300 bool sbios_requests;
1301 bool select_active_disp;
1302 bool lid_state;
1303 bool get_tv_standard;
1304 bool set_tv_standard;
1305 bool get_panel_expansion_mode;
1306 bool set_panel_expansion_mode;
1307 bool temperature_change;
1308 bool graphics_device_types;
1309};
1310
1311struct amdgpu_atif {
1312 struct amdgpu_atif_notifications notifications;
1313 struct amdgpu_atif_functions functions;
1314 struct amdgpu_atif_notification_cfg notification_cfg;
1315 struct amdgpu_encoder *encoder_for_bl;
1316};
1317
1318struct amdgpu_atcs_functions { 1282struct amdgpu_atcs_functions {
1319 bool get_ext_state; 1283 bool get_ext_state;
1320 bool pcie_perf_req; 1284 bool pcie_perf_req;
@@ -1475,7 +1439,7 @@ struct amdgpu_device {
1475#if defined(CONFIG_DEBUG_FS) 1439#if defined(CONFIG_DEBUG_FS)
1476 struct dentry *debugfs_regs[AMDGPU_DEBUGFS_MAX_COMPONENTS]; 1440 struct dentry *debugfs_regs[AMDGPU_DEBUGFS_MAX_COMPONENTS];
1477#endif 1441#endif
1478 struct amdgpu_atif atif; 1442 struct amdgpu_atif *atif;
1479 struct amdgpu_atcs atcs; 1443 struct amdgpu_atcs atcs;
1480 struct mutex srbm_mutex; 1444 struct mutex srbm_mutex;
1481 /* GRBM index mutex. Protects concurrent access to GRBM index */ 1445 /* GRBM index mutex. Protects concurrent access to GRBM index */