cx18: declare MODULE_FIRMWARE
PATCH 29/75 cx18: declare MODULE_FIRMWARE
--- drivers/media/video/cx18/cx18-av-firmware.c | 1 + drivers/media/video/cx18/cx18-dvb.c | 2 ++ drivers/media/video/cx18/cx18-firmware.c | 3 +++ 3 files changed, 6 insertions(+), 0 deletions(-)
drivers/media/video/cx18/cx18-av-firmware.c +1 -0
@@ -32,6 +32,7 @@#define CX18_AI1_MUX_INVALID 0x30#define FWFILE "v4l-cx23418-dig.fw" +MODULE_FIRMWARE (FWFILE );static int cx18_av_verifyfw (struct cx18 *cx,const struct firmware *fw) {
drivers/media/video/cx18/cx18-dvb.c +2 -0
@@ -131,6 +131,8 @@ static int yuan_mpc718_mt352_reqfw(struct cx18_stream *stream,return ret; } +MODULE_FIRMWARE ("dvb-cx18-mpc718-mt352.fw" ); +static int yuan_mpc718_mt352_init (struct dvb_frontend *fe) { struct cx18_dvb *dvb = container_of(fe->dvb,
drivers/media/video/cx18/cx18-firmware.c +3 -0
@@ -446,3 +446,6 @@ int cx18_firmware_init(struct cx18 *cx)cx18_write_reg_expect (cx,0x14001400 ,0xc78110 ,0x00001400 ,0x14001400 );return 0 ; } + +MODULE_FIRMWARE ("v4l-cx23418-cpu.fw" ); +MODULE_FIRMWARE ("v4l-cx23418-apu.fw" );
Signature · 1 line
1.6.5.2
Quoted 24 lines · Ben Hutchings
Signed-off-by Ben Hutchings <[email protected]>--- drivers/media/video/cx18/cx18-av-firmware.c | 1 + drivers/media/video/cx18/cx18-dvb.c | 2 ++ drivers/media/video/cx18/cx18-firmware.c | 3 +++ 3 files changed, 6 insertions(+), 0 deletions(-)drivers/media/video/cx18/cx18-av-firmware.c +1
-0@@ -32,6 +32,7 @@#define CX18_AI1_MUX_INVALID 0x30#define FWFILE "v4l-cx23418-dig.fw" +MODULE_FIRMWARE (FWFILE );static int cx18_av_verifyfw (struct cx18 *cx,const struct firmware *fw) {drivers/media/video/cx18/cx18-dvb.c +0
-0
drivers/media/video/cx18/cx18-dvb.c static int yuan_mpc718_mt352_reqfw(struct cx18_stream *stream, · line 135
Quoted 5 lines
drivers/media/video/cx18/cx18-dvb.c +2
-0@@ -131,6 +131,8 @@ static int yuan_mpc718_mt352_reqfw(struct cx18_stream *stream,return ret; } +MODULE_FIRMWARE ("dvb-cx18-mpc718-mt352.fw" ); +
Ben,
This particular firmware is only needed by one relatively rare TV card. Is there any way for MODULE_FIRMWARE advertisements to hint at "mandatory" vs. "particular case(s)"?
Regards,
Andy
Quoted 14 lines
drivers/media/video/cx18/cx18-dvb.c +0
-0static int yuan_mpc718_mt352_init (struct dvb_frontend *fe) { struct cx18_dvb *dvb = container_of(fe->dvb,drivers/media/video/cx18/cx18-firmware.c +3
-0@@ -446,3 +446,6 @@ int cx18_firmware_init(struct cx18 *cx)cx18_write_reg_expect (cx,0x14001400 ,0xc78110 ,0x00001400 ,0x14001400 );return 0 ; } + +MODULE_FIRMWARE ("v4l-cx23418-cpu.fw" ); +MODULE_FIRMWARE ("v4l-cx23418-apu.fw" );
Quoted 28 lines · Andy Walls
Quoted 27 lines · Ben Hutchings
Signed-off-by Ben Hutchings <[email protected]>--- drivers/media/video/cx18/cx18-av-firmware.c | 1 + drivers/media/video/cx18/cx18-dvb.c | 2 ++ drivers/media/video/cx18/cx18-firmware.c | 3 +++ 3 files changed, 6 insertions(+), 0 deletions(-)drivers/media/video/cx18/cx18-av-firmware.c +1
-0@@ -32,6 +32,7 @@#define CX18_AI1_MUX_INVALID 0x30#define FWFILE "v4l-cx23418-dig.fw" +MODULE_FIRMWARE (FWFILE );static int cx18_av_verifyfw (struct cx18 *cx,const struct firmware *fw) {drivers/media/video/cx18/cx18-dvb.c +0
-0@@ -131,6 +131,8 @@ static int yuan_mpc718_mt352_reqfw(struct cx18_stream *stream,return ret; }
Quoted 8 lines
drivers/media/video/cx18/cx18-dvb.c static int yuan_mpc718_mt352_reqfw(struct cx18_stream *stream, · line 135
Quoted 2 lines
drivers/media/video/cx18/cx18-dvb.c +2
-0+MODULE_FIRMWARE ("dvb-cx18-mpc718-mt352.fw" ); +Ben,
This particular firmware is only needed by one relatively rare TV card. Is there any way for
MODULE_FIRMWAREadvertisements to hint at "mandatory" vs. "particular case(s)"?
No, but perhaps there ought to be. In this case the declaration could be left out for now. It is only critical to list all firmware in drivers that may be needed for booting.
Ben.
Signature · 3 lines
Ben Hutchings
The generation of random numbers is too important to be left to chance.
- Robert CoveyouQuoted 9 lines · Ben Hutchings
Quoted 8 lines · Andy Walls
drivers/media/video/cx18/cx18-dvb.c static int yuan_mpc718_mt352_reqfw(struct cx18_stream *stream, · line 135
Quoted 3 lines · Ben Hutchings
drivers/media/video/cx18/cx18-dvb.c +2
-0+MODULE_FIRMWARE ("dvb-cx18-mpc718-mt352.fw" ); +Ben,
Quoted 7 lines
Quoted 3 lines
This particular firmware is only needed by one relatively rare TV card. Is there any way for
MODULE_FIRMWAREadvertisements to hint at "mandatory" vs. "particular case(s)"?No, but perhaps there ought to be. In this case the declaration could be left out for now. It is only critical to list all firmware in drivers that may be needed for booting.
OK. I don't know that a TV card driver is every *needed* for booting. Maybe one day when I can net-boot with cable-modem like functionality... ;)
I'm OK with the MODULE_FIRMWARE announcements in cx18 so long as automatic behaviors like
1. persistent, repeatitive, or truly alarming user warnings, or
2. refusing to load the module due to missing firmware files
don't happen.
Regards,
Andy
Quoted 1 line
Ben.
Quoted 23 lines · On Sunday 08 November 2009 03:08:56 Andy Walls wrote:
Quoted 9 lines · Ben Hutchings
Quoted 8 lines · Andy Walls
drivers/media/video/cx18/cx18-dvb.c static int yuan_mpc718_mt352_reqfw(struct cx18_stream *stream, · line 135
Quoted 3 lines · Ben Hutchings
drivers/media/video/cx18/cx18-dvb.c +2
-0+MODULE_FIRMWARE ("dvb-cx18-mpc718-mt352.fw" ); +Ben,
Quoted 7 lines
Quoted 3 lines
This particular firmware is only needed by one relatively rare TV card. Is there any way for
MODULE_FIRMWAREadvertisements to hint at "mandatory" vs. "particular case(s)"?No, but perhaps there ought to be. In this case the declaration could be left out for now. It is only critical to list all firmware in drivers that may be needed for booting.
OK. I don't know that a TV card driver is every *needed* for booting. Maybe one day when I can net-boot with cable-modem like functionality... ;)
Quoted 7 lines
I'm OK with the
MODULE_FIRMWAREannouncements in cx18 so long as automatic behaviors like1. persistent, repeatitive, or truly alarming user warnings, or
2. refusing to load the module due to missing firmware filesdon't happen.
I agree with Andy here.
In the case of ivtv and cx18 (unless that changed since the last time I worked on it) the cx firmware is actually not loaded when the module is inited but on the first open() call. So it is not even that clear to me whether we want to have these fairly large fw files in an initramfs image at all.
Regards,
Hans
Quoted 13 lines
Regards,
AndyQuoted 1 line
Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom
Quoted 30 lines · Hans Verkuil
Quoted 29 lines · On Sunday 08 November 2009 03:08:56 Andy Walls wrote:
Quoted 9 lines · Ben Hutchings
Quoted 8 lines · Andy Walls
drivers/media/video/cx18/cx18-dvb.c static int yuan_mpc718_mt352_reqfw(struct cx18_stream *stream, · line 135
Quoted 3 lines · Ben Hutchings
drivers/media/video/cx18/cx18-dvb.c +2
-0+MODULE_FIRMWARE ("dvb-cx18-mpc718-mt352.fw" ); +Ben,
Quoted 7 lines
Quoted 3 lines
This particular firmware is only needed by one relatively rare TV card. Is there any way for
MODULE_FIRMWAREadvertisements to hint at "mandatory" vs. "particular case(s)"?No, but perhaps there ought to be. In this case the declaration could be left out for now. It is only critical to list all firmware in drivers that may be needed for booting.
OK. I don't know that a TV card driver is every *needed* for booting. Maybe one day when I can net-boot with cable-modem like functionality... ;)
I'm OK with the
MODULE_FIRMWAREannouncements in cx18 so long as automatic behaviors like1. persistent, repeatitive, or truly alarming user warnings, or
2. refusing to load the module due to missing firmware files
Quoted 9 lines
Quoted 1 line
don't happen.
I agree with Andy here.
In the case of ivtv and cx18 (unless that changed since the last time I worked on it) the cx firmware is actually not loaded when the module is inited but on the first
open()call. So it is not even that clear to me whether we want to have these fairly large fw files in an initramfs image at all.
I've been thinking about this all a bit more since I read Mauro's comment.
MODULE_FIRMWARE() is essentially turning kernel driver modules into an interactive, read-only, database for (a particular set of ?) end users.
The process of keeping MODULE_FIRMWARE declarations up to date will run into all the incentive, governance, and maintenance problems that any database has. Due to lack incentive structure, one will end up with missing data at any point in time, as the current patch series points out.
It may be better to keep tabs on module firmware image names with a database outside of the kernel *.[ch] files. It could be a simple as a text file somewhere. I suspect it would have just as likely a chance or better of being up to date at any point in time. That would also be a bit more flexible. One could add additional fields to the records for amplifying information (e.g required, optional, card xyz) without perturbing a slew of kernel *.[ch] files.
My $0.02.
Regards,
Andy
Em Mon, 09 Nov 2009 07:03:02 -0500
Andy Walls <[email protected]> escreveu:
Quoted 53 lines · Hans Verkuil
Quoted 30 lines · On Sunday 08 November 2009 03:08:56 Andy Walls wrote:
Quoted 29 lines · Ben Hutchings
Quoted 9 lines · Andy Walls
Quoted 8 lines · Ben Hutchings
drivers/media/video/cx18/cx18-dvb.c static int yuan_mpc718_mt352_reqfw(struct cx18_stream *stream, · line 135
Quoted 4 lines
drivers/media/video/cx18/cx18-dvb.c +2
-0+MODULE_FIRMWARE ("dvb-cx18-mpc718-mt352.fw" ); +Ben,
Quoted 7 lines
Quoted 3 lines
This particular firmware is only needed by one relatively rare TV card. Is there any way for
MODULE_FIRMWAREadvertisements to hint at "mandatory" vs. "particular case(s)"?No, but perhaps there ought to be. In this case the declaration could be left out for now. It is only critical to list all firmware in drivers that may be needed for booting.
OK. I don't know that a TV card driver is every *needed* for booting. Maybe one day when I can net-boot with cable-modem like functionality... ;)
I'm OK with the
MODULE_FIRMWAREannouncements in cx18 so long as automatic behaviors like1. persistent, repeatitive, or truly alarming user warnings, or
2. refusing to load the module due to missing firmware filesQuoted 9 lines
Quoted 1 line
don't happen.
I agree with Andy here.
In the case of ivtv and cx18 (unless that changed since the last time I worked on it) the cx firmware is actually not loaded when the module is inited but on the first
open()call. So it is not even that clear to me whether we want to have these fairly large fw files in an initramfs image at all.I've been thinking about this all a bit more since I read Mauro's comment.
MODULE_FIRMWARE()is essentially turning kernel driver modules into an interactive, read-only, database for (a particular set of ?) end users.The process of keeping
MODULE_FIRMWAREdeclarations up to date will run into all the incentive, governance, and maintenance problems that any database has. Due to lack incentive structure, one will end up with missing data at any point in time, as the current patch series points out.
Quoted 7 lines
It may be better to keep tabs on module firmware image names with a database outside of the kernel *.[ch] files. It could be a simple as a text file somewhere. I suspect it would have just as likely a chance or better of being up to date at any point in time. That would also be a bit more flexible. One could add additional fields to the records for amplifying information (e.g required, optional, card xyz) without perturbing a slew of kernel *.[ch] files.
Yes, this will work better, IMHO, but won't cover the few cases where you only know the frontend/tuner at the runtime, after probing the device or reading the device eeprom.
If the need is to detect the firmware needs during installation, upgrades or hardware changes, the simplest way is to use an userspace tool for the request_firmware hotplug interface that catches the firmware requests after loading and opening a V4L/DVB device. This will catch all cases and will be a way easier than maintaining a database.
Cheers,
Mauro