From: Carl Vanderlip <quic_carlv@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Rob Clark <robdclark@gmail.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
<linux-arm-msm@vger.kernel.org>,
<freedreno@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>,
Stephen Boyd <swboyd@chromium.org>
Subject: Re: [PATCH v3 3/4] drm/msm: add a kernel param to select between MDP5 and DPU drivers
Date: Tue, 9 Jan 2024 11:32:19 -0800 [thread overview]
Message-ID: <ac5db099-b810-4e74-551f-2ee3658482c0@quicinc.com> (raw)
In-Reply-To: <CAA8EJpqmkzOaewrW8tqSV5wz+0zovZx-kpMdVWp_nW_g1KrRzA@mail.gmail.com>
On 1/8/2024 11:07 AM, Dmitry Baryshkov wrote:
> On Mon, 8 Jan 2024 at 19:57, Carl Vanderlip <quic_carlv@quicinc.com> wrote:
>> On 1/5/2024 4:38 PM, Dmitry Baryshkov wrote:
>>> On Sat, 6 Jan 2024 at 02:04, Carl Vanderlip <quic_carlv@quicinc.com> wrote:
>>>> On 1/5/2024 3:34 PM, Dmitry Baryshkov wrote:
>>>>> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
>>>>> index 50b65ffc24b1..ef57586fbeca 100644
>>>>> --- a/drivers/gpu/drm/msm/msm_drv.c
>>>>> +++ b/drivers/gpu/drm/msm/msm_drv.c
>>>>> @@ -969,6 +969,37 @@ static int add_components_mdp(struct device *master_dev,
>>>>> return 0;
>>>>> }
>>>>>
>>>>> +#if !IS_REACHABLE(CONFIG_DRM_MSM_MDP5) || !IS_REACHABLE(CONFIG_DRM_MSM_DPU)
>>>>> +bool msm_disp_drv_should_bind(struct device *dev, bool mdp5_driver)
>>>>> +{
>>>>> + /* If just a single driver is enabled, use it no matter what */
>>>>> + return true;
>>>>> +}
>>>>
>>>> This will cause both MDP/DPU probes to return -ENODEV, rather than
>>>> select the enabled one.
>>>
>>> No. The code (e.g. for DPU) is:
>>>
>>> if (!msm_disp_drv_should_bind(&pdev->dev, true))
>>> return -ENODEV;
>>>
>>> So the driver returns -ENODEV if msm_disp_drv_should_bind() returns
>>> false. Which is logical from the function name point of view.
>>>
>>
>> but msm_disp_drv_should_bind() is returning true in the #if !REACHABLE()
>> case?
>>
>> at minimum the comment is incorrect since returning true causes the
>> driver to NOT be used.
>
> No. Returning _false_ causes the driver to not be used.
>
Apologies... you are correct.
Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com>
-Carl V.
next prev parent reply other threads:[~2024-01-09 19:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 23:34 [PATCH v3 0/4] drm/msm: provide migration path from MDP5 to DPU driver Dmitry Baryshkov
2024-01-05 23:34 ` [PATCH v3 1/4] drm/msm/mdss: generate MDSS data for MDP5 platforms Dmitry Baryshkov
2024-02-07 18:25 ` Abhinav Kumar
2024-02-07 19:59 ` Dmitry Baryshkov
2024-01-05 23:34 ` [PATCH v3 2/4] drm/msm/dpu: support binding to the mdp5 devices Dmitry Baryshkov
2024-02-07 18:47 ` Abhinav Kumar
2024-02-07 19:56 ` Dmitry Baryshkov
2024-02-07 20:05 ` Abhinav Kumar
2024-01-05 23:34 ` [PATCH v3 3/4] drm/msm: add a kernel param to select between MDP5 and DPU drivers Dmitry Baryshkov
2024-01-06 0:04 ` Carl Vanderlip
2024-01-06 0:38 ` Dmitry Baryshkov
2024-01-08 17:57 ` Carl Vanderlip
2024-01-08 19:07 ` Dmitry Baryshkov
2024-01-09 19:32 ` Carl Vanderlip [this message]
2024-02-07 19:19 ` Abhinav Kumar
2024-01-05 23:34 ` [PATCH v3 4/4] drm/msm/dpu: add support for SDM660 and SDM630 platforms Dmitry Baryshkov
2024-02-07 19:50 ` 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=ac5db099-b810-4e74-551f-2ee3658482c0@quicinc.com \
--to=quic_carlv@quicinc.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.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=marijn.suijten@somainline.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=swboyd@chromium.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®