[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=UhOKcSC5FPPZgXiqfFCYOu4iFGrhtrgfGz_ovT8Qi-6w@mail.gmail.com>
Date: Fri, 23 Apr 2021 09:30:36 -0700
From: Doug Anderson <dianders@...omium.org>
To: Bjorn Andersson <bjorn.andersson@...aro.org>
Cc: Andrzej Hajda <a.hajda@...sung.com>,
Neil Armstrong <narmstrong@...libre.com>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Jonas Karlman <jonas@...boo.se>,
Jernej Skrabec <jernej.skrabec@...l.net>,
Sam Ravnborg <sam@...nborg.org>, Wolfram Sang <wsa@...nel.org>,
Stephen Boyd <swboyd@...omium.org>,
Rob Clark <robdclark@...omium.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Stanislav Lisovskiy <stanislav.lisovskiy@...el.com>,
Steev Klimaszewski <steev@...i.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Linus W <linus.walleij@...aro.org>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
Thierry Reding <thierry.reding@...il.com>,
dri-devel <dri-devel@...ts.freedesktop.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 24/27] drm/panel: panel-simple: Cache the EDID as long
as we retain power
Hi,
On Fri, Apr 23, 2021 at 9:12 AM Bjorn Andersson
<bjorn.andersson@...aro.org> wrote:
>
> On Fri 16 Apr 17:39 CDT 2021, Douglas Anderson wrote:
>
> > It doesn't make sense to go out to the bus and read the EDID over and
> > over again. Let's cache it and throw away the cache when we turn power
> > off from the panel. Autosuspend means that even if there are several
> > calls to read the EDID before we officially turn the power on then we
> > should get good use out of this cache.
> >
> > Signed-off-by: Douglas Anderson <dianders@...omium.org>
> > ---
> >
> > (no changes since v1)
> >
> > drivers/gpu/drm/panel/panel-simple.c | 17 ++++++++++-------
> > 1 file changed, 10 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> > index 40382c1be692..5a2953c4ca44 100644
> > --- a/drivers/gpu/drm/panel/panel-simple.c
> > +++ b/drivers/gpu/drm/panel/panel-simple.c
> > @@ -189,6 +189,8 @@ struct panel_simple {
> > struct gpio_desc *enable_gpio;
> > struct gpio_desc *hpd_gpio;
> >
> > + struct edid *edid;
> > +
> > struct drm_display_mode override_mode;
> >
> > enum drm_panel_orientation orientation;
> > @@ -345,6 +347,9 @@ static int panel_simple_suspend(struct device *dev)
> > regulator_disable(p->supply);
> > p->unprepared_time = ktime_get();
> >
> > + kfree(p->edid);
> > + p->edid = NULL;
>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@...aro.org>
>
>
> But separate of this, shouldn't the driver have a pm_runtime_disable()
> in the remove path to synchronize the autosleep? Or is that not how that
> works?
Indeed! I'll add a patch to the start of my v5 (coming shortly) that
fixes this. Thanks for catching!
-Doug
Powered by blists - more mailing lists