linux-kernel.vger.kernel.org archive mirror
 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: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Steev Klimaszewski <steev@kali.org>,
	dri-devel@lists.freedesktop.org, David Airlie <airlied@linux.ie>,
	devicetree@vger.kernel.org, Daniel Vetter <daniel@ffwll.ch>,
	Maxime Ripard <mripard@kernel.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	linux-arm-msm@vger.kernel.org, Linus W <linus.walleij@linaro.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Douglas Anderson <dianders@chromium.org>,
	linux-kernel@vger.kernel.org
Subject: [RFC PATCH 4/8] drm/panel-simple: Don't re-read the EDID every time we power off the panel
Date: Thu, 22 Jul 2021 17:21:42 -0700	[thread overview]
Message-ID: <20210722172104.RFC.4.Ib810fb3bebd0bd6763e4609e1a6764d06064081e@changeid> (raw)
In-Reply-To: <20210723002146.1962910-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>
---

 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 9b286bd4444f..bcdc84b20827 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -370,9 +370,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;
 }
 
@@ -862,6 +859,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.432.gabb21c7263-goog


  parent reply	other threads:[~2021-07-23  0:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23  0:21 [RFC PATCH 0/8] eDP: Support probing eDP panels dynamically instead of hardcoding Douglas Anderson
2021-07-23  0:21 ` [RFC PATCH 1/8] dt-bindings: drm/panel-simple: Introduce generic eDP panels Douglas Anderson
2021-07-29 20:27   ` Rob Herring
2021-07-29 21:19     ` Doug Anderson
2021-07-23  0:21 ` [RFC PATCH 2/8] drm/edid: Break out reading block 0 of the EDID Douglas Anderson
2021-07-23  0:21 ` [RFC PATCH 3/8] drm/edid: Allow the querying/working with the panel ID from " Douglas Anderson
2021-07-23  0:21 ` Douglas Anderson [this message]
2021-07-23  0:21 ` [RFC PATCH 5/8] drm/panel-simple: Copy "desc" into driver data; don't store a pointer Douglas Anderson
2021-07-23  0:21 ` [RFC PATCH 6/8] drm/panel-simple: Split the delay structure out of the panel description Douglas Anderson
2021-07-23  0:21 ` [RFC PATCH 7/8] drm/panel-simple: Implement generic "edp-panel"s probed by EDID Douglas Anderson
2021-07-23  0:21 ` [RFC PATCH 8/8] arm64: dts: qcom: sc7180: trogdor devices can use probable eDP panels Douglas 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=20210722172104.RFC.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 \
    /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).