[PATCH 3/3] drm/amd/powerplay: delete flag PP_VALID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Rex Zhu
> Sent: Thursday, September 28, 2017 5:41 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Zhu, Rex
> Subject: [PATCH 3/3] 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.
> 
> Change-Id: Ib75cebece8fb9ebc7307f5d3cf084a813b5493db
> Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>

Series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/powerplay/amd_powerplay.c   | 3 +--
>  drivers/gpu/drm/amd/powerplay/inc/pp_instance.h | 3 ---
>  2 files changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index a0f08ec..94f85db 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -35,7 +35,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 ||
> @@ -60,7 +60,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;
> diff --git a/drivers/gpu/drm/amd/powerplay/inc/pp_instance.h
> b/drivers/gpu/drm/amd/powerplay/inc/pp_instance.h
> index 25fb146..7d1eec5 100644
> --- a/drivers/gpu/drm/amd/powerplay/inc/pp_instance.h
> +++ b/drivers/gpu/drm/amd/powerplay/inc/pp_instance.h
> @@ -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;
> --
> 1.9.1
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux