Skip to content

Commit

Permalink
Merge branch 'linux-4.19' of git://github.com/skeggsb/linux into drm-…
Browse files Browse the repository at this point in the history
…fixes

One more nouveau fix to remove some debug warnings.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Ben Skeggs <bskeggs@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/CABDvA==GF63dy8a9j611=-0x8G6FRu7uC-ZQypsLO_hqV4OAcA@mail.gmail.com
  • Loading branch information
Dave Airlie committed Sep 13, 2018
2 parents 25824ca + 3483f08 commit 2b6318a
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm200.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,8 @@ pmu_load(struct nv50_devinit *init, u8 type, bool post,
struct nvkm_bios *bios = subdev->device->bios;
struct nvbios_pmuR pmu;

if (!nvbios_pmuRm(bios, type, &pmu)) {
nvkm_error(subdev, "VBIOS PMU fuc %02x not found\n", type);
if (!nvbios_pmuRm(bios, type, &pmu))
return -EINVAL;
}

if (!post)
return 0;
Expand Down Expand Up @@ -124,29 +122,30 @@ gm200_devinit_post(struct nvkm_devinit *base, bool post)
return -EINVAL;
}

/* Upload DEVINIT application from VBIOS onto PMU. */
ret = pmu_load(init, 0x04, post, &exec, &args);
if (ret)
if (ret) {
nvkm_error(subdev, "VBIOS PMU/DEVINIT not found\n");
return ret;
}

/* upload first chunk of init data */
/* Upload tables required by opcodes in boot scripts. */
if (post) {
// devinit tables
u32 pmu = pmu_args(init, args + 0x08, 0x08);
u32 img = nvbios_rd16(bios, bit_I.offset + 0x14);
u32 len = nvbios_rd16(bios, bit_I.offset + 0x16);
pmu_data(init, pmu, img, len);
}

/* upload second chunk of init data */
/* Upload boot scripts. */
if (post) {
// devinit boot scripts
u32 pmu = pmu_args(init, args + 0x08, 0x10);
u32 img = nvbios_rd16(bios, bit_I.offset + 0x18);
u32 len = nvbios_rd16(bios, bit_I.offset + 0x1a);
pmu_data(init, pmu, img, len);
}

/* execute init tables */
/* Execute DEVINIT. */
if (post) {
nvkm_wr32(device, 0x10a040, 0x00005000);
pmu_exec(init, exec);
Expand All @@ -157,7 +156,9 @@ gm200_devinit_post(struct nvkm_devinit *base, bool post)
return -ETIMEDOUT;
}

/* load and execute some other ucode image (bios therm?) */
/* Optional: Execute PRE_OS application on PMU, which should at
* least take care of fans until a full PMU has been loaded.
*/
pmu_load(init, 0x01, post, NULL, NULL);
return 0;
}
Expand Down

0 comments on commit 2b6318a

Please sign in to comment.