linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: Doug Anderson <dianders@chromium.org>
Cc: "Stephen Boyd" <sboyd@kernel.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	"Bjorn Andersson" <bjorn.andersson@linaro.org>,
	"Linus W" <linus.walleij@linaro.org>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	DTML <devicetree@vger.kernel.org>,
	"Steev Klimaszewski" <steev@kali.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Maxime Ripard" <mripard@kernel.org>,
	"David Airlie" <airlied@linux.ie>,
	"DRI mailing list" <dri-devel@lists.freedesktop.org>,
	"Al Viro" <viro@zeniv.linux.org.uk>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Andreas Kemnade" <andreas@kemnade.info>,
	"Andrey Zhizhikin" <andrey.zhizhikin@leica-geosystems.com>,
	"Anson Huang" <Anson.Huang@nxp.com>,
	"Arnd Bergmann" <arnd@arndb.de>, "Chen-Yu Tsai" <wens@csie.org>,
	"Claudiu Beznea" <claudiu.beznea@microchip.com>,
	"Codrin Ciubotariu" <codrin.ciubotariu@microchip.com>,
	"Core ntin Labbe" <clabbe@baylibre.com>,
	"Daniel Thompson" <daniel.thompson@linaro.org>,
	"Dmitry Osipenko" <digetx@gmail.com>,
	"Emil Velikov" <emil.velikov@collabora.com>,
	"Eugen Hristev" <eugen.hristev@microchip.com>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Fabrice Gasnier" <fabrice.gasnier@st.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Grygorii Strashko" <grygorii.strashko@ti.com>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Joel Stanley" <joel@jms.id.au>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"Kees Cook" <keescook@chromium.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski@canonical.com>,
	"Lionel Debieve" <lionel.debieve@st.com>,
	"Liviu Dudau" <liviu.dudau@arm.com>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
	"Ludovic Desroches" <ludovic.desroches@microchip.com>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Marek Szyprowski" <m.szyprowski@samsung.com>,
	"Martin Jücker" <martin.juecker@gmail.com>,
	"Nicolas Ferre" <nicolas.ferre@microchip.com>,
	"Olivier Moysan" <olivier.moysan@st.com>,
	"Otavio Salvador" <otavio@ossystems.com.br>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Razvan Stefanescu" <razvan.stefanescu@microchip.com>,
	"Robert Richter" <rric@kernel.org>,
	"Russell King" <linux@armlinux.org.uk>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Stefan Wahren" <stefan.wahren@i2se.com>,
	"Sudeep Holla" <sudeep.holla@arm.com>,
	"Tony Lindgren" <tony@atomide.com>,
	"Tudor Ambarus" <tudor.ambarus@microchip.com>,
	"Viresh Kumar" <viresh.kumar@linaro.org>,
	"Vladimir Zapolskiy" <vz@mleia.com>,
	"Linux ARM Mailing List" <linux-arm-kernel@lists.infradead.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	linux-omap <linux-omap@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"ARM/SAMSUNG EXYNOS ARM ARCHITECTURES"
	<linux-samsung-soc@vger.kernel.org>,
	linux-sunxi@lists.linux.dev,
	"open list:TEGRA ARCHITECTURE SUPPORT <linux-
	tegra@vger.kernel.org>, Łukasz Stelmach" <l.stelmach@samsung.com>
Subject: Re: [PATCH v3 06/16] ARM: configs: Everyone who had PANEL_SIMPLE now gets PANEL_SIMPLE_EDP
Date: Wed, 8 Sep 2021 16:08:23 -0700	[thread overview]
Message-ID: <CAOesGMhd+m=hU6Fj3QXxqZb6TFf414UwvQLsLWgxe9Zb=3-tPQ@mail.gmail.com> (raw)
In-Reply-To: <CAD=FV=XzPVda==+hkJ8ZJNXz3sT=V+8y4gbsbUik4k3Om_cGvQ@mail.gmail.com>

On Wed, Sep 8, 2021 at 3:36 PM Doug Anderson <dianders@chromium.org> wrote:
>
> Hi,
>
> On Fri, Sep 3, 2021 at 1:38 PM Stephen Boyd <sboyd@kernel.org> wrote:
> >
> > Quoting Doug Anderson (2021-09-01 16:10:15)
> > > Hi,
> > >
> > > On Wed, Sep 1, 2021 at 2:12 PM Olof Johansson <olof@lixom.net> wrote:
> > > >
> > > > On Wed, Sep 1, 2021 at 1:20 PM Douglas Anderson <dianders@chromium.org> wrote:
> > > > >
> > > > > In the patch ("drm/panel-simple-edp: Split eDP panels out of
> > > > > panel-simple") we split the PANEL_SIMPLE driver in 2. By default let's
> > > > > give everyone who had the old driver enabled the new driver too. If
> > > > > folks want to opt-out of one or the other they always can later.
> > > > >
> > > > > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> > > >
> > > > Isn't this a case where the new option should just have had the old
> > > > option as the default value to avoid this kind of churn and possibly
> > > > broken platforms?
> > >
> > > I'm happy to go either way. I guess I didn't do that originally
> > > because logically there's not any reason to link the two drivers going
> > > forward. Said another way, someone enabling the "simple panel" driver
> > > for non-eDP panels wouldn't expect that the "simple panel" driver for
> > > DP panels would also get enabled by default. They really have nothing
> > > to do with one another. Enabling by default for something like this
> > > also seems like it would lead to bloat. I could have sworn that
> > > periodically people get yelled at for marking drivers on by default
> > > when it doesn't make sense.
> > >
> > > ...that being said, I'm happy to change the default as you suggest.
> > > Just let me know.
> >
> > Having the default will help olddefconfig users seamlessly migrate to
> > the new Kconfig. Sadly they don't notice that they should probably
> > disable the previous Kconfig symbol, but oh well. At least with the
> > default they don't go on a hunt/bisect to figure out that some Kconfig
> > needed to be enabled now that they're using a new kernel version.
> >
> > Maybe the default should have a TODO comment next to it indicating we
> > should remove the default in a year or two.
>
> OK, so I'm trying to figure out how to do this without just "kicking
> the can" down the road. I guess your idea is that for the next year
> this will be the default and that anyone who really wants
> "CONFIG_DRM_PANEL_EDP" will "opt-in" to keep it by adding
> "CONFIG_DRM_PANEL_EDP=y" to their config? ...and then after a year
> passes we remove the default? ...but that won't work, will it? Since
> "CONFIG_DRM_PANEL_EDP" will be the default for the next year then you
> really can't add it to the "defconfig", at least if you ever
> "normalize" it. The "defconfig" by definition has everything stripped
> from it that's already the "default", so for the next year anyone who
> tries to opt-in will get their preference stripped.
>
> Hrm, so let me explain options as I see them. Maybe someone can point
> out something that I missed. I'll assume that we'll change the config
> option from CONFIG_DRM_PANEL_SIMPLE_EDP to CONFIG_DRM_PANEL_EDP
> (remove the "SIMPLE" part).
>
> ==
>
> Where we were before my series:
>
> * One config "CONFIG_DRM_PANEL_SIMPLE" and it enables simple non-eDP
> and eDP drivers.
>
> ==
>
> Option 1: update everyone's configs (this patch)
>
> * Keep old config "CONFIG_DRM_PANEL_SIMPLE" but it now only means
> enable the panel-simple (non-eDP) driver.
> * Anyone who wants eDP panels must opt-in to "CONFIG_DRM_PANEL_EDP"
> * Update all configs in mainline; any out-of mainline configs must
> figure this out themselves.
>
> Pros:
> * no long term baggage
>
> Cons:
> * patch upstream is a bit of "churn"
> * anyone with downstream config will have to figure out what happened.
>
> ==
>
> Option 2: kick the can down the road + accept cruft
>
> * Keep old config "CONFIG_DRM_PANEL_SIMPLE" and it means enable the
> panel-simple (non-eDP) driver.
> * Anyone with "CONFIG_DRM_PANEL_SIMPLE" is opted in by default to
> "CONFIG_DRM_PANEL_EDP"
>
> AKA:
> config DRM_PANEL_EDP
>   default DRM_PANEL_SIMPLE
>
> Pros:
> * no config patches needed upstream at all and everything just works!
>
> Cons:
> * people are opted in to extra cruft by default and need to know to turn it off.
> * unclear if we can change the default without the same problems.
>
> ==
>
> Option 3: try to be clever
>
> * Add _two_ new configs. CONFIG_DRM_PANEL_SIMPLE_V2 and CONFIG_DRM_PANEL_EDP.
> * Old config "CONFIG_DRM_PANEL_SIMPLE" gets marked as "deprecated".
> * Both new configs have "default CONFIG_DRM_PANEL_SIMPLE"
>
> Now anyone old will magically get both the new config options by
> default. Anyone looking at this in the future _won't_ set the
> deprecated CONFIG_DRM_PANEL_SIMPLE but will instead choose if they
> want either the eDP or "simple" driver.
>
> Pros:
> * No long term baggage.
> * Everyone is transitioned automatically by default with no cruft patches.
>
> Cons:
> * I can't think of a better name than "CONFIG_DRM_PANEL_SIMPLE_V2" and
> that name is ugly.
>
> ==
>
> Option 4: shave a yak
>
> When thinking about this I came up with a clever idea of stashing the
> kernel version in a defconfig when it's generated. Then you could do
> something like:
>
> config DRM_PANEL_EDP
>   default DRM_PANEL_SIMPLE if DEFCONFIG_GENERATED_AT <= 0x00050f00
>
> That feels like a good idea to me but who knows what others would
> think. In general I think this series already shaves enough yaks. This
> isn't a new problem we're trying to solve so it seems like we should
> pick one of the options above.
>
> ==
>
> Unless I get an explicit NAK from someone like Olof or Arnd or I hear
> that everyone loves Option #3 I'll probably just stick with the
> existing approach since:
>
> * Olof's wording didn't make it sound like a strong objection.

Yeah, not a strong objection but an enquiry if there's a better way to
handle it. TL;DR: I don't think there really is.

My comment mostly came from the fact that when olddefconfig gets
broken like this, we tend to have a bunch of patches trickle in over
time as downstream users discover the need to turn on the new option.
You covered (most) of that  by doing the appropriate defconfigs to
this patch series, so it won't be as bad (besides any newly added
defconfigs during the same release, and we're quite careful about
doing that these days).

I think most of the other options, besides 2, are just more overhead
than needed here. So I'd be fine with just picking up option 1.

What's clear is that this is not a very convenient activity that
scales, but we don't do it all that often. This is where something
like a "HAVE_EDP" type config that the platform can provide helps, but
adding it just for this rework seems to be more work than it's worth.

> * From git history it looks as if config patches don't necessarily
> land through the SoC tree and thus I'd by default follow the
> suggestions of the DRM folks. Andrzej suggested going with the
> existing approach as long as I changed the symbol names and re-ordered
> the patches.

Right, Kconfig changes usually go with the driver. dts and defconfig
changes go to the SoC tree though since otherwise we end up with a
bunch of churn and conflicts.

> Please yell if anything above sounds wrong! I'll probably try to send
> out a new version tomorrow or the next day, but I won't land it right
> away to give people time to yell.

I'd leave it up to you if you want to do option 1 or 2, since there's
no really convenient way to do it better. 3 seems to be a bigger
hammer than what this situation calls for IMHO.


-Olof

  reply	other threads:[~2021-09-08 23:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01 20:19 [PATCH v3 00/16] eDP: Support probing eDP panels dynamically instead of hardcoding Douglas Anderson
2021-09-01 20:19 ` [PATCH v3 06/16] ARM: configs: Everyone who had PANEL_SIMPLE now gets PANEL_SIMPLE_EDP Douglas Anderson
2021-09-01 21:12   ` Olof Johansson
2021-09-01 23:10     ` Doug Anderson
     [not found]       ` <CGME20210903071832eucas1p10a7b8a295e68df4d2735110c9ec09cf1@eucas1p1.samsung.com>
2021-09-03  7:18         ` Andrzej Hajda
     [not found]       ` <163070152582.405991.9480635890491684680@swboyd.mtv.corp.google.com>
2021-09-08 22:36         ` Doug Anderson
2021-09-08 23:08           ` Olof Johansson [this message]
     [not found] ` <CGME20210902221015eucas1p26fae8f6ba4c70087dc7b007a271dce4b@eucas1p2.samsung.com>
2021-09-02 22:10   ` [PATCH v3 00/16] eDP: Support probing eDP panels dynamically instead of hardcoding Andrzej Hajda
2021-09-02 22:33     ` Doug Anderson
     [not found] ` <YTUSiHiCgihz1AcO@ravnborg.org>
2021-09-09  0:24   ` Doug Anderson

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='CAOesGMhd+m=hU6Fj3QXxqZb6TFf414UwvQLsLWgxe9Zb=3-tPQ@mail.gmail.com' \
    --to=olof@lixom.net \
    --cc=Anson.Huang@nxp.com \
    --cc=airlied@linux.ie \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andreas@kemnade.info \
    --cc=andrey.zhizhikin@leica-geosystems.com \
    --cc=arnd@arndb.de \
    --cc=bjorn.andersson@linaro.org \
    --cc=clabbe@baylibre.com \
    --cc=claudiu.beznea@microchip.com \
    --cc=codrin.ciubotariu@microchip.com \
    --cc=daniel.thompson@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=digetx@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.velikov@collabora.com \
    --cc=eugen.hristev@microchip.com \
    --cc=f.fainelli@gmail.com \
    --cc=fabrice.gasnier@st.com \
    --cc=festevam@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=grygorii.strashko@ti.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=joel@jms.id.au \
    --cc=jonathanh@nvidia.com \
    --cc=keescook@chromium.org \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=l.stelmach@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux@armlinux.org.uk \
    --cc=lionel.debieve@st.com \
    --cc=liviu.dudau@arm.com \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=ludovic.desroches@microchip.com \
    --cc=m.szyprowski@samsung.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=magnus.damm@gmail.com \
    --cc=mani@kernel.org \
    --cc=martin.juecker@gmail.com \
    --cc=mripard@kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=olivier.moysan@st.com \
    --cc=otavio@ossystems.com.br \
    --cc=razvan.stefanescu@microchip.com \
    --cc=robh+dt@kernel.org \
    --cc=rric@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sam@ravnborg.org \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=steev@kali.org \
    --cc=stefan.wahren@i2se.com \
    --cc=sudeep.holla@arm.com \
    --cc=thierry.reding@gmail.com \
    --cc=tony@atomide.com \
    --cc=tudor.ambarus@microchip.com \
    --cc=tzimmermann@suse.de \
    --cc=viresh.kumar@linaro.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=vz@mleia.com \
    --cc=wens@csie.org \
    --subject='Re: [PATCH v3 06/16] ARM: configs: Everyone who had PANEL_SIMPLE now gets PANEL_SIMPLE_EDP' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).