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

Commit e1827a30 authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher
Browse files

drm/amd/powerplay: delete flag PP_VALID



don't need to check pp_valid, all pp
export functions are moved to ip_funcs
and pp_funcs. so just need to check the
function point.

Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3811f8f0
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ static int pp_dpm_dispatch_tasks(void *handle, enum amd_pp_task task_id,

static inline int pp_check(struct pp_instance *handle)
{
	if (handle == NULL || handle->pp_valid != PP_VALID)
	if (handle == NULL)
		return -EINVAL;

	if (handle->hwmgr == NULL || handle->hwmgr->smumgr_funcs == NULL)
@@ -64,7 +64,6 @@ static int amd_powerplay_create(struct amd_pp_init *pp_init,
	if (instance == NULL)
		return -ENOMEM;

	instance->pp_valid = PP_VALID;
	instance->chip_family = pp_init->chip_family;
	instance->chip_id = pp_init->chip_id;
	instance->pm_en = pp_init->pm_en;
+0 −3
Original line number Diff line number Diff line
@@ -25,10 +25,7 @@

#include "hwmgr.h"

#define PP_VALID  0x1F1F1F1F

struct pp_instance {
	uint32_t pp_valid;
	uint32_t chip_family;
	uint32_t chip_id;
	bool pm_en;