Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a78fe133 authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu/atpx: add a query for ATPX dGPU power control



The runtime pm sequence is different depending on whether or
not the platform supports ATPX dGPU power control.

Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f81eb1a3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2400,9 +2400,11 @@ bool amdgpu_device_is_px(struct drm_device *dev);
#if defined(CONFIG_VGA_SWITCHEROO)
void amdgpu_register_atpx_handler(void);
void amdgpu_unregister_atpx_handler(void);
bool amdgpu_has_atpx_dgpu_power_cntl(void);
#else
static inline void amdgpu_register_atpx_handler(void) {}
static inline void amdgpu_unregister_atpx_handler(void) {}
static inline bool amdgpu_has_atpx_dgpu_power_cntl(void) { return false; }
#endif

/*
+4 −0
Original line number Diff line number Diff line
@@ -64,6 +64,10 @@ bool amdgpu_has_atpx(void) {
	return amdgpu_atpx_priv.atpx_detected;
}

bool amdgpu_has_atpx_dgpu_power_cntl(void) {
	return amdgpu_atpx_priv.atpx.functions.power_cntl;
}

/**
 * amdgpu_atpx_call - call an ATPX method
 *