All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH v3] video: sunxi_display: Convert to DM_VIDEO
Date: Sun, 7 Feb 2021 21:21:06 -0700	[thread overview]
Message-ID: <CAPnjgZ0eHnH06JX2-KgXpBKA73xA19F4vK2g+ibcaXwS4rGhTQ@mail.gmail.com> (raw)
In-Reply-To: <20210208013628.6954d01f@slackpad.fritz.box>

Hi Andre,

On Sun, 7 Feb 2021 at 18:37, Andre Przywara <andre.przywara@arm.com> wrote:
>
> On Sun, 7 Feb 2021 07:37:34 -0700
> Simon Glass <sjg@chromium.org> wrote:
>
> Hi Simon,
>
> > On Thu, 4 Feb 2021 at 18:08, Andre Przywara <andre.przywara@arm.com> wrote:
> > >
> > > From: Jagan Teki <jagan@amarulasolutions.com>
> > >
> > > DM_VIDEO migration deadline is already expired, but around
> > > 80 Allwinner boards are still using video in a legacy way.
> > >
> > > ===================== WARNING ======================
> > > This board does not use CONFIG_DM_VIDEO Please update
> > > the board to use CONFIG_DM_VIDEO before the v2019.07 release.
> > > Failure to update by the deadline may result in board removal.
> > > See doc/driver-model/migration.rst for more info.
> > > ====================================================
> > >
> > > Convert the legacy video driver over to the DM_VIDEO framework. This is
> > > a minimal conversion: it doesn't use the DT for finding its resources,
> > > nor does it use DM clocks or DM devices for the outputs (LCD, HDMI, CVBS).
> > >
> > > Tested in Bananapi M1+ Plus 1920x1200 HDMI out. (Jagan)
> > >
> > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > [Andre: rebase and smaller fixes]
> > > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> > > ---
> > > Hi,
> > >
> > > I picked this one up to get rid of the warnings. I dropped the BMP
> > > support for now (v2 1/3 and v2 2/3), I need to have a closer look, as
> > > I am not convinced this was the right solution.
> > >
> > > Cheers,
> > > Andre
> > >
> > > Changelog v2 .. v3:
> > > - rebase against master, fixing up renamed variables and structs
> > > - replace enum with #define
> > > - remove BMP from Kconfig
> > > - fix memory node size calculation in simplefb setup
> > >
> > >  arch/arm/mach-sunxi/Kconfig         |   9 +-
> > >  drivers/video/sunxi/sunxi_display.c | 262 ++++++++++++++++------------
> > >  include/configs/sunxi-common.h      |  17 --
> > >  scripts/config_whitelist.txt        |   1 -
> > >  4 files changed, 157 insertions(+), 132 deletions(-)
> > >
> >
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> >
> > Some thoughts below
>
> Many thanks for having a thorough look, much appreciated.
>
> I will have a closer look at your comments which I didn't reply to
> below.
>
> For the other points:
> To be honest, I haven't checked every line in this patch, my goal was
> merely to get it merged (this time), to prevent feature removal and
> drop the nasty buildman warnings.
> I see quite some cleanup potential here (some I already mentioned in
> the commit message above), but wanted to get the main DM_VIDEO
> conversion done first (as I think last time some discussion already
> prevented a merge).
> So my plan was to queue this for next ASAP, then send more cleanup patches
> on top, before the next merge window. I understand that it's typically
> done the other way around, but given this is dragging on for a while,
> is long overdue and works for me (TM) as it is, I would prefer a
> functional patch first, with cleanups on top.

That's fine...you have my review tag. My comments are just suggestions
for improvement and much of it relates to the existing code.

>
> >
> > > diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> > > index 0135575ca1e..a29d11505aa 100644
> > > --- a/arch/arm/mach-sunxi/Kconfig
> > > +++ b/arch/arm/mach-sunxi/Kconfig
> > > @@ -816,13 +816,14 @@ config VIDEO_SUNXI
> > >         depends on !MACH_SUN9I
> > >         depends on !MACH_SUN50I
> > >         depends on !SUN50I_GEN_H6
> > > -       select VIDEO
> > > +       select DM_VIDEO
> >
> > I wonder whether instead VIDEO_SUNXI should depend on DM_VIDEO ?
>
> So I was always wondering about the logic behind that.
> My understanding would be: This driver is (now) implementing the
> DM_VIDEO interface. Any user (at board or SoC level) would just be
> selecting this driver, without caring about which driver interface it
> uses.
> So as this driver is (now) DM_VIDEO only, it would signal this via this
> select line.
>
> If that is not how it's meant to be, can you explain the the idea behind
> this, please?

That sounds fine to me, but what happens when someone selects a DM and
non-DM driver? That has always been the intent - to ensure that people
are selecting DM for a subsystem on purpose.

Of course these days most stuff is DM, so perhaps that approach is
obsolete and we should do what you say. I'm OK with that.

>
> Also: with CONFIG_VIDEO now dying, CONFIG_DM_VIDEO somewhat loses its
> purpose, doesn't it?

All of the CONFIG_DM... things should be removed at some point, yet.
Just waiting for the mythical deadlines...

[...]

Regards,
Simon

  reply	other threads:[~2021-02-08  4:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05  1:07 [PATCH v3] video: sunxi_display: Convert to DM_VIDEO Andre Przywara
2021-02-05 16:04 ` Maxime Ripard
2021-02-05 16:27 ` Jernej Škrabec
2021-02-05 19:31   ` Andre Przywara
2021-02-07 14:37 ` Simon Glass
2021-02-08  1:36   ` Andre Przywara
2021-02-08  4:21     ` Simon Glass [this message]
2021-02-21  0:07   ` Andre Przywara
2021-02-21  0:45     ` Tom Rini
2021-02-21 16:47       ` Anatolij Gustschin
2021-02-22  0:17         ` Andre Przywara
2021-02-22  7:37           ` Anatolij Gustschin
2021-02-21 16:24     ` Simon Glass
2021-02-22  9:02       ` Maxime Ripard
2021-02-22  8:59     ` Maxime Ripard

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=CAPnjgZ0eHnH06JX2-KgXpBKA73xA19F4vK2g+ibcaXwS4rGhTQ@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.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.