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 00/20] More atomisp fixes and cleanups
Date: Thu, 28 May 2020 08:14:00 +0200	[thread overview]
Message-ID: <cover.1590646166.git.mchehab+huawei@kernel.org> (raw)

Most of this series are working at the memory management abstraction.

The last patch contain an important bug fix: the logic which configures 
the hardware pipelines add some "delay frames" that are NULL, causing
the driver to crash when userspace selects a resolution different
than the sensor resolution.

It took me a lot of time debugging it, due to all the weirdness and
abstractions with the mm/ allocation, plus the 4+ abstraction
layers that it takes for the driver to actually do something.

We should try to get rid of at least some of the layers as soon as
possible, as it takes a lot of time to debug certain things with all
those layers.

Mauro Carvalho Chehab (20):
  media: atomisp: simplify hive_isp_css_mm_hrt wrapper
  media: atomisp: get rid of the hrt/hive_isp_css_mm_hrt abstraction
    layer
  media: atomisp: reduce abstraction at ia_css_memory_access
  media: atomisp: go one step further to drop ia_css_memory_access.c
  media: atomisp: get rid of mmgr_load and mmgr_store
  media: atomisp: get rid of unused memory_realloc code
  media: atomisp: change the type returned by mmgr alloc
  media: atomisp: get rid of memory_access.c
  media: atomisp: hmm_bo: untag user pointers
  media: atomisp: add debug message to help debugging hmm code
  media: atomisp: use Yocto Aero default hmm pool sizes
  media: atomisp: get rid of a warning message
  media: atomisp: fix driver caps
  media: atomisp: use pin_user_pages() for memory allocation
  media: atomisp: add debug for hmm alloc
  media: atomisp: improve warning for IRQ enable function
  media: atomisp: add debug functions for received events
  media: atomisp: add more comments about frame allocation
  media: atomisp: remove kvmalloc/kvcalloc abstractions
  media: atomisp: avoid OOPS due to non-existing ref_frames

 drivers/staging/media/atomisp/Makefile        |   8 -
 .../staging/media/atomisp/include/hmm/hmm.h   |   7 +-
 .../media/atomisp/include/hmm/hmm_bo.h        |  11 +-
 .../media/atomisp/include/linux/atomisp.h     |   2 +
 .../staging/media/atomisp/pci/atomisp_acc.c   |  27 ++-
 .../staging/media/atomisp/pci/atomisp_cmd.c   |   2 +-
 .../media/atomisp/pci/atomisp_compat.h        |   2 +-
 .../media/atomisp/pci/atomisp_compat_css20.c  |  19 +-
 .../staging/media/atomisp/pci/atomisp_fops.c  |   3 -
 .../staging/media/atomisp/pci/atomisp_ioctl.c |  48 +----
 .../media/atomisp/pci/atomisp_subdev.c        |   8 +-
 .../staging/media/atomisp/pci/atomisp_v4l2.c  |  30 +--
 .../base/refcount/interface/ia_css_refcount.h |  13 +-
 .../atomisp/pci/base/refcount/src/refcount.c  |  19 +-
 .../pci/hive_isp_css_common/host/debug.c      |  15 +-
 .../hive_isp_css_common/host/debug_private.h  |   9 +-
 .../hive_isp_css_include/host/debug_public.h  |   5 +-
 .../memory_access/memory_access.h             | 174 ------------------
 .../pci/hive_isp_css_include/memory_realloc.h |  38 ----
 .../staging/media/atomisp/pci/hive_types.h    |   3 -
 drivers/staging/media/atomisp/pci/hmm/hmm.c   |  35 +++-
 .../staging/media/atomisp/pci/hmm/hmm_bo.c    | 153 +++------------
 .../atomisp/pci/hrt/hive_isp_css_mm_hrt.c     | 124 -------------
 .../atomisp/pci/hrt/hive_isp_css_mm_hrt.h     |  57 ------
 .../media/atomisp/pci/ia_css_frame_public.h   |   2 +-
 .../media/atomisp/pci/ia_css_memory_access.c  |  85 ---------
 .../staging/media/atomisp/pci/ia_css_pipe.h   |   2 +-
 .../pci/isp/kernels/bh/bh_2/ia_css_bh.host.c  |   1 -
 .../isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c |   5 +-
 .../isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.h |   2 +-
 .../raw_aa_binning_1.0/ia_css_raa.host.c      |   1 -
 .../isp/kernels/ref/ref_1.0/ia_css_ref.host.c |  13 +-
 .../kernels/ref/ref_1.0/ia_css_ref_param.h    |   4 +-
 .../kernels/sdis/sdis_1.0/ia_css_sdis.host.c  |  13 +-
 .../kernels/sdis/sdis_2/ia_css_sdis2.host.c   |   9 +-
 .../kernels/tnr/tnr_1.0/ia_css_tnr_param.h    |   2 +-
 .../media/atomisp/pci/memory_realloc.c        |  81 --------
 .../media/atomisp/pci/mmu/sh_mmu_mrfld.c      |   1 -
 .../atomisp/pci/runtime/binary/src/binary.c   |   8 +-
 .../pci/runtime/debug/src/ia_css_debug.c      |   5 +-
 .../atomisp/pci/runtime/event/src/event.c     |   1 -
 .../frame/interface/ia_css_frame_comm.h       |   4 +-
 .../atomisp/pci/runtime/frame/src/frame.c     |  38 ++--
 .../isp_param/interface/ia_css_isp_param.h    |   2 +-
 .../pci/runtime/isp_param/src/isp_param.c     |  15 +-
 .../pci/runtime/pipeline/src/pipeline.c       |   5 +-
 .../pci/runtime/queue/src/queue_access.c      |  11 +-
 .../runtime/rmgr/interface/ia_css_rmgr_vbuf.h |   3 +-
 .../atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c  |   6 +-
 .../runtime/spctrl/interface/ia_css_spctrl.h  |   2 +-
 .../atomisp/pci/runtime/spctrl/src/spctrl.c   |  17 +-
 drivers/staging/media/atomisp/pci/sh_css.c    |  52 ++----
 .../media/atomisp/pci/sh_css_firmware.c       |   9 +-
 .../media/atomisp/pci/sh_css_firmware.h       |   2 +-
 .../media/atomisp/pci/sh_css_host_data.c      |   2 +-
 .../media/atomisp/pci/sh_css_internal.h       |  76 ++++----
 .../media/atomisp/pci/sh_css_metrics.c        |   9 +-
 .../staging/media/atomisp/pci/sh_css_mmu.c    |   1 -
 .../media/atomisp/pci/sh_css_param_dvs.c      |  21 +--
 .../media/atomisp/pci/sh_css_param_shading.c  |   3 +-
 .../staging/media/atomisp/pci/sh_css_params.c | 161 ++++++++--------
 .../staging/media/atomisp/pci/sh_css_params.h |  12 +-
 drivers/staging/media/atomisp/pci/sh_css_sp.c |  18 +-
 .../staging/media/atomisp/pci/sh_css_struct.h |   2 +-
 64 files changed, 437 insertions(+), 1081 deletions(-)
 delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_include/memory_access/memory_access.h
 delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_include/memory_realloc.h
 delete mode 100644 drivers/staging/media/atomisp/pci/hrt/hive_isp_css_mm_hrt.c
 delete mode 100644 drivers/staging/media/atomisp/pci/hrt/hive_isp_css_mm_hrt.h
 delete mode 100644 drivers/staging/media/atomisp/pci/ia_css_memory_access.c
 delete mode 100644 drivers/staging/media/atomisp/pci/memory_realloc.c

-- 
2.26.2


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

             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 Mauro Carvalho Chehab [this message]
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 ` [PATCH 15/20] media: atomisp: add debug for hmm alloc Mauro Carvalho Chehab
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=cover.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).