From: Shobhit Kumar <shobhit.kumar@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com, vijayakumar.balakrishnan@intel.com,
yogesh.mohan.marimuthu@intel.com
Subject: [PATCH v3 1/7] drm/i915: Add more dev ops for MIPI sub encoder
Date: Tue, 10 Dec 2013 12:14:54 +0530 [thread overview]
Message-ID: <1386657900-12132-2-git-send-email-shobhit.kumar@intel.com> (raw)
In-Reply-To: <1386657900-12132-1-git-send-email-shobhit.kumar@intel.com>
Some panels require one time programming if they do not contain their
own eeprom for basic register initialization. The sequence is
Panel Reset --> Send OTP --> Enable Pixel Stream --> Enable the panel
v2: Based on review comments from Jani and Ville
- Updated the commit message with more details
- Move the new parameters out of this patch
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohan.marimuthu@intel.com>
Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
---
drivers/gpu/drm/i915/intel_dsi.c | 9 ++++++++-
drivers/gpu/drm/i915/intel_dsi.h | 5 +++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 7b9b350..42ed28a 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -147,6 +147,9 @@ static void intel_dsi_enable(struct intel_encoder *encoder)
DRM_DEBUG_KMS("\n");
+ if (intel_dsi->dev.dev_ops->panel_reset)
+ intel_dsi->dev.dev_ops->panel_reset(&intel_dsi->dev);
+
temp = I915_READ(MIPI_DEVICE_READY(pipe));
if ((temp & DEVICE_READY) == 0) {
temp &= ~ULPS_STATE_MASK;
@@ -162,6 +165,9 @@ static void intel_dsi_enable(struct intel_encoder *encoder)
I915_WRITE(MIPI_DEVICE_READY(pipe), temp);
}
+ if (intel_dsi->dev.dev_ops->send_otp_cmds)
+ intel_dsi->dev.dev_ops->send_otp_cmds(&intel_dsi->dev);
+
if (is_cmd_mode(intel_dsi))
I915_WRITE(MIPI_MAX_RETURN_PKT_SIZE(pipe), 8 * 4);
@@ -176,7 +182,8 @@ static void intel_dsi_enable(struct intel_encoder *encoder)
POSTING_READ(MIPI_PORT_CTRL(pipe));
}
- intel_dsi->dev.dev_ops->enable(&intel_dsi->dev);
+ if (intel_dsi->dev.dev_ops->enable)
+ intel_dsi->dev.dev_ops->enable(&intel_dsi->dev);
}
static void intel_dsi_disable(struct intel_encoder *encoder)
diff --git a/drivers/gpu/drm/i915/intel_dsi.h b/drivers/gpu/drm/i915/intel_dsi.h
index c7765f3..14509d6 100644
--- a/drivers/gpu/drm/i915/intel_dsi.h
+++ b/drivers/gpu/drm/i915/intel_dsi.h
@@ -39,6 +39,11 @@ struct intel_dsi_device {
struct intel_dsi_dev_ops {
bool (*init)(struct intel_dsi_device *dsi);
+ void (*panel_reset)(struct intel_dsi_device *dsi);
+
+ /* one time programmable commands if needed */
+ void (*send_otp_cmds)(struct intel_dsi_device *dsi);
+
/* This callback must be able to assume DSI commands can be sent */
void (*enable)(struct intel_dsi_device *dsi);
--
1.8.3.2
next prev parent reply other threads:[~2013-12-10 6:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 6:44 [PATCH v3 0/7] drm/i915: Baytrail MIPI DSI support Updated Shobhit Kumar
2013-12-10 6:44 ` Shobhit Kumar [this message]
2013-12-11 9:20 ` [PATCH v3 1/7] drm/i915: Add more dev ops for MIPI sub encoder Jani Nikula
2013-12-10 6:44 ` [PATCH v3 2/7] drm/i915: Use FLISDSI interface for band gap reset Shobhit Kumar
2013-12-10 6:44 ` [PATCH v3 3/7] drm/i915: Compute dsi_clk from pixel clock Shobhit Kumar
2013-12-10 6:44 ` [PATCH v3 4/7] drm/i915: Try harder to get best m, n, p values with minimal error Shobhit Kumar
2013-12-11 9:21 ` Jani Nikula
2013-12-10 6:44 ` [PATCH v3 5/7] drm/i915: Reorganize the DSI enable/disable sequence Shobhit Kumar
2013-12-11 11:02 ` Jani Nikula
2013-12-11 12:18 ` Shobhit Kumar
2013-12-10 6:44 ` [PATCH v3 6/7] drm/i915: Remove redundant DSI PLL enabling Shobhit Kumar
2013-12-10 6:45 ` [PATCH v3 7/7] drm/i915: Parametrize the dphy and other spec specific parameters Shobhit Kumar
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=1386657900-12132-2-git-send-email-shobhit.kumar@intel.com \
--to=shobhit.kumar@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=vijayakumar.balakrishnan@intel.com \
--cc=yogesh.mohan.marimuthu@intel.com \
/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