* [PATCH 1/1] [media] MFC: Change MFC firmware binary name @ 2011-09-30 10:56 Sachin Kamat 2011-09-30 12:08 ` Kamil Debski 0 siblings, 1 reply; 4+ messages in thread From: Sachin Kamat @ 2011-09-30 10:56 UTC (permalink / raw) To: linux-media; +Cc: k.debski, kyungmin.park, mchehab, sachin.kamat, patches This patches renames the MFC firmware binary to avoid SoC name in it. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> --- drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c b/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c index 5f4da80..f2481a8 100644 --- a/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c +++ b/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c @@ -38,7 +38,7 @@ int s5p_mfc_alloc_and_load_firmware(struct s5p_mfc_dev *dev) * into kernel. */ mfc_debug_enter(); err = request_firmware((const struct firmware **)&fw_blob, - "s5pc110-mfc.fw", dev->v4l2_dev.dev); + "s5p-mfc.fw", dev->v4l2_dev.dev); if (err != 0) { mfc_err("Firmware is not present in the /lib/firmware directory nor compiled in kernel\n"); return -EINVAL; @@ -116,7 +116,7 @@ int s5p_mfc_reload_firmware(struct s5p_mfc_dev *dev) * into kernel. */ mfc_debug_enter(); err = request_firmware((const struct firmware **)&fw_blob, - "s5pc110-mfc.fw", dev->v4l2_dev.dev); + "s5p-mfc.fw", dev->v4l2_dev.dev); if (err != 0) { mfc_err("Firmware is not present in the /lib/firmware directory nor compiled in kernel\n"); return -EINVAL; -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH 1/1] [media] MFC: Change MFC firmware binary name 2011-09-30 10:56 [PATCH 1/1] [media] MFC: Change MFC firmware binary name Sachin Kamat @ 2011-09-30 12:08 ` Kamil Debski 2011-09-30 12:50 ` Subash Patel 0 siblings, 1 reply; 4+ messages in thread From: Kamil Debski @ 2011-09-30 12:08 UTC (permalink / raw) To: 'Sachin Kamat', linux-media Cc: kyungmin.park, mchehab, patches, Sylwester Nawrocki Hi Sachin, Thanks for the patch. I agree with you - MFC module could be used in other SoCs as well. > From: Sachin Kamat [mailto:sachin.kamat@linaro.org] > Sent: 30 September 2011 12:56 > > This patches renames the MFC firmware binary to avoid SoC name in it. > > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Kamil Debski <k.debski@samsung.com> > --- > drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c > b/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c > index 5f4da80..f2481a8 100644 > --- a/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c > +++ b/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c > @@ -38,7 +38,7 @@ int s5p_mfc_alloc_and_load_firmware(struct s5p_mfc_dev > *dev) > * into kernel. */ > mfc_debug_enter(); > err = request_firmware((const struct firmware **)&fw_blob, > - "s5pc110-mfc.fw", dev->v4l2_dev.dev); > + "s5p-mfc.fw", dev->v4l2_dev.dev); > if (err != 0) { > mfc_err("Firmware is not present in the /lib/firmware directory > nor compiled in kernel\n"); > return -EINVAL; > @@ -116,7 +116,7 @@ int s5p_mfc_reload_firmware(struct s5p_mfc_dev *dev) > * into kernel. */ > mfc_debug_enter(); > err = request_firmware((const struct firmware **)&fw_blob, > - "s5pc110-mfc.fw", dev->v4l2_dev.dev); > + "s5p-mfc.fw", dev->v4l2_dev.dev); > if (err != 0) { > mfc_err("Firmware is not present in the /lib/firmware directory > nor compiled in kernel\n"); > return -EINVAL; > -- > 1.7.4.1 Best regards, -- Kamil Debski Linux Platform Group Samsung Poland R&D Center ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] [media] MFC: Change MFC firmware binary name 2011-09-30 12:08 ` Kamil Debski @ 2011-09-30 12:50 ` Subash Patel 2011-09-30 13:15 ` Kamil Debski 0 siblings, 1 reply; 4+ messages in thread From: Subash Patel @ 2011-09-30 12:50 UTC (permalink / raw) To: Kamil Debski Cc: 'Sachin Kamat', linux-media, kyungmin.park, mchehab, patches, Sylwester Nawrocki Hello, There is option in menu->"Device Drivers"->"Generic Driver Options"->"External firmware blobs to build into the kernel binary". I have used this many times instead of /lib/firmware mechanism. If someone chooses to add firmware in that way, and gives different name, then this code too can break. So I have proposed another way to solve that. Have a look into this. Regards, Subash On 09/30/2011 05:38 PM, Kamil Debski wrote: > Hi Sachin, > > Thanks for the patch. I agree with you - MFC module could be used in other > SoCs as well. > >> From: Sachin Kamat [mailto:sachin.kamat@linaro.org] >> Sent: 30 September 2011 12:56 >> >> This patches renames the MFC firmware binary to avoid SoC name in it. >> >> Signed-off-by: Sachin Kamat<sachin.kamat@linaro.org> > > Acked-by: Kamil Debski<k.debski@samsung.com> > >> --- >> drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c | 4 ++-- >> 1 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c >> b/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c >> index 5f4da80..f2481a8 100644 >> --- a/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c >> +++ b/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c >> @@ -38,7 +38,7 @@ int s5p_mfc_alloc_and_load_firmware(struct s5p_mfc_dev >> *dev) >> * into kernel. */ >> mfc_debug_enter(); >> err = request_firmware((const struct firmware **)&fw_blob, >> - "s5pc110-mfc.fw", dev->v4l2_dev.dev); >> + "s5p-mfc.fw", dev->v4l2_dev.dev); >> if (err != 0) { >> mfc_err("Firmware is not present in the /lib/firmware directory >> nor compiled in kernel\n"); >> return -EINVAL; >> @@ -116,7 +116,7 @@ int s5p_mfc_reload_firmware(struct s5p_mfc_dev *dev) >> * into kernel. */ >> mfc_debug_enter(); >> err = request_firmware((const struct firmware **)&fw_blob, >> - "s5pc110-mfc.fw", dev->v4l2_dev.dev); >> + "s5p-mfc.fw", dev->v4l2_dev.dev); int s5p_mfc_alloc_and_load_firmware(struct s5p_mfc_dev *dev) { struct firmware *fw_blob; size_t bank2_base_phys; void *b_base; int err; /* default name */ char firmware_name[30] = "s5p-mfc.fw"; /* Firmare has to be present as a separate file or compiled * into kernel. */ mfc_debug_enter(); #ifdef CONFIG_EXTRA_FIRMWARE snprintf(firmware_name, sizeof(firmware_name), "%s", CONFIG_EXTRA_FIRMWARE); #endif err = request_firmware((const struct firmware **)&fw_blob, firmware_name, dev->v4l2_dev.dev); if (err != 0) { mfc_err("Firmware is not present in the /lib/firmware directory nor compiled in kernel\n"); return -EINVAL; } <snip> >> if (err != 0) { >> mfc_err("Firmware is not present in the /lib/firmware directory >> nor compiled in kernel\n"); >> return -EINVAL; >> -- >> 1.7.4.1 > > Best regards, > -- > Kamil Debski > Linux Platform Group > Samsung Poland R&D Center > > -- > To unsubscribe from this list: send the line "unsubscribe linux-media" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH 1/1] [media] MFC: Change MFC firmware binary name 2011-09-30 12:50 ` Subash Patel @ 2011-09-30 13:15 ` Kamil Debski 0 siblings, 0 replies; 4+ messages in thread From: Kamil Debski @ 2011-09-30 13:15 UTC (permalink / raw) To: 'Subash Patel' Cc: 'Sachin Kamat', linux-media, kyungmin.park, mchehab, patches, Sylwester Nawrocki Hi Subash, > From: Subash Patel [mailto:subash.ramaswamy@linaro.org] > Sent: 30 September 2011 14:51 > > Hello, > > There is option in menu->"Device Drivers"->"Generic Driver > Options"->"External firmware blobs to build into the kernel binary". > I have used this many times instead of /lib/firmware mechanism. If > someone chooses to add firmware in that way, and gives different name, > then this code too can break. So I have proposed another way to solve > that. Have a look into this. The CONFIG_EXTRA_FIRMWARE is a list of all firmware blobs that are going to be embedded in the kernel. As such I am afraid your solution will not work. I don't see the need for adding a configuration option for firmware name. Some good solution would be adding the following line to s5p_mfc_commn.h #define MFC_FIRMWARE_NAME "s5p-mfc.fw" and using MFC_FIRMWARE_NAME in the code. However I feel that the firmware name will change very rarely. If ever. Such option to change the name using a configuration option might be useful during development and testing of various fw versions, but I have serious doubts that it should enter the mainline. > > > On 09/30/2011 05:38 PM, Kamil Debski wrote: > > Hi Sachin, > > > > Thanks for the patch. I agree with you - MFC module could be used in other > > SoCs as well. > > > >> From: Sachin Kamat [mailto:sachin.kamat@linaro.org] > >> Sent: 30 September 2011 12:56 > >> > >> This patches renames the MFC firmware binary to avoid SoC name in it. > >> > >> Signed-off-by: Sachin Kamat<sachin.kamat@linaro.org> > > > > Acked-by: Kamil Debski<k.debski@samsung.com> > > > >> --- > >> drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c | 4 ++-- > >> 1 files changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c > >> b/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c > >> index 5f4da80..f2481a8 100644 > >> --- a/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c > >> +++ b/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c > >> @@ -38,7 +38,7 @@ int s5p_mfc_alloc_and_load_firmware(struct s5p_mfc_dev > >> *dev) > >> * into kernel. */ > >> mfc_debug_enter(); > >> err = request_firmware((const struct firmware **)&fw_blob, > >> - "s5pc110-mfc.fw", dev->v4l2_dev.dev); > >> + "s5p-mfc.fw", dev->v4l2_dev.dev); > >> if (err != 0) { > >> mfc_err("Firmware is not present in the /lib/firmware directory > >> nor compiled in kernel\n"); > >> return -EINVAL; > >> @@ -116,7 +116,7 @@ int s5p_mfc_reload_firmware(struct s5p_mfc_dev *dev) > >> * into kernel. */ > >> mfc_debug_enter(); > >> err = request_firmware((const struct firmware **)&fw_blob, > >> - "s5pc110-mfc.fw", dev->v4l2_dev.dev); > >> + "s5p-mfc.fw", dev->v4l2_dev.dev); > int s5p_mfc_alloc_and_load_firmware(struct s5p_mfc_dev *dev) > { > struct firmware *fw_blob; > size_t bank2_base_phys; > void *b_base; > int err; > /* default name */ > char firmware_name[30] = "s5p-mfc.fw"; > > /* Firmare has to be present as a separate file or compiled > * into kernel. */ > mfc_debug_enter(); > > #ifdef CONFIG_EXTRA_FIRMWARE > snprintf(firmware_name, sizeof(firmware_name), "%s", > CONFIG_EXTRA_FIRMWARE); > #endif > err = request_firmware((const struct firmware **)&fw_blob, > firmware_name, dev->v4l2_dev.dev); > if (err != 0) { > mfc_err("Firmware is not present in the /lib/firmware > directory nor compiled in kernel\n"); > return -EINVAL; > } > <snip> > > >> if (err != 0) { > >> mfc_err("Firmware is not present in the /lib/firmware directory > >> nor compiled in kernel\n"); > >> return -EINVAL; > >> -- > >> 1.7.4.1 Best wishes, -- Kamil Debski Linux Platform Group Samsung Poland R&D Center ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-30 13:15 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-09-30 10:56 [PATCH 1/1] [media] MFC: Change MFC firmware binary name Sachin Kamat 2011-09-30 12:08 ` Kamil Debski 2011-09-30 12:50 ` Subash Patel 2011-09-30 13:15 ` Kamil Debski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox