diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2017-03-29 05:31:10 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-04-06 00:39:04 -0400 |
commit | 2963a06a4d36af5d863c55b2d76ed91e6a922409 (patch) | |
tree | d06af6488651cb8c1c1397c65f98e3ab7fd5bd8d /drivers | |
parent | 598a8148e7208aae64f3c3d33f0ad1a65425965f (diff) |
drm/nouveau/secboot: pass instance to LS firmware loaders
Having access to the secboot instance loading a LS firmware can be
useful to LS firmware handlers. At least more useful than just having an
out-of-context subdev pointer.
GP10B's firmware will also need to know the WPR address, which can be
obtained from the secboot instance.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
12 files changed, 44 insertions, 39 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/msgqueue.h b/drivers/gpu/drm/nouveau/include/nvkm/core/msgqueue.h index 5c902f8c042a..bf3e532665fb 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/msgqueue.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/msgqueue.h | |||
@@ -22,17 +22,14 @@ | |||
22 | 22 | ||
23 | #ifndef __NVKM_CORE_MSGQUEUE_H | 23 | #ifndef __NVKM_CORE_MSGQUEUE_H |
24 | #define __NVKM_CORE_MSGQUEUE_H | 24 | #define __NVKM_CORE_MSGQUEUE_H |
25 | 25 | #include <subdev/secboot.h> | |
26 | #include <core/os.h> | ||
27 | |||
28 | struct nvkm_falcon; | ||
29 | struct nvkm_msgqueue; | 26 | struct nvkm_msgqueue; |
30 | enum nvkm_secboot_falcon; | ||
31 | 27 | ||
32 | /* Hopefully we will never have firmware arguments larger than that... */ | 28 | /* Hopefully we will never have firmware arguments larger than that... */ |
33 | #define NVKM_MSGQUEUE_CMDLINE_SIZE 0x100 | 29 | #define NVKM_MSGQUEUE_CMDLINE_SIZE 0x100 |
34 | 30 | ||
35 | int nvkm_msgqueue_new(u32, struct nvkm_falcon *, struct nvkm_msgqueue **); | 31 | int nvkm_msgqueue_new(u32, struct nvkm_falcon *, const struct nvkm_secboot *, |
32 | struct nvkm_msgqueue **); | ||
36 | void nvkm_msgqueue_del(struct nvkm_msgqueue **); | 33 | void nvkm_msgqueue_del(struct nvkm_msgqueue **); |
37 | void nvkm_msgqueue_recv(struct nvkm_msgqueue *); | 34 | void nvkm_msgqueue_recv(struct nvkm_msgqueue *); |
38 | int nvkm_msgqueue_reinit(struct nvkm_msgqueue *); | 35 | int nvkm_msgqueue_reinit(struct nvkm_msgqueue *); |
diff --git a/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.c b/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.c index 0780d340c3eb..f7101a910bc7 100644 --- a/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.c +++ b/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.c | |||
@@ -491,17 +491,18 @@ nvkm_msgqueue_acr_boot_falcons(struct nvkm_msgqueue *queue, | |||
491 | } | 491 | } |
492 | 492 | ||
493 | int | 493 | int |
494 | nvkm_msgqueue_new(u32 version, struct nvkm_falcon *falcon, struct nvkm_msgqueue **queue) | 494 | nvkm_msgqueue_new(u32 version, struct nvkm_falcon *falcon, |
495 | const struct nvkm_secboot *sb, struct nvkm_msgqueue **queue) | ||
495 | { | 496 | { |
496 | const struct nvkm_subdev *subdev = falcon->owner; | 497 | const struct nvkm_subdev *subdev = falcon->owner; |
497 | int ret = -EINVAL; | 498 | int ret = -EINVAL; |
498 | 499 | ||
499 | switch (version) { | 500 | switch (version) { |
500 | case 0x0137c63d: | 501 | case 0x0137c63d: |
501 | ret = msgqueue_0137c63d_new(falcon, queue); | 502 | ret = msgqueue_0137c63d_new(falcon, sb, queue); |
502 | break; | 503 | break; |
503 | case 0x0148cdec: | 504 | case 0x0148cdec: |
504 | ret = msgqueue_0148cdec_new(falcon, queue); | 505 | ret = msgqueue_0148cdec_new(falcon, sb, queue); |
505 | break; | 506 | break; |
506 | default: | 507 | default: |
507 | nvkm_error(subdev, "unhandled firmware version 0x%08x\n", | 508 | nvkm_error(subdev, "unhandled firmware version 0x%08x\n", |
diff --git a/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.h b/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.h index ea67a522a12e..2b3a6c3b8f6a 100644 --- a/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.h +++ b/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.h | |||
@@ -203,7 +203,9 @@ int nvkm_msgqueue_post(struct nvkm_msgqueue *, enum msgqueue_msg_priority, | |||
203 | void nvkm_msgqueue_process_msgs(struct nvkm_msgqueue *, | 203 | void nvkm_msgqueue_process_msgs(struct nvkm_msgqueue *, |
204 | struct nvkm_msgqueue_queue *); | 204 | struct nvkm_msgqueue_queue *); |
205 | 205 | ||
206 | int msgqueue_0137c63d_new(struct nvkm_falcon *, struct nvkm_msgqueue **); | 206 | int msgqueue_0137c63d_new(struct nvkm_falcon *, const struct nvkm_secboot *, |
207 | int msgqueue_0148cdec_new(struct nvkm_falcon *, struct nvkm_msgqueue **); | 207 | struct nvkm_msgqueue **); |
208 | int msgqueue_0148cdec_new(struct nvkm_falcon *, const struct nvkm_secboot *, | ||
209 | struct nvkm_msgqueue **); | ||
208 | 210 | ||
209 | #endif | 211 | #endif |
diff --git a/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue_0137c63d.c b/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue_0137c63d.c index bba91207fb18..935b9a7e60a9 100644 --- a/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue_0137c63d.c +++ b/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue_0137c63d.c | |||
@@ -307,7 +307,8 @@ msgqueue_0137c63d_func = { | |||
307 | }; | 307 | }; |
308 | 308 | ||
309 | int | 309 | int |
310 | msgqueue_0137c63d_new(struct nvkm_falcon *falcon, struct nvkm_msgqueue **queue) | 310 | msgqueue_0137c63d_new(struct nvkm_falcon *falcon, const struct nvkm_secboot *sb, |
311 | struct nvkm_msgqueue **queue) | ||
311 | { | 312 | { |
312 | struct msgqueue_0137c63d *ret; | 313 | struct msgqueue_0137c63d *ret; |
313 | 314 | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue_0148cdec.c b/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue_0148cdec.c index ed5d0da4f4e9..9424803b9ef4 100644 --- a/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue_0148cdec.c +++ b/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue_0148cdec.c | |||
@@ -247,7 +247,8 @@ msgqueue_0148cdec_func = { | |||
247 | }; | 247 | }; |
248 | 248 | ||
249 | int | 249 | int |
250 | msgqueue_0148cdec_new(struct nvkm_falcon *falcon, struct nvkm_msgqueue **queue) | 250 | msgqueue_0148cdec_new(struct nvkm_falcon *falcon, const struct nvkm_secboot *sb, |
251 | struct nvkm_msgqueue **queue) | ||
251 | { | 252 | { |
252 | struct msgqueue_0148cdec *ret; | 253 | struct msgqueue_0148cdec *ret; |
253 | 254 | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c index aa4e75f0eb0a..3cb4b1953f99 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | |||
@@ -241,6 +241,7 @@ struct ls_ucode_img_r352 { | |||
241 | */ | 241 | */ |
242 | struct ls_ucode_img * | 242 | struct ls_ucode_img * |
243 | acr_r352_ls_ucode_img_load(const struct acr_r352 *acr, | 243 | acr_r352_ls_ucode_img_load(const struct acr_r352 *acr, |
244 | const struct nvkm_secboot *sb, | ||
244 | enum nvkm_secboot_falcon falcon_id) | 245 | enum nvkm_secboot_falcon falcon_id) |
245 | { | 246 | { |
246 | const struct nvkm_subdev *subdev = acr->base.subdev; | 247 | const struct nvkm_subdev *subdev = acr->base.subdev; |
@@ -253,7 +254,7 @@ acr_r352_ls_ucode_img_load(const struct acr_r352 *acr, | |||
253 | 254 | ||
254 | img->base.falcon_id = falcon_id; | 255 | img->base.falcon_id = falcon_id; |
255 | 256 | ||
256 | ret = acr->func->ls_func[falcon_id]->load(subdev, &img->base); | 257 | ret = acr->func->ls_func[falcon_id]->load(sb, &img->base); |
257 | 258 | ||
258 | if (ret) { | 259 | if (ret) { |
259 | kfree(img->base.ucode_data); | 260 | kfree(img->base.ucode_data); |
@@ -462,12 +463,14 @@ acr_r352_ls_write_wpr(struct acr_r352 *acr, struct list_head *imgs, | |||
462 | * will be copied into the WPR region by the HS firmware. | 463 | * will be copied into the WPR region by the HS firmware. |
463 | */ | 464 | */ |
464 | static int | 465 | static int |
465 | acr_r352_prepare_ls_blob(struct acr_r352 *acr, u64 wpr_addr, u32 wpr_size) | 466 | acr_r352_prepare_ls_blob(struct acr_r352 *acr, struct nvkm_secboot *sb) |
466 | { | 467 | { |
467 | const struct nvkm_subdev *subdev = acr->base.subdev; | 468 | const struct nvkm_subdev *subdev = acr->base.subdev; |
468 | struct list_head imgs; | 469 | struct list_head imgs; |
469 | struct ls_ucode_img *img, *t; | 470 | struct ls_ucode_img *img, *t; |
470 | unsigned long managed_falcons = acr->base.managed_falcons; | 471 | unsigned long managed_falcons = acr->base.managed_falcons; |
472 | u64 wpr_addr = sb->wpr_addr; | ||
473 | u32 wpr_size = sb->wpr_size; | ||
471 | int managed_count = 0; | 474 | int managed_count = 0; |
472 | u32 image_wpr_size, ls_blob_size; | 475 | u32 image_wpr_size, ls_blob_size; |
473 | int falcon_id; | 476 | int falcon_id; |
@@ -479,7 +482,7 @@ acr_r352_prepare_ls_blob(struct acr_r352 *acr, u64 wpr_addr, u32 wpr_size) | |||
479 | for_each_set_bit(falcon_id, &managed_falcons, NVKM_SECBOOT_FALCON_END) { | 482 | for_each_set_bit(falcon_id, &managed_falcons, NVKM_SECBOOT_FALCON_END) { |
480 | struct ls_ucode_img *img; | 483 | struct ls_ucode_img *img; |
481 | 484 | ||
482 | img = acr->func->ls_ucode_img_load(acr, falcon_id); | 485 | img = acr->func->ls_ucode_img_load(acr, sb, falcon_id); |
483 | if (IS_ERR(img)) { | 486 | if (IS_ERR(img)) { |
484 | if (acr->base.optional_falcons & BIT(falcon_id)) { | 487 | if (acr->base.optional_falcons & BIT(falcon_id)) { |
485 | managed_falcons &= ~BIT(falcon_id); | 488 | managed_falcons &= ~BIT(falcon_id); |
@@ -704,7 +707,7 @@ acr_r352_load_blobs(struct acr_r352 *acr, struct nvkm_secboot *sb) | |||
704 | return 0; | 707 | return 0; |
705 | 708 | ||
706 | /* Load and prepare the managed falcon's firmwares */ | 709 | /* Load and prepare the managed falcon's firmwares */ |
707 | ret = acr_r352_prepare_ls_blob(acr, sb->wpr_addr, sb->wpr_size); | 710 | ret = acr_r352_prepare_ls_blob(acr, sb); |
708 | if (ret) | 711 | if (ret) |
709 | return ret; | 712 | return ret; |
710 | 713 | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h index 6e88520566c9..9b9156c9c814 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | |||
@@ -57,7 +57,7 @@ hsf_load_header_app_size(const struct hsf_load_header *hdr, u32 app) | |||
57 | * @lhdr_flags: LS flags | 57 | * @lhdr_flags: LS flags |
58 | */ | 58 | */ |
59 | struct acr_r352_ls_func { | 59 | struct acr_r352_ls_func { |
60 | int (*load)(const struct nvkm_subdev *, struct ls_ucode_img *); | 60 | int (*load)(const struct nvkm_secboot *, struct ls_ucode_img *); |
61 | void (*generate_bl_desc)(const struct nvkm_acr *, | 61 | void (*generate_bl_desc)(const struct nvkm_acr *, |
62 | const struct ls_ucode_img *, u64, void *); | 62 | const struct ls_ucode_img *, u64, void *); |
63 | u32 bl_desc_size; | 63 | u32 bl_desc_size; |
@@ -82,6 +82,7 @@ struct acr_r352_func { | |||
82 | bool shadow_blob; | 82 | bool shadow_blob; |
83 | 83 | ||
84 | struct ls_ucode_img *(*ls_ucode_img_load)(const struct acr_r352 *, | 84 | struct ls_ucode_img *(*ls_ucode_img_load)(const struct acr_r352 *, |
85 | const struct nvkm_secboot *, | ||
85 | enum nvkm_secboot_falcon); | 86 | enum nvkm_secboot_falcon); |
86 | int (*ls_fill_headers)(struct acr_r352 *, struct list_head *); | 87 | int (*ls_fill_headers)(struct acr_r352 *, struct list_head *); |
87 | int (*ls_write_wpr)(struct acr_r352 *, struct list_head *, | 88 | int (*ls_write_wpr)(struct acr_r352 *, struct list_head *, |
@@ -145,6 +146,7 @@ struct nvkm_acr *acr_r352_new_(const struct acr_r352_func *, | |||
145 | enum nvkm_secboot_falcon, unsigned long); | 146 | enum nvkm_secboot_falcon, unsigned long); |
146 | 147 | ||
147 | struct ls_ucode_img *acr_r352_ls_ucode_img_load(const struct acr_r352 *, | 148 | struct ls_ucode_img *acr_r352_ls_ucode_img_load(const struct acr_r352 *, |
149 | const struct nvkm_secboot *, | ||
148 | enum nvkm_secboot_falcon); | 150 | enum nvkm_secboot_falcon); |
149 | int acr_r352_ls_fill_headers(struct acr_r352 *, struct list_head *); | 151 | int acr_r352_ls_fill_headers(struct acr_r352 *, struct list_head *); |
150 | int acr_r352_ls_write_wpr(struct acr_r352 *, struct list_head *, | 152 | int acr_r352_ls_write_wpr(struct acr_r352 *, struct list_head *, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r367.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r367.c index f860713642f1..866877b88797 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r367.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r367.c | |||
@@ -107,6 +107,7 @@ struct ls_ucode_img_r367 { | |||
107 | 107 | ||
108 | struct ls_ucode_img * | 108 | struct ls_ucode_img * |
109 | acr_r367_ls_ucode_img_load(const struct acr_r352 *acr, | 109 | acr_r367_ls_ucode_img_load(const struct acr_r352 *acr, |
110 | const struct nvkm_secboot *sb, | ||
110 | enum nvkm_secboot_falcon falcon_id) | 111 | enum nvkm_secboot_falcon falcon_id) |
111 | { | 112 | { |
112 | const struct nvkm_subdev *subdev = acr->base.subdev; | 113 | const struct nvkm_subdev *subdev = acr->base.subdev; |
@@ -119,7 +120,7 @@ acr_r367_ls_ucode_img_load(const struct acr_r352 *acr, | |||
119 | 120 | ||
120 | img->base.falcon_id = falcon_id; | 121 | img->base.falcon_id = falcon_id; |
121 | 122 | ||
122 | ret = acr->func->ls_func[falcon_id]->load(subdev, &img->base); | 123 | ret = acr->func->ls_func[falcon_id]->load(sb, &img->base); |
123 | if (ret) { | 124 | if (ret) { |
124 | kfree(img->base.ucode_data); | 125 | kfree(img->base.ucode_data); |
125 | kfree(img->base.sig); | 126 | kfree(img->base.sig); |
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r367.h b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r367.h index ec6a71ca36be..8bdfb3e5cd1c 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r367.h +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r367.h | |||
@@ -28,6 +28,7 @@ | |||
28 | void acr_r367_fixup_hs_desc(struct acr_r352 *, struct nvkm_secboot *, void *); | 28 | void acr_r367_fixup_hs_desc(struct acr_r352 *, struct nvkm_secboot *, void *); |
29 | 29 | ||
30 | struct ls_ucode_img *acr_r367_ls_ucode_img_load(const struct acr_r352 *, | 30 | struct ls_ucode_img *acr_r367_ls_ucode_img_load(const struct acr_r352 *, |
31 | const struct nvkm_secboot *, | ||
31 | enum nvkm_secboot_falcon); | 32 | enum nvkm_secboot_falcon); |
32 | int acr_r367_ls_fill_headers(struct acr_r352 *, struct list_head *); | 33 | int acr_r367_ls_fill_headers(struct acr_r352 *, struct list_head *); |
33 | int acr_r367_ls_write_wpr(struct acr_r352 *, struct list_head *, | 34 | int acr_r367_ls_write_wpr(struct acr_r352 *, struct list_head *, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h index 4ff9138a2a83..11b88d0c4daf 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h | |||
@@ -147,11 +147,11 @@ struct fw_bl_desc { | |||
147 | u32 data_size; | 147 | u32 data_size; |
148 | }; | 148 | }; |
149 | 149 | ||
150 | int acr_ls_ucode_load_fecs(const struct nvkm_subdev *, struct ls_ucode_img *); | 150 | int acr_ls_ucode_load_fecs(const struct nvkm_secboot *, struct ls_ucode_img *); |
151 | int acr_ls_ucode_load_gpccs(const struct nvkm_subdev *, struct ls_ucode_img *); | 151 | int acr_ls_ucode_load_gpccs(const struct nvkm_secboot *, struct ls_ucode_img *); |
152 | int acr_ls_ucode_load_pmu(const struct nvkm_subdev *, struct ls_ucode_img *); | 152 | int acr_ls_ucode_load_pmu(const struct nvkm_secboot *, struct ls_ucode_img *); |
153 | void acr_ls_pmu_post_run(const struct nvkm_acr *, const struct nvkm_secboot *); | 153 | void acr_ls_pmu_post_run(const struct nvkm_acr *, const struct nvkm_secboot *); |
154 | int acr_ls_ucode_load_sec2(const struct nvkm_subdev *, struct ls_ucode_img *); | 154 | int acr_ls_ucode_load_sec2(const struct nvkm_secboot *, struct ls_ucode_img *); |
155 | void acr_ls_sec2_post_run(const struct nvkm_acr *, const struct nvkm_secboot *); | 155 | void acr_ls_sec2_post_run(const struct nvkm_acr *, const struct nvkm_secboot *); |
156 | 156 | ||
157 | #endif | 157 | #endif |
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c index 40a6df77bb8a..d1cf02d22db1 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c | |||
@@ -144,15 +144,13 @@ error: | |||
144 | } | 144 | } |
145 | 145 | ||
146 | int | 146 | int |
147 | acr_ls_ucode_load_fecs(const struct nvkm_subdev *subdev, | 147 | acr_ls_ucode_load_fecs(const struct nvkm_secboot *sb, struct ls_ucode_img *img) |
148 | struct ls_ucode_img *img) | ||
149 | { | 148 | { |
150 | return ls_ucode_img_load_gr(subdev, img, "fecs"); | 149 | return ls_ucode_img_load_gr(&sb->subdev, img, "fecs"); |
151 | } | 150 | } |
152 | 151 | ||
153 | int | 152 | int |
154 | acr_ls_ucode_load_gpccs(const struct nvkm_subdev *subdev, | 153 | acr_ls_ucode_load_gpccs(const struct nvkm_secboot *sb, struct ls_ucode_img *img) |
155 | struct ls_ucode_img *img) | ||
156 | { | 154 | { |
157 | return ls_ucode_img_load_gr(subdev, img, "gpccs"); | 155 | return ls_ucode_img_load_gr(&sb->subdev, img, "gpccs"); |
158 | } | 156 | } |
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_msgqueue.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_msgqueue.c index ef0b298b70d7..97c14c16e5af 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_msgqueue.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_msgqueue.c | |||
@@ -88,19 +88,18 @@ acr_ls_msgqueue_post_run(struct nvkm_msgqueue *queue, | |||
88 | } | 88 | } |
89 | 89 | ||
90 | int | 90 | int |
91 | acr_ls_ucode_load_pmu(const struct nvkm_subdev *subdev, | 91 | acr_ls_ucode_load_pmu(const struct nvkm_secboot *sb, struct ls_ucode_img *img) |
92 | struct ls_ucode_img *img) | ||
93 | { | 92 | { |
94 | struct nvkm_pmu *pmu = subdev->device->pmu; | 93 | struct nvkm_pmu *pmu = sb->subdev.device->pmu; |
95 | int ret; | 94 | int ret; |
96 | 95 | ||
97 | ret = acr_ls_ucode_load_msgqueue(subdev, "pmu", img); | 96 | ret = acr_ls_ucode_load_msgqueue(&sb->subdev, "pmu", img); |
98 | if (ret) | 97 | if (ret) |
99 | return ret; | 98 | return ret; |
100 | 99 | ||
101 | /* Allocate the PMU queue corresponding to the FW version */ | 100 | /* Allocate the PMU queue corresponding to the FW version */ |
102 | ret = nvkm_msgqueue_new(img->ucode_desc.app_version, pmu->falcon, | 101 | ret = nvkm_msgqueue_new(img->ucode_desc.app_version, pmu->falcon, |
103 | &pmu->queue); | 102 | sb, &pmu->queue); |
104 | if (ret) | 103 | if (ret) |
105 | return ret; | 104 | return ret; |
106 | 105 | ||
@@ -118,19 +117,18 @@ acr_ls_pmu_post_run(const struct nvkm_acr *acr, const struct nvkm_secboot *sb) | |||
118 | } | 117 | } |
119 | 118 | ||
120 | int | 119 | int |
121 | acr_ls_ucode_load_sec2(const struct nvkm_subdev *subdev, | 120 | acr_ls_ucode_load_sec2(const struct nvkm_secboot *sb, struct ls_ucode_img *img) |
122 | struct ls_ucode_img *img) | ||
123 | { | 121 | { |
124 | struct nvkm_sec2 *sec = subdev->device->sec2; | 122 | struct nvkm_sec2 *sec = sb->subdev.device->sec2; |
125 | int ret; | 123 | int ret; |
126 | 124 | ||
127 | ret = acr_ls_ucode_load_msgqueue(subdev, "sec2", img); | 125 | ret = acr_ls_ucode_load_msgqueue(&sb->subdev, "sec2", img); |
128 | if (ret) | 126 | if (ret) |
129 | return ret; | 127 | return ret; |
130 | 128 | ||
131 | /* Allocate the PMU queue corresponding to the FW version */ | 129 | /* Allocate the PMU queue corresponding to the FW version */ |
132 | ret = nvkm_msgqueue_new(img->ucode_desc.app_version, sec->falcon, | 130 | ret = nvkm_msgqueue_new(img->ucode_desc.app_version, sec->falcon, |
133 | &sec->queue); | 131 | sb, &sec->queue); |
134 | if (ret) | 132 | if (ret) |
135 | return ret; | 133 | return ret; |
136 | 134 | ||