All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
To: linux-media@vger.kernel.org
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Prabhakar Lad <prabhakar.csengg@gmail.com>
Subject: [PATCH v5 0/2] media: Add entity types
Date: Wed, 23 Mar 2016 10:45:54 +0200	[thread overview]
Message-ID: <1458722756-7269-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> (raw)

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


             reply	other threads:[~2016-03-23  8:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23  8:45 Laurent Pinchart [this message]
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

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=1458722756-7269-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com \
    --to=laurent.pinchart+renesas@ideasonboard.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=prabhakar.csengg@gmail.com \
    --cc=s.nawrocki@samsung.com \
    --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 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.