linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Peter Senna Tschudin <peter.senna@collabora.co.uk>
Cc: Lucas Stach <l.stach@pengutronix.de>,
	mark.rutland@arm.com, dri-devel@lists.freedesktop.org,
	linux@armlinux.org.uk, geert@linux-m68k.org,
	Peter Senna Tschudin <peter.senna@collabora.com>,
	treding@nvidia.com, linux@roeck-us.net,
	devicetree@vger.kernel.org, kernel@pengutronix.de,
	andrey.gusakov@cogentembedded.com, fabio.estevam@nxp.com,
	robh+dt@kernel.org, mchehab@kernel.org,
	linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org,
	Daniel Stone <daniel.stone@collabora.co.uk>,
	enric.balletbo@collabora.com, akpm@linux-foundation.org,
	shawnguo@kernel.org, davem@davemloft.net
Subject: Re: [PATCH V3 2/5] dts/imx6q-b850v3: Configure IPU assignment order
Date: Tue, 2 Aug 2016 15:13:35 +0200	[thread overview]
Message-ID: <20160802131335.GH6232@phenom.ffwll.local> (raw)
In-Reply-To: <70b6-579f4100-9-6ce4f380@208251793>

On Mon, Aug 01, 2016 at 01:30:57PM +0100, Peter Senna Tschudin wrote:
> Hi Lucas,
> 
> Thank you for the prompt review.
>  
> On Monday, August 1, 2016 10:54 CEST, Lucas Stach <l.stach@pengutronix.de> wrote: 
>  
> > Am Sonntag, den 31.07.2016, 21:55 +0200 schrieb Peter Senna Tschudin:
> > > As the IPU has combined limitations across multiple crtcs, and as that
> > > can't be communicated to userspace at the moment, reorder the crtcs to
> > > allow support to two Full-HD monitors by avoiding assigning two
> > > monitors to a single IPU.
> > > 
> > > Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> > > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > > Cc: Rob Herring <robh@kernel.org>
> > > Cc: Fabio Estevam <fabio.estevam@nxp.com>
> > > Signed-off-by: Peter Senna Tschudin <peter.senna@collabora.com>
> > 
> > NACK. This is a userspace issue. Changing the assignment order of the
> > CRTCs just shifts the failure to a userspace that want to use CRTC 0 and
> > 2 now.
> 
> Err, yeah user space issue... But how the kernel is currently telling
> user space about what exactly went wrong and how user space might fix
> it? How Weston(our user space) is going to know  that reshuffling crtcs
> is going to lead to success; how could it? I guess some
> platform-specific code in user space is needed for this to work...

atomic with the TEST_ONLY flag. This is what userspace should do:
1. submit atomic TEST_ONLY request with 1 screen on first crtc
2. If reject, move to another crtc or if those are all tried, reduce mode
(this should never happen for the 1st screen, kernel /should/ filter out
should impossible modes. But for 2nd/3rd screen combined modes might not
all work).
3. Once you have a successfuly config for the 1st screen, add 2nd screen.
4. goto 2 with that 2nd screen.
5. Once all the screens have a mode/crtc they can be used on, do the real
atomic request without TEST_ONLY.

Like Lucas said, no need to fumble around with ordering of CRTCs. The only
thing we do in the driver is move the preferred output (if there is any)
to the front of the _connector_ list, e.g. for built-in panels.

No need at all for platform specific code.

Cheers, Daniel
> 
> > 
> > imx-drm just got atomic support and with the atomic check it should be
> > possible to inform userspace in a reasonable way about such issues.
> 
> Should be possible, but I guess it isn't, and wont be until a considerable effort is put on both kernel and user space. Or am I missing something? What do you propose?
> 
> I got inspiration from: arch/arm/boot/dts/imx6q.dtsi
> ...
>         display-subsystem {
>                 compatible = "fsl,imx-display-subsystem";
>                 ports = <&ipu1_di0>, <&ipu1_di1>, <&ipu2_di0>, <&ipu2_di1>;
>         };
> ...
> 
> This is there for more than 2 years now, and I get that the idea here is not ordering, but just declaring.
> 
> However even if this patch is not the perfect solution, it allows us to stay close to upstream now without creating problems(does it create any issue?).
> 
> Can you reconsider or propose a concrete solution that is not more complex than our entire driver?
> 
> Thanks a lot!
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  reply	other threads:[~2016-08-02 13:15 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30 16:39 [PATCH 0/5] Add driver for GE B850v3 LVDS/DP++ Bridge Peter Senna Tschudin
2016-05-30 16:39 ` [PATCH 1/5] drm/imx-ldb: Add support to drm-bridge Peter Senna Tschudin
2016-06-02 13:09   ` Philipp Zabel
2016-05-30 16:39 ` [PATCH 2/5] arm/dts/imx6q-b850v3: Configure IPU assignment order Peter Senna Tschudin
2016-05-30 16:49   ` Fabio Estevam
2016-06-02 12:55   ` Philipp Zabel
2016-05-30 16:39 ` [PATCH 3/5] Documentation/devicetree/bindings: Add b850v3_lvds_dp Peter Senna Tschudin
2016-06-02 12:49   ` Philipp Zabel
2016-06-02 23:19     ` Peter Senna Tschudin
2016-06-02 22:57   ` Rob Herring
2016-05-30 16:39 ` [PATCH 4/5] drm/bridge: Add driver for GE B850v3 LVDS/DP++ Bridge Peter Senna Tschudin
2016-05-31  7:48   ` Enric Balletbo Serra
2016-05-30 16:39 ` [PATCH 5/5] arm/dts/imx6q-b850v3: Use " Peter Senna Tschudin
2016-05-30 16:54   ` Fabio Estevam
2016-06-09 16:25 ` [PATCH V2 0/5] Add driver for " Peter Senna Tschudin
2016-06-09 16:25   ` [PATCH V2 1/5] drm/imx-ldb: Add support to drm-bridge Peter Senna Tschudin
2016-06-09 16:25   ` [PATCH V2 2/5] dts/imx6q-b850v3: Configure IPU assignment order Peter Senna Tschudin
2016-06-09 16:25   ` [PATCH V2 3/5] Documentation/devicetree/bindings: b850v3_lvds_dp Peter Senna Tschudin
2016-06-10 17:42     ` Rob Herring
2016-06-10 18:54     ` Javier Martinez Canillas
2016-06-09 16:25   ` [PATCH V2 4/5] drm/bridge: Add driver for GE B850v3 LVDS/DP++ Bridge Peter Senna Tschudin
2016-06-10  7:39     ` Enric Balletbo Serra
2016-06-10  9:44       ` Peter Senna Tschudin
2016-06-10 14:13     ` Daniel Vetter
2016-06-22  8:34     ` Archit Taneja
2016-06-09 16:25   ` [PATCH V2 5/5] dts/imx6q-b850v3: Use " Peter Senna Tschudin
2016-07-31 19:55 ` [PATCH V3 0/5] Add driver for " Peter Senna Tschudin
2016-07-31 19:55   ` [PATCH V3 1/5] drm/imx-ldb: Add support to drm-bridge Peter Senna Tschudin
2016-08-01 10:21     ` Philipp Zabel
2016-08-02 18:46       ` Peter Senna Tschudin
2016-07-31 19:55   ` [PATCH V3 2/5] dts/imx6q-b850v3: Configure IPU assignment order Peter Senna Tschudin
2016-08-01  8:54     ` Lucas Stach
2016-08-01 12:30       ` Peter Senna Tschudin
2016-08-02 13:13         ` Daniel Vetter [this message]
2016-07-31 19:55   ` [PATCH V3 3/5] Documentation/devicetree/bindings: b850v3_lvds_dp Peter Senna Tschudin
2016-08-01 16:59     ` Rob Herring
2016-07-31 19:55   ` [PATCH V3 4/5] drm/bridge: Add driver for GE B850v3 LVDS/DP++ Bridge Peter Senna Tschudin
2016-07-31 19:55   ` [PATCH V3 5/5] dts/imx6q-b850v3: Use " Peter Senna Tschudin
2016-08-04 22:36 ` [PATCH V4 0/4] Add driver for " Peter Senna Tschudin
2016-08-04 22:36   ` [PATCH V4 1/4] drm/imx-ldb: Add support to drm-bridge Peter Senna Tschudin
2016-08-16 15:40     ` Martyn Welch
2016-08-04 22:36   ` [PATCH V4 2/4] Documentation/devicetree/bindings: b850v3_lvds_dp Peter Senna Tschudin
2016-08-05  7:28     ` Enric Balletbo Serra
2016-08-16 15:59     ` Martyn Welch
2016-08-04 22:37   ` [PATCH V4 3/4] drm/bridge: Add driver for GE B850v3 LVDS/DP++ Bridge Peter Senna Tschudin
2016-08-05  7:38     ` Enric Balletbo Serra
2016-08-04 22:37   ` [PATCH V4 4/4] dts/imx6q-b850v3: Use " Peter Senna Tschudin
2016-08-09 16:41 ` [PATCH V5 0/4] Add driver for " Peter Senna Tschudin
2016-08-09 16:41   ` [PATCH V5 1/4] drm/imx-ldb: Add support to drm-bridge Peter Senna Tschudin
2016-08-11  9:38     ` Philipp Zabel
2016-08-09 16:41   ` [PATCH V5 2/4] Documentation/devicetree/bindings: b850v3_lvds_dp Peter Senna Tschudin
2016-09-26  8:26     ` Peter Senna Tschudin
2016-08-09 16:41   ` [PATCH V5 3/4] drm/bridge: Add driver for GE B850v3 LVDS/DP++ Bridge Peter Senna Tschudin
2016-08-16  4:15     ` Archit Taneja
2016-09-26  8:27     ` Peter Senna Tschudin
2016-09-26  8:31       ` Archit Taneja
2016-09-26  8:58         ` Peter Senna Tschudin
2016-09-26 10:28           ` Archit Taneja
2016-09-26 10:29     ` Archit Taneja
2016-09-26 11:54       ` Peter Senna Tschudin
2016-09-26 12:54         ` Archit Taneja
2016-08-09 16:41   ` [PATCH V5 4/4] dts/imx6q-b850v3: Use " Peter Senna Tschudin
2016-09-26  8:27     ` Peter Senna Tschudin
2016-09-29 10:39       ` Shawn Guo

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=20160802131335.GH6232@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=akpm@linux-foundation.org \
    --cc=andrey.gusakov@cogentembedded.com \
    --cc=daniel.stone@collabora.co.uk \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=enric.balletbo@collabora.com \
    --cc=fabio.estevam@nxp.com \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@roeck-us.net \
    --cc=mark.rutland@arm.com \
    --cc=mchehab@kernel.org \
    --cc=peter.senna@collabora.co.uk \
    --cc=peter.senna@collabora.com \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=treding@nvidia.com \
    /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 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).