LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Douglas Anderson <dianders@chromium.org>
To: Thierry Reding <thierry.reding@gmail.com>,
	Rob Herring <robh+dt@kernel.org>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	devicetree@vger.kernel.org, David Airlie <airlied@linux.ie>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Maxime Ripard <mripard@kernel.org>,
	Steev Klimaszewski <steev@kali.org>,
	Linus W <linus.walleij@linaro.org>,
	Douglas Anderson <dianders@chromium.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/6] drm/panel-simple: Don't re-read the EDID every time we power off the panel
Date: Fri, 30 Jul 2021 14:26:23 -0700	[thread overview]
Message-ID: <20210730142537.v2.4.Ib810fb3bebd0bd6763e4609e1a6764d06064081e@changeid> (raw)
In-Reply-To: <20210730212625.3071831-1-dianders@chromium.org>

The simple-panel driver is for panels that are not hot-pluggable at
runtime. Let's keep our cached EDID around until driver unload.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

(no changes since v1)

 drivers/gpu/drm/panel/panel-simple.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index ff8b59471c71..b06bf30c65d0 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -350,9 +350,6 @@ static int panel_simple_suspend(struct device *dev)
 	regulator_disable(p->supply);
 	p->unprepared_time = ktime_get();
 
-	kfree(p->edid);
-	p->edid = NULL;
-
 	return 0;
 }
 
@@ -834,6 +831,9 @@ static int panel_simple_remove(struct device *dev)
 	if (panel->ddc && (!panel->aux || panel->ddc != &panel->aux->ddc))
 		put_device(&panel->ddc->dev);
 
+	kfree(panel->edid);
+	panel->edid = NULL;
+
 	return 0;
 }
 
-- 
2.32.0.554.ge1b32706d8-goog


  parent reply	other threads:[~2021-07-30 21:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 21:26 [PATCH v2 0/6] eDP: Support probing eDP panels dynamically instead of hardcoding Douglas Anderson
2021-07-30 21:26 ` [PATCH v2 1/6] dt-bindings: drm/panel-simple: Introduce generic eDP panels Douglas Anderson
2021-08-02 13:39   ` Rob Herring
2021-08-09 22:20     ` Doug Anderson
2021-08-09 22:56       ` Rob Herring
2021-07-30 21:26 ` [PATCH v2 2/6] drm/edid: Break out reading block 0 of the EDID Douglas Anderson
2021-07-30 21:26 ` [PATCH v2 3/6] drm/edid: Allow the querying/working with the panel ID from " Douglas Anderson
2021-07-30 21:26 ` Douglas Anderson [this message]
2021-07-30 21:26 ` [PATCH v2 5/6] drm/panel-simple: Split the delay structure out of the panel description Douglas Anderson
2021-07-30 21:26 ` [PATCH v2 6/6] drm/panel-simple: Implement generic "edp-panel"s probed by EDID Douglas Anderson
     [not found] ` <YQmp3mGpLW+ELxAC@ravnborg.org>
2021-08-09 22:18   ` [PATCH v2 0/6] eDP: Support probing eDP panels dynamically instead of hardcoding Doug Anderson
     [not found]     ` <YRTsFNTn/T8fLxyB@ravnborg.org>
2021-08-12 16:00       ` 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=20210730142537.v2.4.Ib810fb3bebd0bd6763e4609e1a6764d06064081e@changeid \
    --to=dianders@chromium.org \
    --cc=airlied@linux.ie \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=steev@kali.org \
    --cc=thierry.reding@gmail.com \
    --cc=tzimmermann@suse.de \
    --subject='Re: [PATCH v2 4/6] drm/panel-simple: Don'\''t re-read the EDID every time we power off the panel' \
    /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).