mbox series

[v2,00/18] Allwinner R40 HDMI refactoring

Message ID 20180710203511.18454-1-jernej.skrabec@siol.net
Headers show
Series Allwinner R40 HDMI refactoring | expand

Message

Jernej Škrabec July 10, 2018, 8:34 p.m. UTC
This series fixes several issues found in R40 HDMI patch series after
it was applied. Conversation can be found here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/586011.html

Patches are based on latest linux-next (next-20180710) and are ordered
in such way that they don't break R40 HDMI at any time. Because of that
I suggest that whole series goes through drm-misc to preserve that order.

I also tested those patches on H3 to make sure it doesn't break other
platforms. However, it would be nice to test for regressions also on
older SoCs (with DE1).

Best regards,
Jernej

Changes from v1:
- added Review-by and Acked-by tags
- added a patch which reorders mixer includes alphabetically
- reworked function which finds mixer id
- dropped register initialization in TCON TOP
- reworded some commit messages

Jernej Skrabec (18):
  dt-bindings: display: sun4i-drm: Add R40 display engine compatible
  drm/sun4i: Add R40 display engine compatible
  ARM: dts: sun8i: r40: Remove fallback display engine compatible
  drm/sun4i: tcon-top: Cleanup clock handling
  drm/sun4i: tcon: Release node when traversing of graph
  dt-bindings: display: sun4i-drm: Add R40 TV TCON description
  drm/sun4i: DW HDMI: Release nodes if error happens during CRTC search
  ARM: dts: sun8i: r40: Add mixer ids to TCON TOP
  drm/sun4i: mixer: Order includes alphabetically
  drm/sun4i: mixer: Read id from DT
  drm/sun4i: tcon-top: Add helpers for mux switching
  drm/sun4i: tcon: Add another way for matching mixers with tcon
  drm/sun4i: tcon: Add support for R40 TCON
  ARM: dts: sun8i: r40: Remove fallback compatible for TCON TV
  ARM: dts: sun8i: r40: Add missing TCON-TOP - TCON connections
  ARM: dts: sun8i: r40: Disable TCONs by default.
  drm/sun4i: tcon-top: Remove mux configuration at probe time
  dt-bindings: display: sun4i-drm: Fix order of DW HDMI PHY compatibles

 .../bindings/display/sunxi/sun4i-drm.txt      |   6 +-
 .../boot/dts/sun8i-r40-bananapi-m2-ultra.dts  |  20 +-
 arch/arm/boot/dts/sun8i-r40.dtsi              |  65 ++++++-
 drivers/gpu/drm/sun4i/sun4i_drv.c             |   1 +
 drivers/gpu/drm/sun4i/sun4i_tcon.c            |  92 ++++++++-
 drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c         |  15 +-
 drivers/gpu/drm/sun4i/sun8i_mixer.c           |  42 ++++-
 drivers/gpu/drm/sun4i/sun8i_tcon_top.c        | 178 ++++++++----------
 drivers/gpu/drm/sun4i/sun8i_tcon_top.h        |   4 +
 9 files changed, 278 insertions(+), 145 deletions(-)

Comments

Chen-Yu Tsai July 11, 2018, 2:55 a.m. UTC | #1
On Wed, Jul 11, 2018 at 4:35 AM, Jernej Skrabec <jernej.skrabec@siol.net> wrote:
> sun4i-drm DT binding, second paragraph of the first section says:
>
> For all connections between components up to the TCONs in the display
> pipeline, when there are multiple components of the same type at the
> same depth, the local endpoint ID must be the same as the remote
> component's index.
>
> Add mixer ids in R40 DT as mandated by DT binding.
>
> Fixes: 05a43a262d03 ("ARM: dts: sun8i: r40: Add HDMI pipeline")
>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>

Reviewed-by: Chen-Yu Tsai <wens@csie.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Chen-Yu Tsai July 11, 2018, 2:56 a.m. UTC | #2
On Wed, Jul 11, 2018 at 4:35 AM, Jernej Skrabec <jernej.skrabec@siol.net> wrote:
> Includes are not alphabetically ordered.
>
> Reorder them.
>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>

Reviewed-by: Chen-Yu Tsai <wens@csie.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Chen-Yu Tsai July 11, 2018, 3:11 a.m. UTC | #3
On Wed, Jul 11, 2018 at 4:35 AM, Jernej Skrabec <jernej.skrabec@siol.net> wrote:
> Currently, TCON supports 2 ways to match TCON with engine (mixer in this
> case). Old way is to just traverse of graph backwards and compare node
> pointer. New way is to match TCON and engine by their respective ids.
> All SoCs with DE2 enabled till now used the old way, which means mixer
> id was never used and thus never implemented.
>
> However, for R40, only the new way will be used. To prepare for that,
> implement mixer id fetching from DT.
>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> ---
>  drivers/gpu/drm/sun4i/sun8i_mixer.c | 40 +++++++++++++++++++++++++++--
>  1 file changed, 38 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
> index aa81b9838ae8..4bd4d8ccb34f 100644
> --- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
> +++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
> @@ -22,6 +22,7 @@
>  #include <linux/component.h>
>  #include <linux/dma-mapping.h>
>  #include <linux/of_device.h>
> +#include <linux/of_graph.h>
>  #include <linux/reset.h>
>
>  #include "sun4i_drv.h"
> @@ -322,6 +323,42 @@ static struct regmap_config sun8i_mixer_regmap_config = {
>         .max_register   = 0xbfffc, /* guessed */
>  };
>
> +static int sun8i_mixer_of_get_id(struct device_node *node)
> +{
> +       struct device_node *port, *ep;
> +       int ret = -EINVAL;
> +
> +       /* output is port 1 */
> +       port = of_graph_get_port_by_id(node, 1);
> +       if (!port)
> +               return -EINVAL;
> +
> +       /* try to find downstream endpoint */
> +       for_each_available_child_of_node(port, ep) {
> +               struct device_node *remote;
> +               u32 reg;
> +
> +               remote = of_graph_get_remote_endpoint(ep);
> +               if (!remote)
> +                       continue;
> +
> +               ret = of_property_read_u32(remote, "reg", &reg);
> +               if (!ret) {
> +                       of_node_put(remote);
> +                       of_node_put(ep);
> +                       of_node_put(port);
> +
> +                       return reg;
> +               }
> +
> +               of_node_put(remote);
> +       }
> +
> +       of_node_put(port);
> +
> +       return ret;
> +}
> +

The above looks good.

>  static int sun8i_mixer_bind(struct device *dev, struct device *master,
>                               void *data)
>  {
> @@ -353,8 +390,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
>         dev_set_drvdata(dev, mixer);
>         mixer->engine.ops = &sun8i_engine_ops;
>         mixer->engine.node = dev->of_node;
> -       /* The ID of the mixer currently doesn't matter */
> -       mixer->engine.id = -1;
> +       mixer->engine.id = sun8i_mixer_of_get_id(dev->of_node);

Should you be handling error codes?

ChenYu
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Chen-Yu Tsai July 11, 2018, 3:15 a.m. UTC | #4
On Wed, Jul 11, 2018 at 4:35 AM, Jernej Skrabec <jernej.skrabec@siol.net> wrote:
> Now that R40 TCON migrated to runtime mux configuration, old code can be
> removed.
>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>

Reviewed-by: Chen-Yu Tsai <wens@csie.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jernej Škrabec July 11, 2018, 7:10 a.m. UTC | #5
Dne sreda, 11. julij 2018 ob 05:11:56 CEST je Chen-Yu Tsai napisal(a):
> On Wed, Jul 11, 2018 at 4:35 AM, Jernej Skrabec <jernej.skrabec@siol.net> 
wrote:
> > Currently, TCON supports 2 ways to match TCON with engine (mixer in this
> > case). Old way is to just traverse of graph backwards and compare node
> > pointer. New way is to match TCON and engine by their respective ids.
> > All SoCs with DE2 enabled till now used the old way, which means mixer
> > id was never used and thus never implemented.
> > 
> > However, for R40, only the new way will be used. To prepare for that,
> > implement mixer id fetching from DT.
> > 
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> > ---
> > 
> >  drivers/gpu/drm/sun4i/sun8i_mixer.c | 40 +++++++++++++++++++++++++++--
> >  1 file changed, 38 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c
> > b/drivers/gpu/drm/sun4i/sun8i_mixer.c index aa81b9838ae8..4bd4d8ccb34f
> > 100644
> > --- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
> > +++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
> > @@ -22,6 +22,7 @@
> > 
> >  #include <linux/component.h>
> >  #include <linux/dma-mapping.h>
> >  #include <linux/of_device.h>
> > 
> > +#include <linux/of_graph.h>
> > 
> >  #include <linux/reset.h>
> >  
> >  #include "sun4i_drv.h"
> > 
> > @@ -322,6 +323,42 @@ static struct regmap_config sun8i_mixer_regmap_config
> > = {> 
> >         .max_register   = 0xbfffc, /* guessed */
> >  
> >  };
> > 
> > +static int sun8i_mixer_of_get_id(struct device_node *node)
> > +{
> > +       struct device_node *port, *ep;
> > +       int ret = -EINVAL;
> > +
> > +       /* output is port 1 */
> > +       port = of_graph_get_port_by_id(node, 1);
> > +       if (!port)
> > +               return -EINVAL;
> > +
> > +       /* try to find downstream endpoint */
> > +       for_each_available_child_of_node(port, ep) {
> > +               struct device_node *remote;
> > +               u32 reg;
> > +
> > +               remote = of_graph_get_remote_endpoint(ep);
> > +               if (!remote)
> > +                       continue;
> > +
> > +               ret = of_property_read_u32(remote, "reg", &reg);
> > +               if (!ret) {
> > +                       of_node_put(remote);
> > +                       of_node_put(ep);
> > +                       of_node_put(port);
> > +
> > +                       return reg;
> > +               }
> > +
> > +               of_node_put(remote);
> > +       }
> > +
> > +       of_node_put(port);
> > +
> > +       return ret;
> > +}
> > +
> 
> The above looks good.
> 
> >  static int sun8i_mixer_bind(struct device *dev, struct device *master,
> >  
> >                               void *data)
> >  
> >  {
> > 
> > @@ -353,8 +390,7 @@ static int sun8i_mixer_bind(struct device *dev, struct
> > device *master,> 
> >         dev_set_drvdata(dev, mixer);
> >         mixer->engine.ops = &sun8i_engine_ops;
> >         mixer->engine.node = dev->of_node;
> > 
> > -       /* The ID of the mixer currently doesn't matter */
> > -       mixer->engine.id = -1;
> > +       mixer->engine.id = sun8i_mixer_of_get_id(dev->of_node);
> 
> Should you be handling error codes?

Sadly, no. Other supported DE2 SoC miss reg property in DT and it would break 
them. Additionally, V3s has only one mixer and thus technically doesn't 
violate binding with omiting mixer id.

Anyway, it was -1 all the time before and not really used, so having negative 
value doesn't change anything for other SoCs. If this fails and it's needed, 
it would stop at mixer <-> TCON matching stage anyway.

I guess I should add comment for that.

Best regards,
Jernej



--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Chen-Yu Tsai July 11, 2018, 7:11 a.m. UTC | #6
On Wed, Jul 11, 2018 at 3:10 PM, Jernej Škrabec <jernej.skrabec@siol.net> wrote:
> Dne sreda, 11. julij 2018 ob 05:11:56 CEST je Chen-Yu Tsai napisal(a):
>> On Wed, Jul 11, 2018 at 4:35 AM, Jernej Skrabec <jernej.skrabec@siol.net>
> wrote:
>> > Currently, TCON supports 2 ways to match TCON with engine (mixer in this
>> > case). Old way is to just traverse of graph backwards and compare node
>> > pointer. New way is to match TCON and engine by their respective ids.
>> > All SoCs with DE2 enabled till now used the old way, which means mixer
>> > id was never used and thus never implemented.
>> >
>> > However, for R40, only the new way will be used. To prepare for that,
>> > implement mixer id fetching from DT.
>> >
>> > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
>> > ---
>> >
>> >  drivers/gpu/drm/sun4i/sun8i_mixer.c | 40 +++++++++++++++++++++++++++--
>> >  1 file changed, 38 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c
>> > b/drivers/gpu/drm/sun4i/sun8i_mixer.c index aa81b9838ae8..4bd4d8ccb34f
>> > 100644
>> > --- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
>> > +++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
>> > @@ -22,6 +22,7 @@
>> >
>> >  #include <linux/component.h>
>> >  #include <linux/dma-mapping.h>
>> >  #include <linux/of_device.h>
>> >
>> > +#include <linux/of_graph.h>
>> >
>> >  #include <linux/reset.h>
>> >
>> >  #include "sun4i_drv.h"
>> >
>> > @@ -322,6 +323,42 @@ static struct regmap_config sun8i_mixer_regmap_config
>> > = {>
>> >         .max_register   = 0xbfffc, /* guessed */
>> >
>> >  };
>> >
>> > +static int sun8i_mixer_of_get_id(struct device_node *node)
>> > +{
>> > +       struct device_node *port, *ep;
>> > +       int ret = -EINVAL;
>> > +
>> > +       /* output is port 1 */
>> > +       port = of_graph_get_port_by_id(node, 1);
>> > +       if (!port)
>> > +               return -EINVAL;
>> > +
>> > +       /* try to find downstream endpoint */
>> > +       for_each_available_child_of_node(port, ep) {
>> > +               struct device_node *remote;
>> > +               u32 reg;
>> > +
>> > +               remote = of_graph_get_remote_endpoint(ep);
>> > +               if (!remote)
>> > +                       continue;
>> > +
>> > +               ret = of_property_read_u32(remote, "reg", &reg);
>> > +               if (!ret) {
>> > +                       of_node_put(remote);
>> > +                       of_node_put(ep);
>> > +                       of_node_put(port);
>> > +
>> > +                       return reg;
>> > +               }
>> > +
>> > +               of_node_put(remote);
>> > +       }
>> > +
>> > +       of_node_put(port);
>> > +
>> > +       return ret;
>> > +}
>> > +
>>
>> The above looks good.
>>
>> >  static int sun8i_mixer_bind(struct device *dev, struct device *master,
>> >
>> >                               void *data)
>> >
>> >  {
>> >
>> > @@ -353,8 +390,7 @@ static int sun8i_mixer_bind(struct device *dev, struct
>> > device *master,>
>> >         dev_set_drvdata(dev, mixer);
>> >         mixer->engine.ops = &sun8i_engine_ops;
>> >         mixer->engine.node = dev->of_node;
>> >
>> > -       /* The ID of the mixer currently doesn't matter */
>> > -       mixer->engine.id = -1;
>> > +       mixer->engine.id = sun8i_mixer_of_get_id(dev->of_node);
>>
>> Should you be handling error codes?
>
> Sadly, no. Other supported DE2 SoC miss reg property in DT and it would break
> them. Additionally, V3s has only one mixer and thus technically doesn't
> violate binding with omiting mixer id.
>
> Anyway, it was -1 all the time before and not really used, so having negative
> value doesn't change anything for other SoCs. If this fails and it's needed,
> it would stop at mixer <-> TCON matching stage anyway.
>
> I guess I should add comment for that.

Yes. Please. We'll leave the rest till later. I plan to fix up the missing
IDs for all the other SoCs anyway.

ChenYu
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Maxime Ripard July 11, 2018, 8:30 a.m. UTC | #7
On Tue, Jul 10, 2018 at 10:34:53PM +0200, Jernej Skrabec wrote:
> This series fixes several issues found in R40 HDMI patch series after
> it was applied. Conversation can be found here:
> http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/586011.html
> 
> Patches are based on latest linux-next (next-20180710) and are ordered
> in such way that they don't break R40 HDMI at any time. Because of that
> I suggest that whole series goes through drm-misc to preserve that order.
> 
> I also tested those patches on H3 to make sure it doesn't break other
> platforms. However, it would be nice to test for regressions also on
> older SoCs (with DE1).
> 
> Best regards,
> Jernej

Applied all patches but the patch 10, thanks!
Maxime
Chen-Yu Tsai July 11, 2018, 8:37 a.m. UTC | #8
On Wed, Jul 11, 2018 at 4:30 PM, Maxime Ripard
<maxime.ripard@bootlin.com> wrote:
> On Tue, Jul 10, 2018 at 10:34:53PM +0200, Jernej Skrabec wrote:
>> This series fixes several issues found in R40 HDMI patch series after
>> it was applied. Conversation can be found here:
>> http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/586011.html
>>
>> Patches are based on latest linux-next (next-20180710) and are ordered
>> in such way that they don't break R40 HDMI at any time. Because of that
>> I suggest that whole series goes through drm-misc to preserve that order.
>>
>> I also tested those patches on H3 to make sure it doesn't break other
>> platforms. However, it would be nice to test for regressions also on
>> older SoCs (with DE1).
>>
>> Best regards,
>> Jernej
>
> Applied all patches but the patch 10, thanks!

Patch 4 actually has an error. Hope you haven't pushed it out yet.

ChenYu
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jernej Škrabec July 11, 2018, 8:41 a.m. UTC | #9
Dne sreda, 11. julij 2018 ob 10:30:36 CEST je Maxime Ripard napisal(a):
> On Tue, Jul 10, 2018 at 10:34:53PM +0200, Jernej Skrabec wrote:
> > This series fixes several issues found in R40 HDMI patch series after
> > it was applied. Conversation can be found here:
> > http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/586011.htm
> > l
> > 
> > Patches are based on latest linux-next (next-20180710) and are ordered
> > in such way that they don't break R40 HDMI at any time. Because of that
> > I suggest that whole series goes through drm-misc to preserve that order.
> > 
> > I also tested those patches on H3 to make sure it doesn't break other
> > platforms. However, it would be nice to test for regressions also on
> > older SoCs (with DE1).
> > 
> > Best regards,
> > Jernej
> 
> Applied all patches but the patch 10, thanks!
> Maxime

Ok, I'll send patch 10 separately. However,  patch 4 needs a fix according to 
test build robot:

if (IS_ERR_VALUE(index))
should be:
if (index < 0)

Additionally, due to Arnds patch merged (drm/sun4i: fix build failure with 
CONFIG_DRM_SUN8I_MIXER=m), sun4i_tcon.c needs additional handling if TCON_TOP 
driver is not build.

Best regards,
Jernej



--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Maxime Ripard July 11, 2018, 9:30 a.m. UTC | #10
On Wed, Jul 11, 2018 at 10:41:54AM +0200, Jernej Škrabec wrote:
> Dne sreda, 11. julij 2018 ob 10:30:36 CEST je Maxime Ripard napisal(a):
> > On Tue, Jul 10, 2018 at 10:34:53PM +0200, Jernej Skrabec wrote:
> > > This series fixes several issues found in R40 HDMI patch series after
> > > it was applied. Conversation can be found here:
> > > http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/586011.htm
> > > l
> > > 
> > > Patches are based on latest linux-next (next-20180710) and are ordered
> > > in such way that they don't break R40 HDMI at any time. Because of that
> > > I suggest that whole series goes through drm-misc to preserve that order.
> > > 
> > > I also tested those patches on H3 to make sure it doesn't break other
> > > platforms. However, it would be nice to test for regressions also on
> > > older SoCs (with DE1).
> > > 
> > > Best regards,
> > > Jernej
> > 
> > Applied all patches but the patch 10, thanks!
> > Maxime
> 
> Ok, I'll send patch 10 separately. However,  patch 4 needs a fix according to 
> test build robot:
> 
> if (IS_ERR_VALUE(index))
> should be:
> if (index < 0)

Yeah, sorry, I forgot to say it, but I fixed it locally (and the
return below as well).

> Additionally, due to Arnds patch merged (drm/sun4i: fix build failure with 
> CONFIG_DRM_SUN8I_MIXER=m), sun4i_tcon.c needs additional handling if TCON_TOP 
> driver is not build.

I'll drop it then, I haven't pushed it yet.

Maxime
Jernej Škrabec July 11, 2018, 9:34 a.m. UTC | #11
Dne sreda, 11. julij 2018 ob 11:30:16 CEST je Maxime Ripard napisal(a):
> On Wed, Jul 11, 2018 at 10:41:54AM +0200, Jernej Škrabec wrote:
> > Dne sreda, 11. julij 2018 ob 10:30:36 CEST je Maxime Ripard napisal(a):
> > > On Tue, Jul 10, 2018 at 10:34:53PM +0200, Jernej Skrabec wrote:
> > > > This series fixes several issues found in R40 HDMI patch series after
> > > > it was applied. Conversation can be found here:
> > > > http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/586011
> > > > .htm
> > > > l
> > > > 
> > > > Patches are based on latest linux-next (next-20180710) and are ordered
> > > > in such way that they don't break R40 HDMI at any time. Because of
> > > > that
> > > > I suggest that whole series goes through drm-misc to preserve that
> > > > order.
> > > > 
> > > > I also tested those patches on H3 to make sure it doesn't break other
> > > > platforms. However, it would be nice to test for regressions also on
> > > > older SoCs (with DE1).
> > > > 
> > > > Best regards,
> > > > Jernej
> > > 
> > > Applied all patches but the patch 10, thanks!
> > > Maxime
> > 
> > Ok, I'll send patch 10 separately. However,  patch 4 needs a fix according
> > to test build robot:
> > 
> > if (IS_ERR_VALUE(index))
> > should be:
> > if (index < 0)
> 
> Yeah, sorry, I forgot to say it, but I fixed it locally (and the
> return below as well).
> 
> > Additionally, due to Arnds patch merged (drm/sun4i: fix build failure with
> > CONFIG_DRM_SUN8I_MIXER=m), sun4i_tcon.c needs additional handling if
> > TCON_TOP driver is not build.
> 
> I'll drop it then, I haven't pushed it yet.

Which one? This series or patch from Arnd?

Best regards,
Jernej



--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Maxime Ripard July 11, 2018, 1:36 p.m. UTC | #12
On Wed, Jul 11, 2018 at 11:34:58AM +0200, Jernej Škrabec wrote:
> Dne sreda, 11. julij 2018 ob 11:30:16 CEST je Maxime Ripard napisal(a):
> > On Wed, Jul 11, 2018 at 10:41:54AM +0200, Jernej Škrabec wrote:
> > > Dne sreda, 11. julij 2018 ob 10:30:36 CEST je Maxime Ripard napisal(a):
> > > > On Tue, Jul 10, 2018 at 10:34:53PM +0200, Jernej Skrabec wrote:
> > > > > This series fixes several issues found in R40 HDMI patch series after
> > > > > it was applied. Conversation can be found here:
> > > > > http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/586011
> > > > > .htm
> > > > > l
> > > > > 
> > > > > Patches are based on latest linux-next (next-20180710) and are ordered
> > > > > in such way that they don't break R40 HDMI at any time. Because of
> > > > > that
> > > > > I suggest that whole series goes through drm-misc to preserve that
> > > > > order.
> > > > > 
> > > > > I also tested those patches on H3 to make sure it doesn't break other
> > > > > platforms. However, it would be nice to test for regressions also on
> > > > > older SoCs (with DE1).
> > > > > 
> > > > > Best regards,
> > > > > Jernej
> > > > 
> > > > Applied all patches but the patch 10, thanks!
> > > > Maxime
> > > 
> > > Ok, I'll send patch 10 separately. However,  patch 4 needs a fix according
> > > to test build robot:
> > > 
> > > if (IS_ERR_VALUE(index))
> > > should be:
> > > if (index < 0)
> > 
> > Yeah, sorry, I forgot to say it, but I fixed it locally (and the
> > return below as well).
> > 
> > > Additionally, due to Arnds patch merged (drm/sun4i: fix build failure with
> > > CONFIG_DRM_SUN8I_MIXER=m), sun4i_tcon.c needs additional handling if
> > > TCON_TOP driver is not build.
> > 
> > I'll drop it then, I haven't pushed it yet.
> 
> Which one? This series or patch from Arnd?

Arnd's

Maxime
Jernej Škrabec July 22, 2018, 2:43 p.m. UTC | #13
Hi Maxime,

Dne sreda, 11. julij 2018 ob 10:30:36 CEST je Maxime Ripard napisal(a):
> On Tue, Jul 10, 2018 at 10:34:53PM +0200, Jernej Skrabec wrote:
> > This series fixes several issues found in R40 HDMI patch series after
> > it was applied. Conversation can be found here:
> > http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/586011.htm
> > l
> > 
> > Patches are based on latest linux-next (next-20180710) and are ordered
> > in such way that they don't break R40 HDMI at any time. Because of that
> > I suggest that whole series goes through drm-misc to preserve that order.
> > 
> > I also tested those patches on H3 to make sure it doesn't break other
> > platforms. However, it would be nice to test for regressions also on
> > older SoCs (with DE1).
> > 
> > Best regards,
> > Jernej
> 
> Applied all patches but the patch 10, thanks!
> Maxime

It seems that you forgot to merge some patches:

[PATCH v2 12/18] drm/sun4i: tcon: Add another way for matching mixers with 
tcon
[PATCH v2 13/18] drm/sun4i: tcon: Add support for R40 TCON

Without them, R40 display pipeline can't work.

Maybe they are in your spam folder?

Best regards,
Jernej


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Maxime Ripard July 24, 2018, 12:37 p.m. UTC | #14
On Sun, Jul 22, 2018 at 04:43:56PM +0200, Jernej Škrabec wrote:
> Hi Maxime,
> 
> Dne sreda, 11. julij 2018 ob 10:30:36 CEST je Maxime Ripard napisal(a):
> > On Tue, Jul 10, 2018 at 10:34:53PM +0200, Jernej Skrabec wrote:
> > > This series fixes several issues found in R40 HDMI patch series after
> > > it was applied. Conversation can be found here:
> > > http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/586011.htm
> > > l
> > > 
> > > Patches are based on latest linux-next (next-20180710) and are ordered
> > > in such way that they don't break R40 HDMI at any time. Because of that
> > > I suggest that whole series goes through drm-misc to preserve that order.
> > > 
> > > I also tested those patches on H3 to make sure it doesn't break other
> > > platforms. However, it would be nice to test for regressions also on
> > > older SoCs (with DE1).
> > > 
> > > Best regards,
> > > Jernej
> > 
> > Applied all patches but the patch 10, thanks!
> > Maxime
> 
> It seems that you forgot to merge some patches:
> 
> [PATCH v2 12/18] drm/sun4i: tcon: Add another way for matching mixers with 
> tcon
> [PATCH v2 13/18] drm/sun4i: tcon: Add support for R40 TCON
> 
> Without them, R40 display pipeline can't work.
> 
> Maybe they are in your spam folder?

Thanks for telling me, I'm not quite sure what happened.

I've applied them.

Sorry,
Maxime
Icenowy Zheng July 24, 2018, 4:04 p.m. UTC | #15
在 2018-07-24二的 14:37 +0200,Maxime Ripard写道:
> On Sun, Jul 22, 2018 at 04:43:56PM +0200, Jernej Škrabec wrote:
> > Hi Maxime,
> > 
> > Dne sreda, 11. julij 2018 ob 10:30:36 CEST je Maxime Ripard
> > napisal(a):
> > > On Tue, Jul 10, 2018 at 10:34:53PM +0200, Jernej Skrabec wrote:
> > > > This series fixes several issues found in R40 HDMI patch series
> > > > after
> > > > it was applied. Conversation can be found here:
> > > > 
http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/586011.htm
> > > > l
> > > > 
> > > > Patches are based on latest linux-next (next-20180710) and are
> > > > ordered
> > > > in such way that they don't break R40 HDMI at any time. Because
> > > > of that
> > > > I suggest that whole series goes through drm-misc to preserve
> > > > that order.
> > > > 
> > > > I also tested those patches on H3 to make sure it doesn't break
> > > > other
> > > > platforms. However, it would be nice to test for regressions
> > > > also on
> > > > older SoCs (with DE1).
> > > > 
> > > > Best regards,
> > > > Jernej
> > > 
> > > Applied all patches but the patch 10, thanks!
> > > Maxime
> > 
> > It seems that you forgot to merge some patches:
> > 
> > [PATCH v2 12/18] drm/sun4i: tcon: Add another way for matching
> > mixers with 
> > tcon
> > [PATCH v2 13/18] drm/sun4i: tcon: Add support for R40 TCON
> > 
> > Without them, R40 display pipeline can't work.
> > 
> > Maybe they are in your spam folder?
> 
> Thanks for telling me, I'm not quite sure what happened.
> 
> I've applied them.

BTW without them the board cannot boot because of dead loop in
sun4i_drv_probe().

> 
> Sorry,
> Maxime
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jernej Škrabec July 24, 2018, 5:20 p.m. UTC | #16
Dne torek, 24. julij 2018 ob 18:04:49 CEST je Icenowy Zheng napisal(a):
> 在 2018-07-24二的 14:37 +0200,Maxime Ripard写道:
> 
> > On Sun, Jul 22, 2018 at 04:43:56PM +0200, Jernej Škrabec wrote:
> > > Hi Maxime,
> > > 
> > > Dne sreda, 11. julij 2018 ob 10:30:36 CEST je Maxime Ripard
> > > 
> > > napisal(a):
> > > > On Tue, Jul 10, 2018 at 10:34:53PM +0200, Jernej Skrabec wrote:
> > > > > This series fixes several issues found in R40 HDMI patch series
> > > > > after
> 
> > > > > it was applied. Conversation can be found here:
> http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/586011.htm
> 
> > > > > l
> > > > > 
> > > > > Patches are based on latest linux-next (next-20180710) and are
> > > > > ordered
> > > > > in such way that they don't break R40 HDMI at any time. Because
> > > > > of that
> > > > > I suggest that whole series goes through drm-misc to preserve
> > > > > that order.
> > > > > 
> > > > > I also tested those patches on H3 to make sure it doesn't break
> > > > > other
> > > > > platforms. However, it would be nice to test for regressions
> > > > > also on
> > > > > older SoCs (with DE1).
> > > > > 
> > > > > Best regards,
> > > > > Jernej
> > > > 
> > > > Applied all patches but the patch 10, thanks!
> > > > Maxime
> > > 
> > > It seems that you forgot to merge some patches:
> > > 
> > > [PATCH v2 12/18] drm/sun4i: tcon: Add another way for matching
> > > mixers with
> > > tcon
> > > [PATCH v2 13/18] drm/sun4i: tcon: Add support for R40 TCON
> > > 
> > > Without them, R40 display pipeline can't work.
> > > 
> > > Maybe they are in your spam folder?
> > 
> > Thanks for telling me, I'm not quite sure what happened.
> > 
> > I've applied them.
> 
> BTW without them the board cannot boot because of dead loop in
> sun4i_drv_probe().

Does it work for you now?

> 
> > Sorry,
> > Maxime
> > 
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel




--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Icenowy Zheng July 24, 2018, 5:23 p.m. UTC | #17
于 2018年7月25日 GMT+08:00 上午1:20:42, "Jernej Škrabec" <jernej.skrabec@siol.net> 写到:
>Dne torek, 24. julij 2018 ob 18:04:49 CEST je Icenowy Zheng napisal(a):
>> 在 2018-07-24二的 14:37 +0200,Maxime Ripard写道:
>> 
>> > On Sun, Jul 22, 2018 at 04:43:56PM +0200, Jernej Škrabec wrote:
>> > > Hi Maxime,
>> > > 
>> > > Dne sreda, 11. julij 2018 ob 10:30:36 CEST je Maxime Ripard
>> > > 
>> > > napisal(a):
>> > > > On Tue, Jul 10, 2018 at 10:34:53PM +0200, Jernej Skrabec wrote:
>> > > > > This series fixes several issues found in R40 HDMI patch
>series
>> > > > > after
>> 
>> > > > > it was applied. Conversation can be found here:
>>
>http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/586011.htm
>> 
>> > > > > l
>> > > > > 
>> > > > > Patches are based on latest linux-next (next-20180710) and
>are
>> > > > > ordered
>> > > > > in such way that they don't break R40 HDMI at any time.
>Because
>> > > > > of that
>> > > > > I suggest that whole series goes through drm-misc to preserve
>> > > > > that order.
>> > > > > 
>> > > > > I also tested those patches on H3 to make sure it doesn't
>break
>> > > > > other
>> > > > > platforms. However, it would be nice to test for regressions
>> > > > > also on
>> > > > > older SoCs (with DE1).
>> > > > > 
>> > > > > Best regards,
>> > > > > Jernej
>> > > > 
>> > > > Applied all patches but the patch 10, thanks!
>> > > > Maxime
>> > > 
>> > > It seems that you forgot to merge some patches:
>> > > 
>> > > [PATCH v2 12/18] drm/sun4i: tcon: Add another way for matching
>> > > mixers with
>> > > tcon
>> > > [PATCH v2 13/18] drm/sun4i: tcon: Add support for R40 TCON
>> > > 
>> > > Without them, R40 display pipeline can't work.
>> > > 
>> > > Maybe they are in your spam folder?
>> > 
>> > Thanks for telling me, I'm not quite sure what happened.
>> > 
>> > I've applied them.
>> 
>> BTW without them the board cannot boot because of dead loop in
>> sun4i_drv_probe().
>
>Does it work for you now?

Yes, although it cannot output 1920x1200 to my father's DVI
monitor, but if it output a smaller resolution (e.g. 1024x600, by
insert my WaveShare LCD first then the monitor) it works.

>
>> 
>> > Sorry,
>> > Maxime
>> > 
>> > _______________________________________________
>> > linux-arm-kernel mailing list
>> > linux-arm-kernel@lists.infradead.org
>> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
>
>
>
>
>_______________________________________________
>linux-arm-kernel mailing list
>linux-arm-kernel@lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Icenowy Zheng Aug. 14, 2018, 5:43 a.m. UTC | #18
在 2018-07-24二的 14:37 +0200,Maxime Ripard写道:
> On Sun, Jul 22, 2018 at 04:43:56PM +0200, Jernej Škrabec wrote:
> > Hi Maxime,
> > 
> > Dne sreda, 11. julij 2018 ob 10:30:36 CEST je Maxime Ripard
> > napisal(a):
> > > On Tue, Jul 10, 2018 at 10:34:53PM +0200, Jernej Skrabec wrote:
> > > > This series fixes several issues found in R40 HDMI patch series
> > > > after
> > > > it was applied. Conversation can be found here:
> > > > 
http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/586011.htm
> > > > l
> > > > 
> > > > Patches are based on latest linux-next (next-20180710) and are
> > > > ordered
> > > > in such way that they don't break R40 HDMI at any time. Because
> > > > of that
> > > > I suggest that whole series goes through drm-misc to preserve
> > > > that order.
> > > > 
> > > > I also tested those patches on H3 to make sure it doesn't break
> > > > other
> > > > platforms. However, it would be nice to test for regressions
> > > > also on
> > > > older SoCs (with DE1).
> > > > 
> > > > Best regards,
> > > > Jernej
> > > 
> > > Applied all patches but the patch 10, thanks!
> > > Maxime
> > 
> > It seems that you forgot to merge some patches:
> > 
> > [PATCH v2 12/18] drm/sun4i: tcon: Add another way for matching
> > mixers with 
> > tcon
> > [PATCH v2 13/18] drm/sun4i: tcon: Add support for R40 TCON
> > 
> > Without them, R40 display pipeline can't work.
> > 
> > Maybe they are in your spam folder?
> 
> Thanks for telling me, I'm not quite sure what happened.
> 
> I've applied them.

Sorry, but I still didn't find them in linux-next/master.

> 
> Sorry,
> Maxime
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Chen-Yu Tsai Aug. 14, 2018, 5:47 a.m. UTC | #19
On Tue, Aug 14, 2018 at 1:43 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
> 在 2018-07-24二的 14:37 +0200,Maxime Ripard写道:
>> On Sun, Jul 22, 2018 at 04:43:56PM +0200, Jernej Škrabec wrote:
>> > Hi Maxime,
>> >
>> > Dne sreda, 11. julij 2018 ob 10:30:36 CEST je Maxime Ripard
>> > napisal(a):
>> > > On Tue, Jul 10, 2018 at 10:34:53PM +0200, Jernej Skrabec wrote:
>> > > > This series fixes several issues found in R40 HDMI patch series
>> > > > after
>> > > > it was applied. Conversation can be found here:
>> > > >
> http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/586011.htm
>> > > > l
>> > > >
>> > > > Patches are based on latest linux-next (next-20180710) and are
>> > > > ordered
>> > > > in such way that they don't break R40 HDMI at any time. Because
>> > > > of that
>> > > > I suggest that whole series goes through drm-misc to preserve
>> > > > that order.
>> > > >
>> > > > I also tested those patches on H3 to make sure it doesn't break
>> > > > other
>> > > > platforms. However, it would be nice to test for regressions
>> > > > also on
>> > > > older SoCs (with DE1).
>> > > >
>> > > > Best regards,
>> > > > Jernej
>> > >
>> > > Applied all patches but the patch 10, thanks!
>> > > Maxime
>> >
>> > It seems that you forgot to merge some patches:
>> >
>> > [PATCH v2 12/18] drm/sun4i: tcon: Add another way for matching
>> > mixers with
>> > tcon
>> > [PATCH v2 13/18] drm/sun4i: tcon: Add support for R40 TCON
>> >
>> > Without them, R40 display pipeline can't work.
>> >
>> > Maybe they are in your spam folder?
>>
>> Thanks for telling me, I'm not quite sure what happened.
>>
>> I've applied them.
>
> Sorry, but I still didn't find them in linux-next/master.

They were applied too late and missed the -rc6 deadline for drm-misc.
We either have to revert the DT changes in 4.19-rc or somehow sneak
in a patch that prevents it from crashing.

ChenYu