All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philip Chen <philipchen@chromium.org>
To: Doug Anderson <dianders@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Stephen Boyd <swboyd@chromium.org>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Robert Foss <robert.foss@linaro.org>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/bridge: parade-ps8640: Populate devices on aux-bus
Date: Thu, 21 Oct 2021 14:11:19 -0700	[thread overview]
Message-ID: <CA+cxXh=R3U2uz2x0Mef3LZ-mta-+F9TXD0F+RGd5mDTWQOgZvQ@mail.gmail.com> (raw)
In-Reply-To: <CAD=FV=XXOY_Rded_j6oysDkZ=e7_Gc1SPKPbkLK2DBdoKHWuKA@mail.gmail.com>

Hi Doug,

On Mon, Oct 18, 2021 at 1:43 PM Doug Anderson <dianders@chromium.org> wrote:
>
> Hi,
>
> On Sat, Oct 16, 2021 at 9:57 AM Philip Chen <philipchen@chromium.org> wrote:
> >
> > Conventionally, panel is listed under the root in the device tree.
> > When userland asks for display mode, ps8640 bridge is responsible
> > for returning EDID when ps8640_bridge_get_edid() is called.
> >
> > Now enable a new option of listing the panel under "aux-bus" of ps8640
> > bridge node in the device tree. In this case, panel driver can retrieve
> > EDID by triggering AUX transactions, without ps8640_bridge_get_edid()
> > calls at all.
> >
> > To prevent the "old" and "new" options from interfering with each
> > other's logic flow, disable DRM_BRIDGE_OP_EDID when the new option
> > is taken.
> >
> > Signed-off-by: Philip Chen <philipchen@chromium.org>
> > ---
> >
> >  drivers/gpu/drm/bridge/parade-ps8640.c | 52 ++++++++++++++++++++------
> >  1 file changed, 40 insertions(+), 12 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c
> > index acfe1bf0f936..98884f799ea8 100644
> > --- a/drivers/gpu/drm/bridge/parade-ps8640.c
> > +++ b/drivers/gpu/drm/bridge/parade-ps8640.c
> > @@ -14,6 +14,7 @@
> >  #include <linux/regulator/consumer.h>
> >
> >  #include <drm/drm_bridge.h>
> > +#include <drm/drm_dp_aux_bus.h>
>
> You need a `select DRM_DP_AUX_BUS` in the Kconfig to avoid the errors
> that the build robot found for you.
Thanks for the tip!
I also found "select REGMAP_I2C" seems to be missing for ps8640.
although the build robot didn't complain.
Should I post a fix-up?

>
>
> >  #include <drm/drm_dp_helper.h>
> >  #include <drm/drm_mipi_dsi.h>
> >  #include <drm/drm_of.h>
> > @@ -149,6 +150,24 @@ static inline struct ps8640 *aux_to_ps8640(struct drm_dp_aux *aux)
> >         return container_of(aux, struct ps8640, aux);
> >  }
> >
> > +static bool ps8640_of_panel_on_aux_bus(struct device *dev)
> > +{
> > +       struct device_node *bus, *panel;
> > +
> > +       if (!dev->of_node)
> > +               return false;
>
> You probably don't need the above check. I think things would be
> pretty broken if we didn't have an "of_node".
Removed in v2.
PTAL.
>
>
> > +       bus = of_get_child_by_name(dev->of_node, "aux-bus");
> > +       if (!bus)
> > +               return false;
> > +
> > +       panel = of_get_child_by_name(bus, "panel");
>
> of_node_put(bus);
Added in v2.
PTAL.

>
>
> > +       if (!panel)
> > +               return false;
>
> of_node_put(panel);
Added in v2.
PTAL.
>
>
> Other than the above, this looks reasonable to me.
>
> -Doug

  reply	other threads:[~2021-10-21 21:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-16 16:57 [PATCH 1/2] drm/bridge: parade-ps8640: Enable runtime power management Philip Chen
2021-10-16 16:57 ` [PATCH 2/2] drm/bridge: parade-ps8640: Populate devices on aux-bus Philip Chen
2021-10-16 21:50   ` kernel test robot
2021-10-16 21:50     ` kernel test robot
2021-10-18  8:03   ` kernel test robot
2021-10-18  8:03     ` kernel test robot
2021-10-18 20:43   ` Doug Anderson
2021-10-21 21:11     ` Philip Chen [this message]
2021-10-18 20:42 ` [PATCH 1/2] drm/bridge: parade-ps8640: Enable runtime power management Doug Anderson
2021-10-21 21:06   ` Philip Chen

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='CA+cxXh=R3U2uz2x0Mef3LZ-mta-+F9TXD0F+RGd5mDTWQOgZvQ@mail.gmail.com' \
    --to=philipchen@chromium.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=robert.foss@linaro.org \
    --cc=swboyd@chromium.org \
    /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.