Merge "gpu: ion: Return error value when iommu map fails"
diff --git a/arch/arm/boot/dts/msm-pm8941.dtsi b/arch/arm/boot/dts/msm-pm8941.dtsi
old mode 100755
new mode 100644
diff --git a/arch/arm/boot/dts/msm8974-mtp.dts b/arch/arm/boot/dts/msm8974-mtp.dts
index 1af468a..d3e0bc3 100644
--- a/arch/arm/boot/dts/msm8974-mtp.dts
+++ b/arch/arm/boot/dts/msm8974-mtp.dts
@@ -140,6 +140,19 @@
debounce-interval = <15>;
};
};
+
+ spi@f9923000 {
+ ethernet-switch@2 {
+ compatible = "micrel,ks8851";
+ reg = <2>;
+ interrupt-parent = <&msmgpio>;
+ interrupts = <94 0>;
+ spi-max-frequency = <4800000>;
+ rst-gpio = <&pm8941_mpps 6 0>;
+ vdd-io-supply = <&spi_eth_vreg>;
+ vdd-phy-supply = <&spi_eth_vreg>;
+ };
+ };
};
&sdcc2 {
diff --git a/arch/arm/boot/dts/msm8974.dtsi b/arch/arm/boot/dts/msm8974.dtsi
index 918f1f0..fe60c83 100644
--- a/arch/arm/boot/dts/msm8974.dtsi
+++ b/arch/arm/boot/dts/msm8974.dtsi
@@ -122,6 +122,8 @@
vdd-supply = <&pm8941_l20>;
vdd-io-supply = <&pm8941_s3>;
+ qcom,sdcc-vdd-always_on;
+ qcom,sdcc-vdd-lpm_sup;
qcom,sdcc-vdd-voltage_level = <2950000 2950000>;
qcom,sdcc-vdd-current_level = <800 500000>;
diff --git a/arch/arm/mach-msm/acpuclock-8064.c b/arch/arm/mach-msm/acpuclock-8064.c
index a9521f0..3c80875 100644
--- a/arch/arm/mach-msm/acpuclock-8064.c
+++ b/arch/arm/mach-msm/acpuclock-8064.c
@@ -122,6 +122,7 @@
[13] = { { 1080000, HFPLL, 1, 0, 0x28 }, 1150000, 1150000, 5 },
[14] = { { 1134000, HFPLL, 1, 0, 0x2A }, 1150000, 1150000, 5 },
[15] = { { 1188000, HFPLL, 1, 0, 0x2C }, 1150000, 1150000, 5 },
+ { }
};
static struct acpu_level acpu_freq_tbl_slow[] __initdata = {
diff --git a/arch/arm/mach-msm/acpuclock-8627.c b/arch/arm/mach-msm/acpuclock-8627.c
index 1642dae..07a7f8f 100644
--- a/arch/arm/mach-msm/acpuclock-8627.c
+++ b/arch/arm/mach-msm/acpuclock-8627.c
@@ -104,6 +104,7 @@
[9] = { { 864000, HFPLL, 1, 0, 0x20 }, LVL_HIGH, 1150000, 4 },
[10] = { { 918000, HFPLL, 1, 0, 0x22 }, LVL_HIGH, 1150000, 4 },
[11] = { { 972000, HFPLL, 1, 0, 0x24 }, LVL_HIGH, 1150000, 4 },
+ { }
};
/* TODO: Update core voltages when data is available. */
diff --git a/arch/arm/mach-msm/acpuclock-8930.c b/arch/arm/mach-msm/acpuclock-8930.c
index 782ee60..77876ee 100644
--- a/arch/arm/mach-msm/acpuclock-8930.c
+++ b/arch/arm/mach-msm/acpuclock-8930.c
@@ -144,6 +144,7 @@
[13] = { { 1080000, HFPLL, 1, 0, 0x28 }, LVL_HIGH, 1150000, 7 },
[14] = { { 1134000, HFPLL, 1, 0, 0x2A }, LVL_HIGH, 1150000, 7 },
[15] = { { 1188000, HFPLL, 1, 0, 0x2C }, LVL_HIGH, 1150000, 7 },
+ { }
};
static struct acpu_level acpu_freq_tbl_slow[] __initdata = {
diff --git a/arch/arm/mach-msm/acpuclock-8930aa.c b/arch/arm/mach-msm/acpuclock-8930aa.c
index 34ba1da..dbc3e32 100644
--- a/arch/arm/mach-msm/acpuclock-8930aa.c
+++ b/arch/arm/mach-msm/acpuclock-8930aa.c
@@ -111,6 +111,7 @@
[13] = { { 1080000, HFPLL, 1, 0, 0x28 }, LVL_HIGH, 1150000, 7 },
[14] = { { 1134000, HFPLL, 1, 0, 0x2A }, LVL_HIGH, 1150000, 7 },
[15] = { { 1188000, HFPLL, 1, 0, 0x2C }, LVL_HIGH, 1150000, 7 },
+ { }
};
static struct acpu_level acpu_freq_tbl_slow[] __initdata = {
diff --git a/arch/arm/mach-msm/acpuclock-8960.c b/arch/arm/mach-msm/acpuclock-8960.c
index 8cc4b13..631bd7e 100644
--- a/arch/arm/mach-msm/acpuclock-8960.c
+++ b/arch/arm/mach-msm/acpuclock-8960.c
@@ -109,6 +109,7 @@
[16] = { { 1242000, HFPLL, 1, 0, 0x2E }, 1150000, 1150000, 6 },
[17] = { { 1296000, HFPLL, 1, 0, 0x30 }, 1150000, 1150000, 6 },
[18] = { { 1350000, HFPLL, 1, 0, 0x32 }, 1150000, 1150000, 6 },
+ { }
};
static struct acpu_level acpu_freq_tbl_slow[] __initdata = {
diff --git a/arch/arm/mach-msm/acpuclock-8960ab.c b/arch/arm/mach-msm/acpuclock-8960ab.c
index 3c42090..63bff55 100644
--- a/arch/arm/mach-msm/acpuclock-8960ab.c
+++ b/arch/arm/mach-msm/acpuclock-8960ab.c
@@ -99,6 +99,7 @@
[7] = { { 1134000, HFPLL, 1, 0, 0x2A }, 1150000, 1150000, 5 },
[8] = { { 1242000, HFPLL, 1, 0, 0x2E }, 1150000, 1150000, 5 },
[9] = { { 1350000, HFPLL, 1, 0, 0x32 }, 1150000, 1150000, 5 },
+ { }
};
static struct acpu_level acpu_freq_tbl_slow[] __initdata = {
diff --git a/arch/arm/mach-msm/acpuclock-8974.c b/arch/arm/mach-msm/acpuclock-8974.c
index f0b1231..16f77ba 100644
--- a/arch/arm/mach-msm/acpuclock-8974.c
+++ b/arch/arm/mach-msm/acpuclock-8974.c
@@ -134,6 +134,7 @@
[23] = { { 2035200, HFPLL, 1, 0, 106 }, LVL_HIGH, 1050000, 3 },
[24] = { { 2112000, HFPLL, 1, 0, 110 }, LVL_HIGH, 1050000, 3 },
[25] = { { 2188800, HFPLL, 1, 0, 114 }, LVL_HIGH, 1050000, 3 },
+ { }
};
static struct acpu_level acpu_freq_tbl[] __initdata = {
diff --git a/arch/arm/mach-msm/board-8064-pmic.c b/arch/arm/mach-msm/board-8064-pmic.c
index 3c3293d..3b47d2e 100644
--- a/arch/arm/mach-msm/board-8064-pmic.c
+++ b/arch/arm/mach-msm/board-8064-pmic.c
@@ -142,6 +142,10 @@
PM8921_GPIO_INPUT(17, PM_GPIO_PULL_UP_1P5), /* SD_WP */
};
+static struct pm8xxx_gpio_init pm8921_mpq8064_hrd_gpios[] __initdata = {
+ PM8921_GPIO_OUTPUT(37, 0, LOW), /* MUX1_SEL */
+};
+
/* Initial PM8917 GPIO configurations */
static struct pm8xxx_gpio_init pm8917_gpios[] __initdata = {
PM8921_GPIO_OUTPUT(14, 1, HIGH), /* HDMI Mux Selector */
@@ -223,6 +227,10 @@
apq8064_configure_gpios(pm8921_mpq_gpios,
ARRAY_SIZE(pm8921_mpq_gpios));
+ if (machine_is_mpq8064_hrd())
+ apq8064_configure_gpios(pm8921_mpq8064_hrd_gpios,
+ ARRAY_SIZE(pm8921_mpq8064_hrd_gpios));
+
for (i = 0; i < ARRAY_SIZE(pm8xxx_mpps); i++) {
rc = pm8xxx_mpp_config(pm8xxx_mpps[i].mpp,
&pm8xxx_mpps[i].config);
diff --git a/arch/arm/mach-msm/board-8960-display.c b/arch/arm/mach-msm/board-8960-display.c
index ac4e363..3052902 100644
--- a/arch/arm/mach-msm/board-8960-display.c
+++ b/arch/arm/mach-msm/board-8960-display.c
@@ -586,6 +586,8 @@
.mem_hid = MEMTYPE_EBI1,
#endif
.cont_splash_enabled = 0x01,
+ .splash_screen_addr = 0x00,
+ .splash_screen_size = 0x00,
.mdp_iommu_split_domain = 0,
};
diff --git a/arch/arm/mach-msm/board-8960.c b/arch/arm/mach-msm/board-8960.c
index 8deb648..a54c3e2 100644
--- a/arch/arm/mach-msm/board-8960.c
+++ b/arch/arm/mach-msm/board-8960.c
@@ -2380,7 +2380,6 @@
static struct msm_i2c_platform_data msm8960_i2c_qup_gsbi4_pdata = {
.clk_freq = 100000,
.src_clk_rate = 24000000,
- .keep_ahb_clk_on = 1,
};
static struct msm_i2c_platform_data msm8960_i2c_qup_gsbi3_pdata = {
@@ -2801,6 +2800,9 @@
static void __init msm8960_i2c_init(void)
{
+ if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE)
+ msm8960_i2c_qup_gsbi4_pdata.keep_ahb_clk_on = 1;
+
msm8960_device_qup_i2c_gsbi4.dev.platform_data =
&msm8960_i2c_qup_gsbi4_pdata;
diff --git a/arch/arm/mach-msm/include/mach/board.h b/arch/arm/mach-msm/include/mach/board.h
index d4d2fca..306011a 100644
--- a/arch/arm/mach-msm/include/mach/board.h
+++ b/arch/arm/mach-msm/include/mach/board.h
@@ -395,6 +395,8 @@
u32 ov1_wb_size; /* overlay1 writeback size */
u32 mem_hid;
char cont_splash_enabled;
+ u32 splash_screen_addr;
+ u32 splash_screen_size;
char mdp_iommu_split_domain;
};
diff --git a/drivers/char/diag/diagfwd.c b/drivers/char/diag/diagfwd.c
index 884e5fe..c827ec7 100644
--- a/drivers/char/diag/diagfwd.c
+++ b/drivers/char/diag/diagfwd.c
@@ -16,6 +16,7 @@
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/sched.h>
+#include <linux/ratelimit.h>
#include <linux/workqueue.h>
#include <linux/pm_runtime.h>
#include <linux/diagchar.h>
@@ -439,7 +440,8 @@
diagmem_free(driver,
write_ptr_mdm,
POOL_TYPE_HSIC_WRITE);
- pr_err("diag: HSIC write failure\n");
+ pr_err_ratelimited("diag: HSIC write failure, err: %d\n",
+ err);
}
} else {
pr_err("diag: allocate write fail\n");
diff --git a/drivers/char/diag/diagfwd_hsic.c b/drivers/char/diag/diagfwd_hsic.c
index 0b1f720..3878a82 100644
--- a/drivers/char/diag/diagfwd_hsic.c
+++ b/drivers/char/diag/diagfwd_hsic.c
@@ -71,6 +71,13 @@
write_ptrs_available--;
+ /*
+ * No sense queuing a read if the hsic bridge was
+ * closed in another thread
+ */
+ if (!driver->hsic_ch)
+ break;
+
buf_in_hsic = diagmem_alloc(driver, READ_HSIC_BUF_SIZE,
POOL_TYPE_HSIC);
if (buf_in_hsic) {
@@ -107,7 +114,8 @@
* (-ENODEV is an unrecoverable error), then set up the next read
*/
if ((driver->count_hsic_pool < driver->poolsize_hsic) &&
- (num_reads_submitted == 0) && (err != -ENODEV))
+ (num_reads_submitted == 0) && (err != -ENODEV) &&
+ (driver->hsic_ch != 0))
queue_work(driver->diag_bridge_wq,
&driver->diag_read_hsic_work);
}
@@ -146,7 +154,7 @@
/* If an error, return buffer to the pool */
if (err) {
diagmem_free(driver, buf, POOL_TYPE_HSIC);
- pr_err("diag: In %s, error calling diag_device_write, err: %d\n",
+ pr_err_ratelimited("diag: In %s, error calling diag_device_write, err: %d\n",
__func__, err);
}
}
diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c
index 7317702..cf7f3ce 100644
--- a/drivers/gpu/msm/adreno.c
+++ b/drivers/gpu/msm/adreno.c
@@ -336,13 +336,6 @@
device->mmu.setstate_memory.gpuaddr +
KGSL_IOMMU_SETSTATE_NOP_OFFSET);
}
- /* invalidate all base pointers */
- *cmds++ = cp_type3_packet(CP_INVALIDATE_STATE, 1);
- *cmds++ = 0x7fff;
-
- cmds += __adreno_add_idle_indirect_cmds(cmds,
- device->mmu.setstate_memory.gpuaddr +
- KGSL_IOMMU_SETSTATE_NOP_OFFSET);
}
if (flags & KGSL_MMUFLAGS_TLBFLUSH) {
/*
@@ -386,6 +379,10 @@
sizedwords += (cmds - &link[0]);
if (sizedwords) {
+ /* invalidate all base pointers */
+ *cmds++ = cp_type3_packet(CP_INVALIDATE_STATE, 1);
+ *cmds++ = 0x7fff;
+ sizedwords += 2;
/*
* add an interrupt at the end of commands so that the smmu
* disable clock off function will get called
diff --git a/drivers/gpu/msm/adreno_a2xx.c b/drivers/gpu/msm/adreno_a2xx.c
index ea2cdc4..3fb729b 100644
--- a/drivers/gpu/msm/adreno_a2xx.c
+++ b/drivers/gpu/msm/adreno_a2xx.c
@@ -1983,10 +1983,10 @@
0x18000000);
}
- if (adreno_is_a203(adreno_dev))
- /* For A203 increase number of clocks that RBBM
- * will wait before de-asserting Register Clock
- * Active signal */
+ if (adreno_is_a20x(adreno_dev))
+ /* For A20X based targets increase number of clocks
+ * that RBBM will wait before de-asserting Register
+ * Clock Active signal */
adreno_regwrite(device, REG_RBBM_CNTL, 0x0000FFFF);
else
adreno_regwrite(device, REG_RBBM_CNTL, 0x00004442);
diff --git a/drivers/gpu/msm/kgsl.c b/drivers/gpu/msm/kgsl.c
index 7241201..f630f2a 100644
--- a/drivers/gpu/msm/kgsl.c
+++ b/drivers/gpu/msm/kgsl.c
@@ -1380,104 +1380,6 @@
return vma;
}
-static long
-kgsl_ioctl_sharedmem_from_vmalloc(struct kgsl_device_private *dev_priv,
- unsigned int cmd, void *data)
-{
- int result = 0, len = 0;
- struct kgsl_process_private *private = dev_priv->process_priv;
- struct kgsl_sharedmem_from_vmalloc *param = data;
- struct kgsl_mem_entry *entry = NULL;
- struct vm_area_struct *vma;
-
- KGSL_DEV_ERR_ONCE(dev_priv->device, "IOCTL_KGSL_SHAREDMEM_FROM_VMALLOC"
- " is deprecated\n");
- if (!kgsl_mmu_enabled())
- return -ENODEV;
-
- if (!param->hostptr) {
- KGSL_CORE_ERR("invalid hostptr %x\n", param->hostptr);
- result = -EINVAL;
- goto error;
- }
-
- vma = kgsl_get_vma_from_start_addr(param->hostptr);
- if (!vma) {
- result = -EINVAL;
- goto error;
- }
-
- /*
- * If the user specified a length, use it, otherwise try to
- * infer the length if the vma region
- */
- if (param->gpuaddr != 0) {
- len = param->gpuaddr;
- } else {
- /*
- * For this to work, we have to assume the VMA region is only
- * for this single allocation. If it isn't, then bail out
- */
- if (vma->vm_pgoff || (param->hostptr != vma->vm_start)) {
- KGSL_CORE_ERR("VMA region does not match hostaddr\n");
- result = -EINVAL;
- goto error;
- }
-
- len = vma->vm_end - vma->vm_start;
- }
-
- /* Make sure it fits */
- if (len == 0 || param->hostptr + len > vma->vm_end) {
- KGSL_CORE_ERR("Invalid memory allocation length %d\n", len);
- result = -EINVAL;
- goto error;
- }
-
- entry = kgsl_mem_entry_create();
- if (entry == NULL) {
- result = -ENOMEM;
- goto error;
- }
-
- result = kgsl_sharedmem_page_alloc_user(&entry->memdesc,
- private->pagetable, len,
- param->flags);
- if (result != 0)
- goto error_free_entry;
-
- vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
-
- result = kgsl_sharedmem_map_vma(vma, &entry->memdesc);
- if (result) {
- KGSL_CORE_ERR("kgsl_sharedmem_map_vma failed: %d\n", result);
- goto error_free_alloc;
- }
-
- param->gpuaddr = entry->memdesc.gpuaddr;
-
- entry->memtype = KGSL_MEM_ENTRY_KERNEL;
-
- kgsl_mem_entry_attach_process(entry, private);
-
- trace_kgsl_mem_alloc(entry);
- /* Process specific statistics */
- kgsl_process_add_stats(private, entry->memtype, len);
-
- kgsl_check_idle(dev_priv->device);
- return 0;
-
-error_free_alloc:
- kgsl_sharedmem_free(&entry->memdesc);
-
-error_free_entry:
- kfree(entry);
-
-error:
- kgsl_check_idle(dev_priv->device);
- return result;
-}
-
static inline int _check_region(unsigned long start, unsigned long size,
uint64_t len)
{
@@ -2161,8 +2063,6 @@
kgsl_ioctl_map_user_mem, 0),
KGSL_IOCTL_FUNC(IOCTL_KGSL_SHAREDMEM_FREE,
kgsl_ioctl_sharedmem_free, 0),
- KGSL_IOCTL_FUNC(IOCTL_KGSL_SHAREDMEM_FROM_VMALLOC,
- kgsl_ioctl_sharedmem_from_vmalloc, 0),
KGSL_IOCTL_FUNC(IOCTL_KGSL_SHAREDMEM_FLUSH_CACHE,
kgsl_ioctl_sharedmem_flush_cache, 0),
KGSL_IOCTL_FUNC(IOCTL_KGSL_GPUMEM_ALLOC,
diff --git a/drivers/input/touchscreen/cyttsp-i2c-qc.c b/drivers/input/touchscreen/cyttsp-i2c-qc.c
index a3a12c6..e54a24a 100644
--- a/drivers/input/touchscreen/cyttsp-i2c-qc.c
+++ b/drivers/input/touchscreen/cyttsp-i2c-qc.c
@@ -32,6 +32,7 @@
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/input.h>
+#include <linux/input/mt.h>
#include <linux/slab.h>
#include <linux/gpio.h>
#include <linux/irq.h>
@@ -1698,22 +1699,9 @@
cyttsp_debug("ST->F1:%3d X:%3d Y:%3d Z:%3d\n", \
cur_st_tch[CY_ST_FNGR1_IDX], \
st_x1, st_y1, st_z1);
- if (cur_st_tch[CY_ST_FNGR2_IDX] < CY_NUM_TRK_ID) {
- input_report_key(ts->input, BTN_2, CY_TCH);
- input_report_abs(ts->input, ABS_HAT0X, st_x2);
- input_report_abs(ts->input, ABS_HAT0Y, st_y2);
- cyttsp_debug("ST->F2:%3d X:%3d Y:%3d Z:%3d\n", \
- cur_st_tch[CY_ST_FNGR2_IDX],
- st_x2, st_y2, st_z2);
- } else {
- input_report_key(ts->input,
- BTN_2,
- CY_NTCH);
- }
} else {
input_report_abs(ts->input, ABS_PRESSURE, CY_NTCH);
input_report_key(ts->input, BTN_TOUCH, CY_NTCH);
- input_report_key(ts->input, BTN_2, CY_NTCH);
}
/* update platform data for the current single touch info */
ts->prv_st_tch[CY_ST_FNGR1_IDX] = cur_st_tch[CY_ST_FNGR1_IDX];
@@ -1857,6 +1845,9 @@
id, tmp_trk[id], \
id, snd_trk[id]);
if (snd_trk[id] < CY_NUM_TRK_ID) {
+ input_mt_slot(ts->input, snd_trk[id]);
+ input_mt_report_slot_state(ts->input,
+ MT_TOOL_FINGER, true);
input_report_abs(ts->input,
ABS_MT_TOUCH_MAJOR,
cur_mt_z[snd_trk[id]]);
@@ -1869,7 +1860,6 @@
input_report_abs(ts->input,
ABS_MT_POSITION_Y,
cur_mt_pos[snd_trk[id]][CY_YPOS]);
- CY_MT_SYNC(ts->input);
cyttsp_debug("MT1->TID:%2d X:%3d Y:%3d Z:%3d touch-sent\n", \
snd_trk[id], \
cur_mt_pos[snd_trk[id]][CY_XPOS], \
@@ -1877,19 +1867,10 @@
cur_mt_z[snd_trk[id]]);
} else if (ts->prv_mt_tch[id] < CY_NUM_TRK_ID) {
/* void out this touch */
- input_report_abs(ts->input,
- ABS_MT_TOUCH_MAJOR,
- CY_NTCH);
- input_report_abs(ts->input,
- ABS_MT_WIDTH_MAJOR,
- curr_tool_width);
- input_report_abs(ts->input,
- ABS_MT_POSITION_X,
- ts->prv_mt_pos[ts->prv_mt_tch[id]][CY_XPOS]);
- input_report_abs(ts->input,
- ABS_MT_POSITION_Y,
- ts->prv_mt_pos[ts->prv_mt_tch[id]][CY_YPOS]);
- CY_MT_SYNC(ts->input);
+ input_mt_slot(ts->input,
+ ts->prv_mt_tch[id]);
+ input_mt_report_slot_state(ts->input,
+ MT_TOOL_FINGER, false);
cyttsp_debug("MT2->TID:%2d X:%3d Y:%3d Z:%3d lift off-sent\n", \
ts->prv_mt_tch[id], \
ts->prv_mt_pos[ts->prv_mt_tch[id]][CY_XPOS], \
@@ -2679,7 +2660,6 @@
set_bit(EV_KEY, input_device->evbit);
set_bit(EV_ABS, input_device->evbit);
set_bit(BTN_TOUCH, input_device->keybit);
- set_bit(BTN_2, input_device->keybit);
set_bit(INPUT_PROP_DIRECT, input_device->propbit);
if (ts->platform_data->use_gestures)
@@ -2693,10 +2673,6 @@
ABS_TOOL_WIDTH, 0, CY_LARGE_TOOL_WIDTH, 0 , 0);
input_set_abs_params(input_device,
ABS_PRESSURE, 0, CY_MAXZ, 0, 0);
- input_set_abs_params(input_device,
- ABS_HAT0X, 0, ts->platform_data->panel_maxx, 0, 0);
- input_set_abs_params(input_device,
- ABS_HAT0Y, 0, ts->platform_data->panel_maxy, 0, 0);
if (ts->platform_data->use_gestures) {
input_set_abs_params(input_device,
ABS_HAT1X, 0, CY_MAXZ, 0, 0);
@@ -2714,6 +2690,7 @@
ABS_MT_TOUCH_MAJOR, 0, CY_MAXZ, 0, 0);
input_set_abs_params(input_device,
ABS_MT_WIDTH_MAJOR, 0, CY_LARGE_TOOL_WIDTH, 0, 0);
+ input_mt_init_slots(input_device, CY_NUM_TRK_ID);
if (ts->platform_data->use_trk_id) {
input_set_abs_params(input_device,
ABS_MT_TRACKING_ID, 0, CY_NUM_TRK_ID, 0, 0);
diff --git a/drivers/media/radio/radio-iris.c b/drivers/media/radio/radio-iris.c
index d596782..ac143b1 100644
--- a/drivers/media/radio/radio-iris.c
+++ b/drivers/media/radio/radio-iris.c
@@ -3479,12 +3479,20 @@
struct v4l2_buffer *buffer)
{
struct iris_device *radio = video_get_drvdata(video_devdata(file));
- enum iris_buf_t buf_type = buffer->index;
- struct kfifo *data_fifo;
- unsigned char *buf = (unsigned char *)buffer->m.userptr;
- unsigned int len = buffer->length;
- if (!access_ok(VERIFY_WRITE, buf, len))
- return -EFAULT;
+ enum iris_buf_t buf_type = -1;
+ unsigned char buf_fifo[STD_BUF_SIZE] = {0};
+ struct kfifo *data_fifo = NULL;
+ unsigned char *buf = NULL;
+ unsigned int len = 0, retval = -1;
+
+ if ((radio == NULL) || (buffer == NULL)) {
+ FMDERR("radio/buffer is NULL\n");
+ return -ENXIO;
+ }
+ buf_type = buffer->index;
+ buf = (unsigned char *)buffer->m.userptr;
+ len = buffer->length;
+
if ((buf_type < IRIS_BUF_MAX) && (buf_type >= 0)) {
data_fifo = &radio->data_buf[buf_type];
if (buf_type == IRIS_BUF_EVENTS)
@@ -3495,10 +3503,20 @@
FMDERR("invalid buffer type\n");
return -EINVAL;
}
- buffer->bytesused = kfifo_out_locked(data_fifo, buf, len,
- &radio->buf_lock[buf_type]);
+ if (len <= STD_BUF_SIZE) {
+ buffer->bytesused = kfifo_out_locked(data_fifo, &buf_fifo[0],
+ len, &radio->buf_lock[buf_type]);
+ } else {
+ FMDERR("kfifo_out_locked can not use len more than 128\n");
+ return -EINVAL;
+ }
+ retval = copy_to_user(buf, &buf_fifo[0], buffer->bytesused);
+ if (retval > 0) {
+ FMDERR("Failed to copy %d bytes of data\n", retval);
+ return -EAGAIN;
+ }
- return 0;
+ return retval;
}
static int iris_vidioc_g_fmt_type_private(struct file *file, void *priv,
diff --git a/drivers/media/video/msm/sensors/msm_sensor.c b/drivers/media/video/msm/sensors/msm_sensor.c
index 03d666f..999783e 100644
--- a/drivers/media/video/msm/sensors/msm_sensor.c
+++ b/drivers/media/video/msm/sensors/msm_sensor.c
@@ -86,7 +86,10 @@
output_settings[s_ctrl->curr_res].vt_pixel_clk /
s_ctrl->curr_frame_length_lines /
s_ctrl->curr_line_length_pclk;
- delay = (1000 * s_ctrl->wait_num_frames) / fps / Q10;
+ if (fps == 0)
+ delay = s_ctrl->min_delay;
+ else
+ delay = (1000 * s_ctrl->wait_num_frames) / fps / Q10;
}
CDBG("%s fps = %ld, delay = %d, min_delay %d\n", __func__, fps,
delay, s_ctrl->min_delay);
diff --git a/drivers/media/video/msm/server/msm_cam_server.c b/drivers/media/video/msm/server/msm_cam_server.c
index 8c9b602..bb9a9b7 100644
--- a/drivers/media/video/msm/server/msm_cam_server.c
+++ b/drivers/media/video/msm/server/msm_cam_server.c
@@ -342,6 +342,7 @@
uint32_t id, struct msm_ctrl_cmd *out)
{
int rc = 0;
+ uint8_t wait_count;
void *value;
struct msm_queue_cmd *rcmd;
struct msm_queue_cmd *event_qcmd;
@@ -409,9 +410,20 @@
/* wait for config return status */
D("Waiting for config status\n");
- rc = wait_event_interruptible_timeout(queue->wait,
- !list_empty_careful(&queue->list),
- msecs_to_jiffies(out->timeout_ms));
+ /* wait event may be interrupted by sugnal,
+ * in this case -ERESTARTSYS is returned and retry is needed.
+ * Now we only retry once. */
+ wait_count = 2;
+ do {
+ rc = wait_event_interruptible_timeout(queue->wait,
+ !list_empty_careful(&queue->list),
+ msecs_to_jiffies(out->timeout_ms));
+ wait_count--;
+ if (rc != -ERESTARTSYS)
+ break;
+ D("%s: wait_event interrupted by signal, remain_count = %d",
+ __func__, wait_count);
+ } while (wait_count > 0);
D("Waiting is over for config status\n");
if (list_empty_careful(&queue->list)) {
if (!rc)
diff --git a/drivers/mfd/wcd9xxx-core.c b/drivers/mfd/wcd9xxx-core.c
index 35ae29a..0ea843c 100644
--- a/drivers/mfd/wcd9xxx-core.c
+++ b/drivers/mfd/wcd9xxx-core.c
@@ -253,6 +253,18 @@
},
};
+static struct wcd9xx_codec_type {
+ u8 byte[4];
+ struct mfd_cell *dev;
+ int size;
+} wcd9xxx_codecs[] = {
+ {{0x2, 0x0, 0x0, 0x1}, tabla_devs, ARRAY_SIZE(tabla_devs)},
+ {{0x1, 0x0, 0x0, 0x1}, tabla1x_devs, ARRAY_SIZE(tabla1x_devs)},
+ {{0x0, 0x0, 0x2, 0x1}, taiko_devs, ARRAY_SIZE(taiko_devs)},
+ {{0x0, 0x0, 0x0, 0x1}, sitar_devs, ARRAY_SIZE(sitar_devs)},
+ {{0x1, 0x0, 0x1, 0x1}, sitar_devs, ARRAY_SIZE(sitar_devs)},
+};
+
static void wcd9xxx_bring_up(struct wcd9xxx *wcd9xxx)
{
wcd9xxx_reg_write(wcd9xxx, WCD9XXX_A_LEAKAGE_CTL, 0x4);
@@ -298,6 +310,53 @@
wcd9xxx->reset_gpio = 0;
}
}
+static int wcd9xxx_check_codec_type(struct wcd9xxx *wcd9xxx,
+ struct mfd_cell **wcd9xxx_dev,
+ int *wcd9xxx_dev_size)
+{
+ struct wcd9xx_codec_type *cdc = wcd9xxx_codecs;
+ int index;
+ int ret;
+ index = WCD9XXX_A_CHIP_ID_BYTE_0;
+ while (index <= WCD9XXX_A_CHIP_ID_BYTE_3) {
+ ret = wcd9xxx_reg_read(wcd9xxx, index);
+ if (ret < 0)
+ goto exit;
+ wcd9xxx->idbyte[index-WCD9XXX_A_CHIP_ID_BYTE_0] = (u8)ret;
+ pr_debug("%s: wcd9xx read = %x, byte = %x\n", __func__, ret,
+ index);
+ index++;
+ }
+
+ /* Read codec version */
+ ret = wcd9xxx_reg_read(wcd9xxx, WCD9XXX_A_CHIP_VERSION);
+ if (ret < 0)
+ goto exit;
+ wcd9xxx->version = (u8)ret & 0x1F;
+
+ while (cdc < (cdc + ARRAY_SIZE(wcd9xxx_codecs)) && cdc != NULL) {
+ if ((cdc->byte[0] == wcd9xxx->idbyte[0]) &&
+ (cdc->byte[1] == wcd9xxx->idbyte[1]) &&
+ (cdc->byte[2] == wcd9xxx->idbyte[2]) &&
+ (cdc->byte[3] == wcd9xxx->idbyte[3])) {
+ pr_info("%s: codec is %s", __func__, cdc->dev->name);
+ *wcd9xxx_dev = cdc->dev;
+ *wcd9xxx_dev_size = cdc->size;
+ break;
+ }
+ cdc++;
+ }
+ if (*wcd9xxx_dev == NULL || *wcd9xxx_dev_size == 0)
+ ret = -ENODEV;
+ pr_info("%s: Read codec idbytes & version\n"
+ "byte_0[%08x] byte_1[%08x] byte_2[%08x]\n"
+ " byte_3[%08x] version = %x\n", __func__,
+ wcd9xxx->idbyte[0], wcd9xxx->idbyte[1],
+ wcd9xxx->idbyte[2], wcd9xxx->idbyte[3],
+ wcd9xxx->version);
+exit:
+ return ret;
+}
static int wcd9xxx_device_init(struct wcd9xxx *wcd9xxx, int irq)
{
@@ -326,39 +385,11 @@
goto err;
}
}
+ ret = wcd9xxx_check_codec_type(wcd9xxx, &wcd9xxx_dev,
+ &wcd9xxx_dev_size);
- wcd9xxx->idbyte_0 = wcd9xxx_reg_read(wcd9xxx, WCD9XXX_A_CHIP_ID_BYTE_0);
- wcd9xxx->idbyte_1 = wcd9xxx_reg_read(wcd9xxx, WCD9XXX_A_CHIP_ID_BYTE_1);
- wcd9xxx->idbyte_2 = wcd9xxx_reg_read(wcd9xxx, WCD9XXX_A_CHIP_ID_BYTE_2);
- wcd9xxx->idbyte_3 = wcd9xxx_reg_read(wcd9xxx, WCD9XXX_A_CHIP_ID_BYTE_3);
-
- wcd9xxx->version = wcd9xxx_reg_read(wcd9xxx,
- WCD9XXX_A_CHIP_VERSION) & 0x1F;
- pr_info("%s : Codec version %u initialized\n",
- __func__, wcd9xxx->version);
- pr_info("idbyte_0[%08x] idbyte_1[%08x] idbyte_2[%08x] idbyte_3[%08x]\n",
- wcd9xxx->idbyte_0, wcd9xxx->idbyte_1,
- wcd9xxx->idbyte_2, wcd9xxx->idbyte_3);
-
- if (wcd9xxx->idbyte_0 == 0x2 && wcd9xxx->idbyte_1 == 0x0 &&
- wcd9xxx->idbyte_2 == 0x0 && wcd9xxx->idbyte_3 == 0x1) {
- wcd9xxx_dev = tabla_devs;
- wcd9xxx_dev_size = ARRAY_SIZE(tabla_devs);
- } else if (wcd9xxx->idbyte_0 == 0x1 && wcd9xxx->idbyte_1 == 0x0 &&
- wcd9xxx->idbyte_2 == 0x0 && wcd9xxx->idbyte_3 == 0x1) {
- wcd9xxx_dev = tabla1x_devs;
- wcd9xxx_dev_size = ARRAY_SIZE(tabla1x_devs);
- } else if (wcd9xxx->idbyte_0 == 0x0 && wcd9xxx->idbyte_1 == 0x0 &&
- wcd9xxx->idbyte_2 == 0x2 && wcd9xxx->idbyte_3 == 0x1) {
- wcd9xxx_dev = taiko_devs;
- wcd9xxx_dev_size = ARRAY_SIZE(taiko_devs);
- } else if ((wcd9xxx->idbyte_0 == 0x0 && wcd9xxx->idbyte_1 == 0x0 &&
- wcd9xxx->idbyte_2 == 0x0 && wcd9xxx->idbyte_3 == 0x1) ||
- (wcd9xxx->idbyte_0 == 0x1 && wcd9xxx->idbyte_1 == 0x0 &&
- wcd9xxx->idbyte_2 == 0x1 && wcd9xxx->idbyte_3 == 0x1)) {
- wcd9xxx_dev = sitar_devs;
- wcd9xxx_dev_size = ARRAY_SIZE(sitar_devs);
- }
+ if (ret < 0)
+ goto err_irq;
ret = mfd_add_devices(wcd9xxx->dev, -1, wcd9xxx_dev, wcd9xxx_dev_size,
NULL, 0);
if (ret != 0) {
@@ -772,9 +803,9 @@
goto err_device_init;
}
- if ((wcd9xxx->idbyte_0 == 0x2) || (wcd9xxx->idbyte_0 == 0x1))
+ if ((wcd9xxx->idbyte[0] == 0x2) || (wcd9xxx->idbyte[0] == 0x1))
i2c_mode = TABLA_I2C_MODE;
- else if (wcd9xxx->idbyte_0 == 0x0)
+ else if (wcd9xxx->idbyte[0] == 0x0)
i2c_mode = SITAR_I2C_MODE;
ret = wcd9xxx_read(wcd9xxx, WCD9XXX_A_CHIP_STATUS, 1, &val, 0);
diff --git a/drivers/spi/spi_qsd.c b/drivers/spi/spi_qsd.c
index 4a79f76..c26da60 100644
--- a/drivers/spi/spi_qsd.c
+++ b/drivers/spi/spi_qsd.c
@@ -1298,6 +1298,7 @@
container_of(work, struct msm_spi, work_data);
unsigned long flags;
u32 status_error = 0;
+ int rc = 0;
mutex_lock(&dd->core_lock);
@@ -1308,6 +1309,21 @@
if (dd->use_rlock)
remote_mutex_lock(&dd->r_lock);
+ /* Configure the spi clk, miso, mosi and cs gpio */
+ if (dd->pdata->gpio_config) {
+ rc = dd->pdata->gpio_config();
+ if (rc) {
+ dev_err(dd->dev,
+ "%s: error configuring GPIOs\n",
+ __func__);
+ status_error = 1;
+ }
+ }
+
+ rc = msm_spi_request_gpios(dd);
+ if (rc)
+ status_error = 1;
+
clk_prepare_enable(dd->clk);
clk_prepare_enable(dd->pclk);
msm_spi_enable_irqs(dd);
@@ -1339,6 +1355,12 @@
clk_disable_unprepare(dd->clk);
clk_disable_unprepare(dd->pclk);
+ /* Free the spi clk, miso, mosi, cs gpio */
+ if (!rc && dd->pdata && dd->pdata->gpio_release)
+ dd->pdata->gpio_release();
+ if (!rc)
+ msm_spi_free_gpios(dd);
+
if (dd->use_rlock)
remote_mutex_unlock(&dd->r_lock);
@@ -1425,6 +1447,24 @@
if (dd->use_rlock)
remote_mutex_lock(&dd->r_lock);
+ /* Configure the spi clk, miso, mosi, cs gpio */
+ if (dd->pdata->gpio_config) {
+ rc = dd->pdata->gpio_config();
+ if (rc) {
+ dev_err(&spi->dev,
+ "%s: error configuring GPIOs\n",
+ __func__);
+ rc = -ENXIO;
+ goto err_setup_gpio;
+ }
+ }
+
+ rc = msm_spi_request_gpios(dd);
+ if (rc) {
+ rc = -ENXIO;
+ goto err_setup_gpio;
+ }
+
clk_prepare_enable(dd->clk);
clk_prepare_enable(dd->pclk);
@@ -1457,10 +1497,15 @@
clk_disable_unprepare(dd->clk);
clk_disable_unprepare(dd->pclk);
+ /* Free the spi clk, miso, mosi, cs gpio */
+ if (dd->pdata && dd->pdata->gpio_release)
+ dd->pdata->gpio_release();
+ msm_spi_free_gpios(dd);
+
+err_setup_gpio:
if (dd->use_rlock)
remote_mutex_unlock(&dd->r_lock);
mutex_unlock(&dd->core_lock);
-
err_setup_exit:
return rc;
}
@@ -1897,22 +1942,9 @@
dd->use_dma = 1;
master->dma_alignment = dma_get_cache_alignment();
}
-
-skip_dma_resources:
- if (pdata->gpio_config) {
- rc = pdata->gpio_config();
- if (rc) {
- dev_err(&pdev->dev,
- "%s: error configuring GPIOs\n",
- __func__);
- goto err_probe_gpio;
- }
- }
}
- rc = msm_spi_request_gpios(dd);
- if (rc)
- goto err_probe_gpio;
+skip_dma_resources:
spin_lock_init(&dd->queue_lock);
mutex_init(&dd->core_lock);
@@ -1951,8 +1983,8 @@
dd->use_rlock = 1;
dd->pm_lat = pdata->pm_lat;
- pm_qos_add_request(&qos_req_list, PM_QOS_CPU_DMA_LATENCY,
- PM_QOS_DEFAULT_VALUE);
+ pm_qos_add_request(&qos_req_list, PM_QOS_CPU_DMA_LATENCY,
+ PM_QOS_DEFAULT_VALUE);
}
mutex_lock(&dd->core_lock);
@@ -2082,10 +2114,6 @@
err_probe_reqmem:
destroy_workqueue(dd->workqueue);
err_probe_workq:
- msm_spi_free_gpios(dd);
-err_probe_gpio:
- if (pdata && pdata->gpio_release)
- pdata->gpio_release();
err_probe_res:
spi_master_put(master);
err_probe_exit:
@@ -2112,7 +2140,6 @@
/* Wait for transactions to end, or time out */
wait_event_interruptible(dd->continue_suspend, !dd->transfer_pending);
- msm_spi_free_gpios(dd);
suspend_exit:
return 0;
@@ -2129,7 +2156,6 @@
if (!dd)
goto resume_exit;
- BUG_ON(msm_spi_request_gpios(dd) != 0);
dd->suspended = 0;
resume_exit:
return 0;
@@ -2143,17 +2169,13 @@
{
struct spi_master *master = platform_get_drvdata(pdev);
struct msm_spi *dd = spi_master_get_devdata(master);
- struct msm_spi_platform_data *pdata = pdev->dev.platform_data;
pm_qos_remove_request(&qos_req_list);
spi_debugfs_exit(dd);
sysfs_remove_group(&pdev->dev.kobj, &dev_attr_grp);
msm_spi_teardown_dma(dd);
- if (pdata && pdata->gpio_release)
- pdata->gpio_release();
- msm_spi_free_gpios(dd);
clk_put(dd->clk);
clk_put(dd->pclk);
destroy_workqueue(dd->workqueue);
diff --git a/drivers/usb/gadget/f_rmnet.c b/drivers/usb/gadget/f_rmnet.c
index 1d0b6d4..aa9daf3 100644
--- a/drivers/usb/gadget/f_rmnet.c
+++ b/drivers/usb/gadget/f_rmnet.c
@@ -488,6 +488,8 @@
break;
case USB_GADGET_XPORT_HSIC:
break;
+ case USB_GADGET_XPORT_HSUART:
+ break;
case USB_GADGET_XPORT_NONE:
break;
default:
@@ -515,6 +517,8 @@
break;
case USB_GADGET_XPORT_HSIC:
break;
+ case USB_GADGET_XPORT_HSUART:
+ break;
case USB_GADGET_XPORT_NONE:
break;
default:
diff --git a/drivers/video/msm/mdp.c b/drivers/video/msm/mdp.c
index 4fc78cd..54fb0cb 100644
--- a/drivers/video/msm/mdp.c
+++ b/drivers/video/msm/mdp.c
@@ -2324,6 +2324,7 @@
struct mipi_panel_info *mipi;
#endif
static int contSplash_update_done;
+ char *cp;
if ((pdev->id == 0) && (pdev->num_resources > 0)) {
mdp_init_pdev = pdev;
@@ -2398,7 +2399,44 @@
if (mdp_pdata) {
if (mdp_pdata->cont_splash_enabled) {
mfd->cont_splash_done = 0;
+
if (!contSplash_update_done) {
+ uint32 bpp = 3;
+ /*read panel wxh and calculate splash screen
+ size*/
+ mdp_pdata->splash_screen_size =
+ inpdw(MDP_BASE + 0x90004);
+ mdp_pdata->splash_screen_size =
+ (((mdp_pdata->splash_screen_size >> 16) &
+ 0x00000FFF) * (
+ mdp_pdata->splash_screen_size &
+ 0x00000FFF)) * bpp;
+
+ mdp_pdata->splash_screen_addr =
+ inpdw(MDP_BASE + 0x90008);
+
+ mfd->copy_splash_buf = dma_alloc_coherent(NULL,
+ mdp_pdata->splash_screen_size,
+ (dma_addr_t *) &(mfd->copy_splash_phys),
+ GFP_KERNEL);
+
+ if (!mfd->copy_splash_buf) {
+ pr_err("DMA ALLOC FAILED for SPLASH\n");
+ return -ENOMEM;
+ }
+ cp = (char *)ioremap(
+ mdp_pdata->splash_screen_addr,
+ mdp_pdata->splash_screen_size);
+ if (!cp) {
+ pr_err("IOREMAP FAILED for SPLASH\n");
+ return -ENOMEM;
+ }
+ memcpy(mfd->copy_splash_buf, cp,
+ mdp_pdata->splash_screen_size);
+
+ MDP_OUTP(MDP_BASE + 0x90008,
+ mfd->copy_splash_phys);
+
if (mfd->panel.type == MIPI_VIDEO_PANEL ||
mfd->panel.type == LCDC_PANEL)
mdp_pipe_ctrl(MDP_CMD_BLOCK,
@@ -2787,6 +2825,17 @@
mutex_unlock(&mdp_suspend_mutex);
}
+void mdp_free_splash_buffer(struct msm_fb_data_type *mfd)
+{
+ if (mfd->copy_splash_buf) {
+ dma_free_coherent(NULL, mdp_pdata->splash_screen_size,
+ mfd->copy_splash_buf,
+ (dma_addr_t) mfd->copy_splash_phys);
+
+ mfd->copy_splash_buf = NULL;
+ }
+}
+
#ifdef CONFIG_PM
static void mdp_suspend_sub(void)
{
diff --git a/drivers/video/msm/mdp.h b/drivers/video/msm/mdp.h
index af5a661..2825f87 100644
--- a/drivers/video/msm/mdp.h
+++ b/drivers/video/msm/mdp.h
@@ -764,7 +764,7 @@
int mdp_lcdc_on(struct platform_device *pdev);
int mdp_lcdc_off(struct platform_device *pdev);
void mdp_lcdc_update(struct msm_fb_data_type *mfd);
-
+void mdp_free_splash_buffer(struct msm_fb_data_type *mfd);
#ifdef CONFIG_FB_MSM_MDP303
int mdp_dsi_video_on(struct platform_device *pdev);
int mdp_dsi_video_off(struct platform_device *pdev);
diff --git a/drivers/video/msm/msm_fb.c b/drivers/video/msm/msm_fb.c
index 0f014cf..9c55fe8 100644
--- a/drivers/video/msm/msm_fb.c
+++ b/drivers/video/msm/msm_fb.c
@@ -1820,6 +1820,9 @@
schedule_delayed_work(&mfd->backlight_worker,
backlight_duration);
+ if (info->node == 0 && (mfd->cont_splash_done)) /* primary */
+ mdp_free_splash_buffer(mfd);
+
++mfd->panel_info.frame_count;
return 0;
}
@@ -2993,6 +2996,9 @@
schedule_delayed_work(&mfd->backlight_worker,
backlight_duration);
+ if (info->node == 0 && (mfd->cont_splash_done)) /* primary */
+ mdp_free_splash_buffer(mfd);
+
return ret;
}
diff --git a/drivers/video/msm/msm_fb.h b/drivers/video/msm/msm_fb.h
index 1696a1a..2896349 100644
--- a/drivers/video/msm/msm_fb.h
+++ b/drivers/video/msm/msm_fb.h
@@ -187,6 +187,8 @@
u32 writeback_state;
bool writeback_active_cnt;
int cont_splash_done;
+ void *copy_splash_buf;
+ unsigned char *copy_splash_phys;
};
struct dentry *msm_fb_get_debugfs_root(void);
diff --git a/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_interrupt_handler.c b/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_interrupt_handler.c
index c1e460f..bfc27dc 100644
--- a/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_interrupt_handler.c
+++ b/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_interrupt_handler.c
@@ -1175,20 +1175,28 @@
&(decoder->dec_disp_info);
struct ddl_frame_data_tag *output_frame = &(ddl->output_frame);
struct vcd_frame_data *output_vcd_frm = &(output_frame->vcd_frm);
+ enum vidc_1080p_decode_frame frame_type = 0;
u32 vcd_status, free_luma_dpb = 0, disp_pict = 0, is_interlaced;
+ u32 idr_frame = 0, coded_frame = 0;
get_dec_op_done_data(dec_disp_info, decoder->output_order,
&output_vcd_frm->physical, &is_interlaced);
decoder->progressive_only = !(is_interlaced);
output_vcd_frm->frame = VCD_FRAME_YUV;
+ vidc_sm_get_displayed_picture_frame(&ddl->shared_mem
+ [ddl->command_channel], &disp_pict);
+ coded_frame = (disp_pict & 0x03);
+ idr_frame = (disp_pict & 0x20) >> 5;
+ if (idr_frame)
+ frame_type = VIDC_1080P_DECODE_FRAMETYPE_IDR;
+ else
+ frame_type = (disp_pict & 0x1c) >> 2;
if (decoder->codec.codec == VCD_CODEC_MPEG4 ||
decoder->codec.codec == VCD_CODEC_VC1 ||
decoder->codec.codec == VCD_CODEC_VC1_RCV ||
(decoder->codec.codec >= VCD_CODEC_DIVX_3 &&
decoder->codec.codec <= VCD_CODEC_XVID)) {
- vidc_sm_get_displayed_picture_frame(&ddl->shared_mem
- [ddl->command_channel], &disp_pict);
if (decoder->output_order == VCD_DEC_ORDER_DISPLAY) {
- if (!disp_pict) {
+ if (!coded_frame) {
output_vcd_frm->frame = VCD_FRAME_NOTCODED;
vidc_sm_get_available_luma_dpb_address(
&ddl->shared_mem[ddl->command_channel],
@@ -1213,6 +1221,7 @@
DDL_MSG_ERROR("CORRUPTED_OUTPUT_BUFFER_ADDRESS");
ddl_hw_fatal_cb(ddl);
} else {
+ ddl_get_decoded_frame(output_vcd_frm, frame_type);
vidc_sm_get_metadata_status(&ddl->shared_mem
[ddl->command_channel],
&decoder->meta_data_exists);
@@ -1347,6 +1356,10 @@
case VIDC_1080P_DECODE_FRAMETYPE_OTHERS:
frame->frame = VCD_FRAME_YUV;
break;
+ case VIDC_1080P_DECODE_FRAMETYPE_IDR:
+ frame->flags |= VCD_FRAME_FLAG_SYNCFRAME;
+ frame->frame = VCD_FRAME_IDR;
+ break;
case VIDC_1080P_DECODE_FRAMETYPE_32BIT:
default:
DDL_MSG_ERROR("UNKNOWN-FRAMETYPE");
diff --git a/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.c b/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.c
index 07b2fe2..8099234 100644
--- a/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.c
+++ b/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.c
@@ -45,7 +45,7 @@
#define VIDC_SM_DISP_PIC_PROFILE_DISP_PIC_PROFILE_SHFT 0
#define VIDC_SM_DISP_PIC_FRAME_TYPE_ADDR 0x00c0
-#define VIDC_SM_DISP_PIC_FRAME_TYPE_BMSK 0x00000003
+#define VIDC_SM_DISP_PIC_FRAME_TYPE_BMSK 0x0000003f
#define VIDC_SM_DISP_PIC_FRAME_TYPE_SHFT 0
#define VIDC_SM_FREE_LUMA_DPB_ADDR 0x00c4
diff --git a/drivers/video/msm/vidc/1080p/ddl/vidc.c b/drivers/video/msm/vidc/1080p/ddl/vidc.c
index d399847..3c445bc 100644
--- a/drivers/video/msm/vidc/1080p/ddl/vidc.c
+++ b/drivers/video/msm/vidc/1080p/ddl/vidc.c
@@ -520,8 +520,12 @@
u32 frame = 0;
VIDC_HWIO_IN(REG_760102, &frame);
- *pe_frame = (enum vidc_1080p_decode_frame)
- (frame & VIDC_1080P_SI_RG8_DECODE_FRAMETYPE_MASK);
+ if (frame & 0x10)
+ *pe_frame = (enum vidc_1080p_decode_frame)
+ VIDC_1080P_DECODE_FRAMETYPE_IDR;
+ else
+ *pe_frame = (enum vidc_1080p_decode_frame)
+ (frame & VIDC_1080P_SI_RG8_DECODE_FRAMETYPE_MASK);
}
void vidc_1080p_get_decode_frame_result(
diff --git a/drivers/video/msm/vidc/1080p/ddl/vidc.h b/drivers/video/msm/vidc/1080p/ddl/vidc.h
index 7b8dc6f..22fcd1c 100644
--- a/drivers/video/msm/vidc/1080p/ddl/vidc.h
+++ b/drivers/video/msm/vidc/1080p/ddl/vidc.h
@@ -277,6 +277,7 @@
VIDC_1080P_DECODE_FRAMETYPE_P = 2,
VIDC_1080P_DECODE_FRAMETYPE_B = 3,
VIDC_1080P_DECODE_FRAMETYPE_OTHERS = 4,
+ VIDC_1080P_DECODE_FRAMETYPE_IDR = 5,
VIDC_1080P_DECODE_FRAMETYPE_32BIT = 0x7FFFFFFF
};
enum vidc_1080P_decode_frame_correct_type {
diff --git a/include/linux/mfd/wcd9xxx/core.h b/include/linux/mfd/wcd9xxx/core.h
index 105c2cb..f6d164d 100644
--- a/include/linux/mfd/wcd9xxx/core.h
+++ b/include/linux/mfd/wcd9xxx/core.h
@@ -157,10 +157,7 @@
int num_rx_port;
int num_tx_port;
- u8 idbyte_0;
- u8 idbyte_1;
- u8 idbyte_2;
- u8 idbyte_3;
+ u8 idbyte[4];
};
int wcd9xxx_reg_read(struct wcd9xxx *wcd9xxx, unsigned short reg);
diff --git a/include/linux/msm_kgsl.h b/include/linux/msm_kgsl.h
index 7afc896..2253655 100644
--- a/include/linux/msm_kgsl.h
+++ b/include/linux/msm_kgsl.h
@@ -367,6 +367,12 @@
_IOW(KGSL_IOC_TYPE, 0x22, struct kgsl_bind_gmem_shadow)
/* add a block of memory into the GPU address space */
+
+/*
+ * IOCTL_KGSL_SHAREDMEM_FROM_VMALLOC deprecated 09/2012
+ * use IOCTL_KGSL_GPUMEM_ALLOC instead
+ */
+
struct kgsl_sharedmem_from_vmalloc {
unsigned int gpuaddr; /*output param */
unsigned int hostptr;
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5fb3719..2c9509d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1819,6 +1819,7 @@
#define PF_MEMALLOC 0x00000800 /* Allocating memory */
#define PF_NPROC_EXCEEDED 0x00001000 /* set_user noticed that RLIMIT_NPROC was exceeded */
#define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */
+#define PF_WAKE_UP_IDLE 0x00004000 /* try to wake up on an idle CPU */
#define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */
#define PF_FROZEN 0x00010000 /* frozen for system suspend */
#define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */
@@ -1936,6 +1937,14 @@
}
#endif
+static inline void set_wake_up_idle(bool enabled)
+{
+ if (enabled)
+ current->flags |= PF_WAKE_UP_IDLE;
+ else
+ current->flags &= ~PF_WAKE_UP_IDLE;
+}
+
#ifndef CONFIG_CPUMASK_OFFSTACK
static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
{
diff --git a/include/linux/topology.h b/include/linux/topology.h
index e26db03..92a89f0 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -166,7 +166,7 @@
| 1*SD_WAKE_AFFINE \
| 0*SD_PREFER_LOCAL \
| 0*SD_SHARE_CPUPOWER \
- | 0*SD_SHARE_PKG_RESOURCES \
+ | 1*SD_SHARE_PKG_RESOURCES \
| 0*SD_SERIALIZE \
| sd_balance_for_package_power() \
| sd_power_saving_flags() \
diff --git a/include/media/radio-iris.h b/include/media/radio-iris.h
index ba705bd..db69518 100644
--- a/include/media/radio-iris.h
+++ b/include/media/radio-iris.h
@@ -660,7 +660,7 @@
IRIS_REGION_OTHER
};
-#define STD_BUF_SIZE (64)
+#define STD_BUF_SIZE (128)
enum iris_buf_t {
IRIS_BUF_SRCH_LIST,
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index e955364..9885a9e 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2654,6 +2654,10 @@
if (target == prev_cpu && idle_cpu(prev_cpu))
return prev_cpu;
+ if (!(current->flags & PF_WAKE_UP_IDLE) &&
+ !(p->flags & PF_WAKE_UP_IDLE))
+ return target;
+
/*
* Otherwise, iterate the domains and find an elegible idle cpu.
*/