diff mbox series

[v2,5/9] drm/panel: Add timings field to drm_panel

Message ID 1565867073-24746-6-git-send-email-fabrizio.castro@bp.renesas.com (mailing list archive)
State Superseded
Delegated to: Kieran Bingham
Headers show
Series Add dual-LVDS panel support to EK874 | expand

Commit Message

Fabrizio Castro Aug. 15, 2019, 11:04 a.m. UTC
We need to know if the panel supports dual-link, similarly
to bridges, therefore add a reference to drm_timings in
drm_panel.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

---
v1->v2:
* new patch

 include/drm/drm_panel.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Laurent Pinchart Aug. 15, 2019, 12:03 p.m. UTC | #1
Hi Fabrizio,

Thank you for the patch.

On Thu, Aug 15, 2019 at 12:04:29PM +0100, Fabrizio Castro wrote:
> We need to know if the panel supports dual-link, similarly
> to bridges, therefore add a reference to drm_timings in
> drm_panel.

Panels may also need to report setup/hold time, so it's not about
dual-link only. I would make this explicit in the commit message.

> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> 
> ---
> v1->v2:
> * new patch
> 
>  include/drm/drm_panel.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> index 8c738c0..cd6ff07 100644
> --- a/include/drm/drm_panel.h
> +++ b/include/drm/drm_panel.h
> @@ -26,6 +26,7 @@
>  
>  #include <linux/errno.h>
>  #include <linux/list.h>
> +#include <drm/drm_timings.h>

You can just add a forward-declaration of struct drm_timing.

>  
>  struct device_node;
>  struct drm_connector;
> @@ -81,6 +82,7 @@ struct drm_panel_funcs {
>   * struct drm_panel - DRM panel object
>   * @drm: DRM device owning the panel
>   * @connector: DRM connector that the panel is attached to
> + * @timings: timing information
>   * @dev: parent device of the panel
>   * @link: link from panel device (supplier) to DRM device (consumer)
>   * @funcs: operations that can be performed on the panel
> @@ -89,6 +91,7 @@ struct drm_panel_funcs {
>  struct drm_panel {
>  	struct drm_device *drm;
>  	struct drm_connector *connector;
> +	const struct drm_timings *timings;
>  	struct device *dev;
>  
>  	const struct drm_panel_funcs *funcs;
Fabrizio Castro Aug. 15, 2019, 1:49 p.m. UTC | #2
Hello Laurent,

Thank you for your feedback!

> From: linux-renesas-soc-owner@vger.kernel.org <linux-renesas-soc-owner@vger.kernel.org> On Behalf Of Laurent Pinchart
> Sent: 15 August 2019 13:03
> Subject: Re: [PATCH v2 5/9] drm/panel: Add timings field to drm_panel
> 
> Hi Fabrizio,
> 
> Thank you for the patch.
> 
> On Thu, Aug 15, 2019 at 12:04:29PM +0100, Fabrizio Castro wrote:
> > We need to know if the panel supports dual-link, similarly
> > to bridges, therefore add a reference to drm_timings in
> > drm_panel.
> 
> Panels may also need to report setup/hold time, so it's not about
> dual-link only. I would make this explicit in the commit message.

Ok

> 
> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> >
> > ---
> > v1->v2:
> > * new patch
> >
> >  include/drm/drm_panel.h | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> > index 8c738c0..cd6ff07 100644
> > --- a/include/drm/drm_panel.h
> > +++ b/include/drm/drm_panel.h
> > @@ -26,6 +26,7 @@
> >
> >  #include <linux/errno.h>
> >  #include <linux/list.h>
> > +#include <drm/drm_timings.h>
> 
> You can just add a forward-declaration of struct drm_timing.

Ok

Thanks,
Fab

> 
> >
> >  struct device_node;
> >  struct drm_connector;
> > @@ -81,6 +82,7 @@ struct drm_panel_funcs {
> >   * struct drm_panel - DRM panel object
> >   * @drm: DRM device owning the panel
> >   * @connector: DRM connector that the panel is attached to
> > + * @timings: timing information
> >   * @dev: parent device of the panel
> >   * @link: link from panel device (supplier) to DRM device (consumer)
> >   * @funcs: operations that can be performed on the panel
> > @@ -89,6 +91,7 @@ struct drm_panel_funcs {
> >  struct drm_panel {
> >  	struct drm_device *drm;
> >  	struct drm_connector *connector;
> > +	const struct drm_timings *timings;
> >  	struct device *dev;
> >
> >  	const struct drm_panel_funcs *funcs;
> 
> --
> Regards,
> 
> Laurent Pinchart
Sam Ravnborg Aug. 15, 2019, 2:13 p.m. UTC | #3
Hi Fabrizio

On Thu, Aug 15, 2019 at 12:04:29PM +0100, Fabrizio Castro wrote:
> We need to know if the panel supports dual-link, similarly
> to bridges, therefore add a reference to drm_timings in
> drm_panel.

Why do we need to know this?
Why is it needed in drm_panel and not in some driver specific struct?

I cannot see the full series, as I was copied only on some mails.
Awaiting dri-devel moderator before I can see the rest.

	Sam

> 
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> 
> ---
> v1->v2:
> * new patch
> 
>  include/drm/drm_panel.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> index 8c738c0..cd6ff07 100644
> --- a/include/drm/drm_panel.h
> +++ b/include/drm/drm_panel.h
> @@ -26,6 +26,7 @@
>  
>  #include <linux/errno.h>
>  #include <linux/list.h>
> +#include <drm/drm_timings.h>
>  
>  struct device_node;
>  struct drm_connector;
> @@ -81,6 +82,7 @@ struct drm_panel_funcs {
>   * struct drm_panel - DRM panel object
>   * @drm: DRM device owning the panel
>   * @connector: DRM connector that the panel is attached to
> + * @timings: timing information
>   * @dev: parent device of the panel
>   * @link: link from panel device (supplier) to DRM device (consumer)
>   * @funcs: operations that can be performed on the panel
> @@ -89,6 +91,7 @@ struct drm_panel_funcs {
>  struct drm_panel {
>  	struct drm_device *drm;
>  	struct drm_connector *connector;
> +	const struct drm_timings *timings;
>  	struct device *dev;
>  
>  	const struct drm_panel_funcs *funcs;
> -- 
> 2.7.4
Fabrizio Castro Aug. 15, 2019, 2:48 p.m. UTC | #4
Hi Sam,

Thank you for your feedback!

> From: Sam Ravnborg <sam@ravnborg.org>
> Sent: 15 August 2019 15:14
> Subject: Re: [PATCH v2 5/9] drm/panel: Add timings field to drm_panel
> 
> Hi Fabrizio
> 
> On Thu, Aug 15, 2019 at 12:04:29PM +0100, Fabrizio Castro wrote:
> > We need to know if the panel supports dual-link, similarly
> > to bridges, therefore add a reference to drm_timings in
> > drm_panel.
> 
> Why do we need to know this?

The encoders connected to a dual-LVDS panels may need to do special
arrangements for the dual-link setup, like initializing a companion
encoder, and working out which pixels (even or odd) to send to which
port (first LVDS input port or second LVDS input port). At least, this is
within the scope of the implementation of this series, which is currently
being discussed.

> Why is it needed in drm_panel and not in some driver specific struct?

The other fields are still applicable to panels, so I think it makes sense 
for this to be included in struct drm_panels. 

> 
> I cannot see the full series, as I was copied only on some mails.
> Awaiting dri-devel moderator before I can see the rest.

I am sorry about this, some people don't want to be bothered by the whole
thing, I'll make sure I add you to the recipients list for the next iterations
of this series.

Thanks,
Fab

> 
> 	Sam
> 
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> >
> > ---
> > v1->v2:
> > * new patch
> >
> >  include/drm/drm_panel.h | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> > index 8c738c0..cd6ff07 100644
> > --- a/include/drm/drm_panel.h
> > +++ b/include/drm/drm_panel.h
> > @@ -26,6 +26,7 @@
> >
> >  #include <linux/errno.h>
> >  #include <linux/list.h>
> > +#include <drm/drm_timings.h>
> >
> >  struct device_node;
> >  struct drm_connector;
> > @@ -81,6 +82,7 @@ struct drm_panel_funcs {
> >   * struct drm_panel - DRM panel object
> >   * @drm: DRM device owning the panel
> >   * @connector: DRM connector that the panel is attached to
> > + * @timings: timing information
> >   * @dev: parent device of the panel
> >   * @link: link from panel device (supplier) to DRM device (consumer)
> >   * @funcs: operations that can be performed on the panel
> > @@ -89,6 +91,7 @@ struct drm_panel_funcs {
> >  struct drm_panel {
> >  	struct drm_device *drm;
> >  	struct drm_connector *connector;
> > +	const struct drm_timings *timings;
> >  	struct device *dev;
> >
> >  	const struct drm_panel_funcs *funcs;
> > --
> > 2.7.4
diff mbox series

Patch

diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index 8c738c0..cd6ff07 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -26,6 +26,7 @@ 
 
 #include <linux/errno.h>
 #include <linux/list.h>
+#include <drm/drm_timings.h>
 
 struct device_node;
 struct drm_connector;
@@ -81,6 +82,7 @@  struct drm_panel_funcs {
  * struct drm_panel - DRM panel object
  * @drm: DRM device owning the panel
  * @connector: DRM connector that the panel is attached to
+ * @timings: timing information
  * @dev: parent device of the panel
  * @link: link from panel device (supplier) to DRM device (consumer)
  * @funcs: operations that can be performed on the panel
@@ -89,6 +91,7 @@  struct drm_panel_funcs {
 struct drm_panel {
 	struct drm_device *drm;
 	struct drm_connector *connector;
+	const struct drm_timings *timings;
 	struct device *dev;
 
 	const struct drm_panel_funcs *funcs;