[PATCH v5 05/12] drm/modes: Rewrite the command line parser

Dmitry Osipenko digetx at gmail.com
Tue Jul 9 13:40:20 UTC 2019


09.07.2019 16:28, Jon Hunter пишет:
> 
> On 09/07/2019 14:26, Jon Hunter wrote:
>>
>> On 09/07/2019 13:52, Dmitry Osipenko wrote:
>>> 09.07.2019 15:45, Maxime Ripard пишет:
>>>> Hi,
>>>>
>>>> On Fri, Jul 05, 2019 at 07:54:47PM +0300, Dmitry Osipenko wrote:
>>>>> 17.06.2019 17:51, Maxime Ripard пишет:
>>>>>> From: Maxime Ripard <maxime.ripard at free-electrons.com>
>>>>>>
>>>>>> Rewrite the command line parser in order to get away from the state machine
>>>>>> parsing the video mode lines.
>>>>>>
>>>>>> Hopefully, this will allow to extend it more easily to support named modes
>>>>>> and / or properties set directly on the command line.
>>>>>>
>>>>>> Reviewed-by: Noralf Trønnes <noralf at tronnes.org>
>>>>>> Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
>>>>>> ---
>>>>>>  drivers/gpu/drm/drm_modes.c | 325 +++++++++++++++++++++++--------------
>>>>>>  1 file changed, 210 insertions(+), 115 deletions(-)
>>>>>
>>>>> I have a Tegra device that uses a stock android bootloader which
>>>>> passes "video=tegrafb" in the kernels cmdline. That wasn't a problem
>>>>> before this patch, but now Tegra DRM driver fails to probe because
>>>>> the mode is 0x0:0 and hence framebuffer allocation fails. Is it a
>>>>> legit regression that should be fixed in upstream?
>>>>
>>>> Thierry indeed reported that issue, but the discussion pretty much
>>>> stalled since then.
>>
>> Yes Thierry is currently out and hence has not responded. I had been
>> planning to look at this this week and responded.
>>
>>> Sorry, this doesn't answer my question. Where it was reported?
>>
>> Same thread [0].
> 
> Correction, it was on patch 6/12 and not this one.

Thank you very much, Jon! So looks like this patch is simply broken because it silently
copies the "mode's name" and then drm_connector_get_cmdline_mode() doesn't even try to
validate the mode.


More information about the dri-devel mailing list