All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Christoph Niedermaier <cniedermaier@dh-electronics.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	robert.foss@linaro.org, dri-devel@lists.freedesktop.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Dmitry Osipenko <digetx@gmail.com>,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH 1/2] drm/panel: lvds: Simplify mode parsing
Date: Fri, 1 Apr 2022 18:11:22 +0200	[thread overview]
Message-ID: <66182d46-9270-1096-97b1-1cd635e0795e@denx.de> (raw)
In-Reply-To: <Ykce0oywZTR5NnsF@pendragon.ideasonboard.com>

On 4/1/22 17:48, Laurent Pinchart wrote:

Hi,

[...]

>> diff --git a/drivers/gpu/drm/panel/panel-lvds.c b/drivers/gpu/drm/panel/panel-lvds.c
>> index 27a1c9923b09..65c6a6e9e223 100644
>> --- a/drivers/gpu/drm/panel/panel-lvds.c
>> +++ b/drivers/gpu/drm/panel/panel-lvds.c
>> @@ -30,7 +30,8 @@ struct panel_lvds {
>>   	const char *label;
>>   	unsigned int width;
>>   	unsigned int height;
>> -	struct videomode video_mode;
>> +	struct drm_display_mode dmode;
> 
> "dmode" sounds a bit weird, I would have gone for just "mode", or
> "display_mode", but I don't mind much.

That's how the of_get_drm_panel_display_mode() parameter is called in 
drivers/gpu/drm/drm_modes.c , so I'll just keep it for consistency.

[...]

>> -	videomode_from_timing(&timing, &lvds->video_mode);
>> -
>> -	ret = of_property_read_u32(np, "width-mm", &lvds->width);
>> -	if (ret < 0) {
>> -		dev_err(lvds->dev, "%pOF: invalid or missing %s DT property\n",
>> -			np, "width-mm");
>> -		return -ENODEV;
>> -	}
>> -	ret = of_property_read_u32(np, "height-mm", &lvds->height);
>> -	if (ret < 0) {
>> -		dev_err(lvds->dev, "%pOF: invalid or missing %s DT property\n",
>> -			np, "height-mm");
>> -		return -ENODEV;
>> -	}
> 
> of_get_drm_panel_display_mode() doesn't consider missing width-mm or
> height-mm properties as an error. Should we check here that ->width_mm
> and ->height_mm are not 0 ?

I wonder whether we should always require valid width-mm and height-mm 
DT property in of_get_drm_panel_display_mode() instead.

[...]

  reply	other threads:[~2022-04-01 16:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 19:23 [PATCH 1/2] drm/panel: lvds: Simplify mode parsing Marek Vasut
2022-03-31 19:23 ` [PATCH 2/2] drm/panel: lvds: Use bus_flags from DT panel-timing property Marek Vasut
2022-04-01 15:05   ` Christoph Niedermaier
2022-04-01 15:50   ` Laurent Pinchart
2022-04-01 15:04 ` [PATCH 1/2] drm/panel: lvds: Simplify mode parsing Christoph Niedermaier
2022-04-01 15:48 ` Laurent Pinchart
2022-04-01 16:11   ` Marek Vasut [this message]
2022-04-01 17:02     ` Laurent Pinchart
2022-04-01 17:03       ` Marek Vasut

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=66182d46-9270-1096-97b1-1cd635e0795e@denx.de \
    --to=marex@denx.de \
    --cc=cniedermaier@dh-electronics.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=digetx@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=robert.foss@linaro.org \
    --cc=sam@ravnborg.org \
    --cc=tzimmermann@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.