search for: release_firmwar

Displaying 20 results from an estimated 46 matches for "release_firmwar".

Did you mean: release_firmware
2016 Jan 18
8
[PATCH 0/5] nouveau: unified firmware loading functions
This patchset centralizes the firmware-loading procedure to one set of functions instead of having each engine load its firmware as it pleases. This helps ensure that all firmware comes from the same place, namely nvidia/<chip>/. This changes where the firmware is fetched from for falcon/xtensa/bios, but these locations never seemed to have been official anyway. Also for most (all?) chips
2013 Jul 19
0
[PATCH] drm/nouveau/xtensa: firmware size needs to be 0x40000 no matter what
...u/drm/nouveau/core/engine/xtensa.c @@ -118,7 +118,13 @@ _nouveau_xtensa_init(struct nouveau_object *object) return ret; } - ret = nouveau_gpuobj_new(object, NULL, fw->size, 0x1000, 0, + if (fw->size > 0x40000) { + nv_warn(xtensa, "firmware %s too large\n", name); + release_firmware(fw); + return -EINVAL; + } + + ret = nouveau_gpuobj_new(object, NULL, 0x40000, 0x1000, 0, &xtensa->gpu_fw); if (ret) { release_firmware(fw); -- 1.8.1.5
2013 Dec 07
0
[PATCH] drm/nouveau/falcon: use vmalloc to create firwmare copies
...falcon->data.size = 0; @@ -134,7 +144,7 @@ _nouveau_falcon_init(struct nouveau_object *object) return ret; } - falcon->data.data = kmemdup(fw->data, fw->size, GFP_KERNEL); + falcon->data.data = vmemdup(fw->data, fw->size); falcon->data.size = fw->size; release_firmware(fw); if (!falcon->data.data) @@ -149,7 +159,7 @@ _nouveau_falcon_init(struct nouveau_object *object) return ret; } - falcon->code.data = kmemdup(fw->data, fw->size, GFP_KERNEL); + falcon->code.data = vmemdup(fw->data, fw->size); falcon->code.size = fw->s...
2017 Feb 28
2
[PATCH 0/2] gpu: drm: Use pr_cont and neaten logging
Joe Perches (2): drm: Use pr_cont where appropriate gpu: drm: Convert printk(KERN_<LEVEL> to pr_<level> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +-
2017 Feb 28
0
[PATCH 2/2] gpu: drm: Convert printk(KERN_<LEVEL> to pr_<level>
...04,9 +5804,7 @@ static int ci_dpm_init_microcode(struct amdgpu_device *adev) out: if (err) { - printk(KERN_ERR - "cik_smc: Failed to load firmware \"%s\"\n", - fw_name); + pr_err("cik_smc: Failed to load firmware \"%s\"\n", fw_name); release_firmware(adev->pm.fw); adev->pm.fw = NULL; } diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c index 810bba533975..c33bc1bb4655 100644 --- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c +++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c @@ -142,9 +142,7 @@ static int c...
2016 Nov 02
3
[PATCH] gr: fallback to legacy paths during firmware lookup
...zeof(f), "nouveau/%s", fwname); + ret = request_firmware(&fw, f, device->dev); + if (ret) { + nvkm_error(subdev, "failed to load %s\n", fwname); + return ret; + } + } + + fuc->size = fw->size; + fuc->data = kmemdup(fw->data, fuc->size, GFP_KERNEL); + release_firmware(fw); + return (fuc->data != NULL) ? 0 : -ENOMEM; +} + +int gf100_gr_ctor_fw(struct gf100_gr *gr, const char *fwname, struct gf100_gr_fuc *fuc) { struct nvkm_subdev *subdev = &gr->base.engine.subdev; struct nvkm_device *device = subdev->device; + const char *legacy_fwname = N...
2016 Nov 02
2
[PATCH] gr: fallback to legacy paths during firmware lookup
...error(subdev, "failed to load %s\n", fwname); >> + return ret; >> + } >> + } >> + >> + fuc->size = fw->size; >> + fuc->data = kmemdup(fw->data, fuc->size, GFP_KERNEL); >> + release_firmware(fw); >> + return (fuc->data != NULL) ? 0 : -ENOMEM; >> +} >> + >> +int >> gf100_gr_ctor_fw(struct gf100_gr *gr, const char *fwname, >> struct gf100_gr_fuc *fuc) >> { >> struct nvkm_subdev *subdev = &gr->base...
2016 Nov 04
2
[PATCH v2] gr: fallback to legacy paths during firmware lookup
...zeof(f), "nouveau/%s", fwname); + ret = request_firmware(&fw, f, device->dev); + if (ret) { + nvkm_error(subdev, "failed to load %s\n", fwname); + return ret; + } + } + + fuc->size = fw->size; + fuc->data = kmemdup(fw->data, fuc->size, GFP_KERNEL); + release_firmware(fw); + return (fuc->data != NULL) ? 0 : -ENOMEM; +} + +int gf100_gr_ctor_fw(struct gf100_gr *gr, const char *fwname, struct gf100_gr_fuc *fuc) { @@ -1765,10 +1812,8 @@ gf100_gr_ctor_fw(struct gf100_gr *gr, const char *fwname, int ret; ret = nvkm_firmware_get(device, fwname, &fw)...
2013 Jun 03
4
[PATCH] nouveau: Load firmware for BSP/VP engines on NV84-NV96, NVA0
...nouveau/nv84_bsp", &device->pdev->dev); + if (ret) { + nv_warn(priv, "Firmware for NV84 BSP unavailable.\n"); + return 0; + } + + nv_subdev(priv)->intr = nv84_bsp_intr; + + priv->fw = kmemdup(fw->data, fw->size, GFP_KERNEL); + priv->fw_size = fw->size; + release_firmware(fw); + if (!priv->fw) + return -ENOMEM; + return 0; } +static void +nv84_bsp_dtor(struct nouveau_object *object) +{ + struct nv84_bsp_priv *priv = (void *)object; + kfree(priv->fw); +} + +static int +nv84_bsp_init(struct nouveau_object *object) +{ + struct nouveau_device *device = nv_d...
2016 Nov 05
0
[PATCH v2] gr: fallback to legacy paths during firmware lookup
...ret = request_firmware(&fw, f, device->dev); > + if (ret) { > + nvkm_error(subdev, "failed to load %s\n", fwname); > + return ret; > + } > + } > + > + fuc->size = fw->size; > + fuc->data = kmemdup(fw->data, fuc->size, GFP_KERNEL); > + release_firmware(fw); > + return (fuc->data != NULL) ? 0 : -ENOMEM; > +} > + > +int > gf100_gr_ctor_fw(struct gf100_gr *gr, const char *fwname, > struct gf100_gr_fuc *fuc) > { > @@ -1765,10 +1812,8 @@ gf100_gr_ctor_fw(struct gf100_gr *gr, const char *fwname, > int ret; >...
2016 Nov 02
0
[PATCH] gr: fallback to legacy paths during firmware lookup
...nvkm_error(subdev, "failed to load %s\n", fwname); > + return ret; > + } > + } > + > + fuc->size = fw->size; > + fuc->data = kmemdup(fw->data, fuc->size, GFP_KERNEL); > + release_firmware(fw); > + return (fuc->data != NULL) ? 0 : -ENOMEM; > +} > + > +int > gf100_gr_ctor_fw(struct gf100_gr *gr, const char *fwname, > struct gf100_gr_fuc *fuc) > { > struct nvkm_subdev *subdev = &gr->base.engine.subdev; > str...
2017 Feb 28
8
[PATCH 2/2] gpu: drm: Convert printk(KERN_<LEVEL> to pr_<level>
...icrocode(struct amdgpu_device *adev) > > out: > if (err) { > - printk(KERN_ERR > - "cik_smc: Failed to load firmware \"%s\"\n", > - fw_name); > + pr_err("cik_smc: Failed to load firmware \"%s\"\n", fw_name); > release_firmware(adev->pm.fw); > adev->pm.fw = NULL; > } > diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c > index 810bba533975..c33bc1bb4655 100644 > --- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c > +++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c &g...
2016 Nov 03
0
[PATCH] gr: fallback to legacy paths during firmware lookup
...o load %s\n", fwname); >>> + return ret; >>> + } >>> + } >>> + >>> + fuc->size = fw->size; >>> + fuc->data = kmemdup(fw->data, fuc->size, GFP_KERNEL); >>> + release_firmware(fw); >>> + return (fuc->data != NULL) ? 0 : -ENOMEM; >>> +} >>> + >>> +int >>> gf100_gr_ctor_fw(struct gf100_gr *gr, const char *fwname, >>> struct gf100_gr_fuc *fuc) >>> { >>> struct nvkm_s...
2013 Jun 04
0
[PATCH] nouveau: Load firmware for BSP/VP engines on NV84-NV96, NVA0
..., "Firmware for NV84 BSP unavailable.\n"); > + return 0; > + } > + > + nv_subdev(priv)->intr = nv84_bsp_intr; > + > + priv->fw = kmemdup(fw->data, fw->size, GFP_KERNEL); > + priv->fw_size = fw->size; > + release_firmware(fw); > + if (!priv->fw) > + return -ENOMEM; > + > return 0; > } > > +static void > +nv84_bsp_dtor(struct nouveau_object *object) > +{ > + struct nv84_bsp_priv *priv = (void *)object; > + kfree(priv->fw); > +} > +...
2016 Jan 18
0
[PATCH 1/5] core: add firmware handling functions
...cname[i] = tolower(cname[i]); + } + + snprintf(f, sizeof(f), "nvidia/%s/%s.bin", cname, fwname); + return request_firmware(fw, f, device->dev); +} + +/** + * nvkm_firmware_put - release firmware loaded with nvkm_firmware_get + */ +void +nvkm_firmware_put(const struct firmware *fw) +{ + release_firmware(fw); +} -- 2.7.0
2024 Jun 07
0
[RFC PATCH 7/8] rust: add firmware abstractions
...ersions that are slightly altered in the points that are actively discussed. This really just complicates the situation and does not help getting to an agreement. > > You have the new version of the firmware patch? The unused functions > will not be merged so only request_firmware() and release_firmware() > can be included. If not, I can include my firmware patch that I wrote > before. > Please find the updated firmware patch in [2]. However, I propose to just send a new series with just the device abstraction and this firmware patch and proceed from there. [1] https://lore.kernel.or...
2015 Jun 19
2
[PATCH 1/6] gr: support for NVIDIA-provided firmwares
...goto found; > } > > + nv_error(priv, "failed to load %s / %s\n", fwname, nvfwname); > + return ret; > + > +found: > fuc->size = fw->size; > fuc->data = kmemdup(fw->data, fuc->size, GFP_KERNEL); > release_firmware(fw); > @@ -1615,10 +1651,10 @@ gf100_gr_ctor(struct nvkm_object *parent, struct nvkm_object *engine, > > if (use_ext_fw) { > nv_info(priv, "using external firmware\n"); > - if (gf100_gr_ctor_fw(priv, "fuc409c", &priv->...
2013 Nov 26
1
[PATCH char-misc-linus 4/5] misc: mic: Fix sparse warnings and other endianness issues.
...->size); - iowrite32(cpu_to_le32(mdev->bootaddr << 1), &bp->hdr.ramdisk_image); - iowrite32(cpu_to_le32(fw->size), &bp->hdr.ramdisk_size); + iowrite32(mdev->bootaddr << 1, &bp->hdr.ramdisk_image); + iowrite32(fw->size, &bp->hdr.ramdisk_size); release_firmware(fw); error: return rc; diff --git a/include/uapi/linux/mic_common.h b/include/uapi/linux/mic_common.h index 17e7d95..ca70a50 100644 --- a/include/uapi/linux/mic_common.h +++ b/include/uapi/linux/mic_common.h @@ -48,7 +48,7 @@ struct mic_device_desc { __u8 feature_len; __u8 config_len; __u...
2013 Nov 26
1
[PATCH char-misc-linus 4/5] misc: mic: Fix sparse warnings and other endianness issues.
...->size); - iowrite32(cpu_to_le32(mdev->bootaddr << 1), &bp->hdr.ramdisk_image); - iowrite32(cpu_to_le32(fw->size), &bp->hdr.ramdisk_size); + iowrite32(mdev->bootaddr << 1, &bp->hdr.ramdisk_image); + iowrite32(fw->size, &bp->hdr.ramdisk_size); release_firmware(fw); error: return rc; diff --git a/include/uapi/linux/mic_common.h b/include/uapi/linux/mic_common.h index 17e7d95..ca70a50 100644 --- a/include/uapi/linux/mic_common.h +++ b/include/uapi/linux/mic_common.h @@ -48,7 +48,7 @@ struct mic_device_desc { __u8 feature_len; __u8 config_len; __u...
2013 Sep 05
0
[PATCH RESEND v3 3/7] Intel MIC Host Driver, card OS state management.
...4M + * so copy over the ramdisk @ 128M. + */ + memcpy_toio(mdev->aper.va + (mdev->bootaddr << 1), + fw->data, fw->size); + iowrite32(cpu_to_le32(mdev->bootaddr << 1), &bp->hdr.ramdisk_image); + iowrite32(cpu_to_le32(fw->size), &bp->hdr.ramdisk_size); + release_firmware(fw); +error: + return rc; +} + +/** + * mic_x100_get_boot_addr - Get MIC boot address. + * @mdev: pointer to mic_device instance + * + * This function is called during firmware load to determine + * the address at which the OS should be downloaded in card + * memory i.e. GDDR. + * RETURNS: An appr...