* [PATCH -rc2-mm2] BUG FIX - v4l broken hybrid dvb inclusion @ 2005-07-12 15:06 Michael Krufky 2005-07-12 17:07 ` Alexey Dobriyan 2005-07-12 22:36 ` Johannes Stezenbach 0 siblings, 2 replies; 6+ messages in thread From: Michael Krufky @ 2005-07-12 15:06 UTC (permalink / raw) To: Andrew Morton; +Cc: Mauro Carvalho Chehab, linux-kernel, Linux and Kernel Video [-- Attachment #1: Type: text/plain, Size: 657 bytes --] There was a change made in 2.6.13-rc2-mm2 within both of the following patches: v4l-saa7134-hybrid-dvb.patch v4l-cx88-update.patch The specific change that caused this problem is: - Let Kconfig decide whether to include frontend-specific code. I had tested this change against 2.6.13-rc2-mm1, and it worked perfectly as expected, but it caused problems in today's 2.6.13-rc2-mm2 release. For some reason, the symbols don't get set properly. The following patch corrects this problem and restores previous behavior. We will eventually have to remove these symbols alltogether when we find a better solution, but this will fix the bug until then. [-- Attachment #2: v4l-broken-hybrid-dvb-inclusion-fix.patch --] [-- Type: text/plain, Size: 1269 bytes --] Always include dvb frontend code for hybrid cx88 and saa7134 boards. Signed-off-by: Michael Krufky <mkrufky@m1k.net> cx88/cx88-dvb.c | 5 +++++ saa7134/saa7134-dvb.c | 3 +++ 2 files changed, 8 insertions(+) diff -upr linux-2.6.13-rc2-mm2.orig/drivers/media/video/cx88/cx88-dvb.c linux/drivers/media/video/cx88/cx88-dvb.c --- linux-2.6.13-rc2-mm2.orig/drivers/media/video/cx88/cx88-dvb.c 2005-07-12 08:56:58.000000000 +0000 +++ linux/drivers/media/video/cx88/cx88-dvb.c 2005-07-12 09:01:13.000000000 +0000 @@ -30,6 +30,11 @@ #include <linux/file.h> #include <linux/suspend.h> +#define CONFIG_DVB_MT352 1 +#define CONFIG_DVB_CX22702 1 +#define CONFIG_DVB_OR51132 1 +#define CONFIG_DVB_LGDT3302 1 + #include "cx88.h" #include "dvb-pll.h" diff -upr linux-2.6.13-rc2-mm2.orig/drivers/media/video/saa7134/saa7134-dvb.c linux/drivers/media/video/saa7134/saa7134-dvb.c --- linux-2.6.13-rc2-mm2.orig/drivers/media/video/saa7134/saa7134-dvb.c 2005-07-12 08:56:59.000000000 +0000 +++ linux/drivers/media/video/saa7134/saa7134-dvb.c 2005-07-12 09:01:55.000000000 +0000 @@ -30,6 +30,9 @@ #include <linux/kthread.h> #include <linux/suspend.h> +#define CONFIG_DVB_MT352 1 +#define CONFIG_DVB_TDA1004X 1 + #include "saa7134-reg.h" #include "saa7134.h" ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -rc2-mm2] BUG FIX - v4l broken hybrid dvb inclusion 2005-07-12 15:06 [PATCH -rc2-mm2] BUG FIX - v4l broken hybrid dvb inclusion Michael Krufky @ 2005-07-12 17:07 ` Alexey Dobriyan 2005-07-12 17:19 ` Michael Krufky 2005-07-12 22:36 ` Johannes Stezenbach 1 sibling, 1 reply; 6+ messages in thread From: Alexey Dobriyan @ 2005-07-12 17:07 UTC (permalink / raw) To: Michael Krufky Cc: Andrew Morton, Mauro Carvalho Chehab, linux-kernel, video4linux-list On Tuesday 12 July 2005 19:06, Michael Krufky wrote: > v4l-saa7134-hybrid-dvb.patch > v4l-cx88-update.patch > > The specific change that caused this problem is: > > - Let Kconfig decide whether to include frontend-specific code. > > I had tested this change against 2.6.13-rc2-mm1, and it worked perfectly as > expected, but it caused problems in today's 2.6.13-rc2-mm2 release. For > some reason, the symbols don't get set properly. What symbols? What error messages do you see? > --- linux-2.6.13-rc2-mm2.orig/drivers/media/video/cx88/cx88-dvb.c > +++ linux/drivers/media/video/cx88/cx88-dvb.c > +#define CONFIG_DVB_MT352 1 > +#define CONFIG_DVB_CX22702 1 > +#define CONFIG_DVB_OR51132 1 > +#define CONFIG_DVB_LGDT3302 1 > --- linux-2.6.13-rc2-mm2.orig/drivers/media/video/saa7134/saa7134-dvb.c > +++ linux/drivers/media/video/saa7134/saa7134-dvb.c > +#define CONFIG_DVB_MT352 1 > +#define CONFIG_DVB_TDA1004X 1 Looks band-aidly. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -rc2-mm2] BUG FIX - v4l broken hybrid dvb inclusion 2005-07-12 17:07 ` Alexey Dobriyan @ 2005-07-12 17:19 ` Michael Krufky 2005-07-12 18:18 ` Alexey Dobriyan 0 siblings, 1 reply; 6+ messages in thread From: Michael Krufky @ 2005-07-12 17:19 UTC (permalink / raw) To: Alexey Dobriyan Cc: Andrew Morton, Mauro Carvalho Chehab, linux-kernel, video4linux-list Alexey Dobriyan wrote: >On Tuesday 12 July 2005 19:06, Michael Krufky wrote: > > >>v4l-saa7134-hybrid-dvb.patch >>v4l-cx88-update.patch >> >>The specific change that caused this problem is: >> >>- Let Kconfig decide whether to include frontend-specific code. >> >>I had tested this change against 2.6.13-rc2-mm1, and it worked perfectly as >>expected, but it caused problems in today's 2.6.13-rc2-mm2 release. For >>some reason, the symbols don't get set properly. >> >> >What symbols? What error messages do you see? > Alexey- Maybe symbols was the wrong terminology... What I meant was the CONFIG_DVB_LGDT3302 , etc flags Previous patch removed the #define's that you see below... This should have worked, since these should be set instead from kconfig, but it didn't work as expected (even though the modules ARE selected by kconfig), and the #ifdef's return false.... (I don't know why it worked in my test against 2.6.13-rc2-mm1, but it doesn't work in -mm2, and it must be fixed) Breaks all hybrid v4l/dvb boards. >>--- linux-2.6.13-rc2-mm2.orig/drivers/media/video/cx88/cx88-dvb.c >>+++ linux/drivers/media/video/cx88/cx88-dvb.c >> >> >>+#define CONFIG_DVB_MT352 1 >>+#define CONFIG_DVB_CX22702 1 >>+#define CONFIG_DVB_OR51132 1 >>+#define CONFIG_DVB_LGDT3302 1 >> >> >>--- linux-2.6.13-rc2-mm2.orig/drivers/media/video/saa7134/saa7134-dvb.c >>+++ linux/drivers/media/video/saa7134/saa7134-dvb.c >> >> >>+#define CONFIG_DVB_MT352 1 >>+#define CONFIG_DVB_TDA1004X 1 >> >> > >Looks band-aidly. > > Yes, it does LOOK like a band-aid, but this is actually only reverting a previous change. I admit that something better needs to be done. Gerd Korr says to remove the #ifdef's alltogether. Instead, I just returned the #define's ..... We can remove the #ifdef's in a future patch, but I want to discuss this with the other v4l developers before I would make a change like that. THIS patch, however, is safe to apply, and I've already committed it into video4linux cvs. Andrew, please apply this and don't merge the [v4l-saa7134-hybrid-dvb.patch & v4l-cx88-update.patch] patches to Linus' tree without this patch as well. Thank you. -- Michael Krufky ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -rc2-mm2] BUG FIX - v4l broken hybrid dvb inclusion 2005-07-12 17:19 ` Michael Krufky @ 2005-07-12 18:18 ` Alexey Dobriyan 2005-07-12 18:24 ` Michael Krufky 0 siblings, 1 reply; 6+ messages in thread From: Alexey Dobriyan @ 2005-07-12 18:18 UTC (permalink / raw) To: Michael Krufky Cc: Andrew Morton, Mauro Carvalho Chehab, linux-kernel, video4linux-list On Tuesday 12 July 2005 21:19, Michael Krufky wrote: > Alexey Dobriyan wrote: > >On Tuesday 12 July 2005 19:06, Michael Krufky wrote: > > > > > >>v4l-saa7134-hybrid-dvb.patch > >>v4l-cx88-update.patch > >> > >>The specific change that caused this problem is: > >> > >>- Let Kconfig decide whether to include frontend-specific code. > >> > >>I had tested this change against 2.6.13-rc2-mm1, and it worked perfectly as > >>expected, but it caused problems in today's 2.6.13-rc2-mm2 release. For > >>some reason, the symbols don't get set properly. > >> > >> > >What symbols? What error messages do you see? > > > Alexey- > > Maybe symbols was the wrong terminology... What I meant was the > CONFIG_DVB_LGDT3302 , etc flags > > Previous patch removed the #define's that you see below... This should > have worked, since these should be set instead from kconfig, but it > didn't work as expected (even though the modules ARE selected by > kconfig), Strange... I did allyesconfig and preprocessed source shows lgdt3302.h, or51132.h et al. are included. What's your .config? > and the #ifdef's return false.... (I don't know why it worked > in my test against 2.6.13-rc2-mm1, but it doesn't work in -mm2, and it > must be fixed) Breaks all hybrid v4l/dvb boards. > > >>--- linux-2.6.13-rc2-mm2.orig/drivers/media/video/cx88/cx88-dvb.c > >>+++ linux/drivers/media/video/cx88/cx88-dvb.c > >> > >> > >>+#define CONFIG_DVB_MT352 1 > >>+#define CONFIG_DVB_CX22702 1 > >>+#define CONFIG_DVB_OR51132 1 > >>+#define CONFIG_DVB_LGDT3302 1 > >> > >> > >>--- linux-2.6.13-rc2-mm2.orig/drivers/media/video/saa7134/saa7134-dvb.c > >>+++ linux/drivers/media/video/saa7134/saa7134-dvb.c > >> > >> > >>+#define CONFIG_DVB_MT352 1 > >>+#define CONFIG_DVB_TDA1004X 1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -rc2-mm2] BUG FIX - v4l broken hybrid dvb inclusion 2005-07-12 18:18 ` Alexey Dobriyan @ 2005-07-12 18:24 ` Michael Krufky 0 siblings, 0 replies; 6+ messages in thread From: Michael Krufky @ 2005-07-12 18:24 UTC (permalink / raw) To: Alexey Dobriyan Cc: Andrew Morton, Mauro Carvalho Chehab, linux-kernel, video4linux-list Alexey Dobriyan wrote: >On Tuesday 12 July 2005 21:19, Michael Krufky wrote: > > >>Alexey Dobriyan wrote: >> >> >>>On Tuesday 12 July 2005 19:06, Michael Krufky wrote: >>> >>>>I had tested this change against 2.6.13-rc2-mm1, and it worked perfectly as >>>>expected, but it caused problems in today's 2.6.13-rc2-mm2 release. For >>>>some reason, the symbols don't get set properly. >>>> >>What I meant was the CONFIG_DVB_LGDT3302 , etc flags >> >>Previous patch removed the #define's that you see below... This should >>have worked, since these should be set instead from kconfig, but it >>didn't work as expected (even though the modules ARE selected by >>kconfig), >> >> >Strange... I did allyesconfig and preprocessed source shows lgdt3302.h, >or51132.h et al. are included. What's your .config? > >>and the #ifdef's return false.... (I don't know why it worked >>in my test against 2.6.13-rc2-mm1, but it doesn't work in -mm2, and it >>must be fixed) Breaks all hybrid v4l/dvb boards. >> >> Everything does get built, just as you say... However, there is code inside cx88-dvb.c and saa7134-dvb.c that is enclosed within #ifdef's ... This code is NOT included during the compile. For some reason the #ifdef's are turning up as false during compile time... In -mm1 this didn't happen. For now, I am just setting these to true at the top of the *-dvb.c files... In the future, we (v4l) will either provide a better solution, or just remove the #define AND #ifdef's alltogether... I am including an excerp from cx88-dvb.c to illustrate what I am talking about: #if CONFIG_DVB_MT352 # include "mt352.h" # include "mt352_priv.h" #endif #if CONFIG_DVB_CX22702 # include "cx22702.h" #endif #if CONFIG_DVB_OR51132 # include "or51132.h" #endif #if CONFIG_DVB_LGDT3302 # include "lgdt3302.h" #endif <snip> #if CONFIG_DVB_MT352 static int dvico_fusionhdtv_demod_init(struct dvb_frontend* fe) { static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x39 }; static u8 reset [] = { RESET, 0x80 }; static u8 adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 }; static u8 agc_cfg [] = { AGC_TARGET, 0x24, 0x20 }; <snip> static struct mt352_config dntv_live_dvbt_config = { .demod_address = 0x0f, .demod_init = dntv_live_dvbt_demod_init, .pll_set = mt352_pll_set, }; #endif <snip> This should be enough to explain what I am talking about... Of course this is just a small snippet... There is more in cx88-dvb.c that does this, as well as saa7134-dvb.c... In -mm2, the code inside the #if is NOT compiled... This is a problem, and this is why I sumbitted the patch. -- Michael Krufky ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -rc2-mm2] BUG FIX - v4l broken hybrid dvb inclusion 2005-07-12 15:06 [PATCH -rc2-mm2] BUG FIX - v4l broken hybrid dvb inclusion Michael Krufky 2005-07-12 17:07 ` Alexey Dobriyan @ 2005-07-12 22:36 ` Johannes Stezenbach 1 sibling, 0 replies; 6+ messages in thread From: Johannes Stezenbach @ 2005-07-12 22:36 UTC (permalink / raw) To: Michael Krufky Cc: Andrew Morton, Mauro Carvalho Chehab, linux-kernel, Linux and Kernel Video Michael Krufky wrote: > diff -upr linux-2.6.13-rc2-mm2.orig/drivers/media/video/cx88/cx88-dvb.c linux/drivers/media/video/cx88/cx88-dvb.c > --- linux-2.6.13-rc2-mm2.orig/drivers/media/video/cx88/cx88-dvb.c 2005-07-12 08:56:58.000000000 +0000 > +++ linux/drivers/media/video/cx88/cx88-dvb.c 2005-07-12 09:01:13.000000000 +0000 > @@ -30,6 +30,11 @@ > #include <linux/file.h> > #include <linux/suspend.h> > > +#define CONFIG_DVB_MT352 1 > +#define CONFIG_DVB_CX22702 1 > +#define CONFIG_DVB_OR51132 1 > +#define CONFIG_DVB_LGDT3302 1 > + > #include "cx88.h" > #include "dvb-pll.h" > > diff -upr linux-2.6.13-rc2-mm2.orig/drivers/media/video/saa7134/saa7134-dvb.c linux/drivers/media/video/saa7134/saa7134-dvb.c > --- linux-2.6.13-rc2-mm2.orig/drivers/media/video/saa7134/saa7134-dvb.c 2005-07-12 08:56:59.000000000 +0000 > +++ linux/drivers/media/video/saa7134/saa7134-dvb.c 2005-07-12 09:01:55.000000000 +0000 > @@ -30,6 +30,9 @@ > #include <linux/kthread.h> > #include <linux/suspend.h> > > +#define CONFIG_DVB_MT352 1 > +#define CONFIG_DVB_TDA1004X 1 > + > #include "saa7134-reg.h" > #include "saa7134.h" > A better fix would be to remove the #ifdefs which use this defines. They are now pointless as Kconfig selects those DVB frontends. As Gerd Knorr pointed out they were originally introduced as a workaround because the DVB maintainer was too slow merging sending patches which the saa7134-dvb.c and cx88-dvb.c drivers depended on. Johannes ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-07-12 22:35 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-07-12 15:06 [PATCH -rc2-mm2] BUG FIX - v4l broken hybrid dvb inclusion Michael Krufky 2005-07-12 17:07 ` Alexey Dobriyan 2005-07-12 17:19 ` Michael Krufky 2005-07-12 18:18 ` Alexey Dobriyan 2005-07-12 18:24 ` Michael Krufky 2005-07-12 22:36 ` Johannes Stezenbach
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox