[RFC 08/14] drm/i915: Disable Tearing effect trigger by GPIO pin

Gaurav K Singh
2015-05-29T10:40:04Z

While disabling MIPI Port in command mode, disable TE trigger by GPIO pin.

Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com>
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 | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index aeea289..91ed2c2 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -367,8 +367,12 @@ static void intel_dsi_port_disable(struct intel_encoder *encoder)

for_each_dsi_port(port, intel_dsi->ports) {
/* de-assert ip_tg_enable signal */
- temp = I915_READ(MIPI_PORT_CTRL(port));
- I915_WRITE(MIPI_PORT_CTRL(port), temp & ~DPI_ENABLE);
+ if (is_cmd_mode(intel_dsi)) {
+ I915_WRITE(MIPI_PORT_CTRL(port), 0);
+ } else {
+ temp = I915_READ(MIPI_PORT_CTRL(port));
+ I915_WRITE(MIPI_PORT_CTRL(port), temp & ~DPI_ENABLE);
+ }
POSTING_READ(MIPI_PORT_CTRL(port));
}
}
--
1.7.9.5