Message ID | 1539059262-8326-16-git-send-email-jsanka@codeaurora.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | reserve RM resources in CRTC state | expand |
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@codeaurora.org> Reviewed-by: Sean Paul <seanpaul@chromium.org> > --- > 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 >
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; }
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@codeaurora.org> --- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)