aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/staging
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-05-20 06:53:08 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-05-20 14:51:29 +0200
commit814634b8e81ff54bfed69bba14656fc703221bd0 (patch)
tree445370b623b0f441f30ab58bf7cac7dfbdc3db03 /drivers/staging
parentmedia: atomisp: turn on camera before setting it (diff)
downloadwireguard-linux-814634b8e81ff54bfed69bba14656fc703221bd0.tar.xz
wireguard-linux-814634b8e81ff54bfed69bba14656fc703221bd0.zip
media: atomisp: disable the dynamic and reserved pools
The memory management code for atomisp is complex: it has 2 extra pools (plus some ION-specific code). The code for those extra pools are complex, and there are even some parts of code over there that were forked from some mm/ code, probably from Kernel 3.10. Let's just use a single one, in order to make the driver simpler. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/atomisp/pci/hmm/hmm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/media/atomisp/pci/hmm/hmm.c b/drivers/staging/media/atomisp/pci/hmm/hmm.c
index 0ff81ea06241..cd70307ffd57 100644
--- a/drivers/staging/media/atomisp/pci/hmm/hmm.c
+++ b/drivers/staging/media/atomisp/pci/hmm/hmm.c
@@ -641,6 +641,7 @@ void hmm_vunmap(ia_css_ptr virt)
int hmm_pool_register(unsigned int pool_size, enum hmm_pool_type pool_type)
{
+#if 0 // Just use the "normal" pool
switch (pool_type) {
case HMM_POOL_TYPE_RESERVED:
reserved_pool.pops = &reserved_pops;
@@ -654,10 +655,14 @@ int hmm_pool_register(unsigned int pool_size, enum hmm_pool_type pool_type)
dev_err(atomisp_dev, "invalid pool type.\n");
return -EINVAL;
}
+#else
+ return 0;
+#endif
}
void hmm_pool_unregister(enum hmm_pool_type pool_type)
{
+#if 0 // Just use the "normal" pool
switch (pool_type) {
case HMM_POOL_TYPE_RESERVED:
if (reserved_pool.pops && reserved_pool.pops->pool_exit)
@@ -671,6 +676,7 @@ void hmm_pool_unregister(enum hmm_pool_type pool_type)
dev_err(atomisp_dev, "invalid pool type.\n");
break;
}
+#endif
return;
}