diff --git a/arch/arm/boot/dts/msmcopper.dtsi b/arch/arm/boot/dts/msmcopper.dtsi
index 66f5fa1..7954de5 100644
--- a/arch/arm/boot/dts/msmcopper.dtsi
+++ b/arch/arm/boot/dts/msmcopper.dtsi
@@ -134,7 +134,7 @@
 		compatible = "qcom,spi-qup-v2";
 		reg = <0xf9924000 0x1000>;
 		interrupts = <0 96 0>;
-		spi-max-frequency = <24000000>;
+		spi-max-frequency = <25000000>;
 	};
 
 	slim@fe12f000 {
@@ -278,7 +278,7 @@
 		reg = <0xfe200000 0x00100>,
 		      <0xfd485100 0x00010>;
 
-		qcom,firmware-name = "lpass";
+		qcom,firmware-name = "adsp";
 	};
 
 	qcom,pronto@fb21b000 {
diff --git a/arch/arm/configs/msm-copper_defconfig b/arch/arm/configs/msm-copper_defconfig
index c644cf9..de469da 100644
--- a/arch/arm/configs/msm-copper_defconfig
+++ b/arch/arm/configs/msm-copper_defconfig
@@ -202,3 +202,4 @@
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRC_CCITT=y
 CONFIG_LIBCRC32C=y
+CONFIG_MSM_TZ_LOG=y
diff --git a/arch/arm/mach-msm/board-8064.c b/arch/arm/mach-msm/board-8064.c
index d04e5e4..7ab3894 100644
--- a/arch/arm/mach-msm/board-8064.c
+++ b/arch/arm/mach-msm/board-8064.c
@@ -865,9 +865,11 @@
 
 static void __init apq8064_ehci_host_init(void)
 {
-	if (machine_is_apq8064_liquid()) {
-		msm_ehci_host_pdata3.dock_connect_irq =
-				PM8921_MPP_IRQ(PM8921_IRQ_BASE, 9);
+	if (machine_is_apq8064_liquid() || machine_is_mpq8064_cdp() ||
+		machine_is_mpq8064_hrd() || machine_is_mpq8064_dtv()) {
+		if (machine_is_apq8064_liquid())
+			msm_ehci_host_pdata3.dock_connect_irq =
+					PM8921_MPP_IRQ(PM8921_IRQ_BASE, 9);
 
 		apq8064_device_ehci_host3.dev.platform_data =
 				&msm_ehci_host_pdata3;
diff --git a/arch/arm/mach-msm/devices-8064.c b/arch/arm/mach-msm/devices-8064.c
index 424edce..41980b3 100644
--- a/arch/arm/mach-msm/devices-8064.c
+++ b/arch/arm/mach-msm/devices-8064.c
@@ -2312,11 +2312,17 @@
 		.flags	= IORESOURCE_MEM,
 	},
 	{
-		.name	= "vcap",
+		.name	= "vc_irq",
 		.start	= VCAP_VC,
 		.end	= VCAP_VC,
 		.flags	= IORESOURCE_IRQ,
 	},
+	{
+		.name	= "vp_irq",
+		.start	= VCAP_VP,
+		.end	= VCAP_VP,
+		.flags	= IORESOURCE_IRQ,
+	},
 };
 
 static unsigned vcap_gpios[] = {
diff --git a/arch/arm/mach-msm/rpc_pmapp.c b/arch/arm/mach-msm/rpc_pmapp.c
index 811e63c..1d18553 100644
--- a/arch/arm/mach-msm/rpc_pmapp.c
+++ b/arch/arm/mach-msm/rpc_pmapp.c
@@ -548,7 +548,7 @@
 
 int pmapp_disp_backlight_set_brightness(int value)
 {
-	if (value < 0 || value > 100)
+	if (value < 0 || value > 255)
 		return -EINVAL;
 
 	return pmapp_rpc_set_only(value, 0, 0, 0, 1,
diff --git a/drivers/char/msm_rotator.c b/drivers/char/msm_rotator.c
index 81a9fa7..6cd1806 100644
--- a/drivers/char/msm_rotator.c
+++ b/drivers/char/msm_rotator.c
@@ -45,6 +45,7 @@
 #define MSM_ROTATOR_START			(MSM_ROTATOR_BASE+0x0030)
 #define MSM_ROTATOR_MAX_BURST_SIZE		(MSM_ROTATOR_BASE+0x0050)
 #define MSM_ROTATOR_HW_VERSION			(MSM_ROTATOR_BASE+0x0070)
+#define MSM_ROTATOR_SW_RESET			(MSM_ROTATOR_BASE+0x0074)
 #define MSM_ROTATOR_SRC_SIZE			(MSM_ROTATOR_BASE+0x1108)
 #define MSM_ROTATOR_SRCP0_ADDR			(MSM_ROTATOR_BASE+0x110c)
 #define MSM_ROTATOR_SRCP1_ADDR			(MSM_ROTATOR_BASE+0x1110)
@@ -906,8 +907,7 @@
 			break;
 
 	if (s == MAX_SESSIONS) {
-		dev_dbg(msm_rotator_dev->device,
-			"%s() : Attempt to use invalid session_id %d\n",
+		pr_err("%s() : Attempt to use invalid session_id %d\n",
 			__func__, s);
 		rc = -EINVAL;
 		goto do_rotate_unlock_mutex;
@@ -1129,11 +1129,13 @@
 		break;
 	default:
 		rc = -EINVAL;
+		pr_err("%s(): Unsupported format %u\n", __func__, format);
 		goto do_rotate_exit;
 	}
 
 	if (rc != 0) {
 		msm_rotator_dev->last_session_idx = INVALID_SESSION;
+		pr_err("%s(): Invalid session error\n", __func__);
 		goto do_rotate_exit;
 	}
 
@@ -1145,8 +1147,11 @@
 	wait_event(msm_rotator_dev->wq,
 		   (msm_rotator_dev->processing == 0));
 	status = (unsigned char)ioread32(MSM_ROTATOR_INTR_STATUS);
-	if ((status & 0x03) != 0x01)
+	if ((status & 0x03) != 0x01) {
+		pr_err("%s(): AXI Bus Error, issuing SW_RESET\n", __func__);
+		iowrite32(0x1, MSM_ROTATOR_SW_RESET);
 		rc = -EFAULT;
+	}
 	iowrite32(0, MSM_ROTATOR_INTR_ENABLE);
 	iowrite32(3, MSM_ROTATOR_INTR_CLEAR);
 
diff --git a/drivers/gpu/msm/adreno_postmortem.c b/drivers/gpu/msm/adreno_postmortem.c
index ec38f75..7bb65ca 100644
--- a/drivers/gpu/msm/adreno_postmortem.c
+++ b/drivers/gpu/msm/adreno_postmortem.c
@@ -725,8 +725,8 @@
 				current_context));
 	context = idr_find(&device->context_idr, context_id);
 	if (context) {
-		ts_processed = device->ftbl->readtimestamp(device, context,
-				KGSL_TIMESTAMP_RETIRED);
+		ts_processed = kgsl_readtimestamp(device, context,
+						  KGSL_TIMESTAMP_RETIRED);
 		KGSL_LOG_DUMP(device, "CTXT: %d  TIMESTM RTRD: %08X\n",
 				context->id, ts_processed);
 	} else
diff --git a/drivers/gpu/msm/adreno_ringbuffer.c b/drivers/gpu/msm/adreno_ringbuffer.c
index 8d900b0..3d46221 100644
--- a/drivers/gpu/msm/adreno_ringbuffer.c
+++ b/drivers/gpu/msm/adreno_ringbuffer.c
@@ -928,8 +928,8 @@
 			" context id is invalid.\n");
 		return -EINVAL;
 	}
-	retired_timestamp = device->ftbl->readtimestamp(device, context,
-				KGSL_TIMESTAMP_RETIRED);
+	retired_timestamp = kgsl_readtimestamp(device, context,
+					       KGSL_TIMESTAMP_RETIRED);
 	KGSL_DRV_ERR(device, "GPU successfully executed till ts: %x\n",
 			retired_timestamp);
 	/*
diff --git a/drivers/gpu/msm/kgsl.c b/drivers/gpu/msm/kgsl.c
index cf09f52..1a34e80 100644
--- a/drivers/gpu/msm/kgsl.c
+++ b/drivers/gpu/msm/kgsl.c
@@ -78,8 +78,7 @@
 		if (context == NULL)
 			return -EINVAL;
 	}
-	cur_ts = device->ftbl->readtimestamp(device, context,
-				KGSL_TIMESTAMP_RETIRED);
+	cur_ts = kgsl_readtimestamp(device, context, KGSL_TIMESTAMP_RETIRED);
 
 	/* Check to see if the requested timestamp has already fired */
 
@@ -135,8 +134,7 @@
 	struct kgsl_event *event, *event_tmp;
 	unsigned int id, cur;
 
-	cur = device->ftbl->readtimestamp(device, context,
-			KGSL_TIMESTAMP_RETIRED);
+	cur = kgsl_readtimestamp(device, context, KGSL_TIMESTAMP_RETIRED);
 	id = context->id;
 
 	list_for_each_entry_safe(event, event_tmp, &device->events, list) {
@@ -173,8 +171,8 @@
 		if (event->owner != owner)
 			continue;
 
-		cur = device->ftbl->readtimestamp(device, event->context,
-				KGSL_TIMESTAMP_RETIRED);
+		cur = kgsl_readtimestamp(device, event->context,
+					 KGSL_TIMESTAMP_RETIRED);
 
 		id = event->context ? event->context->id : KGSL_MEMSTORE_GLOBAL;
 		/*
@@ -388,6 +386,7 @@
 	if (context == NULL)
 		return;
 	device = context->dev_priv->device;
+	trace_kgsl_context_detach(device, context);
 	id = context->id;
 
 	if (device->ftbl->drawctxt_destroy)
@@ -425,8 +424,8 @@
 
 	/* Process expired events */
 	list_for_each_entry_safe(event, event_tmp, &device->events, list) {
-		ts_processed = device->ftbl->readtimestamp(device,
-				event->context, KGSL_TIMESTAMP_RETIRED);
+		ts_processed = kgsl_readtimestamp(device, event->context,
+						  KGSL_TIMESTAMP_RETIRED);
 		if (timestamp_cmp(ts_processed, event->timestamp) < 0)
 			continue;
 
@@ -521,8 +520,8 @@
 {
 	unsigned int ts_processed;
 
-	ts_processed = device->ftbl->readtimestamp(device, context,
-		KGSL_TIMESTAMP_RETIRED);
+	ts_processed = kgsl_readtimestamp(device, context,
+					  KGSL_TIMESTAMP_RETIRED);
 
 	return (timestamp_cmp(ts_processed, timestamp) >= 0);
 }
@@ -1021,19 +1020,25 @@
 		unsigned int timeout)
 {
 	int result = 0;
+	struct kgsl_device *device = dev_priv->device;
+	unsigned int context_id = context ? context->id : KGSL_MEMSTORE_GLOBAL;
 
 	/* Set the active count so that suspend doesn't do the wrong thing */
 
-	dev_priv->device->active_cnt++;
+	device->active_cnt++;
 
-	trace_kgsl_waittimestamp_entry(dev_priv->device,
-			context ? context->id : KGSL_MEMSTORE_GLOBAL,
-			timestamp, timeout);
+	trace_kgsl_waittimestamp_entry(device, context_id,
+				       kgsl_readtimestamp(device, context,
+							KGSL_TIMESTAMP_RETIRED),
+				       timestamp, timeout);
 
-	result = dev_priv->device->ftbl->waittimestamp(dev_priv->device,
+	result = device->ftbl->waittimestamp(dev_priv->device,
 					context, timestamp, timeout);
 
-	trace_kgsl_waittimestamp_exit(dev_priv->device, result);
+	trace_kgsl_waittimestamp_exit(device,
+				      kgsl_readtimestamp(device, context,
+							KGSL_TIMESTAMP_RETIRED),
+				      result);
 
 	/* Fire off any pending suspend operations that are in flight */
 
@@ -1050,7 +1055,7 @@
 {
 	struct kgsl_device_waittimestamp *param = data;
 
-	return _device_waittimestamp(dev_priv, KGSL_MEMSTORE_GLOBAL,
+	return _device_waittimestamp(dev_priv, NULL,
 			param->timestamp, param->timeout);
 }
 
@@ -1151,7 +1156,7 @@
 					     &param->timestamp,
 					     param->flags);
 
-	trace_kgsl_issueibcmds(dev_priv->device, param, result);
+	trace_kgsl_issueibcmds(dev_priv->device, param, ibdesc, result);
 
 free_ibdesc:
 	kfree(ibdesc);
@@ -1164,8 +1169,7 @@
 		struct kgsl_context *context, unsigned int type,
 		unsigned int *timestamp)
 {
-	*timestamp = dev_priv->device->ftbl->readtimestamp(dev_priv->device,
-			context, type);
+	*timestamp = kgsl_readtimestamp(dev_priv->device, context, type);
 
 	trace_kgsl_readtimestamp(dev_priv->device,
 			context ? context->id : KGSL_MEMSTORE_GLOBAL,
@@ -1209,7 +1213,7 @@
 	spin_lock(&entry->priv->mem_lock);
 	rb_erase(&entry->node, &entry->priv->mem_rb);
 	spin_unlock(&entry->priv->mem_lock);
-	trace_kgsl_mem_timestamp_free(entry, id, timestamp);
+	trace_kgsl_mem_timestamp_free(device, entry, id, timestamp, 0);
 	kgsl_mem_entry_detach_process(entry);
 }
 
@@ -1220,27 +1224,25 @@
 	int result = 0;
 	struct kgsl_mem_entry *entry = NULL;
 	struct kgsl_device *device = dev_priv->device;
-	unsigned int cur;
 	unsigned int context_id = context ? context->id : KGSL_MEMSTORE_GLOBAL;
 
 	spin_lock(&dev_priv->process_priv->mem_lock);
 	entry = kgsl_sharedmem_find(dev_priv->process_priv, gpuaddr);
 	spin_unlock(&dev_priv->process_priv->mem_lock);
 
-	if (entry) {
-		cur = device->ftbl->readtimestamp(device, context,
-						KGSL_TIMESTAMP_RETIRED);
-
-		trace_kgsl_mem_timestamp_queue(entry, context_id, cur);
-		result = kgsl_add_event(dev_priv->device, context_id,
-				timestamp, kgsl_freemem_event_cb,
-				entry, dev_priv);
-	} else {
+	if (!entry) {
 		KGSL_DRV_ERR(dev_priv->device,
-			"invalid gpuaddr %08x\n", gpuaddr);
+				"invalid gpuaddr %08x\n", gpuaddr);
 		result = -EINVAL;
+		goto done;
 	}
-
+	trace_kgsl_mem_timestamp_queue(device, entry, context_id,
+				       kgsl_readtimestamp(device, context,
+						  KGSL_TIMESTAMP_RETIRED),
+				       timestamp);
+	result = kgsl_add_event(dev_priv->device, context_id, timestamp,
+				kgsl_freemem_event_cb, entry, dev_priv);
+done:
 	return result;
 }
 
@@ -1287,11 +1289,14 @@
 		goto done;
 	}
 
-	if (dev_priv->device->ftbl->drawctxt_create)
+	if (dev_priv->device->ftbl->drawctxt_create) {
 		result = dev_priv->device->ftbl->drawctxt_create(
 			dev_priv->device, dev_priv->process_priv->pagetable,
 			context, param->flags);
-
+		if (result)
+			goto done;
+	}
+	trace_kgsl_context_create(dev_priv->device, context, param->flags);
 	param->drawctxt_id = context->id;
 done:
 	if (result && context)
diff --git a/drivers/gpu/msm/kgsl.h b/drivers/gpu/msm/kgsl.h
index 7f38b72..b67f460 100644
--- a/drivers/gpu/msm/kgsl.h
+++ b/drivers/gpu/msm/kgsl.h
@@ -158,7 +158,6 @@
 	int flags;
 	void *priv_data;
 	struct rb_node node;
-	uint32_t free_timestamp;
 	unsigned int context_id;
 	/* back pointer to private structure under whose context this
 	* allocation is made */
diff --git a/drivers/gpu/msm/kgsl_device.h b/drivers/gpu/msm/kgsl_device.h
index 5b6522a..5b2fd31 100644
--- a/drivers/gpu/msm/kgsl_device.h
+++ b/drivers/gpu/msm/kgsl_device.h
@@ -294,6 +294,13 @@
 	return device->ftbl->gpuid(device);
 }
 
+static inline unsigned int kgsl_readtimestamp(struct kgsl_device *device,
+					      struct kgsl_context *context,
+					      enum kgsl_timestamp_type type)
+{
+	return device->ftbl->readtimestamp(device, context, type);
+}
+
 static inline int kgsl_create_device_sysfs_files(struct device *root,
 	const struct device_attribute **list)
 {
diff --git a/drivers/gpu/msm/kgsl_gpummu.c b/drivers/gpu/msm/kgsl_gpummu.c
index 8f61ab6..429d035 100644
--- a/drivers/gpu/msm/kgsl_gpummu.c
+++ b/drivers/gpu/msm/kgsl_gpummu.c
@@ -21,6 +21,7 @@
 #include "kgsl_mmu.h"
 #include "kgsl_device.h"
 #include "kgsl_sharedmem.h"
+#include "kgsl_trace.h"
 
 #define KGSL_PAGETABLE_SIZE \
 	ALIGN(KGSL_PAGETABLE_ENTRIES(CONFIG_MSM_KGSL_PAGE_TABLE_SIZE) * \
@@ -410,6 +411,9 @@
 			reg & ~(PAGE_SIZE - 1),
 			kgsl_mmu_get_ptname_from_ptbase(ptbase),
 			reg & 0x02 ? "WRITE" : "READ", (reg >> 4) & 0xF);
+	trace_kgsl_mmu_pagefault(mmu->device, reg & ~(PAGE_SIZE - 1),
+			kgsl_mmu_get_ptname_from_ptbase(ptbase),
+			reg & 0x02 ? "WRITE" : "READ");
 }
 
 static void *kgsl_gpummu_create_pagetable(void)
diff --git a/drivers/gpu/msm/kgsl_iommu.c b/drivers/gpu/msm/kgsl_iommu.c
index 1f1571b..2050827 100644
--- a/drivers/gpu/msm/kgsl_iommu.c
+++ b/drivers/gpu/msm/kgsl_iommu.c
@@ -25,6 +25,79 @@
 #include "kgsl_iommu.h"
 #include "adreno_pm4types.h"
 #include "adreno.h"
+#include "kgsl_trace.h"
+
+static struct kgsl_iommu_unit *get_iommu_unit(struct device *dev)
+{
+	int i, j, k;
+
+	for (i = 0; i < KGSL_DEVICE_MAX; i++) {
+		struct kgsl_mmu *mmu;
+		struct kgsl_iommu *iommu;
+
+		if (kgsl_driver.devp[i] == NULL)
+			continue;
+
+		mmu = kgsl_get_mmu(kgsl_driver.devp[i]);
+		if (mmu == NULL || mmu->priv == NULL)
+			continue;
+
+		iommu = mmu->priv;
+
+		for (j = 0; j < iommu->unit_count; j++) {
+			struct kgsl_iommu_unit *iommu_unit =
+				&iommu->iommu_units[j];
+			for (k = 0; k < iommu_unit->dev_count; k++) {
+				if (iommu_unit->dev[k].dev == dev)
+					return iommu_unit;
+			}
+		}
+	}
+
+	return NULL;
+}
+
+static struct kgsl_iommu_device *get_iommu_device(struct kgsl_iommu_unit *unit,
+		struct device *dev)
+{
+	int k;
+
+	for (k = 0; unit && k < unit->dev_count; k++) {
+		if (unit->dev[k].dev == dev)
+			return &(unit->dev[k]);
+	}
+
+	return NULL;
+}
+
+static int kgsl_iommu_fault_handler(struct iommu_domain *domain,
+	struct device *dev, unsigned long addr, int flags)
+{
+	struct kgsl_iommu_unit *iommu_unit = get_iommu_unit(dev);
+	struct kgsl_iommu_device *iommu_dev = get_iommu_device(iommu_unit, dev);
+	unsigned int ptbase, fsr;
+
+	if (!iommu_dev) {
+		KGSL_CORE_ERR("Invalid IOMMU device %p\n", dev);
+		return -ENOSYS;
+	}
+
+	ptbase = iommu_get_pt_base_addr(domain);
+
+	fsr = KGSL_IOMMU_GET_IOMMU_REG(iommu_unit->reg_map.hostptr,
+		iommu_dev->ctx_id, FSR);
+
+	KGSL_MEM_CRIT(iommu_dev->kgsldev,
+		"GPU PAGE FAULT: addr = %lX pid = %d\n",
+		addr, kgsl_mmu_get_ptname_from_ptbase(ptbase));
+	KGSL_MEM_CRIT(iommu_dev->kgsldev, "context = %d FSR = %X\n",
+		iommu_dev->ctx_id, fsr);
+
+	trace_kgsl_mmu_pagefault(iommu_dev->kgsldev, addr,
+			kgsl_mmu_get_ptname_from_ptbase(ptbase), 0);
+
+	return 0;
+}
 
 /*
  * kgsl_iommu_disable_clk - Disable iommu clocks
@@ -167,7 +240,11 @@
 		KGSL_CORE_ERR("Failed to create iommu domain\n");
 		kfree(iommu_pt);
 		return NULL;
+	} else {
+		iommu_set_fault_handler(iommu_pt->domain,
+			kgsl_iommu_fault_handler);
 	}
+
 	return iommu_pt;
 }
 
@@ -304,6 +381,8 @@
 		}
 		iommu_unit->dev[iommu_unit->dev_count].ctx_id =
 						data->iommu_ctxs[i].ctx_id;
+		iommu_unit->dev[iommu_unit->dev_count].kgsldev = mmu->device;
+
 		KGSL_DRV_INFO(mmu->device,
 				"Obtained dev handle %p for iommu context %s\n",
 				iommu_unit->dev[iommu_unit->dev_count].dev,
diff --git a/drivers/gpu/msm/kgsl_iommu.h b/drivers/gpu/msm/kgsl_iommu.h
index d4de656..efc3d9c 100644
--- a/drivers/gpu/msm/kgsl_iommu.h
+++ b/drivers/gpu/msm/kgsl_iommu.h
@@ -18,6 +18,8 @@
 /* IOMMU registers and masks */
 #define KGSL_IOMMU_TTBR0			0x10
 #define KGSL_IOMMU_TTBR1			0x14
+#define KGSL_IOMMU_FSR				0x20
+
 #define KGSL_IOMMU_TTBR0_PA_MASK		0x0003FFFF
 #define KGSL_IOMMU_TTBR0_PA_SHIFT		14
 #define KGSL_IOMMU_CTX_TLBIALL			0x800
@@ -75,6 +77,7 @@
 	unsigned int pt_lsb;
 	enum kgsl_iommu_context_id ctx_id;
 	bool clk_enabled;
+	struct kgsl_device *kgsldev;
 };
 
 /*
diff --git a/drivers/gpu/msm/kgsl_snapshot.c b/drivers/gpu/msm/kgsl_snapshot.c
index f61c74f..080cb15 100644
--- a/drivers/gpu/msm/kgsl_snapshot.c
+++ b/drivers/gpu/msm/kgsl_snapshot.c
@@ -63,10 +63,10 @@
 	 * return the global timestamp for all contexts
 	 */
 
-	header->timestamp_queued = device->ftbl->readtimestamp(device,
-		context, KGSL_TIMESTAMP_QUEUED);
-	header->timestamp_retired = device->ftbl->readtimestamp(device,
-		context, KGSL_TIMESTAMP_RETIRED);
+	header->timestamp_queued = kgsl_readtimestamp(device, context,
+						      KGSL_TIMESTAMP_QUEUED);
+	header->timestamp_retired = kgsl_readtimestamp(device, context,
+						       KGSL_TIMESTAMP_RETIRED);
 
 	_ctxtptr += sizeof(struct kgsl_snapshot_linux_context);
 
diff --git a/drivers/gpu/msm/kgsl_trace.h b/drivers/gpu/msm/kgsl_trace.h
index 84d7f94..60231f6 100644
--- a/drivers/gpu/msm/kgsl_trace.h
+++ b/drivers/gpu/msm/kgsl_trace.h
@@ -22,6 +22,7 @@
 #define TRACE_INCLUDE_FILE kgsl_trace
 
 #include <linux/tracepoint.h>
+#include "kgsl_device.h"
 
 struct kgsl_device;
 struct kgsl_ringbuffer_issueibcmds;
@@ -33,9 +34,11 @@
 TRACE_EVENT(kgsl_issueibcmds,
 
 	TP_PROTO(struct kgsl_device *device,
-			struct kgsl_ringbuffer_issueibcmds *cmd, int result),
+			struct kgsl_ringbuffer_issueibcmds *cmd,
+			struct kgsl_ibdesc *ibdesc,
+			int result),
 
-	TP_ARGS(device, cmd, result),
+	TP_ARGS(device, cmd, ibdesc, result),
 
 	TP_STRUCT__entry(
 		__string(device_name, device->name)
@@ -50,7 +53,7 @@
 	TP_fast_assign(
 		__assign_str(device_name, device->name);
 		__entry->drawctxt_id = cmd->drawctxt_id;
-		__entry->ibdesc_addr = cmd->ibdesc_addr;
+		__entry->ibdesc_addr = ibdesc[0].gpuaddr;
 		__entry->numibs = cmd->numibs;
 		__entry->timestamp = cmd->timestamp;
 		__entry->flags = cmd->flags;
@@ -58,14 +61,19 @@
 	),
 
 	TP_printk(
-		"d_name=%s ctx=%u ib=%u numibs=%u timestamp=%u "
-		"flags=%u result=%d",
+		"d_name=%s ctx=%u ib=0x%u numibs=%u timestamp=0x%x "
+		"flags=0x%x(%s) result=%d",
 		__get_str(device_name),
 		__entry->drawctxt_id,
 		__entry->ibdesc_addr,
 		__entry->numibs,
 		__entry->timestamp,
 		__entry->flags,
+		__entry->flags ? __print_flags(__entry->flags, "|",
+			{ KGSL_CONTEXT_SAVE_GMEM, "SAVE_GMEM" },
+			{ KGSL_CONTEXT_SUBMIT_IB_LIST, "IB_LIST" },
+			{ KGSL_CONTEXT_CTX_SWITCH, "CTX_SWITCH" })
+			: "None",
 		__entry->result
 	)
 );
@@ -97,7 +105,7 @@
 	),
 
 	TP_printk(
-		"d_name=%s context_id=%u type=%u timestamp=%u",
+		"d_name=%s context_id=%u type=%u timestamp=0x%x",
 		__get_str(device_name),
 		__entry->context_id,
 		__entry->type,
@@ -112,30 +120,34 @@
 
 	TP_PROTO(struct kgsl_device *device,
 			unsigned int context_id,
-			unsigned int timestamp,
+			unsigned int curr_ts,
+			unsigned int wait_ts,
 			unsigned int timeout),
 
-	TP_ARGS(device, context_id, timestamp, timeout),
+	TP_ARGS(device, context_id, curr_ts, wait_ts, timeout),
 
 	TP_STRUCT__entry(
 		__string(device_name, device->name)
 		__field(unsigned int, context_id)
-		__field(unsigned int, timestamp)
+		__field(unsigned int, curr_ts)
+		__field(unsigned int, wait_ts)
 		__field(unsigned int, timeout)
 	),
 
 	TP_fast_assign(
 		__assign_str(device_name, device->name);
 		__entry->context_id = context_id;
-		__entry->timestamp = timestamp;
+		__entry->curr_ts = curr_ts;
+		__entry->wait_ts = wait_ts;
 		__entry->timeout = timeout;
 	),
 
 	TP_printk(
-		"d_name=%s context_id=%u timestamp=%u timeout=%u",
+		"d_name=%s context_id=%u curr_ts=%u timestamp=0x%x timeout=%u",
 		__get_str(device_name),
 		__entry->context_id,
-		__entry->timestamp,
+		__entry->curr_ts,
+		__entry->wait_ts,
 		__entry->timeout
 	)
 );
@@ -145,23 +157,27 @@
  */
 TRACE_EVENT(kgsl_waittimestamp_exit,
 
-	TP_PROTO(struct kgsl_device *device, int result),
+	TP_PROTO(struct kgsl_device *device, unsigned int curr_ts,
+		 int result),
 
-	TP_ARGS(device, result),
+	TP_ARGS(device, curr_ts, result),
 
 	TP_STRUCT__entry(
 		__string(device_name, device->name)
+		__field(unsigned int, curr_ts)
 		__field(int, result)
 	),
 
 	TP_fast_assign(
 		__assign_str(device_name, device->name);
+		__entry->curr_ts = curr_ts;
 		__entry->result = result;
 	),
 
 	TP_printk(
-		"d_name=%s result=%d",
+		"d_name=%s curr_ts=%u result=%d",
 		__get_str(device_name),
+		__entry->curr_ts,
 		__entry->result
 	)
 );
@@ -343,12 +359,13 @@
 
 DECLARE_EVENT_CLASS(kgsl_mem_timestamp_template,
 
-	TP_PROTO(struct kgsl_mem_entry *mem_entry, unsigned int id,
-		unsigned int curr_ts),
+	TP_PROTO(struct kgsl_device *device, struct kgsl_mem_entry *mem_entry,
+		unsigned int id, unsigned int curr_ts, unsigned int free_ts),
 
-	TP_ARGS(mem_entry, id, curr_ts),
+	TP_ARGS(device, mem_entry, id, curr_ts, free_ts),
 
 	TP_STRUCT__entry(
+		__string(device_name, device->name)
 		__field(unsigned int, gpuaddr)
 		__field(unsigned int, size)
 		__field(int, type)
@@ -358,33 +375,120 @@
 	),
 
 	TP_fast_assign(
+		__assign_str(device_name, device->name);
 		__entry->gpuaddr = mem_entry->memdesc.gpuaddr;
 		__entry->size = mem_entry->memdesc.size;
 		__entry->drawctxt_id = id;
 		__entry->type = mem_entry->memtype;
 		__entry->curr_ts = curr_ts;
-		__entry->free_ts = mem_entry->free_timestamp;
+		__entry->free_ts = free_ts;
 	),
 
 	TP_printk(
-		"gpuaddr=0x%08x size=%d type=%d ctx=%u curr_ts=0x%08x free_ts=0x%08x",
-		__entry->gpuaddr, __entry->size, __entry->type,
-		__entry->drawctxt_id, __entry->curr_ts, __entry->free_ts
+		"d_name=%s gpuaddr=0x%08x size=%d type=%d ctx=%u"
+		" curr_ts=0x%08x free_ts=0x%08x",
+		__get_str(device_name),
+		__entry->gpuaddr,
+		__entry->size,
+		__entry->type,
+		__entry->drawctxt_id,
+		__entry->curr_ts,
+		__entry->free_ts
 	)
 );
 
 DEFINE_EVENT(kgsl_mem_timestamp_template, kgsl_mem_timestamp_queue,
-	TP_PROTO(struct kgsl_mem_entry *mem_entry, unsigned int id,
-		unsigned int curr_ts),
-	TP_ARGS(mem_entry, id, curr_ts)
+	TP_PROTO(struct kgsl_device *device, struct kgsl_mem_entry *mem_entry,
+		unsigned int id, unsigned int curr_ts, unsigned int free_ts),
+	TP_ARGS(device, mem_entry, id, curr_ts, free_ts)
 );
 
 DEFINE_EVENT(kgsl_mem_timestamp_template, kgsl_mem_timestamp_free,
-	TP_PROTO(struct kgsl_mem_entry *mem_entry, unsigned int id,
-		unsigned int curr_ts),
-	TP_ARGS(mem_entry, id, curr_ts)
+	TP_PROTO(struct kgsl_device *device, struct kgsl_mem_entry *mem_entry,
+		unsigned int id, unsigned int curr_ts, unsigned int free_ts),
+	TP_ARGS(device, mem_entry, id, curr_ts, free_ts)
 );
 
+TRACE_EVENT(kgsl_context_create,
+
+	TP_PROTO(struct kgsl_device *device, struct kgsl_context *context,
+		 unsigned int flags),
+
+	TP_ARGS(device, context, flags),
+
+	TP_STRUCT__entry(
+		__string(device_name, device->name)
+		__field(unsigned int, id)
+		__field(unsigned int, flags)
+	),
+
+	TP_fast_assign(
+		__assign_str(device_name, device->name);
+		__entry->id = context->id;
+		__entry->flags = flags;
+	),
+
+	TP_printk(
+		"d_name=%s ctx=%u flags=0x%x %s",
+		__get_str(device_name), __entry->id, __entry->flags,
+		__entry->flags ? __print_flags(__entry->flags, "|",
+			{ KGSL_CONTEXT_NO_GMEM_ALLOC , "NO_GMEM_ALLOC" },
+			{ KGSL_CONTEXT_PREAMBLE, "PREAMBLE" },
+			{ KGSL_CONTEXT_TRASH_STATE, "TRASH_STATE" },
+			{ KGSL_CONTEXT_PER_CONTEXT_TS, "PER_CONTEXT_TS" })
+			: "None"
+	)
+);
+
+TRACE_EVENT(kgsl_context_detach,
+
+	TP_PROTO(struct kgsl_device *device, struct kgsl_context *context),
+
+	TP_ARGS(device, context),
+
+	TP_STRUCT__entry(
+		__string(device_name, device->name)
+		__field(unsigned int, id)
+	),
+
+	TP_fast_assign(
+		__assign_str(device_name, device->name);
+		__entry->id = context->id;
+	),
+
+	TP_printk(
+		"d_name=%s ctx=%u",
+		__get_str(device_name), __entry->id
+	)
+);
+
+TRACE_EVENT(kgsl_mmu_pagefault,
+
+	TP_PROTO(struct kgsl_device *device, unsigned int page,
+		 unsigned int pt, const char *op),
+
+	TP_ARGS(device, page, pt, op),
+
+	TP_STRUCT__entry(
+		__string(device_name, device->name)
+		__field(unsigned int, page)
+		__field(unsigned int, pt)
+		__string(op, op)
+	),
+
+	TP_fast_assign(
+		__assign_str(device_name, device->name);
+		__entry->page = page;
+		__entry->pt = pt;
+		__assign_str(op, op);
+	),
+
+	TP_printk(
+		"d_name=%s page=0x%08x pt=%d op=%s\n",
+		__get_str(device_name), __entry->page, __entry->pt,
+		__get_str(op)
+	)
+);
 
 #endif /* _KGSL_TRACE_H */
 
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index 444d3d4..d2eabb9 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -158,6 +158,7 @@
 
 obj-$(CONFIG_MSM_VCAP) += vcap_v4l2.o
 obj-$(CONFIG_MSM_VCAP) += vcap_vc.o
+obj-$(CONFIG_MSM_VCAP) += vcap_vp.o
 obj-$(CONFIG_VIDEO_AK881X)		+= ak881x.o
 
 obj-$(CONFIG_VIDEO_OMAP2)		+= omap2cam.o
diff --git a/drivers/media/video/msm/actuators/msm_actuator.c b/drivers/media/video/msm/actuators/msm_actuator.c
index 85470b7..3a8ae9e 100644
--- a/drivers/media/video/msm/actuators/msm_actuator.c
+++ b/drivers/media/video/msm/actuators/msm_actuator.c
@@ -375,38 +375,13 @@
 int32_t msm_actuator_power_down(struct msm_actuator_ctrl_t *a_ctrl)
 {
 	int32_t rc = 0;
-	int16_t step_pos = 0;
-	int16_t i = 0;
-	CDBG("%s called\n", __func__);
-
-	if (a_ctrl->step_position_table) {
-		if (a_ctrl->step_position_table[a_ctrl->curr_step_pos] >=
-			a_ctrl->step_position_table[a_ctrl->pwd_step]) {
-			step_pos = (a_ctrl->
-				step_position_table[a_ctrl->curr_step_pos] -
-				a_ctrl->step_position_table[a_ctrl->
-				pwd_step]) / 10;
-			for (i = 0; i < 10; i++) {
-				rc = a_ctrl->func_tbl->
-					actuator_i2c_write(a_ctrl,
-					i * step_pos, 0);
-				usleep(500);
-			}
-			rc = a_ctrl->func_tbl->actuator_i2c_write(a_ctrl,
-				a_ctrl->step_position_table[a_ctrl->
-				curr_step_pos],
-				0);
-		}
-		CDBG("%s after msm_actuator_set_default_focus\n", __func__);
-		kfree(a_ctrl->step_position_table);
-	}
-
 	if (a_ctrl->vcm_enable) {
 		rc = gpio_direction_output(a_ctrl->vcm_pwd, 0);
 		if (!rc)
 			gpio_free(a_ctrl->vcm_pwd);
 	}
 
+	kfree(a_ctrl->step_position_table);
 	a_ctrl->step_position_table = NULL;
 	return rc;
 }
diff --git a/drivers/media/video/msm/sensors/msm_sensor.c b/drivers/media/video/msm/sensors/msm_sensor.c
index ff5bb49..d163427 100644
--- a/drivers/media/video/msm/sensors/msm_sensor.c
+++ b/drivers/media/video/msm/sensors/msm_sensor.c
@@ -22,6 +22,13 @@
 	uint16_t cur_line = 0;
 	uint16_t exp_fl_lines = 0;
 	if (s_ctrl->sensor_exp_gain_info) {
+		if (s_ctrl->prev_gain && s_ctrl->prev_line &&
+			s_ctrl->func_tbl->sensor_write_exp_gain)
+			s_ctrl->func_tbl->sensor_write_exp_gain(
+				s_ctrl,
+				s_ctrl->prev_gain,
+				s_ctrl->prev_line);
+
 		msm_camera_i2c_read(s_ctrl->sensor_i2c_client,
 			s_ctrl->sensor_exp_gain_info->coarse_int_time_addr,
 			&cur_line,
@@ -429,6 +436,8 @@
 					s_ctrl,
 					cdata.cfg.exp_gain.gain,
 					cdata.cfg.exp_gain.line);
+			s_ctrl->prev_gain = cdata.cfg.exp_gain.gain;
+			s_ctrl->prev_line = cdata.cfg.exp_gain.line;
 			break;
 
 		case CFG_SET_PICT_EXP_GAIN:
diff --git a/drivers/media/video/msm/sensors/msm_sensor.h b/drivers/media/video/msm/sensors/msm_sensor.h
index 22cc05b..0e51409 100644
--- a/drivers/media/video/msm/sensors/msm_sensor.h
+++ b/drivers/media/video/msm/sensors/msm_sensor.h
@@ -153,6 +153,8 @@
 
 	uint16_t curr_line_length_pclk;
 	uint16_t curr_frame_length_lines;
+	uint16_t prev_gain;
+	uint16_t prev_line;
 
 	uint32_t fps_divider;
 	enum msm_sensor_resolution_t curr_res;
diff --git a/drivers/media/video/vcap_v4l2.c b/drivers/media/video/vcap_v4l2.c
index fb02676..dd5bd0f 100644
--- a/drivers/media/video/vcap_v4l2.c
+++ b/drivers/media/video/vcap_v4l2.c
@@ -43,6 +43,7 @@
 #include <media/vcap_v4l2.h>
 #include <media/vcap_fmt.h>
 #include "vcap_vc.h"
+#include "vcap_vp.h"
 
 #define NUM_INPUTS 1
 #define MSM_VCAP_DRV_NAME "msm_vcap"
@@ -57,6 +58,28 @@
 			printk(KERN_DEBUG "VCAP: " fmt, ## arg);	\
 	} while (0)
 
+enum vcap_op_mode determine_mode(struct vcap_client_data *cd)
+{
+	if (cd->set_cap == 1 && cd->set_vp_o == 0 &&
+			cd->set_decode == 0)
+		return VC_VCAP_OP;
+	else if (cd->set_cap == 1 && cd->set_vp_o == 1 &&
+			cd->set_decode == 0)
+		return VC_AND_VP_VCAP_OP;
+	else if (cd->set_cap == 0 && cd->set_vp_o == 1 &&
+			cd->set_decode == 1)
+		return VP_VCAP_OP;
+	else
+		return UNKNOWN_VCAP_OP;
+}
+
+void dealloc_resources(struct vcap_client_data *cd)
+{
+	cd->set_cap = false;
+	cd->set_decode = false;
+	cd->set_vp_o = false;
+}
+
 int get_phys_addr(struct vcap_dev *dev, struct vb2_queue *q,
 				  struct v4l2_buffer *b)
 {
@@ -103,6 +126,8 @@
 			&buf->paddr, (size_t *)&len);
 	if (rc < 0) {
 		pr_err("%s: Could not get phys addr\n", __func__);
+		ion_free(dev->ion_client, buf->ion_handle);
+		buf->ion_handle = NULL;
 		return -EFAULT;
 	}
 
@@ -148,7 +173,7 @@
 	return 0;
 }
 
-/* Videobuf operations */
+/* VC Videobuf operations */
 
 static int capture_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers,
 				unsigned int *nplanes, unsigned long sizes[],
@@ -157,7 +182,6 @@
 	*nbuffers += 2;
 	if (*nbuffers > VIDEO_MAX_FRAME)
 		return -EINVAL;
-
 	*nplanes = 1;
 	return 0;
 }
@@ -240,6 +264,197 @@
 	.buf_cleanup		= capture_buffer_cleanup,
 };
 
+/* VP I/P Videobuf operations */
+
+static int vp_in_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers,
+				unsigned int *nplanes, unsigned long sizes[],
+				void *alloc_ctxs[])
+{
+	if (*nbuffers >= VIDEO_MAX_FRAME && *nbuffers < 5)
+		*nbuffers = 5;
+
+	*nplanes = 1;
+	return 0;
+}
+
+static int vp_in_buffer_init(struct vb2_buffer *vb)
+{
+	return 0;
+}
+
+static int vp_in_buffer_prepare(struct vb2_buffer *vb)
+{
+	return 0;
+}
+
+static void vp_in_buffer_queue(struct vb2_buffer *vb)
+{
+	struct vcap_client_data *cd = vb2_get_drv_priv(vb->vb2_queue);
+	struct vcap_buffer *buf = container_of(vb, struct vcap_buffer, vb);
+	struct vp_action *vp_act = &cd->vid_vp_action;
+	struct vb2_queue *q = vb->vb2_queue;
+	unsigned long flags = 0;
+
+	spin_lock_irqsave(&cd->cap_slock, flags);
+	list_add_tail(&buf->list, &vp_act->in_active);
+	spin_unlock_irqrestore(&cd->cap_slock, flags);
+
+	if (atomic_read(&cd->dev->vp_enabled) == 0) {
+		if (cd->vid_vp_action.vp_state == VP_FRAME1) {
+			if (atomic_read(&q->queued_count) > 1 &&
+				atomic_read(&cd->vp_out_vidq.queued_count) > 0)
+				/* Valid code flow for VC-VP mode */
+				kickoff_vp(cd);
+		} else {
+			/* VP has already kicked off just needs cont */
+			continue_vp(cd);
+		}
+	}
+}
+
+static int vp_in_start_streaming(struct vb2_queue *vq)
+{
+	dprintk(2, "VP IN start streaming\n");
+	return 0;
+}
+
+static int vp_in_stop_streaming(struct vb2_queue *vq)
+{
+	struct vcap_client_data *c_data = vb2_get_drv_priv(vq);
+	struct vb2_buffer *vb;
+
+	dprintk(2, "VP stop streaming\n");
+
+	while (!list_empty(&c_data->vid_vp_action.in_active)) {
+		struct vcap_buffer *buf;
+		buf = list_entry(c_data->vid_vp_action.in_active.next,
+			struct vcap_buffer, list);
+		list_del(&buf->list);
+		vb2_buffer_done(&buf->vb, VB2_BUF_STATE_ERROR);
+	}
+
+	/* clean ion handles */
+	list_for_each_entry(vb, &vq->queued_list, queued_entry)
+		free_ion_handle_work(c_data->dev, vb);
+	return 0;
+}
+
+static int vp_in_buffer_finish(struct vb2_buffer *vb)
+{
+	return 0;
+}
+
+static void vp_in_buffer_cleanup(struct vb2_buffer *vb)
+{
+}
+
+static struct vb2_ops vp_in_video_qops = {
+	.queue_setup		= vp_in_queue_setup,
+	.buf_init			= vp_in_buffer_init,
+	.buf_prepare		= vp_in_buffer_prepare,
+	.buf_queue			= vp_in_buffer_queue,
+	.start_streaming	= vp_in_start_streaming,
+	.stop_streaming		= vp_in_stop_streaming,
+	.buf_finish			= vp_in_buffer_finish,
+	.buf_cleanup		= vp_in_buffer_cleanup,
+};
+
+
+/* VP O/P Videobuf operations */
+
+static int vp_out_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers,
+				unsigned int *nplanes, unsigned long sizes[],
+				void *alloc_ctxs[])
+{
+	if (*nbuffers >= VIDEO_MAX_FRAME && *nbuffers < 3)
+		*nbuffers = 3;
+
+	*nplanes = 1;
+	return 0;
+}
+
+static int vp_out_buffer_init(struct vb2_buffer *vb)
+{
+	return 0;
+}
+
+static int vp_out_buffer_prepare(struct vb2_buffer *vb)
+{
+	return 0;
+}
+
+static void vp_out_buffer_queue(struct vb2_buffer *vb)
+{
+	struct vcap_client_data *cd = vb2_get_drv_priv(vb->vb2_queue);
+	struct vcap_buffer *buf = container_of(vb, struct vcap_buffer, vb);
+	struct vp_action *vp_act = &cd->vid_vp_action;
+	struct vb2_queue *q = vb->vb2_queue;
+	unsigned long flags = 0;
+
+	spin_lock_irqsave(&cd->cap_slock, flags);
+	list_add_tail(&buf->list, &vp_act->out_active);
+	spin_unlock_irqrestore(&cd->cap_slock, flags);
+
+	if (atomic_read(&cd->dev->vp_enabled) == 0) {
+		if (cd->vid_vp_action.vp_state == VP_FRAME1) {
+			if (atomic_read(&q->queued_count) > 0 &&
+				atomic_read(&
+					cd->vp_in_vidq.queued_count) > 1)
+				kickoff_vp(cd);
+		} else {
+			/* VP has already kicked off just needs cont */
+			continue_vp(cd);
+		}
+	}
+}
+
+static int vp_out_start_streaming(struct vb2_queue *vq)
+{
+	return 0;
+}
+
+static int vp_out_stop_streaming(struct vb2_queue *vq)
+{
+	struct vcap_client_data *c_data = vb2_get_drv_priv(vq);
+	struct vb2_buffer *vb;
+
+	dprintk(2, "VP out q stop streaming\n");
+	vp_stop_capture(c_data);
+
+	while (!list_empty(&c_data->vid_vp_action.out_active)) {
+		struct vcap_buffer *buf;
+		buf = list_entry(c_data->vid_vp_action.out_active.next,
+			struct vcap_buffer, list);
+		list_del(&buf->list);
+		vb2_buffer_done(&buf->vb, VB2_BUF_STATE_ERROR);
+	}
+
+	/* clean ion handles */
+	list_for_each_entry(vb, &vq->queued_list, queued_entry)
+		free_ion_handle_work(c_data->dev, vb);
+	return 0;
+}
+
+static int vp_out_buffer_finish(struct vb2_buffer *vb)
+{
+	return 0;
+}
+
+static void vp_out_buffer_cleanup(struct vb2_buffer *vb)
+{
+}
+
+static struct vb2_ops vp_out_video_qops = {
+	.queue_setup		= vp_out_queue_setup,
+	.buf_init			= vp_out_buffer_init,
+	.buf_prepare		= vp_out_buffer_prepare,
+	.buf_queue			= vp_out_buffer_queue,
+	.start_streaming	= vp_out_start_streaming,
+	.stop_streaming		= vp_out_stop_streaming,
+	.buf_finish			= vp_out_buffer_finish,
+	.buf_cleanup		= vp_out_buffer_cleanup,
+};
+
 /* IOCTL vidioc handling */
 
 static int vidioc_querycap(struct file *file, void  *priv,
@@ -305,15 +520,41 @@
 			c_data->vc_format.vactive_start);
 		priv_fmt->u.timing.sizeimage = size;
 		vcap_ctrl->vc_client = c_data;
+		c_data->set_cap = true;
 		break;
 	case VP_IN_TYPE:
-		c_data->vp_buf_type_field = V4L2_BUF_TYPE_INTERLACED_IN_DECODER;
-		c_data->vp_format.field = f->fmt.pix.field;
-		c_data->vp_format.height = f->fmt.pix.height;
-		c_data->vp_format.width = f->fmt.pix.width;
-		c_data->vp_format.pixelformat = f->fmt.pix.pixelformat;
+		vcap_ctrl->vp_client = c_data;
+		c_data->vp_in_fmt.width = priv_fmt->u.pix.width;
+		c_data->vp_in_fmt.height = priv_fmt->u.pix.height;
+		c_data->vp_in_fmt.pixfmt = priv_fmt->u.pix.pixelformat;
+
+		if (priv_fmt->u.pix.priv)
+			c_data->vid_vp_action.nr_enabled = 1;
+
+		size = c_data->vp_in_fmt.width * c_data->vp_in_fmt.height;
+		if (c_data->vp_in_fmt.pixfmt == V4L2_PIX_FMT_NV16)
+			size = size * 2;
+		else
+			size = size / 2 * 3;
+		priv_fmt->u.pix.sizeimage = size;
+		c_data->set_decode = true;
 		break;
 	case VP_OUT_TYPE:
+		vcap_ctrl->vp_client = c_data;
+		c_data->vp_out_fmt.width = priv_fmt->u.pix.width;
+		c_data->vp_out_fmt.height = priv_fmt->u.pix.height;
+		c_data->vp_out_fmt.pixfmt = priv_fmt->u.pix.pixelformat;
+
+		if (priv_fmt->u.pix.priv)
+			c_data->vid_vp_action.nr_enabled = 1;
+
+		size = c_data->vp_out_fmt.width * c_data->vp_out_fmt.height;
+		if (c_data->vp_out_fmt.pixfmt == V4L2_PIX_FMT_NV16)
+			size = size * 2;
+		else
+			size = size / 2 * 3;
+		priv_fmt->u.pix.sizeimage = size;
+		c_data->set_vp_o = true;
 		break;
 	default:
 		break;
@@ -326,9 +567,55 @@
 			  struct v4l2_requestbuffers *rb)
 {
 	struct vcap_client_data *c_data = file->private_data;
+	int rc;
+
+	dprintk(3, "In Req Buf %08x\n", (unsigned int)rb->type);
+	c_data->op_mode = determine_mode(c_data);
+	if (c_data->op_mode == UNKNOWN_VCAP_OP) {
+		pr_err("VCAP Error: %s: VCAP in unknown mode\n", __func__);
+		return -ENOTRECOVERABLE;
+	}
+
 	switch (rb->type) {
 	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
-		return vb2_reqbufs(&c_data->vc_vidq, rb);
+		if (c_data->op_mode == VC_AND_VP_VCAP_OP) {
+			if (c_data->vc_format.color_space) {
+				pr_err("VCAP Err: %s: VP No RGB support\n",
+					__func__);
+				return -ENOTRECOVERABLE;
+			}
+			if (!c_data->vc_format.mode) {
+				pr_err("VCAP Err: VP No prog support\n");
+				return -ENOTRECOVERABLE;
+			}
+			if (rb->count < 6) {
+				pr_err("VCAP Err: Not enough buf for VC_VP\n");
+				return -EINVAL;
+			}
+			rc = vb2_reqbufs(&c_data->vc_vidq, rb);
+			if (rc < 0)
+				return rc;
+
+			c_data->vp_in_fmt.width =
+				(c_data->vc_format.hactive_end -
+				c_data->vc_format.hactive_start);
+			c_data->vp_in_fmt.height =
+				(c_data->vc_format.vactive_end -
+				c_data->vc_format.vactive_start);
+			/* VC outputs YCbCr 4:2:2 */
+			c_data->vp_in_fmt.pixfmt = V4L2_PIX_FMT_NV16;
+			rb->type = V4L2_BUF_TYPE_INTERLACED_IN_DECODER;
+			rc = vb2_reqbufs(&c_data->vp_in_vidq, rb);
+			rb->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+			return rc;
+
+		} else {
+			return vb2_reqbufs(&c_data->vc_vidq, rb);
+		}
+	case V4L2_BUF_TYPE_INTERLACED_IN_DECODER:
+		return vb2_reqbufs(&c_data->vp_in_vidq, rb);
+	case V4L2_BUF_TYPE_VIDEO_OUTPUT:
+		return vb2_reqbufs(&c_data->vp_out_vidq, rb);
 	default:
 		pr_err("VCAP Error: %s: Unknown buffer type\n", __func__);
 		return -EINVAL;
@@ -353,16 +640,57 @@
 static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *p)
 {
 	struct vcap_client_data *c_data = file->private_data;
+	struct vb2_buffer *vb;
+	struct vb2_queue *q;
 	int rc;
 
+	dprintk(3, "In Q Buf %08x\n", (unsigned int)p->type);
 	switch (p->type) {
 	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
-		if (get_phys_addr(c_data->dev, &c_data->vc_vidq, p))
-			return -EINVAL;
+		if (c_data->op_mode == VC_AND_VP_VCAP_OP) {
+			/* If buffer in vp_in_q it will be coming back */
+			q = &c_data->vp_in_vidq;
+			if (p->index >= q->num_buffers) {
+				dprintk(1, "qbuf: buffer index out of range\n");
+				return -EINVAL;
+			}
+
+			vb = q->bufs[p->index];
+			if (NULL == vb) {
+				dprintk(1, "qbuf: buffer is NULL\n");
+				return -EINVAL;
+			}
+
+			if (vb->state != VB2_BUF_STATE_DEQUEUED) {
+				dprintk(1, "qbuf: buffer already in use\n");
+				return -EINVAL;
+			}
+		}
+		rc = get_phys_addr(c_data->dev, &c_data->vc_vidq, p);
+		if (rc < 0)
+			return rc;
 		rc = vb2_qbuf(&c_data->vc_vidq, p);
 		if (rc < 0)
 			free_ion_handle(c_data->dev, &c_data->vc_vidq, p);
 		return rc;
+	case V4L2_BUF_TYPE_INTERLACED_IN_DECODER:
+		if (c_data->op_mode == VC_AND_VP_VCAP_OP)
+			return -EINVAL;
+		rc = get_phys_addr(c_data->dev, &c_data->vp_in_vidq, p);
+		if (rc < 0)
+			return rc;
+		rc = vb2_qbuf(&c_data->vp_in_vidq, p);
+		if (rc < 0)
+			free_ion_handle(c_data->dev, &c_data->vp_in_vidq, p);
+		return rc;
+	case V4L2_BUF_TYPE_VIDEO_OUTPUT:
+		rc = get_phys_addr(c_data->dev, &c_data->vp_out_vidq, p);
+		if (rc < 0)
+			return rc;
+		rc = vb2_qbuf(&c_data->vp_out_vidq, p);
+		if (rc < 0)
+			free_ion_handle(c_data->dev, &c_data->vp_out_vidq, p);
+		return rc;
 	default:
 		pr_err("VCAP Error: %s: Unknown buffer type\n", __func__);
 		return -EINVAL;
@@ -375,12 +703,29 @@
 	struct vcap_client_data *c_data = file->private_data;
 	int rc;
 
+	dprintk(3, "In DQ Buf %08x\n", (unsigned int)p->type);
 	switch (p->type) {
 	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
+		if (c_data->op_mode == VC_AND_VP_VCAP_OP)
+			return -EINVAL;
 		rc = vb2_dqbuf(&c_data->vc_vidq, p, file->f_flags & O_NONBLOCK);
 		if (rc < 0)
 			return rc;
 		return free_ion_handle(c_data->dev, &c_data->vc_vidq, p);
+	case V4L2_BUF_TYPE_INTERLACED_IN_DECODER:
+		if (c_data->op_mode == VC_AND_VP_VCAP_OP)
+			return -EINVAL;
+		rc = vb2_dqbuf(&c_data->vp_in_vidq, p, file->f_flags &
+				O_NONBLOCK);
+		if (rc < 0)
+			return rc;
+		return free_ion_handle(c_data->dev, &c_data->vp_in_vidq, p);
+	case V4L2_BUF_TYPE_VIDEO_OUTPUT:
+		rc = vb2_dqbuf(&c_data->vp_out_vidq, p, file->f_flags &
+				O_NONBLOCK);
+		if (rc < 0)
+			return rc;
+		return free_ion_handle(c_data->dev, &c_data->vp_out_vidq, p);
 	default:
 		pr_err("VCAP Error: %s: Unknown buffer type", __func__);
 		return -EINVAL;
@@ -388,15 +733,153 @@
 	return 0;
 }
 
+/*
+ * When calling streamon on multiple queues there is a need to first verify
+ * that the steamon will succeed on all queues, similarly for streamoff
+ */
+int streamon_validate_q(struct vb2_queue *q)
+{
+	if (q->fileio) {
+		dprintk(1, "streamon: file io in progress\n");
+		return -EBUSY;
+	}
+
+	if (q->streaming) {
+		dprintk(1, "streamon: already streaming\n");
+		return -EBUSY;
+	}
+
+	if (V4L2_TYPE_IS_OUTPUT(q->type)) {
+		if (list_empty(&q->queued_list)) {
+			dprintk(1, "streamon: no output buffers queued\n");
+			return -EINVAL;
+		}
+	}
+	return 0;
+}
+
 static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
 {
 	struct vcap_client_data *c_data = file->private_data;
+	int rc;
 
-	switch (i) {
-	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
+	dprintk(3, "In Stream ON\n");
+	if (determine_mode(c_data) != c_data->op_mode) {
+		pr_err("VCAP Error: %s: s_fmt called after req_buf", __func__);
+		return -ENOTRECOVERABLE;
+	}
+
+	switch (c_data->op_mode) {
+	case VC_VCAP_OP:
+		c_data->dev->vc_client = c_data;
+		config_vc_format(c_data);
 		return vb2_streamon(&c_data->vc_vidq, i);
+	case VP_VCAP_OP:
+		rc = streamon_validate_q(&c_data->vp_in_vidq);
+		if (rc < 0)
+			return rc;
+		rc = streamon_validate_q(&c_data->vp_out_vidq);
+		if (rc < 0)
+			return rc;
+
+		c_data->dev->vp_client = c_data;
+
+		rc = config_vp_format(c_data);
+		if (rc < 0)
+			return rc;
+		rc = init_motion_buf(c_data);
+		if (rc < 0)
+			return rc;
+		if (c_data->vid_vp_action.nr_enabled) {
+			rc = init_nr_buf(c_data);
+			if (rc < 0)
+				goto s_on_deinit_m_buf;
+		}
+
+		c_data->vid_vp_action.vp_state = VP_FRAME1;
+
+		rc = vb2_streamon(&c_data->vp_in_vidq,
+				V4L2_BUF_TYPE_INTERLACED_IN_DECODER);
+		if (rc < 0)
+			goto s_on_deinit_nr_buf;
+
+		rc = vb2_streamon(&c_data->vp_out_vidq,
+				V4L2_BUF_TYPE_VIDEO_OUTPUT);
+		if (rc < 0)
+			goto s_on_deinit_nr_buf;
+		return rc;
+	case VC_AND_VP_VCAP_OP:
+		rc = streamon_validate_q(&c_data->vc_vidq);
+		if (rc < 0)
+			return rc;
+		rc = streamon_validate_q(&c_data->vp_in_vidq);
+		if (rc < 0)
+			return rc;
+		rc = streamon_validate_q(&c_data->vp_out_vidq);
+		if (rc < 0)
+			return rc;
+
+		c_data->dev->vc_client = c_data;
+		c_data->dev->vp_client = c_data;
+		c_data->dev->vc_to_vp_work.cd = c_data;
+
+		rc = config_vc_format(c_data);
+		if (rc < 0)
+			return rc;
+		rc = config_vp_format(c_data);
+		if (rc < 0)
+			return rc;
+		rc = init_motion_buf(c_data);
+		if (rc < 0)
+			return rc;
+		if (c_data->vid_vp_action.nr_enabled) {
+			rc = init_nr_buf(c_data);
+			if (rc < 0)
+				goto s_on_deinit_m_buf;
+		}
+		c_data->streaming = 1;
+
+		c_data->vid_vp_action.vp_state = VP_FRAME1;
+
+		/* These stream on calls should not fail */
+		rc = vb2_streamon(&c_data->vc_vidq,
+				V4L2_BUF_TYPE_VIDEO_CAPTURE);
+		if (rc < 0)
+			goto s_on_deinit_nr_buf;
+
+		rc = vb2_streamon(&c_data->vp_in_vidq,
+				V4L2_BUF_TYPE_INTERLACED_IN_DECODER);
+		if (rc < 0)
+			goto s_on_deinit_nr_buf;
+
+		rc = vb2_streamon(&c_data->vp_out_vidq,
+				V4L2_BUF_TYPE_VIDEO_OUTPUT);
+		if (rc < 0)
+			goto s_on_deinit_nr_buf;
+		return rc;
 	default:
-		pr_err("VCAP Error: %s: Unknown buffer type", __func__);
+		pr_err("VCAP Error: %s: Operation Mode type", __func__);
+		return -ENOTRECOVERABLE;
+	}
+	return 0;
+
+s_on_deinit_nr_buf:
+	if (c_data->vid_vp_action.nr_enabled)
+		deinit_nr_buf(c_data);
+s_on_deinit_m_buf:
+	deinit_motion_buf(c_data);
+	return rc;
+}
+
+int streamoff_validate_q(struct vb2_queue *q)
+{
+	if (q->fileio) {
+		dprintk(1, "streamoff: file io in progress\n");
+		return -EBUSY;
+	}
+
+	if (!q->streaming) {
+		dprintk(1, "streamoff: not streaming\n");
 		return -EINVAL;
 	}
 	return 0;
@@ -407,21 +890,78 @@
 	struct vcap_client_data *c_data = file->private_data;
 	int rc;
 
-	switch (i) {
-	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
+	switch (c_data->op_mode) {
+	case VC_VCAP_OP:
 		rc = vb2_streamoff(&c_data->vc_vidq, i);
 		if (rc >= 0)
 			atomic_set(&c_data->dev->vc_enabled, 0);
 		return rc;
+	case VP_VCAP_OP:
+		rc = streamoff_validate_q(&c_data->vp_in_vidq);
+		if (rc < 0)
+			return rc;
+		rc = streamoff_validate_q(&c_data->vp_out_vidq);
+		if (rc < 0)
+			return rc;
+
+		/* These stream on calls should not fail */
+		rc = vb2_streamoff(&c_data->vp_in_vidq,
+				V4L2_BUF_TYPE_INTERLACED_IN_DECODER);
+		if (rc < 0)
+			return rc;
+
+		rc = vb2_streamoff(&c_data->vp_out_vidq,
+				V4L2_BUF_TYPE_VIDEO_OUTPUT);
+		if (rc < 0)
+			return rc;
+
+		deinit_motion_buf(c_data);
+		if (c_data->vid_vp_action.nr_enabled)
+			deinit_nr_buf(c_data);
+		atomic_set(&c_data->dev->vp_enabled, 0);
+		return rc;
+	case VC_AND_VP_VCAP_OP:
+		rc = streamoff_validate_q(&c_data->vc_vidq);
+		if (rc < 0)
+			return rc;
+		rc = streamoff_validate_q(&c_data->vp_in_vidq);
+		if (rc < 0)
+			return rc;
+		rc = streamoff_validate_q(&c_data->vp_out_vidq);
+		if (rc < 0)
+			return rc;
+
+		/* These stream on calls should not fail */
+		c_data->streaming = 0;
+		rc = vb2_streamoff(&c_data->vc_vidq,
+				V4L2_BUF_TYPE_VIDEO_CAPTURE);
+		if (rc < 0)
+			return rc;
+
+		rc = vb2_streamoff(&c_data->vp_in_vidq,
+				V4L2_BUF_TYPE_INTERLACED_IN_DECODER);
+		if (rc < 0)
+			return rc;
+
+		rc = vb2_streamoff(&c_data->vp_out_vidq,
+				V4L2_BUF_TYPE_VIDEO_OUTPUT);
+		if (rc < 0)
+			return rc;
+
+		deinit_motion_buf(c_data);
+		if (c_data->vid_vp_action.nr_enabled)
+			deinit_nr_buf(c_data);
+		atomic_set(&c_data->dev->vc_enabled, 0);
+		atomic_set(&c_data->dev->vp_enabled, 0);
+		return rc;
 	default:
-		pr_err("VCAP Error: %s: Unknown buffer type", __func__);
-		break;
+		pr_err("VCAP Error: %s: Unknown Operation mode", __func__);
+		return -ENOTRECOVERABLE;
 	}
 	return 0;
 }
 
 /* VCAP fops */
-
 static void *vcap_ops_get_userptr(void *alloc_ctx, unsigned long vaddr,
 					unsigned long size, int write)
 {
@@ -458,7 +998,7 @@
 
 	spin_lock_init(&c_data->cap_slock);
 
-	/* initialize queue */
+	/* initialize vc queue */
 	q = &c_data->vc_vidq;
 	memset(q, 0, sizeof(c_data->vc_vidq));
 	q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
@@ -467,17 +1007,49 @@
 	q->buf_struct_size = sizeof(struct vcap_buffer);
 	q->ops = &capture_video_qops;
 	q->mem_ops = &vcap_mem_ops;
+	ret = vb2_queue_init(q);
+	if (ret < 0)
+		goto vc_q_failed;
+
+	/* initialize vp in queue */
+	q = &c_data->vp_in_vidq;
+	memset(q, 0, sizeof(c_data->vp_in_vidq));
+	q->type = V4L2_BUF_TYPE_INTERLACED_IN_DECODER;
+	q->io_modes = VB2_USERPTR;
+	q->drv_priv = c_data;
+	q->buf_struct_size = sizeof(struct vcap_buffer);
+	q->ops = &vp_in_video_qops;
+	q->mem_ops = &vcap_mem_ops;
+	ret = vb2_queue_init(q);
+	if (ret < 0)
+		goto vp_in_q_failed;
+
+	/* initialize vp out queue */
+	q = &c_data->vp_out_vidq;
+	memset(q, 0, sizeof(c_data->vp_out_vidq));
+	q->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
+	q->io_modes = VB2_USERPTR;
+	q->drv_priv = c_data;
+	q->buf_struct_size = sizeof(struct vcap_buffer);
+	q->ops = &vp_out_video_qops;
+	q->mem_ops = &vcap_mem_ops;
 
 	ret = vb2_queue_init(q);
 	if (ret < 0)
-		goto open_failed;
+		goto vp_out_q_failed;
 
 	INIT_LIST_HEAD(&c_data->vid_vc_action.active);
+	INIT_LIST_HEAD(&c_data->vid_vp_action.in_active);
+	INIT_LIST_HEAD(&c_data->vid_vp_action.out_active);
 	file->private_data = c_data;
 
 	return 0;
 
-open_failed:
+vp_out_q_failed:
+	vb2_queue_release(&c_data->vp_in_vidq);
+vp_in_q_failed:
+	vb2_queue_release(&c_data->vc_vidq);
+vc_q_failed:
 	kfree(c_data);
 	return ret;
 }
@@ -485,6 +1057,8 @@
 static int vcap_close(struct file *file)
 {
 	struct vcap_client_data *c_data = file->private_data;
+	vb2_queue_release(&c_data->vp_out_vidq);
+	vb2_queue_release(&c_data->vp_in_vidq);
 	vb2_queue_release(&c_data->vc_vidq);
 	c_data->dev->vc_client = NULL;
 	c_data->dev->vp_client = NULL;
@@ -492,13 +1066,60 @@
 	return 0;
 }
 
+unsigned int poll_work(struct vb2_queue *q, struct file *file,
+	poll_table *wait, bool write_q)
+{
+	unsigned long flags;
+	struct vb2_buffer *vb = NULL;
+
+	if (q->num_buffers == 0)
+		return POLLERR;
+
+	if (list_empty(&q->queued_list))
+		return POLLERR;
+
+	poll_wait(file, &q->done_wq, wait);
+
+	spin_lock_irqsave(&q->done_lock, flags);
+	if (!list_empty(&q->done_list))
+		vb = list_first_entry(&q->done_list, struct vb2_buffer,
+					done_entry);
+	spin_unlock_irqrestore(&q->done_lock, flags);
+
+	if (vb && (vb->state == VB2_BUF_STATE_DONE
+			|| vb->state == VB2_BUF_STATE_ERROR)) {
+		return (write_q) ? POLLOUT | POLLWRNORM :
+			POLLIN | POLLRDNORM;
+	}
+	return 0;
+}
+
 static unsigned int vcap_poll(struct file *file,
 				  struct poll_table_struct *wait)
 {
 	struct vcap_client_data *c_data = file->private_data;
-	struct vb2_queue *q = &c_data->vc_vidq;
+	struct vb2_queue *q;
+	unsigned int mask = 0;
 
-	return vb2_poll(q, file, wait);
+	switch (c_data->op_mode) {
+	case VC_VCAP_OP:
+		q = &c_data->vc_vidq;
+		return vb2_poll(q, file, wait);
+	case VP_VCAP_OP:
+		q = &c_data->vp_in_vidq;
+		mask = poll_work(q, file, wait, 0);
+		q = &c_data->vp_out_vidq;
+		mask |= poll_work(q, file, wait, 1);
+		return mask;
+	case VC_AND_VP_VCAP_OP:
+		q = &c_data->vp_out_vidq;
+		mask = poll_work(q, file, wait, 0);
+		return mask;
+	default:
+		pr_err("VCAP Error: %s: Unknown operation mode", __func__);
+		return POLLERR;
+	}
+	return 0;
 }
 /* V4L2 and video device structures */
 
@@ -518,6 +1139,8 @@
 	.vidioc_s_fmt_vid_cap     = vidioc_s_fmt_vid_cap,
 	.vidioc_s_fmt_type_private     = vidioc_s_fmt_vid_cap,
 	.vidioc_g_fmt_type_private     = vidioc_g_fmt_vid_cap,
+	.vidioc_s_fmt_vid_out_mplane	= vidioc_s_fmt_vid_cap,
+	.vidioc_g_fmt_vid_out_mplane	= vidioc_g_fmt_vid_cap,
 	.vidioc_reqbufs       = vidioc_reqbufs,
 	.vidioc_querybuf      = vidioc_querybuf,
 	.vidioc_qbuf          = vidioc_qbuf,
@@ -533,9 +1156,9 @@
 	.release	= video_device_release,
 };
 
-int vcap_reg_powerup(struct vcap_dev *dev, struct device *ddev)
+int vcap_reg_powerup(struct vcap_dev *dev)
 {
-	dev->fs_vcap = regulator_get(ddev, "vdd");
+	dev->fs_vcap = regulator_get(NULL, "fs_vcap");
 	if (IS_ERR(dev->fs_vcap)) {
 		pr_err("%s: Regulator FS_VCAP get failed %ld\n", __func__,
 			PTR_ERR(dev->fs_vcap));
@@ -711,7 +1334,7 @@
 {
 	int rc;
 
-	rc = vcap_reg_powerup(dev, ddev);
+	rc = vcap_reg_powerup(dev);
 	if (rc < 0)
 		goto reg_failed;
 	rc = vcap_clk_powerup(dev, ddev);
@@ -747,6 +1370,11 @@
 	return 0;
 }
 
+static irqreturn_t vcap_vp_handler(int irq_num, void *data)
+{
+	return vp_handler(vcap_ctrl);
+}
+
 static irqreturn_t vcap_vc_handler(int irq_num, void *data)
 {
 	return vc_handler(vcap_ctrl);
@@ -789,26 +1417,44 @@
 		goto free_resource;
 	}
 
-	dev->vcapirq = platform_get_resource_byname(pdev,
-					IORESOURCE_IRQ, "vcap");
-	if (!dev->vcapirq) {
-		pr_err("%s: no irq resource?\n", __func__);
+	dev->vcirq = platform_get_resource_byname(pdev,
+					IORESOURCE_IRQ, "vc_irq");
+	if (!dev->vcirq) {
+		pr_err("%s: no vc irq resource?\n", __func__);
+		ret = -ENODEV;
+		goto free_resource;
+	}
+	dev->vpirq = platform_get_resource_byname(pdev,
+					IORESOURCE_IRQ, "vp_irq");
+	if (!dev->vpirq) {
+		pr_err("%s: no vp irq resource?\n", __func__);
 		ret = -ENODEV;
 		goto free_resource;
 	}
 
-	ret = request_irq(dev->vcapirq->start, vcap_vc_handler,
-		IRQF_TRIGGER_RISING, "vcap", 0);
+
+	ret = request_irq(dev->vcirq->start, vcap_vc_handler,
+		IRQF_TRIGGER_RISING, "vc_irq", 0);
 	if (ret < 0) {
-		pr_err("%s: irq request fail\n", __func__);
+		pr_err("%s: vc irq request fail\n", __func__);
 		ret = -EBUSY;
 		goto free_resource;
 	}
+	disable_irq(dev->vcirq->start);
 
-	disable_irq(dev->vcapirq->start);
+	ret = request_irq(dev->vpirq->start, vcap_vp_handler,
+		IRQF_TRIGGER_RISING, "vp_irq", 0);
+
+	if (ret < 0) {
+		pr_err("%s: vp irq request fail\n", __func__);
+		ret = -EBUSY;
+		goto free_resource;
+	}
+	disable_irq(dev->vpirq->start);
 
 	snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name),
 			"%s", MSM_VCAP_DRV_NAME);
+
 	ret = v4l2_device_register(NULL, &dev->v4l2_dev);
 	if (ret)
 		goto free_resource;
@@ -838,17 +1484,25 @@
 	dev->vfd = vfd;
 	video_set_drvdata(vfd, dev);
 
-	dev->ion_client = msm_ion_client_create(-1, "vcap");
-	if (IS_ERR((void *)dev->ion_client)) {
-		pr_err("could not get ion client");
+	dev->vcap_wq = create_workqueue("vcap");
+	if (!dev->vcap_wq) {
+		pr_err("Could not create workqueue");
 		goto rel_vdev;
 	}
 
+	dev->ion_client = msm_ion_client_create(-1, "vcap");
+	if (IS_ERR((void *)dev->ion_client)) {
+		pr_err("could not get ion client");
+		goto rel_vcap_wq;
+	}
+
 	atomic_set(&dev->vc_enabled, 0);
+	atomic_set(&dev->vp_enabled, 0);
 
 	dprintk(1, "Exit probe succesfully");
 	return 0;
-
+rel_vcap_wq:
+	destroy_workqueue(dev->vcap_wq);
 rel_vdev:
 	video_device_release(vfd);
 deinit_vc:
@@ -870,6 +1524,8 @@
 {
 	struct vcap_dev *dev = vcap_ctrl;
 	ion_client_destroy(dev->ion_client);
+	flush_workqueue(dev->vcap_wq);
+	destroy_workqueue(dev->vcap_wq);
 	video_device_release(dev->vfd);
 	deinit_vc();
 	vcap_disable(dev);
diff --git a/drivers/media/video/vcap_vc.c b/drivers/media/video/vcap_vc.c
index 84b52b2..2c4a243 100644
--- a/drivers/media/video/vcap_vc.c
+++ b/drivers/media/video/vcap_vc.c
@@ -51,6 +51,61 @@
 	}
 }
 
+static void mov_buf_to_vp(struct work_struct *work)
+{
+	struct vp_work_t *vp_work = container_of(work, struct vp_work_t, work);
+	struct v4l2_buffer p;
+	struct vb2_buffer *vb_vc;
+	struct vcap_buffer *buf_vc;
+	struct vb2_buffer *vb_vp;
+	struct vcap_buffer *buf_vp;
+
+	int rc;
+	p.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+	p.memory = V4L2_MEMORY_USERPTR;
+	while (1) {
+		if (!vp_work->cd->streaming)
+			return;
+		rc = vb2_dqbuf(&vp_work->cd->vc_vidq, &p, O_NONBLOCK);
+		if (rc < 0)
+			return;
+
+		vb_vc = vp_work->cd->vc_vidq.bufs[p.index];
+		if (NULL == vb_vc) {
+			dprintk(1, "%s: buffer is NULL\n", __func__);
+			vb2_qbuf(&vp_work->cd->vc_vidq, &p);
+			return;
+		}
+		buf_vc = container_of(vb_vc, struct vcap_buffer, vb);
+
+		vb_vp = vp_work->cd->vp_in_vidq.bufs[p.index];
+		if (NULL == vb_vp) {
+			dprintk(1, "%s: buffer is NULL\n", __func__);
+			vb2_qbuf(&vp_work->cd->vc_vidq, &p);
+			return;
+		}
+		buf_vp = container_of(vb_vp, struct vcap_buffer, vb);
+		buf_vp->ion_handle = buf_vc->ion_handle;
+		buf_vp->paddr = buf_vc->paddr;
+		buf_vc->ion_handle = NULL;
+		buf_vc->paddr = 0;
+
+		p.type = V4L2_BUF_TYPE_INTERLACED_IN_DECODER;
+
+		/* This call should not fail */
+		rc = vb2_qbuf(&vp_work->cd->vp_in_vidq, &p);
+		if (rc < 0) {
+			pr_err("%s: qbuf to vp_in failed\n", __func__);
+			buf_vc->ion_handle = buf_vp->ion_handle;
+			buf_vc->paddr = buf_vp->paddr;
+			buf_vp->ion_handle = NULL;
+			buf_vp->paddr = 0;
+			p.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+			vb2_qbuf(&vp_work->cd->vc_vidq, &p);
+		}
+	}
+}
+
 irqreturn_t vc_handler(struct vcap_dev *dev)
 {
 	uint32_t irq, timestamp;
@@ -59,6 +114,7 @@
 	struct vb2_buffer *vb = NULL;
 	struct vcap_client_data *c_data;
 
+
 	irq = readl_relaxed(VCAP_VC_INT_STATUS);
 
 	dprintk(1, "%s: irq=0x%08x\n", __func__, irq);
@@ -150,6 +206,10 @@
 		dev->vc_client->vid_vc_action.buf_ind = VC_BUF1;
 		irq = VC_BUF2;
 	}
+
+	if (c_data->op_mode == VC_AND_VP_VCAP_OP)
+		queue_work(dev->vcap_wq, &dev->vc_to_vp_work.work);
+
 	writel_relaxed(irq, VCAP_VC_INT_CLEAR);
 
 	return IRQ_HANDLED;
@@ -209,11 +269,11 @@
 			VCAP_VC_C_ADDR_2);
 
 	rc = readl_relaxed(VCAP_VC_CTRL);
-	writel_relaxed(rc | 0x1, VCAP_VC_CTRL);
+	writel_iowmb(rc | 0x1, VCAP_VC_CTRL);
 
 	writel_relaxed(0x6, VCAP_VC_INT_MASK);
 
-	enable_irq(dev->vcapirq->start);
+	enable_irq(dev->vcirq->start);
 	return 0;
 }
 
@@ -223,9 +283,12 @@
 	int rc;
 
 	rc = readl_relaxed(VCAP_VC_CTRL);
-	writel_relaxed(rc & ~(0x1), VCAP_VC_CTRL);
+	writel_iowmb(rc & ~(0x1), VCAP_VC_CTRL);
 
-	disable_irq(c_data->dev->vcapirq->start);
+	if (atomic_read(&dev->vc_enabled) == 1)
+		disable_irq(dev->vcirq->start);
+
+	flush_workqueue(dev->vcap_wq);
 }
 
 int config_vc_format(struct vcap_client_data *c_data)
@@ -251,17 +314,21 @@
 	}
 	writel_relaxed(0x00000000, VCAP_SW_RESET_REQ);
 
-	writel_relaxed(0x00000102, VCAP_VC_NPL_CTRL);
+	writel_iowmb(0x00000102, VCAP_VC_NPL_CTRL);
 	rc = readl_relaxed(VCAP_VC_NPL_CTRL);
 	rc = readl_relaxed(VCAP_VC_NPL_CTRL);
-	writel_relaxed(0x00000002, VCAP_VC_NPL_CTRL);
+	writel_iowmb(0x00000002, VCAP_VC_NPL_CTRL);
 
 	dprintk(2, "%s: Starting VC configuration\n", __func__);
-	writel_relaxed(0x00000002, VCAP_VC_NPL_CTRL);
-	writel_relaxed(0x00000004 | vc_format->color_space << 1, VCAP_VC_CTRL);
+	writel_iowmb(0x00000002, VCAP_VC_NPL_CTRL);
+	writel_iowmb(0x00000004 | vc_format->color_space << 1 |
+			vc_format->mode << 3 |
+			vc_format->mode << 10, VCAP_VC_CTRL);
 
-	writel_relaxed(vc_format->d_polar << 8 |
-			vc_format->h_polar << 4 |
+	writel_relaxed(vc_format->h_polar << 4 |
+			vc_format->v_polar << 0, VCAP_VC_POLARITY);
+
+	writel_relaxed(vc_format->h_polar << 4 |
 			vc_format->v_polar << 0, VCAP_VC_POLARITY);
 	writel_relaxed(((vc_format->htotal << 16) | vc_format->vtotal),
 			VCAP_VC_V_H_TOTAL);
@@ -280,7 +347,7 @@
 			vc_format->hsync_start), VCAP_VC_HSYNC_HPOS);
 	writel_relaxed(((vc_format->f2_vsync_h_end << 16) |
 			vc_format->f2_vsync_h_start), VCAP_VC_VSYNC_F2_HPOS);
-	writel_relaxed(0x000033FF, VCAP_VC_BUF_CTRL);
+	writel_iowmb(0x000033FF, VCAP_VC_BUF_CTRL);
 
 	rc = vc_format->hactive_end - vc_format->hactive_start;
 	if (vc_format->color_space)
@@ -297,6 +364,7 @@
 	writel_relaxed(0x2f6ad272, VCAP_VC_IN_CTRL4);
 	writel_relaxed(0x00006b38, VCAP_VC_IN_CTRL5);
 
+	writel_iowmb(0x00000001 , VCAP_OFFSET(0x0d00));
 	dprintk(2, "%s: Done VC configuration\n", __func__);
 
 	return 0;
@@ -309,6 +377,7 @@
 	dprintk(1, "Hardware version: %08x\n", result);
 	if (result != VCAP_HARDWARE_VERSION)
 		return -ENODEV;
+	INIT_WORK(&dev->vc_to_vp_work.work, mov_buf_to_vp);
 	return 0;
 }
 
diff --git a/drivers/media/video/vcap_vp.c b/drivers/media/video/vcap_vp.c
new file mode 100644
index 0000000..f8dfdc1
--- /dev/null
+++ b/drivers/media/video/vcap_vp.c
@@ -0,0 +1,606 @@
+/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/kthread.h>
+#include <linux/freezer.h>
+#include <mach/camera.h>
+#include <linux/io.h>
+#include <mach/clk.h>
+#include <linux/clk.h>
+
+#include <media/vcap_v4l2.h>
+#include <media/vcap_fmt.h>
+#include "vcap_vp.h"
+
+static unsigned debug;
+
+#define dprintk(level, fmt, arg...)					\
+	do {								\
+		if (debug >= level)					\
+			printk(KERN_DEBUG "VP: " fmt, ## arg);		\
+	} while (0)
+
+void config_nr_buffer(struct vcap_client_data *c_data,
+			struct vcap_buffer *buf)
+{
+	struct vcap_dev *dev = c_data->dev;
+	int size = c_data->vp_in_fmt.height * c_data->vp_in_fmt.width;
+
+	writel_relaxed(buf->paddr, VCAP_VP_NR_T2_Y_BASE_ADDR);
+	writel_relaxed(buf->paddr + size, VCAP_VP_NR_T2_C_BASE_ADDR);
+}
+
+void config_in_buffer(struct vcap_client_data *c_data,
+			struct vcap_buffer *buf)
+{
+	struct vcap_dev *dev = c_data->dev;
+	int size = c_data->vp_in_fmt.height * c_data->vp_in_fmt.width;
+
+	writel_relaxed(buf->paddr, VCAP_VP_T2_Y_BASE_ADDR);
+	writel_relaxed(buf->paddr + size, VCAP_VP_T2_C_BASE_ADDR);
+}
+
+void config_out_buffer(struct vcap_client_data *c_data,
+			struct vcap_buffer *buf)
+{
+	struct vcap_dev *dev = c_data->dev;
+	int size;
+	size = c_data->vp_out_fmt.height * c_data->vp_out_fmt.width;
+	writel_relaxed(buf->paddr, VCAP_VP_OUT_Y_BASE_ADDR);
+	writel_relaxed(buf->paddr + size, VCAP_VP_OUT_C_BASE_ADDR);
+}
+
+int vp_setup_buffers(struct vcap_client_data *c_data)
+{
+	struct vp_action *vp_act;
+	struct vcap_dev *dev;
+	unsigned long flags = 0;
+
+	if (!c_data->streaming)
+		return -ENOEXEC;
+	dev = c_data->dev;
+	dprintk(2, "Start setup buffers\n");
+
+	/* No need to verify vp_client is not NULL caller does so */
+	vp_act = &dev->vp_client->vid_vp_action;
+
+	spin_lock_irqsave(&dev->vp_client->cap_slock, flags);
+	if (list_empty(&vp_act->in_active)) {
+		spin_unlock_irqrestore(&dev->vp_client->cap_slock, flags);
+		dprintk(1, "%s: VP We have no more input buffers\n",
+				__func__);
+		return -EAGAIN;
+	}
+
+	if (list_empty(&vp_act->out_active)) {
+		spin_unlock_irqrestore(&dev->vp_client->cap_slock,
+			flags);
+		dprintk(1, "%s: VP We have no more output buffers\n",
+		   __func__);
+		return -EAGAIN;
+	}
+
+	vp_act->bufT2 = list_entry(vp_act->in_active.next,
+			struct vcap_buffer, list);
+	list_del(&vp_act->bufT2->list);
+
+	vp_act->bufOut = list_entry(vp_act->out_active.next,
+			struct vcap_buffer, list);
+	list_del(&vp_act->bufOut->list);
+	spin_unlock_irqrestore(&dev->vp_client->cap_slock, flags);
+
+	config_in_buffer(c_data, vp_act->bufT2);
+	config_out_buffer(c_data, vp_act->bufOut);
+	return 0;
+}
+
+static void mov_buf_to_vc(struct work_struct *work)
+{
+	struct vp_work_t *vp_work = container_of(work, struct vp_work_t, work);
+	struct v4l2_buffer p;
+	struct vb2_buffer *vb_vc;
+	struct vcap_buffer *buf_vc;
+	struct vb2_buffer *vb_vp;
+	struct vcap_buffer *buf_vp;
+	int rc;
+
+	p.type = V4L2_BUF_TYPE_INTERLACED_IN_DECODER;
+	p.memory = V4L2_MEMORY_USERPTR;
+
+	/* This loop exits when there is no more buffers left */
+	while (1) {
+		if (!vp_work->cd->streaming)
+			return;
+		rc = vb2_dqbuf(&vp_work->cd->vp_in_vidq, &p, O_NONBLOCK);
+		if (rc < 0)
+			return;
+
+		vb_vc = vp_work->cd->vc_vidq.bufs[p.index];
+		if (NULL == vb_vc) {
+			dprintk(1, "%s: buffer is NULL\n", __func__);
+			vb2_qbuf(&vp_work->cd->vp_in_vidq, &p);
+			return;
+		}
+		buf_vc = container_of(vb_vc, struct vcap_buffer, vb);
+
+		vb_vp = vp_work->cd->vp_in_vidq.bufs[p.index];
+		if (NULL == vb_vp) {
+			dprintk(1, "%s: buffer is NULL\n", __func__);
+			vb2_qbuf(&vp_work->cd->vp_in_vidq, &p);
+			return;
+		}
+		buf_vp = container_of(vb_vp, struct vcap_buffer, vb);
+		buf_vc->ion_handle = buf_vp->ion_handle;
+		buf_vc->paddr = buf_vp->paddr;
+		buf_vp->ion_handle = NULL;
+		buf_vp->paddr = 0;
+
+		p.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+		/* This call should not fail */
+		rc = vb2_qbuf(&vp_work->cd->vc_vidq, &p);
+		if (rc < 0) {
+			dprintk(1, "%s: qbuf to vc failed\n", __func__);
+			buf_vp->ion_handle = buf_vc->ion_handle;
+			buf_vp->paddr = buf_vc->paddr;
+			buf_vc->ion_handle = NULL;
+			buf_vc->paddr = 0;
+			p.type = V4L2_BUF_TYPE_INTERLACED_IN_DECODER;
+			vb2_qbuf(&vp_work->cd->vp_in_vidq, &p);
+		}
+	}
+}
+
+static void vp_wq_fnc(struct work_struct *work)
+{
+	struct vp_work_t *vp_work = container_of(work, struct vp_work_t, work);
+	struct vcap_dev *dev;
+	struct vp_action *vp_act;
+	uint32_t irq;
+	int rc;
+#ifndef TOP_FIELD_FIX
+	bool top_field;
+#endif
+
+	if (vp_work && vp_work->cd && vp_work->cd->dev)
+		dev = vp_work->cd->dev;
+	else
+		return;
+
+	vp_act = &dev->vp_client->vid_vp_action;
+	irq = vp_work->irq;
+
+	rc = readl_relaxed(VCAP_OFFSET(0x048));
+	while (!(rc & 0x00000100))
+		rc = readl_relaxed(VCAP_OFFSET(0x048));
+
+	writel_relaxed(0x00000000, VCAP_VP_BAL_VMOTION_STATE);
+	writel_relaxed(0x40000000, VCAP_VP_REDUCT_AVG_MOTION2);
+
+	/* Queue the done buffers */
+	if (vp_act->vp_state == VP_NORMAL &&
+			vp_act->bufNR.nr_pos != TM1_BUF) {
+		vb2_buffer_done(&vp_act->bufTm1->vb, VB2_BUF_STATE_DONE);
+		if (vp_work->cd->op_mode == VC_AND_VP_VCAP_OP)
+			queue_work(dev->vcap_wq, &dev->vp_to_vc_work.work);
+	}
+
+	vb2_buffer_done(&vp_act->bufOut->vb, VB2_BUF_STATE_DONE);
+
+	/* Cycle to next state */
+	if (vp_act->vp_state != VP_NORMAL)
+		vp_act->vp_state++;
+#ifdef TOP_FIELD_FIX
+	vp_act->top_field = !vp_act->top_field;
+#endif
+
+	/* Cycle Buffers*/
+	if (vp_work->cd->vid_vp_action.nr_enabled) {
+		if (vp_act->bufNR.nr_pos == TM1_BUF)
+			vp_act->bufNR.nr_pos = BUF_NOT_IN_USE;
+
+		if (vp_act->bufNR.nr_pos != BUF_NOT_IN_USE)
+			vp_act->bufNR.nr_pos++;
+
+		vp_act->bufTm1 = vp_act->bufT0;
+		vp_act->bufT0 = vp_act->bufT1;
+		vp_act->bufT1 = vp_act->bufNRT2;
+		vp_act->bufNRT2 = vp_act->bufT2;
+		config_nr_buffer(vp_work->cd, vp_act->bufNRT2);
+	} else {
+		vp_act->bufTm1 = vp_act->bufT0;
+		vp_act->bufT0 = vp_act->bufT1;
+		vp_act->bufT1 = vp_act->bufT2;
+	}
+
+	rc = vp_setup_buffers(vp_work->cd);
+	if (rc < 0) {
+		/* setup_buf failed because we are waiting for buffers */
+		writel_relaxed(0x00000000, VCAP_VP_INTERRUPT_ENABLE);
+		writel_iowmb(irq, VCAP_VP_INT_CLEAR);
+		atomic_set(&dev->vp_enabled, 0);
+		return;
+	}
+
+	/* Config VP */
+#ifndef TOP_FIELD_FIX
+	if (vp_act->bufT2->vb.v4l2_buf.field == V4L2_FIELD_TOP)
+		top_field = 1;
+#endif
+
+#ifdef TOP_FIELD_FIX
+	writel_iowmb(0x00000000 | vp_act->top_field << 0, VCAP_VP_CTRL);
+	writel_iowmb(0x00030000 | vp_act->top_field << 0, VCAP_VP_CTRL);
+#else
+	writel_iowmb(0x00000000 | top_field, VCAP_VP_CTRL);
+	writel_iowmb(0x00030000 | top_field, VCAP_VP_CTRL);
+#endif
+	enable_irq(dev->vpirq->start);
+	writel_iowmb(irq, VCAP_VP_INT_CLEAR);
+}
+
+irqreturn_t vp_handler(struct vcap_dev *dev)
+{
+	struct vcap_client_data *c_data;
+	struct vp_action *vp_act;
+	uint32_t irq;
+	int rc;
+
+	irq = readl_relaxed(VCAP_VP_INT_STATUS);
+
+	dprintk(1, "%s: irq=0x%08x\n", __func__, irq);
+	if (!irq & VP_PIC_DONE) {
+		writel_relaxed(irq, VCAP_VP_INT_CLEAR);
+		pr_err("VP IRQ shows some error\n");
+		return IRQ_HANDLED;
+	}
+
+	if (dev->vp_client == NULL) {
+		writel_relaxed(irq, VCAP_VP_INT_CLEAR);
+		pr_err("VC: There is no active vp client\n");
+		return IRQ_HANDLED;
+	}
+
+	vp_act = &dev->vp_client->vid_vp_action;
+	c_data = dev->vp_client;
+
+	if (vp_act->vp_state == VP_UNKNOWN) {
+		writel_relaxed(irq, VCAP_VP_INT_CLEAR);
+		pr_err("%s: VP is in an unknown state\n",
+				__func__);
+		return -EAGAIN;
+	}
+
+	INIT_WORK(&dev->vp_work.work, vp_wq_fnc);
+	dev->vp_work.cd = c_data;
+	dev->vp_work.irq = irq;
+	rc = queue_work(dev->vcap_wq, &dev->vp_work.work);
+
+	disable_irq_nosync(dev->vpirq->start);
+	return IRQ_HANDLED;
+}
+
+void vp_stop_capture(struct vcap_client_data *c_data)
+{
+	struct vcap_dev *dev = c_data->dev;
+
+	writel_iowmb(0x00000000, VCAP_VP_CTRL);
+	flush_workqueue(dev->vcap_wq);
+
+	if (atomic_read(&dev->vp_enabled) == 1)
+		disable_irq(dev->vpirq->start);
+
+	writel_iowmb(0x00000001, VCAP_VP_SW_RESET);
+	writel_iowmb(0x00000000, VCAP_VP_SW_RESET);
+}
+
+int config_vp_format(struct vcap_client_data *c_data)
+{
+	struct vcap_dev *dev = c_data->dev;
+
+	INIT_WORK(&dev->vp_to_vc_work.work, mov_buf_to_vc);
+	dev->vp_to_vc_work.cd = c_data;
+
+	/* SW restart VP */
+	writel_iowmb(0x00000001, VCAP_VP_SW_RESET);
+	writel_iowmb(0x00000000, VCAP_VP_SW_RESET);
+
+	/* Film Mode related settings */
+	writel_iowmb(0x00000000, VCAP_VP_FILM_PROJECTION_T0);
+	writel_relaxed(0x00000000, VCAP_VP_FILM_PROJECTION_T2);
+	writel_relaxed(0x00000000, VCAP_VP_FILM_PAST_MAX_PROJ);
+	writel_relaxed(0x00000000, VCAP_VP_FILM_PAST_MIN_PROJ);
+	writel_relaxed(0x00000000, VCAP_VP_FILM_SEQUENCE_HIST);
+	writel_relaxed(0x00000000, VCAP_VP_FILM_MODE_STATE);
+
+	writel_relaxed(0x00000000, VCAP_VP_BAL_VMOTION_STATE);
+	writel_relaxed(0x00000010, VCAP_VP_REDUCT_AVG_MOTION);
+	writel_relaxed(0x40000000, VCAP_VP_REDUCT_AVG_MOTION2);
+	writel_relaxed(0x40000000, VCAP_VP_NR_AVG_LUMA);
+	writel_relaxed(0x40000000, VCAP_VP_NR_AVG_CHROMA);
+	writel_relaxed(0x40000000, VCAP_VP_NR_CTRL_LUMA);
+	writel_relaxed(0x40000000, VCAP_VP_NR_CTRL_CHROMA);
+	writel_relaxed(0x00000000, VCAP_VP_BAL_AVG_BLEND);
+	writel_relaxed(0x00000000, VCAP_VP_VMOTION_HIST);
+	writel_relaxed(0x05047D19, VCAP_VP_FILM_ANALYSIS_CONFIG);
+	writel_relaxed(0x20260200, VCAP_VP_FILM_STATE_CONFIG);
+	writel_relaxed(0x23A60114, VCAP_VP_FVM_CONFIG);
+	writel_relaxed(0x03043210, VCAP_VP_FILM_ANALYSIS_CONFIG2);
+	writel_relaxed(0x04DB7A51, VCAP_VP_MIXED_ANALYSIS_CONFIG);
+	writel_relaxed(0x14224916, VCAP_VP_SPATIAL_CONFIG);
+	writel_relaxed(0x83270400, VCAP_VP_SPATIAL_CONFIG2);
+	writel_relaxed(0x0F000F92, VCAP_VP_SPATIAL_CONFIG3);
+	writel_relaxed(0x00000000, VCAP_VP_TEMPORAL_CONFIG);
+	writel_relaxed(0x00000000, VCAP_VP_PIXEL_DIFF_CONFIG);
+	writel_relaxed(0x0C090511, VCAP_VP_H_FREQ_CONFIG);
+	writel_relaxed(0x0A000000, VCAP_VP_NR_CONFIG);
+	writel_relaxed(0x008F4149, VCAP_VP_NR_LUMA_CONFIG);
+	writel_relaxed(0x008F4149, VCAP_VP_NR_CHROMA_CONFIG);
+	writel_relaxed(0x43C0FD0C, VCAP_VP_BAL_CONFIG);
+	writel_relaxed(0x00000255, VCAP_VP_BAL_MOTION_CONFIG);
+	writel_relaxed(0x24154252, VCAP_VP_BAL_LIGHT_COMB);
+	writel_relaxed(0x10024414, VCAP_VP_BAL_VMOTION_CONFIG);
+	writel_relaxed(0x00000002, VCAP_VP_NR_CONFIG2);
+	writel_relaxed((c_data->vp_out_fmt.height-1)<<16 |
+			(c_data->vp_out_fmt.width - 1), VCAP_VP_FRAME_SIZE);
+	writel_relaxed(0x00000000, VCAP_VP_SPLIT_SCRN_CTRL);
+
+	return 0;
+}
+
+int init_motion_buf(struct vcap_client_data *c_data)
+{
+	struct vcap_dev *dev = c_data->dev;
+	void *buf;
+	unsigned long motion_base_addr;
+	uint32_t size = ((c_data->vp_out_fmt.width + 63) >> 6) *
+		((c_data->vp_out_fmt.height + 7) >> 3) * 16;
+
+	if (c_data->vid_vp_action.bufMotion) {
+		pr_err("Motion buffer has already been created");
+		return -ENOEXEC;
+	}
+
+	buf = kzalloc(size, GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+
+	c_data->vid_vp_action.bufMotion = buf;
+	motion_base_addr = virt_to_phys(buf);
+	writel_iowmb(motion_base_addr, VCAP_VP_MOTION_EST_ADDR);
+	return 0;
+}
+
+void deinit_motion_buf(struct vcap_client_data *c_data)
+{
+	struct vcap_dev *dev = c_data->dev;
+	void *buf;
+
+	if (!c_data->vid_vp_action.bufMotion) {
+		dprintk(1, "Motion buffer has not been created");
+		return;
+	}
+
+	buf = c_data->vid_vp_action.bufMotion;
+
+	writel_iowmb(0x00000000, VCAP_VP_MOTION_EST_ADDR);
+	c_data->vid_vp_action.bufMotion = NULL;
+	kfree(buf);
+	return;
+}
+
+int init_nr_buf(struct vcap_client_data *c_data)
+{
+	struct vcap_dev *dev = c_data->dev;
+	struct nr_buffer *buf;
+	uint32_t frame_size, tot_size, rc;
+
+	if (c_data->vid_vp_action.bufNR.vaddr) {
+		pr_err("NR buffer has already been created");
+		return -ENOEXEC;
+	}
+	buf = &c_data->vid_vp_action.bufNR;
+
+	frame_size = c_data->vp_in_fmt.width * c_data->vp_in_fmt.height;
+	if (c_data->vp_in_fmt.pixfmt == V4L2_PIX_FMT_NV16)
+		tot_size = frame_size * 2;
+	else
+		tot_size = frame_size / 2 * 3;
+
+	buf->vaddr = kzalloc(tot_size, GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+
+	buf->paddr = virt_to_phys(buf->vaddr);
+	rc = readl_relaxed(VCAP_VP_NR_CONFIG2);
+	rc |= 0x02D00001;
+	writel_relaxed(rc, VCAP_VP_NR_CONFIG2);
+	writel_relaxed(buf->paddr, VCAP_VP_NR_T2_Y_BASE_ADDR);
+	writel_relaxed(buf->paddr + frame_size, VCAP_VP_NR_T2_C_BASE_ADDR);
+	buf->nr_pos = NRT2_BUF;
+	return 0;
+}
+
+void deinit_nr_buf(struct vcap_client_data *c_data)
+{
+	struct vcap_dev *dev = c_data->dev;
+	struct nr_buffer *buf;
+	uint32_t rc;
+
+	if (!c_data->vid_vp_action.bufNR.vaddr) {
+		pr_err("NR buffer has not been created");
+		return;
+	}
+
+	buf = &c_data->vid_vp_action.bufNR;
+
+	rc = readl_relaxed(VCAP_VP_NR_CONFIG2);
+	rc &= !(0x02D00001);
+	writel_relaxed(rc, VCAP_VP_NR_CONFIG2);
+
+	kfree(buf->vaddr);
+	buf->paddr = 0;
+	buf->vaddr = NULL;
+	return;
+}
+
+int kickoff_vp(struct vcap_client_data *c_data)
+{
+	struct vcap_dev *dev;
+	struct vp_action *vp_act;
+	unsigned long flags = 0;
+	unsigned int chroma_fmt = 0;
+	int size;
+#ifndef TOP_FIELD_FIX
+	bool top_field;
+#endif
+
+	if (!c_data->streaming)
+		return -ENOEXEC;
+
+	dev = c_data->dev;
+	dprintk(2, "Start Kickoff\n");
+
+	if (dev->vp_client == NULL) {
+		pr_err("No active vp client\n");
+		return -ENODEV;
+	}
+	vp_act = &dev->vp_client->vid_vp_action;
+
+	spin_lock_irqsave(&dev->vp_client->cap_slock, flags);
+	if (list_empty(&vp_act->in_active)) {
+		spin_unlock_irqrestore(&dev->vp_client->cap_slock, flags);
+		pr_err("%s: VP We have no more input buffers\n",
+				__func__);
+		return -EAGAIN;
+	}
+
+	vp_act->bufT1 = list_entry(vp_act->in_active.next,
+			struct vcap_buffer, list);
+	list_del(&vp_act->bufT1->list);
+
+	if (list_empty(&vp_act->in_active)) {
+		spin_unlock_irqrestore(&dev->vp_client->cap_slock, flags);
+		list_add(&vp_act->bufT1->list, &vp_act->in_active);
+		pr_err("%s: VP We have no more input buffers\n",
+				__func__);
+		return -EAGAIN;
+	}
+
+	vp_act->bufT2 = list_entry(vp_act->in_active.next,
+			struct vcap_buffer, list);
+	list_del(&vp_act->bufT2->list);
+
+	if (list_empty(&vp_act->out_active)) {
+		spin_unlock_irqrestore(&dev->vp_client->cap_slock, flags);
+		list_add(&vp_act->bufT2->list, &vp_act->in_active);
+		list_add(&vp_act->bufT1->list, &vp_act->in_active);
+		pr_err("%s: VP We have no more output buffers\n",
+				__func__);
+		return -EAGAIN;
+	}
+
+	vp_act->bufOut = list_entry(vp_act->out_active.next,
+			struct vcap_buffer, list);
+	list_del(&vp_act->bufOut->list);
+	spin_unlock_irqrestore(&dev->vp_client->cap_slock, flags);
+
+	size = c_data->vp_in_fmt.height * c_data->vp_in_fmt.width;
+	writel_relaxed(vp_act->bufT1->paddr, VCAP_VP_T1_Y_BASE_ADDR);
+	writel_relaxed(vp_act->bufT1->paddr + size, VCAP_VP_T1_C_BASE_ADDR);
+
+	config_in_buffer(c_data, vp_act->bufT2);
+	config_out_buffer(c_data, vp_act->bufOut);
+
+	/* Config VP */
+	if (c_data->vp_in_fmt.pixfmt == V4L2_PIX_FMT_NV16)
+		chroma_fmt = 1;
+	writel_relaxed((c_data->vp_in_fmt.width / 16) << 20 |
+			chroma_fmt << 11 | 0x2 << 4, VCAP_VP_IN_CONFIG);
+
+	chroma_fmt = 0;
+	if (c_data->vp_in_fmt.pixfmt == V4L2_PIX_FMT_NV16)
+		chroma_fmt = 1;
+
+	writel_relaxed((c_data->vp_in_fmt.width / 16) << 20 |
+			chroma_fmt << 11 | 0x1 << 4, VCAP_VP_OUT_CONFIG);
+
+	/* Enable Interrupt */
+#ifdef TOP_FIELD_FIX
+	vp_act->top_field = 1;
+#else
+	if (vp_act->bufT2->vb.v4l2_buf.field == V4L2_FIELD_TOP)
+		top_field = 1;
+#endif
+	vp_act->vp_state = VP_FRAME2;
+	writel_relaxed(0x01100101, VCAP_VP_INTERRUPT_ENABLE);
+#ifdef TOP_FIELD_FIX
+	writel_iowmb(0x00000000 | vp_act->top_field << 0, VCAP_VP_CTRL);
+	writel_iowmb(0x00030000 | vp_act->top_field << 0, VCAP_VP_CTRL);
+#else
+	writel_iowmb(0x00000000 | top_field, VCAP_VP_CTRL);
+	writel_iowmb(0x00030000 | top_field, VCAP_VP_CTRL);
+#endif
+	atomic_set(&c_data->dev->vp_enabled, 1);
+	enable_irq(dev->vpirq->start);
+	return 0;
+}
+
+int continue_vp(struct vcap_client_data *c_data)
+{
+	struct vcap_dev *dev;
+	struct vp_action *vp_act;
+	int rc;
+#ifndef TOP_FIELD_FIX
+	bool top_field;
+#endif
+
+	dprintk(2, "Start Continue\n");
+	dev = c_data->dev;
+
+	if (dev->vp_client == NULL) {
+		pr_err("No active vp client\n");
+		return -ENODEV;
+	}
+	vp_act = &dev->vp_client->vid_vp_action;
+
+	if (vp_act->vp_state == VP_UNKNOWN) {
+		pr_err("%s: VP is in an unknown state\n",
+				__func__);
+		return -EAGAIN;
+	}
+
+	rc = vp_setup_buffers(c_data);
+	if (rc < 0)
+		return rc;
+
+#ifndef TOP_FIELD_FIX
+	if (vp_act->bufT2->vb.v4l2_buf.field == V4L2_FIELD_TOP)
+		top_field = 1;
+#endif
+
+	/* Config VP & Enable Interrupt */
+	writel_relaxed(0x01100101, VCAP_VP_INTERRUPT_ENABLE);
+#ifdef TOP_FIELD_FIX
+	writel_iowmb(0x00000000 | vp_act->top_field << 0, VCAP_VP_CTRL);
+	writel_iowmb(0x00030000 | vp_act->top_field << 0, VCAP_VP_CTRL);
+#else
+	writel_iowmb(0x00000000 | top_field, VCAP_VP_CTRL);
+	writel_iowmb(0x00030000 | top_field, VCAP_VP_CTRL);
+#endif
+
+	atomic_set(&c_data->dev->vp_enabled, 1);
+	enable_irq(dev->vpirq->start);
+	return 0;
+}
diff --git a/drivers/media/video/vcap_vp.h b/drivers/media/video/vcap_vp.h
new file mode 100644
index 0000000..47ad8d4
--- /dev/null
+++ b/drivers/media/video/vcap_vp.h
@@ -0,0 +1,103 @@
+/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+#ifndef VCAP_VP_H
+#define VCAP_VP_H
+
+#include <linux/interrupt.h>
+
+#include <media/vcap_v4l2.h>
+
+#define VCAP_BASE (dev->vcapbase)
+#define VCAP_OFFSET(off) (VCAP_BASE + off)
+
+#define VCAP_VP_INT_STATUS (VCAP_BASE + 0x404)
+#define VCAP_VP_INT_CLEAR (VCAP_BASE + 0x40C)
+
+#define VCAP_VP_SW_RESET (VCAP_BASE + 0x410)
+#define VCAP_VP_INTERRUPT_ENABLE (VCAP_BASE + 0x408)
+
+#define VCAP_VP_FILM_PROJECTION_T0 (VCAP_BASE + 0x50C)
+#define VCAP_VP_FILM_PROJECTION_T2 (VCAP_BASE + 0x508)
+#define VCAP_VP_FILM_PAST_MAX_PROJ (VCAP_BASE + 0x510)
+#define VCAP_VP_FILM_PAST_MIN_PROJ (VCAP_BASE + 0x514)
+#define VCAP_VP_FILM_SEQUENCE_HIST (VCAP_BASE + 0x504)
+#define VCAP_VP_FILM_MODE_STATE (VCAP_BASE + 0x500)
+
+#define VCAP_VP_BAL_VMOTION_STATE (VCAP_BASE + 0x690)
+#define VCAP_VP_REDUCT_AVG_MOTION (VCAP_BASE + 0x610)
+#define VCAP_VP_REDUCT_AVG_MOTION2 (VCAP_BASE + 0x614)
+
+#define VCAP_VP_NR_AVG_LUMA (VCAP_BASE + 0x608)
+#define VCAP_VP_NR_AVG_CHROMA (VCAP_BASE + 0x60C)
+#define VCAP_VP_NR_CTRL_LUMA (VCAP_BASE + 0x600)
+#define VCAP_VP_NR_CTRL_CHROMA (VCAP_BASE + 0x604)
+
+#define VCAP_VP_BAL_AVG_BLEND (VCAP_BASE + 0x694)
+#define VCAP_VP_VMOTION_HIST (VCAP_BASE + 0x6F8)
+
+#define VCAP_VP_MOTION_EST_ADDR (VCAP_BASE + 0x4E0)
+#define VCAP_VP_FILM_ANALYSIS_CONFIG (VCAP_BASE + 0x520)
+#define VCAP_VP_FILM_STATE_CONFIG (VCAP_BASE + 0x524)
+
+#define VCAP_VP_FVM_CONFIG (VCAP_BASE + 0x550)
+#define VCAP_VP_FILM_ANALYSIS_CONFIG2 (VCAP_BASE + 0x52C)
+#define VCAP_VP_MIXED_ANALYSIS_CONFIG (VCAP_BASE + 0x530)
+
+#define VCAP_VP_SPATIAL_CONFIG (VCAP_BASE + 0x580)
+#define VCAP_VP_SPATIAL_CONFIG2 (VCAP_BASE + 0x584)
+#define VCAP_VP_SPATIAL_CONFIG3 (VCAP_BASE + 0x588)
+#define VCAP_VP_TEMPORAL_CONFIG (VCAP_BASE + 0x5C0)
+
+#define VCAP_VP_PIXEL_DIFF_CONFIG (VCAP_BASE + 0x6FC)
+#define VCAP_VP_H_FREQ_CONFIG (VCAP_BASE + 0x528)
+#define VCAP_VP_NR_CONFIG (VCAP_BASE + 0x620)
+#define VCAP_VP_NR_LUMA_CONFIG (VCAP_BASE + 0x624)
+#define VCAP_VP_NR_CHROMA_CONFIG (VCAP_BASE + 0x628)
+#define VCAP_VP_BAL_CONFIG (VCAP_BASE + 0x680)
+#define VCAP_VP_BAL_MOTION_CONFIG (VCAP_BASE + 0x684)
+#define VCAP_VP_BAL_LIGHT_COMB (VCAP_BASE + 0x688)
+#define VCAP_VP_BAL_VMOTION_CONFIG (VCAP_BASE + 0x68C)
+
+#define VCAP_VP_NR_CONFIG2 (VCAP_BASE + 0x484)
+#define VCAP_VP_FRAME_SIZE (VCAP_BASE + 0x48C)
+#define VCAP_VP_SPLIT_SCRN_CTRL (VCAP_BASE + 0x750)
+
+#define VCAP_VP_IN_CONFIG (VCAP_BASE + 0x480)
+#define VCAP_VP_OUT_CONFIG (VCAP_BASE + 0x488)
+
+#define VCAP_VP_T2_Y_BASE_ADDR (VCAP_BASE + 0x4C0)
+#define VCAP_VP_T2_C_BASE_ADDR (VCAP_BASE + 0x4C4)
+#define VCAP_VP_OUT_Y_BASE_ADDR (VCAP_BASE + 0x4CC)
+#define VCAP_VP_OUT_C_BASE_ADDR (VCAP_BASE + 0x4D0)
+#define VCAP_VP_OUT_CR_BASE_ADDR (VCAP_BASE + 0x4D4)
+
+#define VCAP_VP_CTRL (VCAP_BASE + 0x4D8)
+
+#define VCAP_VP_T1_Y_BASE_ADDR (VCAP_BASE + 0x4A8)
+#define VCAP_VP_T1_C_BASE_ADDR (VCAP_BASE + 0x4Ac)
+#define VCAP_VP_NR_T2_Y_BASE_ADDR (VCAP_BASE + 0x4B4)
+#define VCAP_VP_NR_T2_C_BASE_ADDR (VCAP_BASE + 0x4B8)
+
+#define VP_PIC_DONE (0x1 << 0)
+
+irqreturn_t vp_handler(struct vcap_dev *dev);
+int config_vp_format(struct vcap_client_data *c_data);
+void vp_stop_capture(struct vcap_client_data *c_data);
+int init_motion_buf(struct vcap_client_data *c_data);
+void deinit_motion_buf(struct vcap_client_data *c_data);
+int init_nr_buf(struct vcap_client_data *c_data);
+void deinit_nr_buf(struct vcap_client_data *c_data);
+int kickoff_vp(struct vcap_client_data *c_data);
+int continue_vp(struct vcap_client_data *c_data);
+
+#endif
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 9385087..8fce9a6 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -464,6 +464,11 @@
 			ext_csd[EXT_CSD_CACHE_SIZE + 1] << 8 |
 			ext_csd[EXT_CSD_CACHE_SIZE + 2] << 16 |
 			ext_csd[EXT_CSD_CACHE_SIZE + 3] << 24;
+
+		card->ext_csd.max_packed_writes =
+			ext_csd[EXT_CSD_MAX_PACKED_WRITES];
+		card->ext_csd.max_packed_reads =
+			ext_csd[EXT_CSD_MAX_PACKED_READS];
 	}
 
 out:
@@ -1183,6 +1188,25 @@
 		card->ext_csd.cache_ctrl = err ? 0 : 1;
 	}
 
+	if ((host->caps2 & MMC_CAP2_PACKED_CMD) &&
+			(card->ext_csd.max_packed_writes > 0) &&
+			(card->ext_csd.max_packed_reads > 0)) {
+		err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
+				EXT_CSD_EXP_EVENTS_CTRL,
+				EXT_CSD_PACKED_EVENT_EN,
+				card->ext_csd.generic_cmd6_time);
+		if (err && err != -EBADMSG)
+			goto free_card;
+		if (err) {
+			pr_warning("%s: Enabling packed event failed\n",
+					mmc_hostname(card->host));
+			card->ext_csd.packed_event_en = 0;
+			err = 0;
+		} else {
+			card->ext_csd.packed_event_en = 1;
+		}
+	}
+
 	if (!oldcard)
 		host->card = card;
 
diff --git a/drivers/net/wireless/wcnss/wcnss_wlan.c b/drivers/net/wireless/wcnss/wcnss_wlan.c
index cc95fcd..ad9dc7d 100644
--- a/drivers/net/wireless/wcnss/wcnss_wlan.c
+++ b/drivers/net/wireless/wcnss/wcnss_wlan.c
@@ -45,7 +45,7 @@
 	int		smd_channel_ready;
 	unsigned int	serial_number;
 	int		thermal_mitigation;
-	void		(*tm_notify)(int);
+	void		(*tm_notify)(struct device *, int);
 	struct wcnss_wlan_config wlan_config;
 	struct delayed_work wcnss_work;
 } *penv = NULL;
@@ -99,7 +99,7 @@
 		return -EINVAL;
 	penv->thermal_mitigation = value;
 	if (penv->tm_notify)
-		(penv->tm_notify)(value);
+		(penv->tm_notify)(dev, value);
 	return count;
 }
 
@@ -275,14 +275,16 @@
 }
 EXPORT_SYMBOL(wcnss_wlan_unregister_pm_ops);
 
-void wcnss_register_thermal_mitigation(void (*tm_notify)(int))
+void wcnss_register_thermal_mitigation(struct device *dev,
+				void (*tm_notify)(struct device *, int))
 {
-	if (penv && tm_notify)
+	if (penv && dev && tm_notify)
 		penv->tm_notify = tm_notify;
 }
 EXPORT_SYMBOL(wcnss_register_thermal_mitigation);
 
-void wcnss_unregister_thermal_mitigation(void (*tm_notify)(int))
+void wcnss_unregister_thermal_mitigation(
+				void (*tm_notify)(struct device *, int))
 {
 	if (penv && tm_notify) {
 		if (tm_notify != penv->tm_notify)
diff --git a/drivers/platform/msm/sps/sps_bam.c b/drivers/platform/msm/sps/sps_bam.c
index 0abd739..e0289ad 100644
--- a/drivers/platform/msm/sps/sps_bam.c
+++ b/drivers/platform/msm/sps/sps_bam.c
@@ -17,6 +17,7 @@
 #include <linux/slab.h>		/* kzalloc() */
 #include <linux/interrupt.h>	/* request_irq() */
 #include <linux/memory.h>	/* memset */
+#include <linux/vmalloc.h>
 
 #include "sps_bam.h"
 #include "bam.h"
@@ -914,7 +915,11 @@
 		dev->pipe_remote_mask &= ~(1UL << pipe_index);
 		bam_pipe_exit(dev->base, pipe_index, dev->props.ee);
 		if (pipe->sys.desc_cache != NULL) {
-			kfree(pipe->sys.desc_cache);
+			u32 size = pipe->num_descs * sizeof(void *);
+			if (pipe->desc_size + size <= PAGE_SIZE)
+				kfree(pipe->sys.desc_cache);
+			else
+				vfree(pipe->sys.desc_cache);
 			pipe->sys.desc_cache = NULL;
 		}
 		dev->pipes[pipe_index] = BAM_PIPE_UNASSIGNED;
@@ -1034,8 +1039,16 @@
 	    && (pipe->state & BAM_STATE_BAM2BAM) == 0) {
 		/* Allocate both descriptor cache and user pointer array */
 		size = pipe->num_descs * sizeof(void *);
-		pipe->sys.desc_cache =
-		kzalloc(pipe->desc_size + size, GFP_KERNEL);
+
+		if (pipe->desc_size + size <= PAGE_SIZE)
+			pipe->sys.desc_cache =
+				kzalloc(pipe->desc_size + size, GFP_KERNEL);
+		else {
+			pipe->sys.desc_cache =
+				vmalloc(pipe->desc_size + size);
+			memset(pipe->sys.desc_cache, 0, pipe->desc_size + size);
+		}
+
 		if (pipe->sys.desc_cache == NULL) {
 			/*** MUST BE LAST POINT OF FAILURE (see below) *****/
 			SPS_ERR("sps:Desc cache error: BAM 0x%x pipe %d: %d",
diff --git a/include/linux/input.h b/include/linux/input.h
index 6e7d6d9..191f7d7 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -817,7 +817,8 @@
 #define SW_ROTATE_LOCK		0x0c  /* set = rotate locked/disabled */
 #define SW_HPHL_OVERCURRENT	0x0d  /* set = over current on left hph */
 #define SW_HPHR_OVERCURRENT	0x0e  /* set = over current on right hph */
-#define SW_MAX			0x0f
+#define SW_UNSUPPORT_INSERT	0x0f  /* set = unsupported device inserted */
+#define SW_MAX			0x10
 #define SW_CNT			(SW_MAX+1)
 
 /*
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index aa808dc..14f2d43 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -52,6 +52,9 @@
 	u8			part_config;
 	u8			cache_ctrl;
 	u8			rst_n_function;
+	u8			max_packed_writes;
+	u8			max_packed_reads;
+	u8			packed_event_en;
 	unsigned int		part_time;		/* Units: ms */
 	unsigned int		sa_timeout;		/* Units: 100ns */
 	unsigned int		generic_cmd6_time;	/* Units: 10ms */
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index cbd4fbd..2489bb5 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -249,7 +249,11 @@
 #define MMC_CAP2_HS200_1_2V_SDR	(1 << 6)        /* can support */
 #define MMC_CAP2_HS200		(MMC_CAP2_HS200_1_8V_SDR | \
 				 MMC_CAP2_HS200_1_2V_SDR)
-#define MMC_CAP2_DETECT_ON_ERR	(1 << 8)	/* On I/O err check card removal */
+#define MMC_CAP2_DETECT_ON_ERR	(1 << 7)	/* On I/O err check card removal */
+#define MMC_CAP2_PACKED_RD	(1 << 10)	/* Allow packed read */
+#define MMC_CAP2_PACKED_WR	(1 << 11)	/* Allow packed write */
+#define MMC_CAP2_PACKED_CMD	(MMC_CAP2_PACKED_RD | \
+				 MMC_CAP2_PACKED_WR) /* Allow packed commands */
 	mmc_pm_flag_t		pm_caps;	/* supported pm features */
 	unsigned int        power_notify_type;
 #define MMC_HOST_PW_NOTIFY_NONE		0
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index e124fbe..06539dff 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -140,6 +140,7 @@
 #define R1_READY_FOR_DATA	(1 << 8)	/* sx, a */
 #define R1_SWITCH_ERROR		(1 << 7)	/* sx, c */
 #define R1_APP_CMD		(1 << 5)	/* sr, c */
+#define R1_EXP_EVENT		(1 << 6)	/* sr, a */
 
 #define R1_STATE_IDLE	0
 #define R1_STATE_READY	1
@@ -275,6 +276,10 @@
 #define EXT_CSD_FLUSH_CACHE		32      /* W */
 #define EXT_CSD_CACHE_CTRL		33      /* R/W */
 #define EXT_CSD_POWER_OFF_NOTIFICATION	34	/* R/W */
+#define EXT_CSD_PACKED_FAILURE_INDEX	35	/* RO */
+#define EXT_CSD_PACKED_CMD_STATUS	36	/* RO */
+#define EXT_CSD_EXP_EVENTS_STATUS	54	/* RO, 2 bytes */
+#define EXT_CSD_EXP_EVENTS_CTRL	56	/* R/W, 2 bytes */
 #define EXT_CSD_PARTITION_ATTRIBUTE	156	/* R/W */
 #define EXT_CSD_PARTITION_SUPPORT	160	/* RO */
 #define EXT_CSD_HPI_MGMT		161	/* R/W */
@@ -314,6 +319,8 @@
 #define EXT_CSD_POWER_OFF_LONG_TIME	247	/* RO */
 #define EXT_CSD_GENERIC_CMD6_TIME	248	/* RO */
 #define EXT_CSD_CACHE_SIZE		249	/* RO, 4 bytes */
+#define EXT_CSD_MAX_PACKED_WRITES	500	/* RO */
+#define EXT_CSD_MAX_PACKED_READS	501	/* RO */
 #define EXT_CSD_HPI_FEATURES		503	/* RO */
 
 /*
@@ -426,6 +433,14 @@
 #define EXT_CSD_PWR_CL_4BIT_MASK	0x0F	/* 8 bit PWR CLS */
 #define EXT_CSD_PWR_CL_8BIT_SHIFT	4
 #define EXT_CSD_PWR_CL_4BIT_SHIFT	0
+
+#define EXT_CSD_PACKED_EVENT_EN	(1 << 3)
+
+#define EXT_CSD_PACKED_FAILURE	(1 << 3)
+
+#define EXT_CSD_PACKED_GENERIC_ERROR	(1 << 0)
+#define EXT_CSD_PACKED_INDEXED_ERROR	(1 << 1)
+
 /*
  * MMC_SWITCH access modes
  */
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index cb394e8..b4e14d2 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -292,7 +292,7 @@
 #define INPUT_DEVICE_ID_LED_MAX		0x0f
 #define INPUT_DEVICE_ID_SND_MAX		0x07
 #define INPUT_DEVICE_ID_FF_MAX		0x7f
-#define INPUT_DEVICE_ID_SW_MAX		0x0f
+#define INPUT_DEVICE_ID_SW_MAX		0x10
 
 #define INPUT_DEVICE_ID_MATCH_BUS	1
 #define INPUT_DEVICE_ID_MATCH_VENDOR	2
diff --git a/include/linux/wcnss_wlan.h b/include/linux/wcnss_wlan.h
index 1c492f9..d7e65b0 100644
--- a/include/linux/wcnss_wlan.h
+++ b/include/linux/wcnss_wlan.h
@@ -35,8 +35,10 @@
 				const struct dev_pm_ops *pm_ops);
 void wcnss_wlan_unregister_pm_ops(struct device *dev,
 				const struct dev_pm_ops *pm_ops);
-void wcnss_register_thermal_mitigation(void (*tm_notify)(int));
-void wcnss_unregister_thermal_mitigation(void (*tm_notify)(int));
+void wcnss_register_thermal_mitigation(struct device *dev,
+				void (*tm_notify)(struct device *dev, int));
+void wcnss_unregister_thermal_mitigation(
+				void (*tm_notify)(struct device *dev, int));
 struct platform_device *wcnss_get_platform_device(void);
 struct wcnss_wlan_config *wcnss_get_wlan_config(void);
 int wcnss_wlan_power(struct device *dev,
diff --git a/include/media/vcap_fmt.h b/include/media/vcap_fmt.h
index e69f9b0..51b45ac 100644
--- a/include/media/vcap_fmt.h
+++ b/include/media/vcap_fmt.h
@@ -70,6 +70,7 @@
 	enum vcap_type type;
 	union {
 		struct v4l2_format_vc_ext timing;
+		struct v4l2_pix_format pix;
 		/* Once VP is created there will be another type in here */
 	} u;
 };
diff --git a/include/media/vcap_v4l2.h b/include/media/vcap_v4l2.h
index 57f9703..374e681 100644
--- a/include/media/vcap_v4l2.h
+++ b/include/media/vcap_v4l2.h
@@ -14,6 +14,7 @@
 #ifndef VCAP_V4L2_H
 #define VCAP_V4L2_H
 
+#define TOP_FIELD_FIX
 #ifdef __KERNEL__
 #include <linux/types.h>
 #include <linux/videodev2.h>
@@ -28,6 +29,12 @@
 #include <media/vcap_fmt.h>
 #include <mach/board.h>
 
+#define writel_iowmb(val, addr)		\
+	do {							\
+		__iowmb();					\
+		writel_relaxed(val, addr);	\
+	} while (0)
+
 struct vcap_client_data;
 
 enum rdy_buf {
@@ -37,11 +44,34 @@
 	VC_BUF1N2 = 0x11 << 1,
 };
 
+enum vp_state {
+	VP_UNKNOWN = 0,
+	VP_FRAME1,
+	VP_FRAME2,
+	VP_FRAME3,
+	VP_NORMAL,
+};
+
+enum nr_buf_pos {
+	BUF_NOT_IN_USE = 0,
+	NRT2_BUF,
+	T1_BUF,
+	T0_BUF,
+	TM1_BUF,
+};
+
 struct vcap_buf_info {
 	unsigned long vaddr;
 	unsigned long size;
 };
 
+enum vcap_op_mode {
+	UNKNOWN_VCAP_OP = 0,
+	VC_VCAP_OP,
+	VP_VCAP_OP,
+	VC_AND_VP_VCAP_OP,
+};
+
 struct vcap_action {
 	struct list_head		active;
 
@@ -61,13 +91,50 @@
 	int						ini_jiffies;
 };
 
+struct nr_buffer {
+	void						*vaddr;
+	unsigned long				paddr;
+	enum nr_buf_pos				nr_pos;
+};
+
+struct vp_action {
+	struct list_head		in_active;
+	struct list_head		out_active;
+
+	/* Buffer index */
+	enum vp_state			vp_state;
+#ifdef TOP_FIELD_FIX
+	bool					top_field;
+#endif
+
+	/* Buffers inside vc */
+	struct vcap_buffer      *bufTm1;
+	struct vcap_buffer      *bufT0;
+	struct vcap_buffer      *bufT1;
+	struct vcap_buffer      *bufT2;
+	struct vcap_buffer      *bufNRT2;
+
+	struct vcap_buffer      *bufOut;
+
+	void					*bufMotion;
+	struct nr_buffer		bufNR;
+	bool					nr_enabled;
+};
+
+struct vp_work_t {
+	struct work_struct work;
+	struct vcap_client_data *cd;
+	uint32_t irq;
+};
+
 struct vcap_dev {
 	struct v4l2_device		v4l2_dev;
 
 	struct video_device		*vfd;
 	struct ion_client       *ion_client;
 
-	struct resource         *vcapirq;
+	struct resource         *vcirq;
+	struct resource         *vpirq;
 
 	struct resource			*vcapmem;
 	struct resource			*vcapio;
@@ -87,15 +154,20 @@
 	struct vcap_client_data *vp_client;
 
 	atomic_t			    vc_enabled;
+	atomic_t			    vp_enabled;
+
 	atomic_t				vc_resource;
 	atomic_t				vp_resource;
+
+	struct workqueue_struct	*vcap_wq;
+	struct vp_work_t		vp_work;
+	struct vp_work_t		vc_to_vp_work;
+	struct vp_work_t		vp_to_vc_work;
 };
 
 struct vp_format_data {
 	unsigned int		width, height;
-	unsigned int		pixelformat;
-	enum v4l2_field		field;
-
+	unsigned int		pixfmt;
 };
 
 struct vcap_buffer {
@@ -107,18 +179,23 @@
 };
 
 struct vcap_client_data {
+	bool set_cap, set_decode, set_vp_o;
 	struct vcap_dev *dev;
 
 	struct vb2_queue		vc_vidq;
-	/*struct vb2_queue		vb__vidq;*/
-	/*struct vb2_queue		vb_cap_vidq;*/
+	struct vb2_queue		vp_in_vidq;
+	struct vb2_queue		vp_out_vidq;
+
+	enum vcap_op_mode		op_mode;
 
 	struct v4l2_format_vc_ext vc_format;
 
 	enum v4l2_buf_type		vp_buf_type_field;
-	struct vp_format_data	vp_format;
+	struct vp_format_data	vp_in_fmt;
+	struct vp_format_data	vp_out_fmt;
 
 	struct vcap_action		vid_vc_action;
+	struct vp_action		vid_vp_action;
 	struct workqueue_struct *vcap_work_q;
 	struct ion_handle			*vc_ion_handle;
 
@@ -126,7 +203,20 @@
 	uint32_t				hold_vp;
 
 	spinlock_t				cap_slock;
+	bool					streaming;
 };
 
+struct vcap_hacked_vals {
+	uint32_t	value;
+	uint32_t	offset;
+};
+
+extern struct vcap_hacked_vals hacked_buf[];
+
 #endif
+int free_ion_handle(struct vcap_dev *dev, struct vb2_queue *q,
+					 struct v4l2_buffer *b);
+
+int get_phys_addr(struct vcap_dev *dev, struct vb2_queue *q,
+				  struct v4l2_buffer *b);
 #endif
diff --git a/include/sound/jack.h b/include/sound/jack.h
index ccdc341..1b13cbb 100644
--- a/include/sound/jack.h
+++ b/include/sound/jack.h
@@ -35,24 +35,26 @@
  * sound/core/jack.c.
  */
 enum snd_jack_types {
-	SND_JACK_HEADPHONE	= 0x0001,
-	SND_JACK_MICROPHONE	= 0x0002,
+	SND_JACK_HEADPHONE	= 0x0000001,
+	SND_JACK_MICROPHONE	= 0x0000002,
 	SND_JACK_HEADSET	= SND_JACK_HEADPHONE | SND_JACK_MICROPHONE,
-	SND_JACK_LINEOUT	= 0x0004,
-	SND_JACK_MECHANICAL	= 0x0008, /* If detected separately */
-	SND_JACK_VIDEOOUT	= 0x0010,
+	SND_JACK_LINEOUT	= 0x0000004,
+	SND_JACK_MECHANICAL	= 0x0000008, /* If detected separately */
+	SND_JACK_VIDEOOUT	= 0x0000010,
 	SND_JACK_AVOUT		= SND_JACK_LINEOUT | SND_JACK_VIDEOOUT,
-	SND_JACK_OC_HPHL	= 0x0020,
-	SND_JACK_OC_HPHR	= 0x0040,
+	/* */
+	SND_JACK_OC_HPHL	= 0x0000020,
+	SND_JACK_OC_HPHR	= 0x0000040,
+	SND_JACK_UNSUPPORTED	= 0x0000080,
 	/* Kept separate from switches to facilitate implementation */
-	SND_JACK_BTN_0		= 0x4000,
-	SND_JACK_BTN_1		= 0x2000,
-	SND_JACK_BTN_2		= 0x1000,
-	SND_JACK_BTN_3		= 0x0800,
-	SND_JACK_BTN_4		= 0x0400,
-	SND_JACK_BTN_5		= 0x0200,
-	SND_JACK_BTN_6		= 0x0100,
-	SND_JACK_BTN_7		= 0x0080,
+	SND_JACK_BTN_0		= 0x4000000,
+	SND_JACK_BTN_1		= 0x2000000,
+	SND_JACK_BTN_2		= 0x1000000,
+	SND_JACK_BTN_3		= 0x0800000,
+	SND_JACK_BTN_4		= 0x0400000,
+	SND_JACK_BTN_5		= 0x0200000,
+	SND_JACK_BTN_6		= 0x0100000,
+	SND_JACK_BTN_7		= 0x0080000,
 };
 
 struct snd_jack {
diff --git a/sound/core/jack.c b/sound/core/jack.c
index 80453a9..675f45b 100644
--- a/sound/core/jack.c
+++ b/sound/core/jack.c
@@ -32,6 +32,7 @@
 	SW_VIDEOOUT_INSERT,
 	SW_HPHL_OVERCURRENT,
 	SW_HPHR_OVERCURRENT,
+	SW_UNSUPPORT_INSERT,
 };
 
 static int snd_jack_dev_free(struct snd_device *device)
