Linux-Media Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/4] media: staging: rkisp1: add serialization to the isp and resizer ops
@ 2020-02-07  8:59 Dafna Hirschfeld
  2020-02-07  8:59 ` [PATCH 1/4] media: staging: rkisp1: change function to return void instead of int Dafna Hirschfeld
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Dafna Hirschfeld @ 2020-02-07  8:59 UTC (permalink / raw)
  To: linux-media
  Cc: dafna.hirschfeld, helen.koike, ezequiel, hverkuil, kernel,
	dafna3, sakari.ailus, linux-rockchip, mchehab

Subdevices' ops callbacks can be called either through uAPI with
ioctl or through kAPI with the v4l2_subdev_call macro. Therefore
the lock of the subdevice node is not set and instead the driver
itself is responsible for serializing the ops.
This patchset adds serialization to the isp and resizer subdevices.
A mutex field 'ops_lock' is added to the inner struct of each of them.

The ops_lock is then used in the following operations:

set_fmt, get_fmt, set_selection, get_selection, s_stream

Serialization for enum_mbus_code is not needed since this operation
is independent of the specific configuration.

Patches summary:

patch 1 Changes two functions that return int to return void
        and removes a redundant check of error since the functions don't fail.

patch 2 moves the check that the bus type is DPHY before initializing registers
        in the s_stream callback of the isp.

patch 3 adds serialization for the isp subdevice.

patch 4 adds serialization for the resizer subdevice.


Dafna Hirschfeld (4):
  media: staging: rkisp1: change function to return void instead of int
  media: staging: rkisp1: isp: check for dphy bus before initializations
    in s_stream
  media: staging: rkisp1: add serialization to the isp subdev ops
  media: staging: rkisp1: add serialization to the resizer subdev ops

 drivers/staging/media/rkisp1/rkisp1-common.h  |  3 ++
 drivers/staging/media/rkisp1/rkisp1-isp.c     | 51 ++++++++++---------
 drivers/staging/media/rkisp1/rkisp1-resizer.c | 16 +++++-
 3 files changed, 45 insertions(+), 25 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, back to index

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07  8:59 [PATCH 0/4] media: staging: rkisp1: add serialization to the isp and resizer ops Dafna Hirschfeld
2020-02-07  8:59 ` [PATCH 1/4] media: staging: rkisp1: change function to return void instead of int Dafna Hirschfeld
2020-02-07 12:57   ` Helen Koike
2020-02-07  8:59 ` [PATCH 2/4] media: staging: rkisp1: isp: check for dphy bus before initializations in s_stream Dafna Hirschfeld
2020-02-07 12:57   ` Helen Koike
2020-02-07  8:59 ` [PATCH 3/4] media: staging: rkisp1: add serialization to the isp subdev ops Dafna Hirschfeld
2020-02-07 13:54   ` Helen Koike
2020-02-14  9:46   ` Sakari Ailus
2020-02-07  8:59 ` [PATCH 4/4] media: staging: rkisp1: add serialization to the resizer " Dafna Hirschfeld
2020-02-07 13:56   ` Helen Koike

Linux-Media Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-media/0 linux-media/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-media linux-media/ https://lore.kernel.org/linux-media \
		linux-media@vger.kernel.org
	public-inbox-index linux-media

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-media


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git