1. 11 1月, 2016 2 次提交
    • M
      [media] dvb: modify core to implement interfaces/entities at MC new gen · df2f94e5
      Mauro Carvalho Chehab 提交于
      The Media Controller New Generation redefines the types for both
      interfaces and entities to be used on DVB. Make the needed
      changes at the DVB core for all interfaces, entities and
      data and interface links to appear in the graph.
      Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      df2f94e5
    • M
      [media] media: convert links from array to list · 57208e5e
      Mauro Carvalho Chehab 提交于
      The entire logic that represent graph links were developed on a
      time where there were no needs to dynamic remove links. So,
      although links are created/removed one by one via some
      functions, they're stored as an array inside the entity struct.
      
      As the array may grow, there's a logic inside the code that
      checks if the amount of space is not enough to store
      the needed links. If it isn't the core uses krealloc()
      to change the size of the link, with is bad, as it
      leaves the memory fragmented.
      
      So, convert links into a list.
      
      Also, currently,  both source and sink entities need the link
      at the graph traversal logic inside media_entity. So there's
      a logic duplicating all links. That makes it to spend
      twice the memory needed. This is not a big deal for today's
      usage, where the number of links are not big.
      
      Yet, if during the MC workshop discussions, it was said that
      IIO graphs could have up to 4,000 entities. So, we may
      want to remove the duplication on some future. The problem
      is that it would require a separate linked list to store
      the backlinks inside the entity, or to use a more complex
      algorithm to do graph backlink traversal, with is something
      that the current graph traversal inside the core can't cope
      with. So, let's postpone a such change if/when it is actually
      needed.
      
      It should also be noticed that the media_link structure uses
      44 bytes on 32-bit architectures and 84 bytes on 64-bit
      architecture. It will thus be allocated out of the 64-bytes and
      96-bytes pools respectively. That's a 12.5% memory waste on
      64-bit architectures and 31.25% on 32-bit architecture.
      A linked list is less efficient than an array in this case, but
      this could later be optimized if we can get rid of the reverse
      links (with would reduce memory allocation by 50%).
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      57208e5e
  2. 19 11月, 2015 1 次提交
    • M
      [media] fix dvb_frontend_sleep_until() logic · a733a41a
      Mauro Carvalho Chehab 提交于
      As pointed by Laurent Navet:
      	"Calling ktime_add_us() seems useless as is only useful
      	 for it's return value which is ignored."
      
      That's reported by coverity CID 1309761.
      
      Laurent proposed to just remove ktime_add_us, but the fact is that
      the logic of this function is broken. Instead, we need to use the
      value of the timeout, and ensure that it will work on the loops
      to emulate the legacy DiSEqC ioctl (FE_DISHNETWORK_SEND_LEGACY_CMD).
      
      Please notice that the logic was also broken if, for any reason,
      msleep() would sleep a little less than what it was expected, as
      newdelta would be smaller than delta, and udelay() would not be called.
      
      It should also be noticed that nobody noticed that trouble before
      likely because the FE_DISHNETWORK_SEND_LEGACY_CMD is not used
      anymore by modern DVB applications.
      Reported-by: NLaurent Navet <laurent.navet@gmail.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      a733a41a
  3. 18 11月, 2015 1 次提交
  4. 17 11月, 2015 2 次提交
  5. 23 8月, 2015 1 次提交
  6. 10 6月, 2015 3 次提交
  7. 21 5月, 2015 1 次提交
  8. 26 2月, 2015 1 次提交
  9. 24 2月, 2015 1 次提交
  10. 14 2月, 2015 3 次提交
  11. 04 11月, 2014 1 次提交
  12. 26 9月, 2014 1 次提交
    • M
      [media] dvb_frontend: Fix __user namespace · 71d1b2be
      Mauro Carvalho Chehab 提交于
      As reported by smatch:
      
      drivers/media/dvb-core/dvb_frontend.c:1960:45: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/dvb-core/dvb_frontend.c:1960:45:    expected void const [noderef] <asn:1>*from
      drivers/media/dvb-core/dvb_frontend.c:1960:45:    got struct dtv_property *[noderef] <asn:1>props
      drivers/media/dvb-core/dvb_frontend.c:1992:45: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/dvb-core/dvb_frontend.c:1992:45:    expected void const [noderef] <asn:1>*from
      drivers/media/dvb-core/dvb_frontend.c:1992:45:    got struct dtv_property *[noderef] <asn:1>props
      drivers/media/dvb-core/dvb_frontend.c:2014:38: warning: incorrect type in argument 1 (different address spaces)
      drivers/media/dvb-core/dvb_frontend.c:2014:38:    expected void [noderef] <asn:1>*to
      drivers/media/dvb-core/dvb_frontend.c:2014:38:    got struct dtv_property *[noderef] <asn:1>props
      drivers/media/dvb-core/dvb_frontend.c:1946:17: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:1947:17: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:1951:22: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:1951:42: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:1954:31: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:1960:41: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:1960:54: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:1965:33: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:1978:17: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:1979:17: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:1983:22: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:1983:42: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:1986:31: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:1992:41: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:1992:54: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:2007:33: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:2014:34: warning: dereference of noderef expression
      drivers/media/dvb-core/dvb_frontend.c:2014:52: warning: dereference of noderef expression
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      71d1b2be
  13. 27 8月, 2014 1 次提交
  14. 22 8月, 2014 1 次提交
    • M
      [media] dvb-frontend: add core support for tuner suspend/resume · 59d7889a
      Mauro Carvalho Chehab 提交于
      While several tuners have some sort of suspend/resume
      implementation, this is currently mangled with an optional
      .sleep callback that it is also used to put the device on
      low power mode.
      
      Not all drivers implement it, as returning the driver from
      low power may require to re-load the firmware, with takes
      some time. Also, some drivers may delay it.
      
      So, the more coherent is to add two new optional callbacks
      that will let the tuners to directy implement suspend and
      resume callbacks if they need.
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      59d7889a
  15. 26 7月, 2014 2 次提交
  16. 17 6月, 2014 1 次提交
  17. 12 3月, 2014 1 次提交
  18. 05 3月, 2014 1 次提交
  19. 30 4月, 2013 1 次提交
  20. 21 3月, 2013 1 次提交
  21. 19 3月, 2013 2 次提交
  22. 16 2月, 2013 1 次提交
  23. 24 1月, 2013 2 次提交
  24. 28 12月, 2012 2 次提交
  25. 28 10月, 2012 1 次提交
    • M
      [media] dvb_frontend: Don't declare values twice at a table · e6ea0b91
      Mauro Carvalho Chehab 提交于
      drivers/media/dvb-core/dvb_frontend.c:1032:2: warning: initialized field overwritten [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1032:2: warning: (near initialization for 'dtv_cmds[36]') [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1033:2: warning: initialized field overwritten [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1033:2: warning: (near initialization for 'dtv_cmds[37]') [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1034:2: warning: initialized field overwritten [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1034:2: warning: (near initialization for 'dtv_cmds[38]') [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1035:2: warning: initialized field overwritten [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1035:2: warning: (near initialization for 'dtv_cmds[39]') [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1036:2: warning: initialized field overwritten [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1036:2: warning: (near initialization for 'dtv_cmds[40]') [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1037:2: warning: initialized field overwritten [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1037:2: warning: (near initialization for 'dtv_cmds[60]') [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1045:2: warning: initialized field overwritten [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1045:2: warning: (near initialization for 'dtv_cmds[46]') [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1051:2: warning: initialized field overwritten [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1051:2: warning: (near initialization for 'dtv_cmds[52]') [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1060:2: warning: initialized field overwritten [-Woverride-init]
      drivers/media/dvb-core/dvb_frontend.c:1060:2: warning: (near initialization for 'dtv_cmds[61]') [-Woverride-init]
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      e6ea0b91
  26. 07 10月, 2012 2 次提交
  27. 28 9月, 2012 2 次提交
  28. 24 9月, 2012 1 次提交