1. 24 Sep, 2018 5 commits
    • Arnd Bergmann's avatar
      media: imx: work around false-positive warning, again · 8d1a4817
      Arnd Bergmann authored
      A warning that I thought to be solved by a previous patch of mine
      has resurfaced with gcc-8:
      
      media/imx/imx-media-csi.c: In function 'csi_link_validate':
      media/imx/imx-media-csi.c:1025:20: error: 'upstream_ep' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      media/imx/imx-media-csi.c:1026:24: error: 'upstream_ep.bus_type' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      media/imx/imx-media-csi.c:127:19: error: 'upstream_ep.bus.parallel.bus_width' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      media/imx/imx-media-csi.c: In function 'csi_enum_mbus_code':
      media/imx/imx-media-csi.c:132:9: error: '*((void *)&upstream_ep+12)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      media/imx/imx-media-csi.c:132:48: error: 'upstream_ep.bus.parallel.bus_width' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      I spent some more time digging in this time, and think I have a better
      fix, bailing out of the function that either initializes or errors
      out here, which simplifies the code enough for gcc to figure out
      what is going on. The earlier partial workaround can be removed now,
      as the new workaround is better.
      
      Fixes: 890f2769 ("media: imx: work around false-positive warning")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      8d1a4817
    • Hans Verkuil's avatar
      media: cec: remove cec-edid.c · f94d463f
      Hans Verkuil authored
      Move cec_get_edid_phys_addr() to cec-adap.c. It's not worth keeping
      a separate source for this.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Cc: <stable@vger.kernel.org>      # for v4.17 and up
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      f94d463f
    • Hans Verkuil's avatar
      media: cec/v4l2: move V4L2 specific CEC functions to V4L2 · 9cfd2753
      Hans Verkuil authored
      Several CEC functions are actually specific for use with receivers,
      i.e. they should be part of the V4L2 subsystem, not CEC.
      
      These functions deal with validating and modifying EDIDs for (HDMI)
      receivers, and they do not actually have anything to do with the CEC
      subsystem and whether or not CEC is enabled. The problem was that if
      the CEC_CORE config option was not set, then these functions would
      become stubs, but that's not right: they should always be valid.
      
      So replace the cec_ prefix by v4l2_ and move them to v4l2-dv-timings.c.
      Update all drivers that call these accordingly.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Reported-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Cc: <stable@vger.kernel.org>      # for v4.17 and up
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      9cfd2753
    • Hans Verkuil's avatar
      media: cec: integrate cec_validate_phys_addr() in cec-api.c · e81bff39
      Hans Verkuil authored
      The cec_phys_addr_validate() function will be moved to V4L2,
      so use a simplified variant of that function in cec-api.c.
      cec now no longer calls cec_phys_addr_validate() and it can
      be safely moved to V4L2.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Cc: <stable@vger.kernel.org>      # for v4.17 and up
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      e81bff39
    • Hans Verkuil's avatar
      media: cec: make cec_get_edid_spa_location() an inline function · b915bf57
      Hans Verkuil authored
      This function is needed by both V4L2 and CEC, so move this to
      cec.h as a static inline since there are no obvious shared
      modules between the two subsystems.
      
      This patch, together with the following ones, fixes a
      dependency bug: if CEC_CORE is disabled, then building adv7604
      (and other HDMI receivers) will fail because an essential
      function is now stubbed out.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Cc: <stable@vger.kernel.org>      # for v4.17 and up
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      b915bf57
  2. 17 Sep, 2018 35 commits