summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2016-01-11 15:15:02 +0200
committerJani Nikula <jani.nikula@intel.com>2016-01-11 19:18:06 +0200
commit2a33d93486f247924e46b5402b8ffb43d1b9b38c (patch)
treebdcc65e0333c073947b148907e6547873773328d /drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
parent4b42dfbbd8e5f0cd8b7a3f16d719046d363f6b57 (diff)
downloadop-kernel-dev-2a33d93486f247924e46b5402b8ffb43d1b9b38c.zip
op-kernel-dev-2a33d93486f247924e46b5402b8ffb43d1b9b38c.tar.gz
drm/i915/bios: add support for MIPI sequence block v3
The changes since the sequence block v2 are: * The whole MIPI bios data block has a separate 32-bit size field since v3, stored after the version. This facilitates big sequences. * The size of the panel specific sequence blocks has grown to 32 bits. This facilitates big sequences. * The elements within sequences now have an 8-bit size field following the operation byte. This facilitates skipping unknown new operation bytes, i.e. forward compatibility. v2 (of the patch): use DRM_ERROR for unknown operation byte v3 (of the patch): even more bounds checking (Ville) Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1452518102-3154-1-git-send-email-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dsi_panel_vbt.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dsi_panel_vbt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
index b98cec6..a7d22eb 100644
--- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
+++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
@@ -267,6 +267,7 @@ static const char *sequence_name(enum mipi_seq seq_id)
static void generic_exec_sequence(struct intel_dsi *intel_dsi, const u8 *data)
{
+ struct drm_i915_private *dev_priv = to_i915(intel_dsi->base.base.dev);
fn_mipi_elem_exec mipi_elem_exec;
if (!data)
@@ -278,6 +279,10 @@ static void generic_exec_sequence(struct intel_dsi *intel_dsi, const u8 *data)
/* go to the first element of the sequence */
data++;
+ /* Skip Size of Sequence. */
+ if (dev_priv->vbt.dsi.seq_version >= 3)
+ data += 4;
+
/* parse each byte till we reach end of sequence byte - 0x00 */
while (1) {
u8 operation_byte = *data++;
@@ -289,6 +294,10 @@ static void generic_exec_sequence(struct intel_dsi *intel_dsi, const u8 *data)
}
mipi_elem_exec = exec_elem[operation_byte];
+ /* Skip Size of Operation. */
+ if (dev_priv->vbt.dsi.seq_version >= 3)
+ data++;
+
/* execute the element specific rotines */
data = mipi_elem_exec(intel_dsi, data);
OpenPOWER on IntegriCloud