lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 8 Jan 2024 09:57:31 -0800
From: Carl Vanderlip <quic_carlv@...cinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
CC: Rob Clark <robdclark@...il.com>,
        Abhinav Kumar
	<quic_abhinavk@...cinc.com>,
        Sean Paul <sean@...rly.run>,
        Marijn Suijten
	<marijn.suijten@...ainline.org>,
        David Airlie <airlied@...il.com>, "Daniel
 Vetter" <daniel@...ll.ch>,
        <linux-arm-msm@...r.kernel.org>, <freedreno@...ts.freedesktop.org>,
        <linux-kernel@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>,
        Stephen Boyd <swboyd@...omium.org>
Subject: Re: [PATCH v3 3/4] drm/msm: add a kernel param to select between MDP5
 and DPU drivers



On 1/5/2024 4:38 PM, Dmitry Baryshkov wrote:
> On Sat, 6 Jan 2024 at 02:04, Carl Vanderlip <quic_carlv@...cinc.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.

-Carl V.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ