media: atomisp: add debug message to help debugging hmm code
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 26 May 2020 08:11:14 +0000 (10:11 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 11 Jun 2020 16:10:03 +0000 (18:10 +0200)
The hmm code is partially based on a fork from 3.10 code,
and has bugs.

Add debug there to help tracking what happens there.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/hmm/hmm_bo.c

index 6fce8c95be1d10cd7456219b7e14cd8f5f79f71e..b6dcd246d7afe65b18dbc2f3c47374f5602261e5 100644 (file)
@@ -1015,6 +1015,11 @@ static int alloc_user_pages(struct hmm_buffer_object *bo,
                bo->mem_type = HMM_BO_MEM_TYPE_USER;
        }
 
+       dev_dbg(atomisp_dev, "%s: %d %s pages were allocated as 0x%08x\n",
+               __func__,
+               bo->pgnr,
+               bo->mem_type == HMM_BO_MEM_TYPE_USER ? "user" : "pfn", page_nr);
+
        /* can be written by caller, not forced */
        if (page_nr != bo->pgnr) {
                dev_err(atomisp_dev,