diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-05-26 15:35:16 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-06-11 19:13:03 +0300 |
commit | 03884c93560c48c2739caa9b104b0cb4d3ea8c91 (patch) | |
tree | 443c602498480fb7c236f5a6506b3a748410dfd7 /drivers | |
parent | 14a638ab96c518f93386eae1ac460e459e775ea2 (diff) | |
download | linux-03884c93560c48c2739caa9b104b0cb4d3ea8c91.tar.xz |
media: atomisp: add debug for hmm alloc
The hmm code is still complex and has bugs. Add a debug print
when memory gets allocated, in order to help identifying what's
happening out there.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/atomisp/pci/hmm/hmm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/media/atomisp/pci/hmm/hmm.c b/drivers/staging/media/atomisp/pci/hmm/hmm.c index 462f20652209..f9c2c7896520 100644 --- a/drivers/staging/media/atomisp/pci/hmm/hmm.c +++ b/drivers/staging/media/atomisp/pci/hmm/hmm.c @@ -253,7 +253,7 @@ ia_css_ptr hmm_alloc(size_t bytes, enum hmm_bo_type type, goto alloc_page_err; } - /* Combind the virtual address and pages togather */ + /* Combine the virtual address and pages together */ ret = hmm_bo_bind(bo); if (ret) { dev_err(atomisp_dev, "hmm_bo_bind failed.\n"); @@ -265,6 +265,10 @@ ia_css_ptr hmm_alloc(size_t bytes, enum hmm_bo_type type, if (attrs & ATOMISP_MAP_FLAG_CLEARED) hmm_set(bo->start, 0, bytes); + dev_dbg(atomisp_dev, + "%s: pages: 0x%08x (%ld bytes), type: %d from highmem %d, user ptr %p, cached %d\n", + __func__, bo->start, bytes, type, from_highmem, userptr, cached); + return bo->start; bind_err: |