video: msm: Add QSEED Table2 Support
Add support for QSEED Table2 reads/writes. Table 2 is a table of coeffients
for QSEED Table 1 to offset into. Table 2 is quite large, caution should be
taken when writing into it.
CRs-Fixed: 380315
Change-Id: I89be18c0047dcf1d9a3bcd538967b2bbe7b4efe1
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
diff --git a/drivers/video/msm/mdp4_util.c b/drivers/video/msm/mdp4_util.c
index 600ca82..645d5a8 100644
--- a/drivers/video/msm/mdp4_util.c
+++ b/drivers/video/msm/mdp4_util.c
@@ -3312,12 +3312,16 @@
goto err_mem;
}
for (i = 0; i < cfg->len; i++) {
+ if (!(base & 0x3FF))
+ wmb();
MDP_OUTP(base , values[i]);
base += sizeof(uint32_t);
}
} else if (cfg->ops & MDP_PP_OPS_READ) {
for (i = 0; i < cfg->len; i++) {
values[i] = inpdw(base);
+ if (!(base & 0x3FF))
+ rmb();
base += sizeof(uint32_t);
}
ret = copy_to_user(cfg->data, values,
@@ -3344,12 +3348,6 @@
goto error;
}
- if (cfg->table_num != 1) {
- ret = -ENOTTY;
- pr_info("%s: Only QSEED table1 supported.\n", __func__);
- goto error;
- }
-
if ((cfg->ops & MDP_PP_OPS_READ) && (cfg->ops & MDP_PP_OPS_WRITE)) {
ret = -EPERM;
pr_warn("%s: Cannot read and write on the same request\n",