All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/2] media: Add entity types
@ 2016-03-23  8:45 Laurent Pinchart
  2016-03-23  8:45 ` [PATCH v5 1/2] media: Add obj_type field to struct media_entity Laurent Pinchart
  2016-03-23  8:45 ` [PATCH v5 2/2] media: Rename is_media_entity_v4l2_io to is_media_entity_v4l2_video_device Laurent Pinchart
  0 siblings, 2 replies; 22+ messages in thread
From: Laurent Pinchart @ 2016-03-23  8:45 UTC (permalink / raw)
  To: linux-media
  Cc: Sakari Ailus, Hans Verkuil, Mauro Carvalho Chehab, Kyungmin Park,
	Sylwester Nawrocki, Prabhakar Lad

Hello,

This patch series adds an obj_type field to the media entity structure. It is
a resend of v4 rebased on top of the latest media master branch, with the type
field renamed to obj_type and the documentation clarified. I have dropped
patches 1 and 2 as they have been merged already.

As a reminder, a few words about what types are and are not. The purpose of
the entity type is to identify the object type that implements the entity, in
order to safely cast the entity to that object (using container_of()). Two
types are currently defined, for media entities that are embedded in a struct
video_device (MEDIA_ENTITY_TYPE_VIDEO_DEVICE) or embedded in a struct
v4l2_subdev (MEDIA_ENTITY_TYPE_V4L2_SUBDEV). A third type is defined to catch
uninitialized fields (MEDIA_ENTITY_TYPE_INVALID) but should not be used
directly.

Types do not convey any additional information. They don't tell anything about
the features of the entity or the object that implements it. In particular
they don't report capabilities of video_device instances, which is why the
is_media_entity_v4l2_io() function performs additional checks on the video
device capabilities field, after verifying with the type that it can safely be
cast to a video_device instance.

Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>

Laurent Pinchart (2):
  media: Add obj_type field to struct media_entity
  media: Rename is_media_entity_v4l2_io to
    is_media_entity_v4l2_video_device

 drivers/media/media-device.c                    |  2 +
 drivers/media/platform/exynos4-is/media-dev.c   |  4 +-
 drivers/media/platform/omap3isp/ispvideo.c      |  2 +-
 drivers/media/v4l2-core/v4l2-dev.c              |  1 +
 drivers/media/v4l2-core/v4l2-mc.c               |  2 +-
 drivers/media/v4l2-core/v4l2-subdev.c           |  1 +
 drivers/staging/media/davinci_vpfe/vpfe_video.c |  2 +-
 drivers/staging/media/omap4iss/iss_video.c      |  2 +-
 include/media/media-entity.h                    | 81 +++++++++++++------------
 9 files changed, 53 insertions(+), 44 deletions(-)

-- 
Regards,

Laurent Pinchart


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

end of thread, other threads:[~2016-03-24  8:15 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-23  8:45 [PATCH v5 0/2] media: Add entity types Laurent Pinchart
2016-03-23  8:45 ` [PATCH v5 1/2] media: Add obj_type field to struct media_entity Laurent Pinchart
2016-03-23 10:35   ` Mauro Carvalho Chehab
2016-03-23 14:05     ` Hans Verkuil
2016-03-23 14:45       ` Laurent Pinchart
2016-03-23 14:57         ` Hans Verkuil
2016-03-23 15:04           ` Laurent Pinchart
2016-03-23 15:17           ` Mauro Carvalho Chehab
2016-03-23 15:41             ` Laurent Pinchart
2016-03-23 17:29               ` Mauro Carvalho Chehab
2016-03-24  8:15                 ` Laurent Pinchart
2016-03-23 15:00       ` Mauro Carvalho Chehab
2016-03-23 15:11         ` Laurent Pinchart
2016-03-23 15:20           ` Hans Verkuil
2016-03-23 15:24           ` Mauro Carvalho Chehab
2016-03-23 16:30             ` Laurent Pinchart
2016-03-23 17:06               ` Mauro Carvalho Chehab
2016-03-23 16:17         ` Sakari Ailus
2016-03-23 16:47           ` Mauro Carvalho Chehab
2016-03-23 23:42             ` Sakari Ailus
2016-03-24  7:51             ` Laurent Pinchart
2016-03-23  8:45 ` [PATCH v5 2/2] media: Rename is_media_entity_v4l2_io to is_media_entity_v4l2_video_device Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.