All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org
Cc: Marek Vasut <marex@denx.de>,
	Chun-Kuang Hu <chunkuang.hu@kernel.org>,
	Jonas Karlman <jonas@kwiboo.se>,
	Robert Foss <robert.foss@linaro.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Douglas Anderson <dianders@chromium.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Frieder Schrempf <frieder.schrempf@kontron.de>,
	andrzej.hajda@gmail.com,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Jagan Teki <jagan@amarulasolutions.com>
Subject: [PATCH v4 5/6] drm/panel: Add prepare_prev_first flag to drm_panel
Date: Mon,  5 Dec 2022 17:33:27 +0000	[thread overview]
Message-ID: <20221205173328.1395350-6-dave.stevenson@raspberrypi.com> (raw)
In-Reply-To: <20221205173328.1395350-1-dave.stevenson@raspberrypi.com>

Mapping to the drm_bridge flag pre_enable_prev_first,
add a new flag prepare_prev_first to drm_panel to allow
the panel driver to request that the upstream bridge should
be pre_enabled before the panel prepare.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/bridge/panel.c |  2 ++
 include/drm/drm_panel.h        | 10 ++++++++++
 2 files changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c
index 216af76d0042..03c3274dc3d9 100644
--- a/drivers/gpu/drm/bridge/panel.c
+++ b/drivers/gpu/drm/bridge/panel.c
@@ -364,6 +364,8 @@ struct drm_bridge *devm_drm_panel_bridge_add_typed(struct device *dev,
 		devres_free(ptr);
 	}
 
+	bridge->pre_enable_prev_first = panel->prepare_prev_first;
+
 	return bridge;
 }
 EXPORT_SYMBOL(devm_drm_panel_bridge_add_typed);
diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index 994bfcdd84c5..432fab2347eb 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -188,6 +188,16 @@ struct drm_panel {
 	 * Panel entry in registry.
 	 */
 	struct list_head list;
+
+	/**
+	 * @prepare_prev_first:
+	 *
+	 * The previous controller should be prepared first, before the prepare
+	 * for the panel is called. This is largely required for DSI panels
+	 * where the DSI host controller should be initialised to LP-11 before
+	 * the panel is powered up.
+	 */
+	bool prepare_prev_first;
 };
 
 void drm_panel_init(struct drm_panel *panel, struct device *dev,
-- 
2.34.1


  parent reply	other threads:[~2022-12-05 17:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05 17:33 [PATCH v4 0/6] DSI host and peripheral initialisation ordering Dave Stevenson
2022-12-05 17:33 ` [PATCH v4 1/6] drm/bridge: ps8640: Use atomic variants of drm_bridge_funcs Dave Stevenson
2022-12-05 17:33 ` [PATCH v4 2/6] drm/mediatek: dp: Replace usage of drm_bridge_chain_ functions Dave Stevenson
2022-12-05 17:33 ` [PATCH v4 3/6] drm/bridge: Drop unused drm_bridge_chain functions Dave Stevenson
2022-12-05 17:33 ` [PATCH v4 4/6] drm/bridge: Introduce pre_enable_prev_first to alter bridge init order Dave Stevenson
2022-12-05 17:33 ` Dave Stevenson [this message]
2022-12-05 17:33 ` [PATCH v4 6/6] drm/bridge: Document the expected behaviour of DSI host controllers Dave Stevenson
2022-12-08  8:58 ` [PATCH v4 0/6] DSI host and peripheral initialisation ordering Maxime Ripard

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=20221205173328.1395350-6-dave.stevenson@raspberrypi.com \
    --to=dave.stevenson@raspberrypi.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=frieder.schrempf@kontron.de \
    --cc=jagan@amarulasolutions.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marex@denx.de \
    --cc=mripard@kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=robert.foss@linaro.org \
    --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 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.