From: Archit Taneja <architt@codeaurora.org>
To: dri-devel@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org
Subject: [PATCH 5/5] drm/msm/dsi: Modify dsi manager bridge ops to work with external bridges
Date: Fri, 26 Jun 2015 13:15:14 +0530 [thread overview]
Message-ID: <1435304714-4684-6-git-send-email-architt@codeaurora.org> (raw)
In-Reply-To: <1435304714-4684-1-git-send-email-architt@codeaurora.org>
The dsi bridge ops call drm_panel functions to set up the connected
drm_panel. Add checks to make sure these aren't called when we're
connected to an external bridge.
Signed-off-by: Archit Taneja <architt@codeaurora.org>
---
drivers/gpu/drm/msm/dsi/dsi_manager.c | 43 +++++++++++++++++++++++------------
1 file changed, 28 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 026e223..b03c4ba 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -366,10 +366,13 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
/* Always call panel functions once, because even for dual panels,
* there is only one drm_panel instance.
*/
- ret = drm_panel_prepare(panel);
- if (ret) {
- pr_err("%s: prepare panel %d failed, %d\n", __func__, id, ret);
- goto panel_prep_fail;
+ if (panel) {
+ ret = drm_panel_prepare(panel);
+ if (ret) {
+ pr_err("%s: prepare panel %d failed, %d\n", __func__,
+ id, ret);
+ goto panel_prep_fail;
+ }
}
ret = msm_dsi_host_enable(host);
@@ -386,10 +389,13 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
}
}
- ret = drm_panel_enable(panel);
- if (ret) {
- pr_err("%s: enable panel %d failed, %d\n", __func__, id, ret);
- goto panel_en_fail;
+ if (panel) {
+ ret = drm_panel_enable(panel);
+ if (ret) {
+ pr_err("%s: enable panel %d failed, %d\n", __func__, id,
+ ret);
+ goto panel_en_fail;
+ }
}
return;
@@ -400,7 +406,8 @@ panel_en_fail:
host1_en_fail:
msm_dsi_host_disable(host);
host_en_fail:
- drm_panel_unprepare(panel);
+ if (panel)
+ drm_panel_unprepare(panel);
panel_prep_fail:
if (is_dual_dsi && msm_dsi1)
msm_dsi_host_power_off(msm_dsi1->host);
@@ -436,9 +443,12 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
(is_dual_dsi && (DSI_1 == id)))
return;
- ret = drm_panel_disable(panel);
- if (ret)
- pr_err("%s: Panel %d OFF failed, %d\n", __func__, id, ret);
+ if (panel) {
+ ret = drm_panel_disable(panel);
+ if (ret)
+ pr_err("%s: Panel %d OFF failed, %d\n", __func__, id,
+ ret);
+ }
ret = msm_dsi_host_disable(host);
if (ret)
@@ -450,9 +460,12 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
pr_err("%s: host1 disable failed, %d\n", __func__, ret);
}
- ret = drm_panel_unprepare(panel);
- if (ret)
- pr_err("%s: Panel %d unprepare failed,%d\n", __func__, id, ret);
+ if (panel) {
+ ret = drm_panel_unprepare(panel);
+ if (ret)
+ pr_err("%s: Panel %d unprepare failed,%d\n", __func__,
+ id, ret);
+ }
ret = msm_dsi_host_power_off(host);
if (ret)
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-06-26 7:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 7:45 [PATCH 0/5] drm/msm/dsi: Add support for external bridge chips Archit Taneja
2015-06-26 7:45 ` [PATCH 1/5] drm/msm/dsi: Make TE gpio optional Archit Taneja
2015-06-26 7:45 ` [PATCH 2/5] drm/msm/dsi: Refer to connected device as 'device' instead of 'panel' Archit Taneja
2015-06-26 7:45 ` [PATCH 3/5] drm/msm/dsi: Create a helper to check if there is a connected device Archit Taneja
2015-06-26 7:45 ` [PATCH 4/5] drm/msm/dsi: Allow dsi to connect to an external bridge Archit Taneja
2015-06-26 7:45 ` Archit Taneja [this message]
2015-08-02 16:20 ` [PATCH v2 0/5] drm/msm/dsi: Add support for external bridge chips Archit Taneja
2015-08-02 16:20 ` [PATCH v2 1/5] drm/msm/dsi: Make TE gpio optional Archit Taneja
2015-08-02 16:20 ` [PATCH v2 2/5] drm/msm/dsi: Refer to connected device as 'device' instead of 'panel' Archit Taneja
2015-08-02 16:20 ` [PATCH v2 3/5] drm/msm/dsi: Create a helper to check if there is a connected device Archit Taneja
2015-08-02 16:20 ` [PATCH v2 4/5] drm/msm/dsi: Allow dsi to connect to an external bridge Archit Taneja
2015-08-02 16:20 ` [PATCH v2 5/5] drm/msm/dsi: Modify dsi manager bridge ops to work with external bridges Archit Taneja
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=1435304714-4684-6-git-send-email-architt@codeaurora.org \
--to=architt@codeaurora.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.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 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.