From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Kuogee Hsieh <quic_khsieh@quicinc.com>,
robdclark@gmail.com, sean@poorly.run, swboyd@chromium.org,
dianders@chromium.org, vkoul@kernel.org, daniel@ffwll.ch,
airlied@gmail.com, agross@kernel.org, andersson@kernel.org
Cc: quic_abhinavk@quicinc.com, quic_sbillaka@quicinc.com,
freedreno@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/msm/dpu: add DSC range checking during resource reservation
Date: Wed, 12 Apr 2023 01:22:01 +0300 [thread overview]
Message-ID: <cfb8b5c2-f5e0-48b3-fab2-9708190df1c3@linaro.org> (raw)
In-Reply-To: <1681247380-1607-1-git-send-email-quic_khsieh@quicinc.com>
On 12/04/2023 00:09, Kuogee Hsieh wrote:
> Perform DSC range checking to make sure correct DSC is requested before
> reserve resource for it.
>
> Fixes: c985d7bb64ff ("drm/msm/disp/dpu1: Add DSC support in RM")
$ git log -p -1 c985d7bb64ff
fatal: ambiguous argument 'c985d7bb64ff': unknown revision or path not
in the working tree.
I assume this was generated against some internal tree. Please. Please.
Don't do this again. I hoped that this was pointed out ages ago, but
probably not. No fixes, commits, tests against internal trees, no matter
how precious they are to you.
> Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
> index f4dda88..95e58f1 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
> @@ -1,6 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0-only
> /*
> * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
> + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
> */
>
> #define pr_fmt(fmt) "[drm:%s] " fmt, __func__
> @@ -250,6 +251,11 @@ int dpu_rm_init(struct dpu_rm *rm,
> struct dpu_hw_dsc *hw;
> const struct dpu_dsc_cfg *dsc = &cat->dsc[i];
>
> + if (dsc->id < DSC_0 || dsc->id >= DSC_MAX) {
> + DPU_ERROR("skip dsc %d with invalid id\n", dsc->id);
> + continue;
> + }
> +
> hw = dpu_hw_dsc_init(dsc->id, mmio, cat);
> if (IS_ERR_OR_NULL(hw)) {
> rc = PTR_ERR(hw);
> @@ -557,8 +563,10 @@ static int _dpu_rm_make_reservation(
> }
>
> ret = _dpu_rm_reserve_dsc(rm, global_state, enc, &reqs->topology);
> - if (ret)
> + if (ret) {
> + DPU_ERROR("unable to find appropriate DSC\n");
> return ret;
> + }
>
> return ret;
> }
--
With best wishes
Dmitry
next prev parent reply other threads:[~2023-04-11 22:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-11 21:09 Kuogee Hsieh
2023-04-11 21:36 ` Abhinav Kumar
2023-04-11 22:22 ` Dmitry Baryshkov [this message]
2023-04-11 22:24 ` Marijn Suijten
2023-04-11 22:32 ` [Freedreno] " Abhinav Kumar
2023-04-12 1:06 ` Dmitry Baryshkov
2023-04-12 1:50 ` Abhinav Kumar
2023-04-12 7:38 ` Marijn Suijten
2023-04-12 17:48 ` Abhinav Kumar
2023-04-12 18:50 ` Marijn Suijten
2023-04-12 18:56 ` Dmitry Baryshkov
2023-04-12 18:59 ` Abhinav Kumar
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=cfb8b5c2-f5e0-48b3-fab2-9708190df1c3@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=agross@kernel.org \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_khsieh@quicinc.com \
--cc=quic_sbillaka@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=swboyd@chromium.org \
--cc=vkoul@kernel.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
all inboxes | Powered by JetHome®