summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_bios.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2015-12-21 16:11:00 +0300
committerJani Nikula <jani.nikula@intel.com>2016-01-11 20:08:10 +0300
commitf4d64936afb414fd5af3ac301919407273fb74a4 (patch)
tree8c5306ec9664d2476afdfca9e9a86aa382038c44 /drivers/gpu/drm/i915/intel_bios.c
parentbc3b9346cd47148db8601fb425a4949902c475ec (diff)
downloadlinux-f4d64936afb414fd5af3ac301919407273fb74a4.tar.xz
drm/i915/bios: interpret the i2c element
Add parsing of the i2c element, defined in MIPI sequence block v2. Drop the status operation byte while at it, that does not exist. 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/d8a2998977feee2f5b5ad609aaca787adfb41479.1450702954.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_bios.c')
-rw-r--r--drivers/gpu/drm/i915/intel_bios.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 71c739e33101..69040a73c09a 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -812,6 +812,11 @@ static int goto_next_sequence(const u8 *data, int index, int total)
case MIPI_SEQ_ELEM_GPIO:
len = 2;
break;
+ case MIPI_SEQ_ELEM_I2C:
+ if (index + 7 > total)
+ return 0;
+ len = *(data + index + 6) + 7;
+ break;
default:
DRM_ERROR("Unknown operation byte\n");
return 0;