From: Vasily Khoruzhick <anarsoul@gmail.com>
To: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Thierry Reding <thierry.reding@gmail.com>,
Maxime Ripard <maxime.ripard@bootlin.com>,
Chen-Yu Tsai <wens@csie.org>,
Archit Taneja <architt@codeaurora.org>,
Andrzej Hajda <a.hajda@samsung.com>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Icenowy Zheng <icenowy@aosc.io>,
Sean Paul <seanpaul@chromium.org>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@googlegroups.com
Subject: [PATCH RESEND v2 07/12] drm/panel: simple: don't fail if we don't have panel desc
Date: Sun, 3 Feb 2019 10:54:56 -0800 [thread overview]
Message-ID: <20190203185501.8958-8-anarsoul@gmail.com> (raw)
In-Reply-To: <20190203185501.8958-1-anarsoul@gmail.com>
This is preparation for addition of generic eDP panel that
doesn't have any modes or delays defined.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
drivers/gpu/drm/panel/panel-simple.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 9c69e739a524..2f2cb2d81f2b 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -176,7 +176,7 @@ static int panel_simple_disable(struct drm_panel *panel)
backlight_update_status(p->backlight);
}
- if (p->desc->delay.disable)
+ if (p->desc && p->desc->delay.disable)
msleep(p->desc->delay.disable);
p->enabled = false;
@@ -195,7 +195,7 @@ static int panel_simple_unprepare(struct drm_panel *panel)
regulator_disable(p->supply);
- if (p->desc->delay.unprepare)
+ if (p->desc && p->desc->delay.unprepare)
msleep(p->desc->delay.unprepare);
p->prepared = false;
@@ -220,11 +220,13 @@ static int panel_simple_prepare(struct drm_panel *panel)
gpiod_set_value_cansleep(p->enable_gpio, 1);
- delay = p->desc->delay.prepare;
- if (p->no_hpd)
- delay += p->desc->delay.hpd_absent_delay;
- if (delay)
- msleep(delay);
+ if (p->desc) {
+ delay = p->desc->delay.prepare;
+ if (p->no_hpd)
+ delay += p->desc->delay.hpd_absent_delay;
+ if (delay)
+ msleep(delay);
+ }
p->prepared = true;
@@ -238,7 +240,7 @@ static int panel_simple_enable(struct drm_panel *panel)
if (p->enabled)
return 0;
- if (p->desc->delay.enable)
+ if (p->desc && p->desc->delay.enable)
msleep(p->desc->delay.enable);
if (p->backlight) {
@@ -280,6 +282,9 @@ static int panel_simple_get_timings(struct drm_panel *panel,
struct panel_simple *p = to_panel_simple(panel);
unsigned int i;
+ if (!p->desc)
+ return 0;
+
if (p->desc->num_timings < num_timings)
num_timings = p->desc->num_timings;
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-02-03 18:57 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-03 18:54 [PATCH RESEND v2 00/12] Analogix ANX6345 RGB-(e)DP bridge support Vasily Khoruzhick
2019-02-03 18:54 ` [PATCH RESEND v2 01/12] drm/bridge: move ANA78xx driver to analogix subdirectory Vasily Khoruzhick
2019-02-03 18:54 ` [PATCH RESEND v2 02/12] drm/bridge: split some definitions of ANX78xx to dedicated headers Vasily Khoruzhick
2019-02-03 18:54 ` [PATCH RESEND v2 03/12] drm/bridge: extract some Analogix I2C DP common code Vasily Khoruzhick
2019-02-03 18:54 ` [PATCH RESEND v2 04/12] dt-bindings: Add ANX6345 DP/eDP transmitter binding Vasily Khoruzhick
2019-02-03 18:54 ` [PATCH RESEND v2 05/12] drm/bridge: Add Analogix anx6345 support Vasily Khoruzhick
2019-02-05 13:19 ` Torsten Duwe
2019-02-03 18:54 ` [PATCH RESEND v2 06/12] drm/sun4i: rgb: Add 1% tolerance to dclk frequency check when bridge is connected Vasily Khoruzhick
2019-02-04 14:20 ` Maxime Ripard
2019-02-04 16:26 ` Vasily Khoruzhick
2019-02-04 16:28 ` Icenowy Zheng
2019-02-04 18:50 ` [linux-sunxi] " Vasily Khoruzhick
2019-02-05 15:41 ` Maxime Ripard
2019-02-05 17:49 ` Vasily Khoruzhick
2019-02-06 9:16 ` Maxime Ripard
2019-02-06 11:42 ` Thierry Reding
2019-02-03 18:54 ` Vasily Khoruzhick [this message]
2019-02-03 18:54 ` [PATCH RESEND v2 08/12] dt-bindings: add binding for generic eDP panel Vasily Khoruzhick
2019-02-04 7:43 ` Thierry Reding
2019-02-04 8:13 ` Vasily Khoruzhick
2019-02-04 8:23 ` Thierry Reding
2019-02-04 9:40 ` Daniel Vetter
2019-02-04 11:22 ` Thierry Reding
2019-02-04 15:59 ` Daniel Vetter
2019-02-04 16:22 ` Thierry Reding
2019-02-05 8:57 ` Daniel Vetter
2019-02-05 10:24 ` Thierry Reding
2019-02-05 16:36 ` Daniel Vetter
2019-02-14 19:51 ` Vasily Khoruzhick
2019-02-14 20:05 ` Vasily Khoruzhick
2019-02-14 20:38 ` Rob Herring
2019-02-14 20:54 ` Vasily Khoruzhick
2019-02-04 16:11 ` Vasily Khoruzhick
2019-02-04 16:27 ` Thierry Reding
2019-02-04 16:39 ` Rob Herring
2019-02-04 17:02 ` [linux-sunxi] " Vasily Khoruzhick
2019-02-04 16:27 ` Rob Herring
2019-02-04 16:56 ` Thierry Reding
2019-02-04 17:07 ` Vasily Khoruzhick
2019-02-04 20:23 ` Rob Herring
2019-02-04 20:26 ` Vasily Khoruzhick
2019-02-04 20:34 ` Rob Herring
2019-02-03 18:54 ` [PATCH RESEND v2 09/12] drm/panel: simple: add " Vasily Khoruzhick
2019-02-03 18:54 ` [PATCH RESEND v2 10/12] arm64: allwinner: a64: add pinmux for RGB666 LCD Vasily Khoruzhick
2019-02-03 18:55 ` [PATCH RESEND v2 11/12] arm64: allwinner: a64: enable LCD-related hardware for Pinebook Vasily Khoruzhick
2019-02-03 18:55 ` [PATCH RESEND v2 12/12] arm64: allwinner: a64: enable LCD-related hardware for TERES-I Vasily Khoruzhick
-- strict thread matches above, loose matches on Subject: below --
2018-10-18 7:33 [PATCH 0/9] Analogix ANX6345 RGB-(e)DP bridge support Icenowy Zheng
2018-10-18 7:33 ` [PATCH 1/9] drm/bridge: move ANA78xx driver to analogix subdirectory Icenowy Zheng
2018-10-18 8:47 ` Laurent Pinchart
2018-10-18 7:33 ` [PATCH 2/9] drm/bridge: split some definitions of ANX78xx to dedicated headers Icenowy Zheng
2018-10-18 7:33 ` [PATCH 3/9] drm/bridge: extract some Analogix I2C DP common code Icenowy Zheng
2018-10-18 7:33 ` [PATCH 4/9] dt-bindings: Add ANX6345 DP/eDP transmitter binding Icenowy Zheng
2018-10-18 8:53 ` Laurent Pinchart
2018-10-18 10:00 ` Icenowy Zheng
2018-10-18 11:23 ` Laurent Pinchart
2018-10-18 12:40 ` Icenowy Zheng
2018-10-25 18:30 ` Rob Herring
2018-10-26 0:08 ` Icenowy Zheng
2018-10-18 7:33 ` [PATCH 5/9] drm/bridge: Add Analogix anx6345 support Icenowy Zheng
2018-10-18 7:33 ` [PATCH 6/9] arm64: allwinner: a64: add pinmux for RGB666 LCD Icenowy Zheng
2018-10-18 7:33 ` [PATCH 7/9] arm64: allwinner: a64: enable ANX6345 bridge on Pinebook Icenowy Zheng
2018-10-18 15:17 ` Vasily Khoruzhick
2018-10-19 5:50 ` Icenowy Zheng
2018-10-18 7:33 ` [PATCH 8/9] arm64: allwinner: a64: enable ANX6345 bridge on TERES-I Icenowy Zheng
2018-10-18 7:33 ` [PATCH 9/9] [DO NOT MERGE] drm/sun4i: rgb: Add 5% tolerance to dot clock frequency check Icenowy Zheng
2018-10-18 8:55 ` Laurent Pinchart
2018-10-18 9:18 ` Daniel Vetter
2018-10-18 9:42 ` Maxime Ripard
2018-10-18 11:31 ` Laurent Pinchart
2018-10-18 12:18 ` Maxime Ripard
2018-10-18 12:50 ` Icenowy Zheng
2018-10-18 13:07 ` Maxime Ripard
2018-10-18 13:57 ` Laurent Pinchart
2019-02-03 1:32 ` Vasily Khoruzhick
2018-10-29 2:20 ` [PATCH 0/9] Analogix ANX6345 RGB-(e)DP bridge support Vasily Khoruzhick
2019-02-04 12:22 ` Torsten Duwe
2019-02-04 20:21 ` Vasily Khoruzhick
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=20190203185501.8958-8-anarsoul@gmail.com \
--to=anarsoul@gmail.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=architt@codeaurora.org \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=icenowy@aosc.io \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-sunxi@googlegroups.com \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@bootlin.com \
--cc=robh+dt@kernel.org \
--cc=seanpaul@chromium.org \
--cc=thierry.reding@gmail.com \
--cc=wens@csie.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 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).