[Freedreno] [PATCH v5 19/19] drm/msm/dpu: remove RM topology definition
Sean Paul
sean at poorly.run
Fri Sep 7 13:29:50 UTC 2018
On Wed, Sep 05, 2018 at 07:08:28PM -0700, Jeykumar Sankaran wrote:
> RM maintained a redundant definition for display topology
> to identify the no. of hw blocks needed for a display
> and their hardware dependencies. This information can be
> implicitly deduced from the msm_display_topology structure
> available in RM reserve request. In addition to getting
> rid of the redundant topology, this change also removes
> the topology name enums and their usages.
>
> changes in v4:
> - remove the topology name enum entirely (Sean)
> changes in v5:
> - remove RM topology definition and their
> references (Sean)
> - Implement helper for dual mixer CRTC (Sean)
>
> Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 10 ++
> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 -
> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 1 -
> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 9 +-
> .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 7 +-
> drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 118 ++++++---------------
> drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 24 -----
> 7 files changed, 53 insertions(+), 119 deletions(-)
>
/snip
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
> index 1164561..4638c32 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
/snip
> @@ -858,12 +806,6 @@ static int _dpu_rm_commit_rsvp(struct dpu_rm *rm, struct dpu_rm_rsvp *rsvp)
> }
> }
> }
> -
> - if (!ret)
> - DRM_DEBUG_KMS("rsrv enc %d topology %d\n", rsvp->enc_id,
> - rsvp->topology);
> -
> - return ret;
> }
>
> int dpu_rm_reserve(
> @@ -889,6 +831,11 @@ int dpu_rm_reserve(
> DRM_DEBUG_KMS("reserving hw for enc %d crtc %d test_only %d\n",
> enc->base.id, crtc_state->crtc->base.id, test_only);
>
> + reqs.topology = kzalloc(sizeof(struct msm_display_topology),
> + GFP_KERNEL);
This is only 12 bytes, why use the heap?
Sean
> + if (!reqs.topology)
> + return -ENOMEM;
> +
> mutex_lock(&rm->rm_lock);
>
> _dpu_rm_print_rsvps(rm, DPU_RM_STAGE_BEGIN);
> @@ -946,6 +893,7 @@ int dpu_rm_reserve(
>
> end:
> mutex_unlock(&rm->rm_lock);
> + kfree(reqs.topology);
>
> return ret;
> }
/snip
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
> _______________________________________________
> Freedreno mailing list
> Freedreno at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/freedreno
--
Sean Paul, Software Engineer, Google / Chromium OS
More information about the dri-devel
mailing list