diff options
author | André Fabian Silva Delgado <emulatorman@lavabit.com> | 2012-08-27 14:59:45 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@lavabit.com> | 2012-08-27 14:59:45 -0300 |
commit | dd29002274e3109288469fe9677575d450807542 (patch) | |
tree | a0e90576b37a460dd9977c3f53162fc7e4765068 /libre/linux-libre/i915-i2c-crash-3.5.x.patch | |
parent | 43a5bcc4818d2b06b0dbc8f53c9b9c26150e7dc6 (diff) | |
download | abslibre-dd29002274e3109288469fe9677575d450807542.tar.gz abslibre-dd29002274e3109288469fe9677575d450807542.tar.bz2 abslibre-dd29002274e3109288469fe9677575d450807542.zip |
linux-libre-3.5.3-1: updating version
Diffstat (limited to 'libre/linux-libre/i915-i2c-crash-3.5.x.patch')
-rw-r--r-- | libre/linux-libre/i915-i2c-crash-3.5.x.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/libre/linux-libre/i915-i2c-crash-3.5.x.patch b/libre/linux-libre/i915-i2c-crash-3.5.x.patch new file mode 100644 index 000000000..d202b531c --- /dev/null +++ b/libre/linux-libre/i915-i2c-crash-3.5.x.patch @@ -0,0 +1,47 @@ +From cee25168e9c4ef7f9417632af2dc78b8521dfda7 Mon Sep 17 00:00:00 2001 +From: Jani Nikula <jani.nikula@intel.com> +Date: Mon, 13 Aug 2012 17:33:02 +0300 +Subject: [PATCH] drm/i915: ensure i2c adapter is all set before adding it + +i2c_add_adapter() may do i2c transfers on the bus to detect supported +devices. Therefore the adapter needs to be all set before adding it. This +was not the case for the bit-banging fallback, resulting in an oops if the +device detection GMBUS transfers timed out. Fix the issue by calling +i2c_add_adapter() only after intel_gpio_setup(). + +LKML-Reference: <5021F00B.7000503@ionic.de> +Tested-by: Mihai Moldovan <ionic@ionic.de> +Signed-off-by: Jani Nikula <jani.nikula@intel.com> +Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> +--- + drivers/gpu/drm/i915/intel_i2c.c | 7 ++++--- + 1 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c +index d79500b..b9755f6 100644 +--- a/drivers/gpu/drm/i915/intel_i2c.c ++++ b/drivers/gpu/drm/i915/intel_i2c.c +@@ -486,9 +486,6 @@ int intel_setup_gmbus(struct drm_device *dev) + bus->dev_priv = dev_priv; + + bus->adapter.algo = &gmbus_algorithm; +- ret = i2c_add_adapter(&bus->adapter); +- if (ret) +- goto err; + + /* By default use a conservative clock rate */ + bus->reg0 = port | GMBUS_RATE_100KHZ; +@@ -498,6 +495,10 @@ int intel_setup_gmbus(struct drm_device *dev) + bus->force_bit = true; + + intel_gpio_setup(bus, port); ++ ++ ret = i2c_add_adapter(&bus->adapter); ++ if (ret) ++ goto err; + } + + intel_i2c_reset(dev_priv->dev); +-- +1.7.7.6 + |