aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2018-07-30 04:59:09 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-08-27 12:09:51 -0400
commitd23ee13fba23a3039971a976b2c4857cb5ba9c73 (patch)
tree88971cc05b8acc8f7e3ba0a9cee5d88e2aa68e97 /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parent5a83c93249098df2ee3b0039ec8f4495b959fcd0 (diff)
drm/amdgpu: Add amdgpu_gfx_off_ctrl function
v2: 1. drop the special handling for the hw IP suggested by hawking and Christian. 2. refine the variable name suggested by Flora. This funciton as the entry of gfx off feature. we arbitrat gfx off feature enable/disable in this function. Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 447c4c7a36d6..47fbe8f54036 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -950,6 +950,10 @@ struct amdgpu_gfx {
950 /* NGG */ 950 /* NGG */
951 struct amdgpu_ngg ngg; 951 struct amdgpu_ngg ngg;
952 952
953 /* gfx off */
954 bool gfx_off_state; /* true: enabled, false: disabled */
955 struct mutex gfx_off_mutex;
956 uint32_t gfx_off_req_count; /* default 1, enable gfx off: dec 1, disable gfx off: add 1 */
953 /* pipe reservation */ 957 /* pipe reservation */
954 struct mutex pipe_reserve_mutex; 958 struct mutex pipe_reserve_mutex;
955 DECLARE_BITMAP (pipe_reserve_bitmap, AMDGPU_MAX_COMPUTE_QUEUES); 959 DECLARE_BITMAP (pipe_reserve_bitmap, AMDGPU_MAX_COMPUTE_QUEUES);
@@ -1774,6 +1778,7 @@ void amdgpu_device_program_register_sequence(struct amdgpu_device *adev,
1774 const u32 array_size); 1778 const u32 array_size);
1775 1779
1776bool amdgpu_device_is_px(struct drm_device *dev); 1780bool amdgpu_device_is_px(struct drm_device *dev);
1781void amdgpu_gfx_off_ctrl(struct amdgpu_device *adev, bool enable);
1777/* atpx handler */ 1782/* atpx handler */
1778#if defined(CONFIG_VGA_SWITCHEROO) 1783#if defined(CONFIG_VGA_SWITCHEROO)
1779void amdgpu_register_atpx_handler(void); 1784void amdgpu_register_atpx_handler(void);