search for: nvkm_firmware_put

Displaying 20 results from an estimated 28 matches for "nvkm_firmware_put".

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
2016 Jan 18
0
[PATCH 1/5] core: add firmware handling functions
Add two functions nvkm_firmware_get() and nvkm_firmware_put() to load a firmware file and free its resources, respectively. Since firmware files are becoming a necessity for new GPUs, and their location has been standardized to nvidia/chip/, this will prevent duplicate and error-prone name-generation code. Signed-off-by: Alexandre Courbot <acourbot at n...
2016 Jan 21
2
[PATCH 1/5] core: add firmware handling functions
Hi Alexandre, On 18 January 2016 at 06:07, Alexandre Courbot <acourbot at nvidia.com> wrote: > Add two functions nvkm_firmware_get() and nvkm_firmware_put() to load a > firmware file and free its resources, respectively. Since firmware files > are becoming a necessity for new GPUs, and their location has been > standardized to nvidia/chip/, this will prevent duplicate and > error-prone name-generation code. > Strictly speaking this wil...
2016 Nov 02
3
[PATCH] gr: fallback to legacy paths during firmware lookup
...t;device; + const char *legacy_fwname = NULL; const struct firmware *fw; int ret; ret = nvkm_firmware_get(device, fwname, &fw); - if (ret) { + /* firmware found, success! */ + if (!ret) { + fuc->size = fw->size; + fuc->data = kmemdup(fw->data, fuc->size, GFP_KERNEL); + nvkm_firmware_put(fw); + return (fuc->data != NULL) ? 0 : -ENOMEM; + } + + /* see if this firmware has a legacy path */ + if (!strcmp(fwname, "fecs_inst")) + legacy_fwname = "fuc409c"; + else if (!strcmp(fwname, "fecs_data")) + legacy_fwname = "fuc409d"; + else if (!strc...
2016 Oct 24
2
[PATCH 01/17] drm/nouveau/core: add missing header dependencies
...2 warnings when building kernel with W=1: > > drivers/gpu/drm/nouveau/nvkm/core/firmware.c:34:1: warning: no previous > prototype for 'nvkm_firmware_get' [-Wmissing-prototypes] > > drivers/gpu/drm/nouveau/nvkm/core/firmware.c:58:1: warning: no previous > prototype for 'nvkm_firmware_put' [-Wmissing-prototypes] > > > > In fact, these functions are declared in > > drivers/gpu/drm/nouveau/include/nvkm/core/firmware.h. > > So this patch adds missing header dependencies. > > > > Signed-off-by: Baoyou Xie <baoyou.xie at linaro.org> > >...
2020 Nov 16
0
[PATCH 21/42] drm/nouveau/nvkm/core/firmware: Fix formatting, provide missing param description
...n 'nvkm_firmware_get' drivers/gpu/drm/nouveau/nvkm/core/firmware.c:71: warning: Function parameter or member 'fw' not described in 'nvkm_firmware_get' drivers/gpu/drm/nouveau/nvkm/core/firmware.c:106: warning: Function parameter or member 'fw' not described in 'nvkm_firmware_put' Cc: Ben Skeggs <bskeggs at redhat.com> Cc: David Airlie <airlied at linux.ie> Cc: Daniel Vetter <daniel at ffwll.ch> Cc: dri-devel at lists.freedesktop.org Cc: nouveau at lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones at linaro.org> --- drivers/gpu/drm/nouv...
2016 Nov 02
0
[PATCH] gr: fallback to legacy paths during firmware lookup
...ret = nvkm_firmware_get(device, fwname, &fw); > - if (ret) { > + /* firmware found, success! */ > + if (!ret) { > + fuc->size = fw->size; > + fuc->data = kmemdup(fw->data, fuc->size, GFP_KERNEL); > + nvkm_firmware_put(fw); > + return (fuc->data != NULL) ? 0 : -ENOMEM; > + } > + > + /* see if this firmware has a legacy path */ > + if (!strcmp(fwname, "fecs_inst")) > + legacy_fwname = "fuc409c"; > + else if (!strcmp(fwn...
2020 Nov 16
2
[PATCH v2 00/42] Rid W=1 warnings from GPU (non-Radeon)
[sending again, as `git send-email` crashed!] This set contains fixes for some "wouldn't it be nice if" issues, however most of the patches seen here have been on the MLs, but were left unreviewed. Lee Jones (42): drm/amd/amdgpu/atombios_encoders: Remove set but unused variable 'backlight_level' drm/armada/armada_overlay: Staticify local function
2020 Apr 21
1
[PATCH -next] drm/nouveau/acr: Use kmemdup instead of kmalloc and memcpy
...hdr->sig_dbg_offset + sig, + hsfw->sig.dbg.size, GFP_KERNEL); if (!hsfw->sig.dbg.data) { ret = -ENOMEM; goto done; } - memcpy(hsfw->sig.dbg.data, fw->data + fwhdr->sig_dbg_offset + sig, - hsfw->sig.dbg.size); - hsfw->sig.patch_loc = loc; done: nvkm_firmware_put(fw); -- 2.6.2
2016 Jan 25
0
[PATCH 1/5] core: add firmware handling functions
On Thu, Jan 21, 2016 at 8:41 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote: > Hi Alexandre, > > On 18 January 2016 at 06:07, Alexandre Courbot <acourbot at nvidia.com> wrote: >> Add two functions nvkm_firmware_get() and nvkm_firmware_put() to load a >> firmware file and free its resources, respectively. Since firmware files >> are becoming a necessity for new GPUs, and their location has been >> standardized to nvidia/chip/, this will prevent duplicate and >> error-prone name-generation code. >> > S...
2016 Nov 02
2
[PATCH] gr: fallback to legacy paths during firmware lookup
...et(device, fwname, &fw); >> - if (ret) { >> + /* firmware found, success! */ >> + if (!ret) { >> + fuc->size = fw->size; >> + fuc->data = kmemdup(fw->data, fuc->size, GFP_KERNEL); >> + nvkm_firmware_put(fw); >> + return (fuc->data != NULL) ? 0 : -ENOMEM; >> + } >> + >> + /* see if this firmware has a legacy path */ >> + if (!strcmp(fwname, "fecs_inst")) >> + legacy_fwname = "fuc409c"; >>...
2020 Nov 12
1
[PATCH 00/30] [Set 6] Rid W=1 warnings from GPU
This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings. NB: Hopefully the other sets turn up in -next soon, so they can be rebased and any stragglers re-submitted. Lee Jones (30): drm/savage/savage_bci: Remove set but never used 'aper_rsrc' and 'fb_rsrc' include: drm: drm_atomic:
2016 Sep 18
0
[PATCH] drm/nouveau/core: add missing header dependencies
We get 2 warnings when building kernel with W=1: drivers/gpu/drm/nouveau/nvkm/core/firmware.c:34:1: warning: no previous prototype for 'nvkm_firmware_get' [-Wmissing-prototypes] drivers/gpu/drm/nouveau/nvkm/core/firmware.c:58:1: warning: no previous prototype for 'nvkm_firmware_put' [-Wmissing-prototypes] In fact, both functions are declared in drivers/gpu/drm/nouveau/include/nvkm/core/firmware.h, so this patch adds missing header dependencies. Signed-off-by: Baoyou Xie <baoyou.xie at linaro.org> --- drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 1 + 1 file chan...
2016 Oct 22
0
[PATCH 01/17] drm/nouveau/core: add missing header dependencies
...rg>: > We get 2 warnings when building kernel with W=1: > drivers/gpu/drm/nouveau/nvkm/core/firmware.c:34:1: warning: no previous prototype for 'nvkm_firmware_get' [-Wmissing-prototypes] > drivers/gpu/drm/nouveau/nvkm/core/firmware.c:58:1: warning: no previous prototype for 'nvkm_firmware_put' [-Wmissing-prototypes] > > In fact, these functions are declared in > drivers/gpu/drm/nouveau/include/nvkm/core/firmware.h. > So this patch adds missing header dependencies. > > Signed-off-by: Baoyou Xie <baoyou.xie at linaro.org> > --- > drivers/gpu/drm/nouveau/...
2016 Oct 24
0
[PATCH 01/17] drm/nouveau/core: add missing header dependencies
...ernel with W=1: >> > drivers/gpu/drm/nouveau/nvkm/core/firmware.c:34:1: warning: no previous >> > prototype for 'nvkm_firmware_get' [-Wmissing-prototypes] >> > drivers/gpu/drm/nouveau/nvkm/core/firmware.c:58:1: warning: no previous >> > prototype for 'nvkm_firmware_put' [-Wmissing-prototypes] >> > >> > In fact, these functions are declared in >> > drivers/gpu/drm/nouveau/include/nvkm/core/firmware.h. >> > So this patch adds missing header dependencies. >> > >> > Signed-off-by: Baoyou Xie <baoyou.xie at...
2017 May 08
0
[PATCH] drm/nouveau/secboot: fix some error handling in 'ls_ucode_img_load_gr'
...ev *subdev, struct ls_ucode_img *img, &img->ucode_desc); if (IS_ERR(img->ucode_data)) { ret = PTR_ERR(img->ucode_data); - goto free_data; + goto free_img_sig; } img->ucode_size = img->ucode_desc.image_size; +free_img_sig: + kfree(img->sig); free_sig: nvkm_firmware_put(sig); free_data: -- 2.11.0
2016 Nov 03
0
[PATCH] gr: fallback to legacy paths during firmware lookup
...fw); >>> - if (ret) { >>> + /* firmware found, success! */ >>> + if (!ret) { >>> + fuc->size = fw->size; >>> + fuc->data = kmemdup(fw->data, fuc->size, GFP_KERNEL); >>> + nvkm_firmware_put(fw); >>> + return (fuc->data != NULL) ? 0 : -ENOMEM; >>> + } >>> + >>> + /* see if this firmware has a legacy path */ >>> + if (!strcmp(fwname, "fecs_inst")) >>> + legacy_fwname = "...
2016 Feb 24
0
[PATCH v3 10/11] secboot/gm200: add secure-boot support
...in_size) +{ + const struct firmware *fw; + void *blob; + int ret; + + ret = nvkm_firmware_get(subdev->device, name, &fw); + if (ret) + return ERR_PTR(ret); + if (fw->size < min_size) { + nvkm_error(subdev, "%s is smaller than expected size %zu\n", + name, min_size); + nvkm_firmware_put(fw); + return ERR_PTR(-EINVAL); + } + blob = kmemdup(fw->data, fw->size, GFP_KERNEL); + nvkm_firmware_put(fw); + if (!blob) + return ERR_PTR(-ENOMEM); + + return blob; +} + + +/* + * Low-secure blob creation + */ + +#define BL_DESC_BLK_SIZE 256 +/** + * Build a ucode image and descriptor fr...
2016 Oct 22
18
[PATCH 01/17] drm/nouveau/core: add missing header dependencies
We get 2 warnings when building kernel with W=1: drivers/gpu/drm/nouveau/nvkm/core/firmware.c:34:1: warning: no previous prototype for 'nvkm_firmware_get' [-Wmissing-prototypes] drivers/gpu/drm/nouveau/nvkm/core/firmware.c:58:1: warning: no previous prototype for 'nvkm_firmware_put' [-Wmissing-prototypes] In fact, these functions are declared in drivers/gpu/drm/nouveau/include/nvkm/core/firmware.h. So this patch adds missing header dependencies. Signed-off-by: Baoyou Xie <baoyou.xie at linaro.org> --- drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 1 + 1 file cha...
2016 Nov 02
0
[PATCH v3 14/15] secboot: abstract LS firmware loading functions
...gt;falcon_id = falcon_id; - memcpy(&img->lsb_header.signature, lsf_desc, sizeof(*lsf_desc)); - img->falcon_id = lsf_desc->falcon_id; - kfree(lsf_desc); - - /* success path - only free requested firmware files */ - goto free_data; - -free_image: - kfree(img->ucode_data); +free_sig: + nvkm_firmware_put(sig); free_data: nvkm_firmware_put(data); free_inst: @@ -152,12 +147,12 @@ int acr_ls_ucode_load_fecs(const struct nvkm_subdev *subdev, struct ls_ucode_img *img) { - return ls_ucode_img_load_gr(subdev, img, "fecs", NVKM_FALCON_FECS); + return ls_ucode_img_load_gr(subdev, i...