1. 11 1月, 2016 5 次提交
    • M
      [media] uapi/media.h: Rename entities types to functions · 4ca72efa
      Mauro Carvalho Chehab 提交于
      Rename the userspace types from MEDIA_ENT_T_ to MEDIA_ENT_F_
      and add the backward compatibility bits.
      
      The changes at the .c files was generated by the following
      coccinelle script:
      
      @@
      @@
      -MEDIA_ENT_T_UNKNOWN
      +MEDIA_ENT_F_UNKNOWN
      @@
      @@
      -MEDIA_ENT_T_DVB_BASE
      +MEDIA_ENT_F_DVB_BASE
      @@
      @@
      -MEDIA_ENT_T_V4L2_BASE
      +MEDIA_ENT_F_V4L2_BASE
      @@
      @@
      -MEDIA_ENT_T_V4L2_SUBDEV_BASE
      +MEDIA_ENT_F_V4L2_SUBDEV_BASE
      @@
      @@
      -MEDIA_ENT_T_CONNECTOR_BASE
      +MEDIA_ENT_F_CONNECTOR_BASE
      @@
      @@
      -MEDIA_ENT_T_V4L2_VIDEO
      +MEDIA_ENT_F_IO_V4L
      @@
      @@
      -MEDIA_ENT_T_V4L2_VBI
      +MEDIA_ENT_F_IO_VBI
      @@
      @@
      -MEDIA_ENT_T_V4L2_SWRADIO
      +MEDIA_ENT_F_IO_SWRADIO
      @@
      @@
      -MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN
      +MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN
      @@
      @@
      -MEDIA_ENT_T_CONN_RF
      +MEDIA_ENT_F_CONN_RF
      @@
      @@
      -MEDIA_ENT_T_CONN_SVIDEO
      +MEDIA_ENT_F_CONN_SVIDEO
      @@
      @@
      -MEDIA_ENT_T_CONN_COMPOSITE
      +MEDIA_ENT_F_CONN_COMPOSITE
      @@
      @@
      -MEDIA_ENT_T_CONN_TEST
      +MEDIA_ENT_F_CONN_TEST
      @@
      @@
      -MEDIA_ENT_T_V4L2_SUBDEV_SENSOR
      +MEDIA_ENT_F_CAM_SENSOR
      @@
      @@
      -MEDIA_ENT_T_V4L2_SUBDEV_FLASH
      +MEDIA_ENT_F_FLASH
      @@
      @@
      -MEDIA_ENT_T_V4L2_SUBDEV_LENS
      +MEDIA_ENT_F_LENS
      @@
      @@
      -MEDIA_ENT_T_V4L2_SUBDEV_DECODER
      +MEDIA_ENT_F_ATV_DECODER
      @@
      @@
      -MEDIA_ENT_T_V4L2_SUBDEV_TUNER
      +MEDIA_ENT_F_TUNER
      @@
      @@
      -MEDIA_ENT_T_DVB_DEMOD
      +MEDIA_ENT_F_DTV_DEMOD
      @@
      @@
      -MEDIA_ENT_T_DVB_DEMUX
      +MEDIA_ENT_F_TS_DEMUX
      @@
      @@
      -MEDIA_ENT_T_DVB_TSOUT
      +MEDIA_ENT_F_IO_DTV
      @@
      @@
      -MEDIA_ENT_T_DVB_CA
      +MEDIA_ENT_F_DTV_CA
      @@
      @@
      -MEDIA_ENT_T_DVB_NET_DECAP
      +MEDIA_ENT_F_DTV_NET_DECAP
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      4ca72efa
    • M
      [media] media-entity.h: rename entity.type to entity.function · 0e576b76
      Mauro Carvalho Chehab 提交于
      Entities should have one or more functions. Calling it as a
      type proofed to not be correct, as an entity could eventually
      have more than one type.
      
      So, rename the field as function.
      
      Please notice that this patch doesn't extend support for
      multiple function entities. Such change will happen when
      we have real case drivers using it.
      
      No functional changes.
      Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      0e576b76
    • M
      [media] v4l2-subdev: use MEDIA_ENT_T_UNKNOWN for new subdevs · b50bde4e
      Mauro Carvalho Chehab 提交于
      Instead of abusing MEDIA_ENT_T_V4L2_SUBDEV, initialize
      new subdev entities as MEDIA_ENT_T_UNKNOWN.
      Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      b50bde4e
    • M
      [media] media: use macros to check for V4L2 subdev entities · 3efdf62c
      Mauro Carvalho Chehab 提交于
      Instead of relying on media subtype, use the new macros to detect
      if an entity is a subdev or an A/V DMA entity.
      
      Please note that most drivers assume that there's just AV_DMA or
      V4L2 subdevs. This is not true anymore, as we've added MC support
      for DVB, and there are plans to add support for ALSA and FB/DRM
      too.
      
      Ok, on the current pipelines supported by those drivers, just V4L
      stuff are there, but, assuming that some day a pipeline that also
      works with other subsystems will ever added, it is better to add
      explicit checks for the AV_DMA stuff.
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      3efdf62c
    • M
      [media] replace all occurrences of MEDIA_ENT_T_DEVNODE_V4L · cf490661
      Mauro Carvalho Chehab 提交于
      Now that interfaces and entities are distinct, it makes no sense
      of keeping something named as MEDIA_ENT_T_DEVNODE.
      
      This change was done with this script:
      
      	for i in $(git grep -l MEDIA_ENT_T|grep -v uapi/linux/media.h); do sed s,MEDIA_ENT_T_DEVNODE_V4L,MEDIA_ENT_T_V4L2_VIDEO, <$i >a && mv a $i; done
      Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      cf490661
  2. 17 7月, 2015 1 次提交
  3. 08 4月, 2015 1 次提交
  4. 24 3月, 2015 2 次提交
  5. 23 12月, 2014 1 次提交
  6. 22 8月, 2014 1 次提交
  7. 22 7月, 2014 2 次提交
    • M
      [media] v4l2-subdev: Fix compilation when !VIDEO_V4L2_SUBDEV_API · d352bcc9
      Mauro Carvalho Chehab 提交于
      As reported by Kbuildtest:
      
         drivers/media/v4l2-core/v4l2-subdev.c: In function 'check_format':
         drivers/media/v4l2-core/v4l2-subdev.c:136:23: error: 'struct v4l2_subdev' has no member named 'entity'
           if (format->pad >= sd->entity.num_pads)
                                ^
         drivers/media/v4l2-core/v4l2-subdev.c: In function 'check_crop':
         drivers/media/v4l2-core/v4l2-subdev.c:148:21: error: 'struct v4l2_subdev' has no member named 'entity'
           if (crop->pad >= sd->entity.num_pads)
                              ^
         drivers/media/v4l2-core/v4l2-subdev.c: In function 'check_selection':
         drivers/media/v4l2-core/v4l2-subdev.c:161:20: error: 'struct v4l2_subdev' has no member named 'entity'
           if (sel->pad >= sd->entity.num_pads)
                             ^
         drivers/media/v4l2-core/v4l2-subdev.c: In function 'check_edid':
         drivers/media/v4l2-core/v4l2-subdev.c:169:21: error: 'struct v4l2_subdev' has no member named 'entity'
           if (edid->pad >= sd->entity.num_pads)
                              ^
         drivers/media/v4l2-core/v4l2-subdev.c: In function 'subdev_do_ioctl':
      >> drivers/media/v4l2-core/v4l2-subdev.c:186:6: warning: unused variable 'rval' [-Wunused-variable]
           int rval;
               ^
         drivers/media/v4l2-core/v4l2-subdev.c: At top level:
         drivers/media/v4l2-core/v4l2-subdev.c:129:12: warning: 'check_format' defined but not used [-Wunused-function]
          static int check_format(struct v4l2_subdev *sd,
                     ^
         drivers/media/v4l2-core/v4l2-subdev.c:142:12: warning: 'check_crop' defined but not used [-Wunused-function]
          static int check_crop(struct v4l2_subdev *sd, struct v4l2_subdev_crop *crop)
                     ^
         drivers/media/v4l2-core/v4l2-subdev.c:154:12: warning: 'check_selection' defined but not used [-Wunused-function]
          static int check_selection(struct v4l2_subdev *sd,
                     ^
         drivers/media/v4l2-core/v4l2-subdev.c:167:12: warning: 'check_edid' defined but not used [-Wunused-function]
          static int check_edid(struct v4l2_subdev *sd, struct v4l2_subdev_edid *edid)
      
      The above warnins happen because those functions are used only
      when the V4L2 subdev API is enabled.
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      d352bcc9
    • S
      [media] v4l: subdev: Unify argument validation across IOCTLs · b225e398
      Sakari Ailus 提交于
      Separate validation of different argument types. There's no reason to do
      this separately for every IOCTL.
      Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      b225e398
  8. 17 7月, 2014 1 次提交
  9. 25 5月, 2014 2 次提交
  10. 14 5月, 2014 1 次提交
  11. 11 3月, 2014 1 次提交
  12. 24 2月, 2014 1 次提交
  13. 22 11月, 2012 1 次提交
  14. 14 9月, 2012 1 次提交
  15. 14 8月, 2012 1 次提交
  16. 07 7月, 2012 2 次提交
  17. 14 5月, 2012 1 次提交
  18. 11 4月, 2012 2 次提交
  19. 15 2月, 2012 1 次提交
  20. 06 1月, 2012 1 次提交
  21. 01 11月, 2011 1 次提交
  22. 24 9月, 2011 1 次提交
  23. 28 7月, 2011 4 次提交
    • H
      [media] v4l2-event/ctrls/fh: allocate events per fh and per type instead of just per-fh · f1e393de
      Hans Verkuil 提交于
      The driver had to decide how many events to allocate when the v4l2_fh struct
      was created. It was possible to add more events afterwards, but there was no
      way to ensure that you wouldn't miss important events if the event queue
      would fill up for that filehandle.
      
      In addition, once there were no more free events, any new events were simply
      dropped on the floor.
      
      For the control event in particular this made life very difficult since
      control status/value changes could just be missed if the number of allocated
      events and the speed at which the application read events was too low to keep
      up with the number of generated events. The application would have no idea
      what the latest state was for a control since it could have missed the latest
      control change.
      
      So this patch makes some major changes in how events are allocated. Instead
      of allocating events per-filehandle they are now allocated when subscribing an
      event. So for that particular event type N events (determined by the driver)
      are allocated. Those events are reserved for that particular event type.
      This ensures that you will not miss events for a particular type altogether.
      
      In addition, if there are N events in use and a new event is raised, then
      the oldest event is dropped and the new one is added. So the latest event
      is always available.
      
      This can be further improved by adding the ability to merge the state of
      two events together, ensuring that no data is lost at all. This will be
      added in the next patch.
      
      This also makes it possible to allow the user to determine the number of
      events that will be allocated. This is not implemented at the moment, but
      would be trivial.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      f1e393de
    • H
      [media] v4l2-events/fh: merge v4l2_events into v4l2_fh · 523f46d6
      Hans Verkuil 提交于
      Drivers that supported events used to be rare, but now that controls can also
      raise events this will become much more common since almost all drivers have
      controls.
      
      This means that keeping struct v4l2_events as a separate struct make no more
      sense. Merging it into struct v4l2_fh simplifies things substantially as it
      is now an integral part of the filehandle struct.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      523f46d6
    • H
      [media] v4l2-ctrls: add v4l2_fh pointer to the set control functions · ab892bac
      Hans Verkuil 提交于
      When an application changes a control you want to generate an event.
      However, you want to avoid sending such an event back to the application
      (file handle) that caused the change.
      
      Add the filehandle to the various set control functions.
      
      The filehandle isn't used yet, but the control event patches will need
      this.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      ab892bac
    • H
      [media] v4l2-subdev: implement per-filehandle control handlers · 18d171ba
      Hans Verkuil 提交于
      To be consistent with v4l2-ioctl.c.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      18d171ba
  24. 05 5月, 2011 1 次提交
  25. 22 3月, 2011 4 次提交