From: Jeykumar Sankaran <jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: Bruce Wang <bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH v3 7/7] drm/msm/dpu: Make _dpu_plane_get_aspace void
Date: Mon, 24 Sep 2018 11:01:15 -0700 [thread overview]
Message-ID: <41c32e7d920f1e9d5d80d82cdd3a2067@codeaurora.org> (raw)
In-Reply-To: <20180924174555.11494-1-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
On 2018-09-24 10:45, Bruce Wang wrote:
> Remove unneeded checks from _dpu_plane_get_aspace. The function
> no longer needs to return anything so it is changed to void.
>
Are the subject and text still appropriate for the patch? The function
is returning
a ptr to msm_gem_address_space.
> v3: change _dpu_plane_get_aspace to return a struct
> *msm_gem_address_space instead passing in a pointer of the same
> type to edit.
>
> Signed-off-by: Bruce Wang <bzwang@chromium.org>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 35 ++++-------------------
> 1 file changed, 6 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> index 924e321a5ac4..02c27240d38f 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> @@ -431,23 +431,12 @@ static void _dpu_plane_set_qos_remap(struct
> drm_plane *plane)
> /**
> * _dpu_plane_get_aspace: gets the address space
> */
> -static int _dpu_plane_get_aspace(
> - struct dpu_plane *pdpu,
> - struct dpu_plane_state *pstate,
> - struct msm_gem_address_space **aspace)
> +static inline struct msm_gem_address_space *_dpu_plane_get_aspace(
> + struct dpu_plane *pdpu)
> {
> - struct dpu_kms *kms;
> -
> - if (!pdpu || !pstate || !aspace) {
> - DPU_ERROR("invalid parameters\n");
> - return -EINVAL;
> - }
> -
> - kms = _dpu_plane_get_kms(&pdpu->base);
> + struct dpu_kms *kms = _dpu_plane_get_kms(&pdpu->base);
>
> - *aspace = kms->base.aspace;
> -
> - return 0;
> + return kms->base.aspace;
> }
>
> static inline void _dpu_plane_set_scanout(struct drm_plane *plane,
> @@ -456,15 +445,9 @@ static inline void _dpu_plane_set_scanout(struct
> drm_plane *plane,
> struct drm_framebuffer *fb)
> {
> struct dpu_plane *pdpu = to_dpu_plane(plane);
> - struct msm_gem_address_space *aspace = NULL;
> + struct msm_gem_address_space *aspace =
> _dpu_plane_get_aspace(pdpu);
> int ret;
>
> - ret = _dpu_plane_get_aspace(pdpu, pstate, &aspace);
> - if (ret) {
> - DPU_ERROR_PLANE(pdpu, "Failed to get aspace %d\n", ret);
> - return;
> - }
> -
> ret = dpu_format_populate_layout(aspace, fb, &pipe_cfg->layout);
> if (ret == -EAGAIN)
> DPU_DEBUG_PLANE(pdpu, "not updating same src addrs\n");
> @@ -816,7 +799,7 @@ static int dpu_plane_prepare_fb(struct drm_plane
> *plane,
> struct drm_gem_object *obj;
> struct msm_gem_object *msm_obj;
> struct dma_fence *fence;
> - struct msm_gem_address_space *aspace;
> + struct msm_gem_address_space *aspace =
> _dpu_plane_get_aspace(pdpu);
> int ret;
>
> if (!new_state->fb)
> @@ -824,12 +807,6 @@ static int dpu_plane_prepare_fb(struct drm_plane
> *plane,
>
> DPU_DEBUG_PLANE(pdpu, "FB[%u]\n", fb->base.id);
>
> - ret = _dpu_plane_get_aspace(pdpu, pstate, &aspace);
> - if (ret) {
> - DPU_ERROR_PLANE(pdpu, "Failed to get aspace\n");
> - return ret;
> - }
> -
> /* cache aspace */
> pstate->aspace = aspace;
--
Jeykumar S
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
next prev parent reply other threads:[~2018-09-24 18:01 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-24 16:22 [PATCH v3 0/7] drm/msm/dpu: Clean up dpu code Bruce Wang
[not found] ` <20180924162228.180689-1-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-09-24 16:22 ` [PATCH v3 1/7] drm/msm/dpu: Remove unneeded checks in dpu_plane.c Bruce Wang
[not found] ` <20180924162228.180689-2-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-09-24 16:45 ` Jordan Crouse
2018-09-24 16:22 ` [PATCH v3 2/7] drm/msm/dpu: Clean up plane atomic disable/update Bruce Wang
[not found] ` <20180924162228.180689-3-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-09-24 16:45 ` Jordan Crouse
2018-09-24 16:22 ` [PATCH v3 3/7] drm/msm/dpu: Remove unneeded checks in dpu_crtc.c Bruce Wang
[not found] ` <20180924162228.180689-4-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-09-24 16:45 ` Jordan Crouse
2018-09-24 16:22 ` [PATCH v3 4/7] drm/msm/dpu: Change _dpu_crtc_power_enable to void Bruce Wang
[not found] ` <20180924162228.180689-5-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-09-24 16:46 ` Jordan Crouse
2018-09-26 8:10 ` Sean Paul
2018-09-26 21:28 ` [PATCH v4 4/7] drm/msm/dpu: Remove _dpu_crtc_power_enable Bruce Wang
2018-09-24 16:22 ` [PATCH v3 5/7] drm/msm/dpu: Change _dpu_crtc_vblank_enable_no_lock to void Bruce Wang
2018-09-24 16:22 ` [PATCH v3 6/7] drm/msm/dpu: Make dpu_plane_danger_signal_ctrl void Bruce Wang
2018-09-24 16:22 ` [PATCH v3 7/7] drm/msm/dpu: _dpu_plane_get_aspace returns Bruce Wang
[not found] ` <20180924162228.180689-8-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-09-24 16:47 ` Jordan Crouse
[not found] ` <20180924164729.GE10761-9PYrDHPZ2Orvke4nUoYGnHL1okKdlPRT@public.gmane.org>
2018-09-24 16:57 ` Bruce Wang
2018-09-24 17:45 ` [PATCH v3 7/7] drm/msm/dpu: Make _dpu_plane_get_aspace void Bruce Wang
[not found] ` <20180924174555.11494-1-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-09-24 17:53 ` Jordan Crouse
2018-09-24 18:01 ` Jeykumar Sankaran [this message]
[not found] ` <41c32e7d920f1e9d5d80d82cdd3a2067-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-09-25 13:56 ` Bruce Wang
2018-09-25 21:10 ` [PATCH v3 7/7] drm/msm/dpu: Revise _dpu_plane_get_aspace Bruce Wang
2018-09-28 7:42 ` [PATCH v3 0/7] drm/msm/dpu: Clean up dpu code Sean Paul
2018-09-28 20:41 ` Bruce Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41c32e7d920f1e9d5d80d82cdd3a2067@codeaurora.org \
--to=jsanka-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
--cc=abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox