1. 20 Jun, 2013 2 commits
    • Mauro Carvalho Chehab's avatar
      [media] Fix build when drivers are builtin and frontend modules · bb69ee27
      Mauro Carvalho Chehab authored
      There are a large number of reports that the media build is
      not compiling when some drivers are compiled as builtin, while
      the needed frontends are compiled as module.
      
      On the last one of such reports:
      	From: kbuild test robot <fengguang.wu@intel.com>
      	Subject: saa7134-dvb.c:undefined reference to `zl10039_attach'
      
      The .config file has:
      
      	CONFIG_VIDEO_SAA7134=y
      	CONFIG_VIDEO_SAA7134_DVB=y
      	# CONFIG_MEDIA_ATTACH is not set
      	CONFIG_DVB_ZL10039=m
      
      And it produces all those errors:
      
         drivers/built-in.o: In function `set_type':
         tuner-core.c:(.text+0x2f263e): undefined reference to `tea5767_attach'
         tuner-core.c:(.text+0x2f273e): undefined reference to `tda9887_attach'
         drivers/built-in.o: In function `tuner_probe':
         tuner-core.c:(.text+0x2f2d20): undefined reference to `tea5767_autodetection'
         drivers/built-in.o: In function `av7110_attach':
         av7110.c:(.text+0x330bda): undefined reference to `ves1x93_attach'
         av7110.c:(.text+0x330bf7): undefined reference to `stv0299_attach'
         av7110.c:(.text+0x330c63): undefined reference to `tda8083_attach'
         av7110.c:(.text+0x330d09): undefined reference to `ves1x93_attach'
         av7110.c:(.text+0x330d33): undefined reference to `tda8083_attach'
         av7110.c:(.text+0x330d5d): undefined reference to `stv0297_attach'
         av7110.c:(.text+0x330dbe): undefined reference to `stv0299_attach'
         drivers/built-in.o: In function `tuner_attach_dtt7520x':
         ngene-cards.c:(.text+0x3381cb): undefined reference to `dvb_pll_attach'
         drivers/built-in.o: In function `demod_attach_lg330x':
         ngene-cards.c:(.text+0x33828a): undefined reference to `lgdt330x_attach'
         drivers/built-in.o: In function `demod_attach_stv0900':
         ngene-cards.c:(.text+0x3383d5): undefined reference to `stv090x_attach'
         drivers/built-in.o: In function `cineS2_probe':
         ngene-cards.c:(.text+0x338b7f): undefined reference to `drxk_attach'
         drivers/built-in.o: In function `configure_tda827x_fe':
         saa7134-dvb.c:(.text+0x346ae7): undefined reference to `tda10046_attach'
         drivers/built-in.o: In function `dvb_init':
         saa7134-dvb.c:(.text+0x347283): undefined reference to `mt352_attach'
         saa7134-dvb.c:(.text+0x3472cd): undefined reference to `mt352_attach'
         saa7134-dvb.c:(.text+0x34731c): undefined reference to `tda10046_attach'
         saa7134-dvb.c:(.text+0x34733c): undefined reference to `tda10046_attach'
         saa7134-dvb.c:(.text+0x34735c): undefined reference to `tda10046_attach'
         saa7134-dvb.c:(.text+0x347378): undefined reference to `tda10046_attach'
         saa7134-dvb.c:(.text+0x3473db): undefined reference to `tda10046_attach'
         drivers/built-in.o:saa7134-dvb.c:(.text+0x347502): more undefined references to `tda10046_attach' follow
         drivers/built-in.o: In function `dvb_init':
         saa7134-dvb.c:(.text+0x347812): undefined reference to `mt352_attach'
         saa7134-dvb.c:(.text+0x347951): undefined reference to `mt312_attach'
         saa7134-dvb.c:(.text+0x3479a9): undefined reference to `mt312_attach'
      >> saa7134-dvb.c:(.text+0x3479c1): undefined reference to `zl10039_attach'
      
      This is happening because a builtin module can't use directly a symbol
      found on a module. By enabling CONFIG_MEDIA_ATTACH, the configuration
      becomes valid, as dvb_attach() macro loads the module if needed, making
      the symbol available to the builtin module.
      
      While this bug started to appear after the patches that use IS_DEFINED
      macro (like changeset 7b34be71), this
      bug is a way ancient than that.
      
      The thing is that, before the IS_DEFINED() patches, the logic used to be:
      
             && defined(MODULE))
      struct dvb_frontend *zl10039_attach(struct dvb_frontend *fe,
      					u8 i2c_addr,
      					struct i2c_adapter *i2c);
      static inline struct dvb_frontend *zl10039_attach(struct dvb_frontend *fe,
      					u8 i2c_addr,
      					struct i2c_adapter *i2c)
      {
      	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
      	return NULL;
      }
      
      The above code, with the .config file used, was evoluting to FALSE
      (instead of TRUE as it should be, as CONFIG_DVB_ZL10039 is 'm'),
      and were adding the static inline code at saa7134-dvb, instead
      of the external call. So, while it weren't producing any compilation
      error, the code weren't working either.
      
      So, as the overhead for using CONFIG_MEDIA_ATTACH is minimal, just
      enable it, if MODULES is defined.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      bb69ee27
    • Mauro Carvalho Chehab's avatar
      [media] s5p makefiles: don't override other selections on obj-[ym] · 5f63adbb
      Mauro Carvalho Chehab authored
      The $obj-m/$obj-y vars should be adding new modules to build, not
      overriding it. So, it should never use
      	$obj-y := foo.o
      instead, it should use:
      	$obj-y += foo.o
      
      Failing to do that is very bad, as it will suppress needed modules.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      5f63adbb
  2. 19 Jun, 2013 1 commit
    • Sylwester Nawrocki's avatar
      [media] exynos4-is: Fix FIMC-IS clocks initialization · 722a860e
      Sylwester Nawrocki authored
      The ISP clock register content is not preserved over the ISP power domain
      off/on cycle. Instead of setting the clock frequencies once at probe time
      the clock rates set up is moved to the runtime_resume handler, which is
      invoked after the related power domain is already enabled, ensuring the
      clocks are properly configured when the device is actively used.
      This fixes the FIMC-IS malfunctions and STREAM ON timeout errors accuring
      on some boards:
      [ 59.860000] fimc_is_general_irq_handler:583 ISR_NDONE: 5: 0x800003e8, IS_ERROR_UNKNOWN
      [ 59.860000] fimc_is_general_irq_handler:586 IS_ERROR_TIME_OUT
      Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      722a860e
  3. 17 Jun, 2013 1 commit
  4. 09 Jun, 2013 6 commits
  5. 08 Jun, 2013 6 commits
  6. 03 Jun, 2013 12 commits
  7. 27 May, 2013 2 commits
  8. 21 May, 2013 10 commits