driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: [PATCH 15/20] media: atomisp: add debug for hmm alloc
Date: Thu, 28 May 2020 08:14:15 +0200	[thread overview]
Message-ID: <5ed808e5f2cf6792c2c33511a2958e96ebcea719.1590646166.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1590646166.git.mchehab+huawei@kernel.org>

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>
---
 drivers/staging/media/atomisp/pci/hmm/hmm.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/pci/hmm/hmm.c b/drivers/staging/media/atomisp/pci/hmm/hmm.c
index 5e983442ca80..c8a6e2d6e498 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:
-- 
2.26.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2020-05-28  6:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  6:14 [PATCH 00/20] More atomisp fixes and cleanups Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 01/20] media: atomisp: simplify hive_isp_css_mm_hrt wrapper Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 02/20] media: atomisp: get rid of the hrt/hive_isp_css_mm_hrt abstraction layer Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 03/20] media: atomisp: reduce abstraction at ia_css_memory_access Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 04/20] media: atomisp: go one step further to drop ia_css_memory_access.c Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 05/20] media: atomisp: get rid of mmgr_load and mmgr_store Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 06/20] media: atomisp: get rid of unused memory_realloc code Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 07/20] media: atomisp: change the type returned by mmgr alloc Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 08/20] media: atomisp: get rid of memory_access.c Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 09/20] media: atomisp: hmm_bo: untag user pointers Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 10/20] media: atomisp: add debug message to help debugging hmm code Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 11/20] media: atomisp: use Yocto Aero default hmm pool sizes Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 12/20] media: atomisp: get rid of a warning message Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 13/20] media: atomisp: fix driver caps Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 14/20] media: atomisp: use pin_user_pages() for memory allocation Mauro Carvalho Chehab
2020-05-28  6:14 ` Mauro Carvalho Chehab [this message]
2020-05-28  6:14 ` [PATCH 16/20] media: atomisp: improve warning for IRQ enable function Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 17/20] media: atomisp: add debug functions for received events Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 18/20] media: atomisp: add more comments about frame allocation Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 19/20] media: atomisp: remove kvmalloc/kvcalloc abstractions Mauro Carvalho Chehab
2020-05-28  6:57   ` [PATCH v2 " Mauro Carvalho Chehab
2020-05-28  6:14 ` [PATCH 20/20] media: atomisp: avoid OOPS due to non-existing ref_frames Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5ed808e5f2cf6792c2c33511a2958e96ebcea719.1590646166.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).