All of lore.kernel.org
 help / color / mirror / Atom feed
From: Subash Patel <subash.ramaswamy@linaro.org>
To: Kamil Debski <k.debski@samsung.com>
Cc: 'Sachin Kamat' <sachin.kamat@linaro.org>,
	linux-media@vger.kernel.org, kyungmin.park@samsung.com,
	mchehab@infradead.org, patches@linaro.org,
	Sylwester Nawrocki <s.nawrocki@samsung.com>
Subject: Re: [PATCH 1/1] [media] MFC: Change MFC firmware binary name
Date: Fri, 30 Sep 2011 18:20:43 +0530	[thread overview]
Message-ID: <4E85BB23.70300@linaro.org> (raw)
In-Reply-To: <001201cc7f69$9e690c80$db3b2580$%debski@samsung.com>

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

  reply	other threads:[~2011-09-30 12:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2011-09-30 13:15     ` Kamil Debski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E85BB23.70300@linaro.org \
    --to=subash.ramaswamy@linaro.org \
    --cc=k.debski@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=patches@linaro.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sachin.kamat@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.