Re: coda 2040000.vpu: firmware request failed
On Fri, Jul 7, 2017 at 7:09 PM, Philipp Zabel wrote: > Hi Jagan, > > On Fri, 2017-07-07 at 18:15 +0530, Jagan Teki wrote: >> Hi, >> >> I'm observing firmware request failure with i.MX6Q board, This is with >> latest linux-next (4.12) with firmware from, [1] and converted >> v4l-coda960-imx6q.bin using [2]. >> >> Log: >> -- >> coda 204.vpu: Direct firmware load for vpu_fw_imx6q.bin failed with >> error -2 >> coda 204.vpu: Direct firmware load for vpu/vpu_fw_imx6q.bin failed >> with error -2 >> coda 204.vpu: Direct firmware load for v4l-coda960-imx6q.bin >> failed with error -2 > > The error code is -ENOENT, so the firmware binary is not found where the > firmware loader code is looking. That could be caused by the coda driver > being probed before the file system containing the firmware binary is > mounted. Have you tried compiling the coda driver as a module > (CONFIG_VIDEO_CODA=m)? Yes, true unless it is module firmware files can't get by coda # modprobe -a coda [ 24.474662] coda 204.vpu: Firmware code revision: 36350 [ 24.480556] coda 204.vpu: Initialized CODA960. [ 24.485415] coda 204.vpu: Unsupported firmware version: 2.1.9 [ 24.493494] coda 204.vpu: codec registered as /dev/video[0-1] thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India.
Re: coda 2040000.vpu: firmware request failed
Hi Jagan, On Fri, Jul 7, 2017 at 9:45 AM, Jagan Teki wrote: > Hi, > > I'm observing firmware request failure with i.MX6Q board, This is with > latest linux-next (4.12) with firmware from, [1] and converted > v4l-coda960-imx6q.bin using [2]. There is no need to do the conversion with current code.
Re: coda 2040000.vpu: firmware request failed
Hi Jagan, On Fri, 2017-07-07 at 18:15 +0530, Jagan Teki wrote: > Hi, > > I'm observing firmware request failure with i.MX6Q board, This is with > latest linux-next (4.12) with firmware from, [1] and converted > v4l-coda960-imx6q.bin using [2]. > > Log: > -- > coda 204.vpu: Direct firmware load for vpu_fw_imx6q.bin failed with error > -2 > coda 204.vpu: Direct firmware load for vpu/vpu_fw_imx6q.bin failed > with error -2 > coda 204.vpu: Direct firmware load for v4l-coda960-imx6q.bin > failed with error -2 The error code is -ENOENT, so the firmware binary is not found where the firmware loader code is looking. That could be caused by the coda driver being probed before the file system containing the firmware binary is mounted. Have you tried compiling the coda driver as a module (CONFIG_VIDEO_CODA=m)? > coda 204.vpu: firmware request failed > > I've verified md4sum and VDDPU as well, hope these look OK. > > # md5sum /lib/firmware/v4l-coda960-imx6q.bin > af4971a37c7a3a50c99f7dfd36104c63 /lib/firmware/v4l-coda960-imx6q.bin > # dmesg | grep regu | grep -i vddpu > [0.061552] vddpu: supplied by regulator-dummy > > Did I missed any, request for help? > > [1] > http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-3.0.35-4.0.0.bin > [2] > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-July/181101.html > > thanks! Note that converting the NXP provided firmware is not necessary anymore since commits a1a87fa3a0cf ("[media] coda: add support for native order firmware files with Freescale header") and 2ac7f08e3075 ("[media] coda: add support for firmware files named as distributed by NXP"). Also there are newer firmware binaries available, see https://patchwork.linuxtv.org/patch/42332/ regards Philipp
coda 2040000.vpu: firmware request failed
Hi, I'm observing firmware request failure with i.MX6Q board, This is with latest linux-next (4.12) with firmware from, [1] and converted v4l-coda960-imx6q.bin using [2]. Log: -- coda 204.vpu: Direct firmware load for vpu_fw_imx6q.bin failed with error -2 coda 204.vpu: Direct firmware load for vpu/vpu_fw_imx6q.bin failed with error -2 coda 204.vpu: Direct firmware load for v4l-coda960-imx6q.bin failed with error -2 coda 204.vpu: firmware request failed I've verified md4sum and VDDPU as well, hope these look OK. # md5sum /lib/firmware/v4l-coda960-imx6q.bin af4971a37c7a3a50c99f7dfd36104c63 /lib/firmware/v4l-coda960-imx6q.bin # dmesg | grep regu | grep -i vddpu [0.061552] vddpu: supplied by regulator-dummy Did I missed any, request for help? [1] http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-3.0.35-4.0.0.bin [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-July/181101.html thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India.
[PATCH V2 2/4] exynos4-is: Move firmware request to subdev open()
Move the firmware request to the FIMC-IS-ISP subdev open callback so we can avoid crashed on error paths in probe and deferred probing, when firmware request was sheduled and is in progress while the fimc-is device is being unregistered and its driver detached. Signed-off-by: Sylwester Nawrocki Acked-by: Kyungmin Park --- drivers/media/platform/exynos4-is/fimc-is.c | 31 -- drivers/media/platform/exynos4-is/fimc-is.h |2 +- drivers/media/platform/exynos4-is/fimc-isp.c | 10 - 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c index 5476dce..6bbb6ca 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.c +++ b/drivers/media/platform/exynos4-is/fimc-is.c @@ -374,22 +374,22 @@ static void fimc_is_free_cpu_memory(struct fimc_is *is) is->memory.paddr); } -static void fimc_is_load_firmware(const struct firmware *fw, void *context) +int fimc_is_request_firmware(struct fimc_is *is, const char *fw_name) { - struct fimc_is *is = context; + const struct firmware *fw; struct device *dev = &is->pdev->dev; void *buf; int ret; - if (fw == NULL) { + ret = request_firmware(&fw, fw_name, &is->pdev->dev); + if (ret < 0) { dev_err(dev, "firmware request failed\n"); - return; + return ret; } - mutex_lock(&is->lock); if (fw->size < FIMC_IS_FW_SIZE_MIN || fw->size > FIMC_IS_FW_SIZE_MAX) { dev_err(dev, "wrong firmware size: %d\n", fw->size); - goto done; + return -EINVAL; } is->fw.size = fw->size; @@ -397,7 +397,7 @@ static void fimc_is_load_firmware(const struct firmware *fw, void *context) ret = fimc_is_alloc_cpu_memory(is); if (ret < 0) { dev_err(dev, "failed to allocate FIMC-IS CPU memory\n"); - goto done; + return -ENOMEM; } memcpy(is->memory.vaddr, fw->data, fw->size); @@ -430,16 +430,9 @@ static void fimc_is_load_firmware(const struct firmware *fw, void *context) */ if (is->fw.f_w) release_firmware(is->fw.f_w); - is->fw.f_w = fw; -done: - mutex_unlock(&is->lock); -} -static int fimc_is_request_firmware(struct fimc_is *is, const char *fw_name) -{ - return request_firmware_nowait(THIS_MODULE, - FW_ACTION_HOTPLUG, fw_name, &is->pdev->dev, - GFP_KERNEL, is, fimc_is_load_firmware); + is->fw.f_w = fw; + return 0; } /* General IS interrupt handler */ @@ -795,7 +788,6 @@ static int fimc_is_probe(struct platform_device *pdev) init_waitqueue_head(&is->irq_queue); spin_lock_init(&is->slock); - mutex_init(&is->lock); ret = of_address_to_resource(dev->of_node, 0, &res); if (ret < 0) @@ -859,17 +851,12 @@ static int fimc_is_probe(struct platform_device *pdev) if (ret < 0) goto err_sd; - ret = fimc_is_request_firmware(is, FIMC_IS_FW_FILENAME); - if (ret < 0) - goto err_dfs; pm_runtime_put_sync(dev); dev_dbg(dev, "FIMC-IS registered successfully\n"); return 0; -err_dfs: - fimc_is_debugfs_remove(is); err_sd: fimc_is_unregister_subdevs(is); err_vb: diff --git a/drivers/media/platform/exynos4-is/fimc-is.h b/drivers/media/platform/exynos4-is/fimc-is.h index e0be691..16afd9c 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.h +++ b/drivers/media/platform/exynos4-is/fimc-is.h @@ -234,7 +234,6 @@ struct chain_config { * @pctrl: pointer to pinctrl structure for this device * @v4l2_dev: pointer to top the level v4l2_device * @alloc_ctx: videobuf2 memory allocator context - * @lock: mutex serializing video device and the subdev operations * @slock: spinlock protecting this data structure and the hw registers * @clocks: FIMC-LITE gate clock * @regs: MCUCTL mmapped registers region @@ -336,6 +335,7 @@ static inline u32 pmuisp_read(struct fimc_is *is, unsigned int offset) int fimc_is_wait_event(struct fimc_is *is, unsigned long bit, unsigned int state, unsigned int timeout); +int fimc_is_request_firmware(struct fimc_is *is, const char *fw_name); int fimc_is_cpu_set_power(struct fimc_is *is, int on); int fimc_is_start_firmware(struct fimc_is *is); int fimc_is_hw_initialize(struct fimc_is *is); diff --git a/drivers/media/platform/exynos4-is/fimc-isp.c b/drivers/media/platform/exynos4-is/fimc-isp.c index be62d6b..915c46b 100644 --- a/drivers/media/platform/exynos4-is/fimc-isp.c +++ b/drivers/media
Firmware request
Hello list! I am getting some firmware request on a MythTV system dmesg: [ 944.754753] ds3000_firmware_ondemand: Waiting for firmware upload (dvb-fe-ds3000.fw)... [ 944.754766] cx23885 :02:00.0: firmware: requesting dvb-fe-ds3000.fw [ 944.775896] ds3000_firmware_ondemand: Waiting for firmware upload(2)... I have a Tevii S470 DVB-S2 tuner, is this normal? I have the firmware on /lib/firmware: ls -l /lib/firmware/ | grep ds3000 -rw-r--r-- 1 root root 8192 dic 6 14:54 dvb-fe-ds3000.fw I am getting also some player problems, I don't know if it is for the firmware request. Thanks for all your help and best regards. -- Josu Lazkano -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html