Re: [PATCH 15/25] drm/msm/dpu: avoid redundant hw blk reference

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

 



On Mon, Oct 08, 2018 at 09:27:32PM -0700, Jeykumar Sankaran wrote:
> Get rid of hw block pointer in RM iter as we can
> access the same through dpu_hw_blk.
> 
> Signed-off-by: Jeykumar Sankaran <jsanka@xxxxxxxxxxxxxx>

Reviewed-by: Sean Paul <seanpaul@xxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
> index a8461b8..3a92a3e 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
> @@ -47,12 +47,10 @@ struct dpu_rm_hw_blk {
>  
>  /**
>   * struct dpu_rm_hw_iter - iterator for use with dpu_rm
> - * @hw: dpu_hw object requested, or NULL on failure
>   * @blk: dpu_rm internal block representation. Clients ignore. Used as iterator.
>   * @type: Hardware Block Type client wishes to search for.
>   */
>  struct dpu_rm_hw_iter {
> -	struct dpu_hw_blk *hw;
>  	struct dpu_rm_hw_blk *blk;
>  	enum dpu_hw_blk_type type;
>  };
> @@ -74,7 +72,6 @@ static bool _dpu_rm_get_hw_locked(struct dpu_rm *rm, struct dpu_rm_hw_iter *i)
>  		return false;
>  	}
>  
> -	i->hw = NULL;
>  	blk_list = &rm->hw_blks[i->type];
>  
>  	if (i->blk && (&i->blk->list == blk_list)) {
> @@ -84,12 +81,9 @@ static bool _dpu_rm_get_hw_locked(struct dpu_rm *rm, struct dpu_rm_hw_iter *i)
>  
>  	i->blk = list_prepare_entry(i->blk, blk_list, list);
>  
> -	list_for_each_entry_continue(i->blk, blk_list, list) {
> -		if (!i->blk->in_use) {
> -			i->hw = i->blk->hw;
> +	list_for_each_entry_continue(i->blk, blk_list, list)
> +		if (!i->blk->in_use)
>  			return true;
> -		}
> -	}
>  
>  	return false;
>  }
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux