Re: [PATCH 1/2] drm/panel: panel-simple: Add generic panel-dsi driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 22, 2024 at 02:05:01PM +0000, Johan Adolfsson wrote:
> Hi,
> Sorry for delayed response, still investigating why these mails didn't reach my inbox as expected..
> 
> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> 
> Sent: den 19 april 2024 01:06
> To: Johan Adolfsson <Johan.Adolfsson@xxxxxxxx>; Neil Armstrong <neil.armstrong@xxxxxxxxxx>; Jessica Zhang <quic_jesszhan@xxxxxxxxxxx>; Sam Ravnborg <sam@xxxxxxxxxxxx>; Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>; Maxime Ripard <mripard@xxxxxxxxxx>; Thomas Zimmermann <tzimmermann@xxxxxxx>; David Airlie <airlied@xxxxxxxxx>; Daniel Vetter <daniel@xxxxxxxx>; Rob Herring <robh+dt@xxxxxxxxxx>; Krzysztof Kozlowski <krzysztof.kozlowski+dt@xxxxxxxxxx>; Conor Dooley <conor+dt@xxxxxxxxxx>; Thierry Reding <thierry.reding@xxxxxxxxx>
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx; kernel <kernel@xxxxxxxx>
> Subject: Re: [PATCH 1/2] drm/panel: panel-simple: Add generic panel-dsi driver
> 
> On 18/04/2024 16:01, Johan Adolfsson wrote:
> > Add generic panel-dsi panel, similar to panel-dpi that can have it's 
> > timing, lanes and flags overridden by devicetree.
> > Add some dev_err() and dev_warn() calls.
> > 
> 
> ...
> 
> >>  		/* sentinel */
> >>  	}
> >> @@ -4992,17 +5051,28 @@ static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
> >>  		return -ENODEV;
> >>  
> >>  	err = panel_simple_probe(&dsi->dev, &desc->desc);
> >> +	if (err)
> >> +		dev_err(&dsi->dev, "%s: err %i\n", __func__, err);
> 
> >This looks like debugging code.
> I added it since you don't really get any good hints on where things fails if they do it.
> Debugging code or not depends on the definition I guess - it helps the user track down a faulty devicetree,
> or as in the case below mismatch with the DSI driver.
> 
> ...
> >>  	dsi->format = desc->format;
> >>  	dsi->lanes = desc->lanes;
> >> +	of_property_read_u32(dsi->dev.of_node, "lanes", &dsi->lanes);
> >
> >Is this defined in the binding?
> 
> Apparently not which I assumed. Other bindings mentions dsi-lanes, but I guess "num-dsi-lanes" would be more correct.

Please use drm_of_get_data_lanes_count() and corresponding property from
the bindings.
> 
> >>  	err = mipi_dsi_attach(dsi);
> >>  	if (err) {
> >>  		struct panel_simple *panel = mipi_dsi_get_drvdata(dsi);
> >>  
> >> +		dev_err(&dsi->dev, "probe attach err: %i", err);
> >
> >Do not introduce unrelated code changes.
> 
> As before, it helps the user who has a messed up devicetree find out, since we now gets some more configurability using devicetree.
> Would it be acceptable as a separate commit, or should I simply skip this?
> 
> 
> >Best regards,
> >Krzysztof
> 
> Thanks!
> 
> Best regards
> /Johan
> 
> 

-- 
With best wishes
Dmitry



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux