diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 14:54:12 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 12:40:22 +1000 |
commit | aa860e4bbe16d5756d6845022a6e94d6cb200df9 (patch) | |
tree | 970b3ab6270f7f41269f6b4651f81803385fc90b /drivers/gpu/drm | |
parent | b907649e7be734a4911f83b67a14e3425fa8a2a1 (diff) | |
download | blackbird-op-linux-aa860e4bbe16d5756d6845022a6e94d6cb200df9.tar.gz blackbird-op-linux-aa860e4bbe16d5756d6845022a6e94d6cb200df9.zip |
drm/nouveau/devinit: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
8 files changed, 29 insertions, 22 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c index 438a58e8be5b..58f75c33f555 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c @@ -55,7 +55,7 @@ gf100_devinit_pll_set(struct nvkm_devinit *init, u32 type, u32 freq) nvkm_wr32(device, info.reg + 0x10, fN << 16); break; default: - nv_warn(init, "0x%08x/%dKhz unimplemented\n", type, freq); + nvkm_warn(subdev, "%08x/%dKhz unimplemented\n", type, freq); ret = -EINVAL; break; } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm204.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm204.c index cc3263889084..32d04fe606c1 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm204.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm204.c @@ -81,11 +81,12 @@ static int pmu_load(struct nv50_devinit *init, u8 type, bool post, u32 *init_addr_pmu, u32 *args_addr_pmu) { - struct nvkm_bios *bios = nvkm_bios(init); + struct nvkm_subdev *subdev = &init->base.subdev; + struct nvkm_bios *bios = subdev->device->bios; struct nvbios_pmuR pmu; if (!nvbios_pmuRm(bios, type, &pmu)) { - nv_error(init, "VBIOS PMU fuc %02x not found\n", type); + nvkm_error(subdev, "VBIOS PMU fuc %02x not found\n", type); return -EINVAL; } @@ -109,7 +110,7 @@ static int gm204_devinit_post(struct nvkm_subdev *subdev, bool post) { struct nv50_devinit *init = (void *)nvkm_devinit(subdev); - struct nvkm_device *device = init->base.subdev.device; + struct nvkm_device *device = subdev->device; struct nvkm_bios *bios = device->bios; struct bit_entry bit_I; u32 exec, args; @@ -117,7 +118,7 @@ gm204_devinit_post(struct nvkm_subdev *subdev, bool post) if (bit_entry(bios, 'I', &bit_I) || bit_I.version != 1 || bit_I.length < 0x1c) { - nv_error(init, "VBIOS PMU init data not found\n"); + nvkm_error(subdev, "VBIOS PMU init data not found\n"); return -EINVAL; } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c index 052fe7e1f25b..145a1c7ba39c 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c @@ -54,7 +54,7 @@ gt215_devinit_pll_set(struct nvkm_devinit *init, u32 type, u32 freq) nvkm_wr32(device, info.reg + 8, fN); break; default: - nv_warn(init, "0x%08x/%dKhz unimplemented\n", type, freq); + nvkm_warn(subdev, "%08x/%dKhz unimplemented\n", type, freq); ret = -EINVAL; break; } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c index 8e2992038f9f..5158ea62f65a 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c @@ -35,7 +35,8 @@ static void nv04_devinit_meminit(struct nvkm_devinit *init) { - struct nvkm_device *device = init->subdev.device; + struct nvkm_subdev *subdev = &init->subdev; + struct nvkm_device *device = subdev->device; u32 patt = 0xdeadbeef; struct io_mapping *fb; int i; @@ -43,7 +44,7 @@ nv04_devinit_meminit(struct nvkm_devinit *init) /* Map the framebuffer aperture */ fb = fbmem_init(device); if (!fb) { - nv_error(init, "failed to map fb\n"); + nvkm_error(subdev, "failed to map fb\n"); return; } @@ -414,6 +415,7 @@ int nv04_devinit_init(struct nvkm_object *object) { struct nv04_devinit *init = (void *)object; + struct nvkm_subdev *subdev = &init->base.subdev; if (!init->base.post) { u32 htotal = nv_rdvgac(init, 0, 0x06); @@ -422,7 +424,7 @@ nv04_devinit_init(struct nvkm_object *object) htotal |= (nv_rdvgac(init, 0, 0x25) & 0x01) << 10; htotal |= (nv_rdvgac(init, 0, 0x41) & 0x01) << 11; if (!htotal) { - nv_info(init, "adaptor not initialised\n"); + nvkm_debug(subdev, "adaptor not initialised\n"); init->base.post = true; } } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c index 3fb789b5050e..fc3b0f4a54e2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c @@ -44,7 +44,8 @@ nv05_devinit_meminit(struct nvkm_devinit *init) { 0x06, 0x00 }, { 0x00, 0x00 } }; - struct nvkm_device *device = init->subdev.device; + struct nvkm_subdev *subdev = &init->subdev; + struct nvkm_device *device = subdev->device; struct nvkm_bios *bios = device->bios; struct io_mapping *fb; u32 patt = 0xdeadbeef; @@ -55,7 +56,7 @@ nv05_devinit_meminit(struct nvkm_devinit *init) /* Map the framebuffer aperture */ fb = fbmem_init(device); if (!fb) { - nv_error(init, "failed to map fb\n"); + nvkm_error(subdev, "failed to map fb\n"); return; } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv10.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv10.c index f0d47d1ce2a1..5f54906d45b7 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv10.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv10.c @@ -32,7 +32,8 @@ static void nv10_devinit_meminit(struct nvkm_devinit *init) { - struct nvkm_device *device = init->subdev.device; + struct nvkm_subdev *subdev = &init->subdev; + struct nvkm_device *device = subdev->device; static const int mem_width[] = { 0x10, 0x00, 0x20 }; int mem_width_count; uint32_t patt = 0xdeadbeef; @@ -47,7 +48,7 @@ nv10_devinit_meminit(struct nvkm_devinit *init) /* Map the framebuffer aperture */ fb = fbmem_init(device); if (!fb) { - nv_error(init, "failed to map fb\n"); + nvkm_error(subdev, "failed to map fb\n"); return; } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv20.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv20.c index 29ea11f8482d..1ea129c44674 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv20.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv20.c @@ -30,10 +30,10 @@ #include <subdev/bios/init.h> static void -nv20_devinit_meminit(struct nvkm_devinit *devinit) +nv20_devinit_meminit(struct nvkm_devinit *init) { - struct nv04_devinit *init = (void *)devinit; - struct nvkm_device *device = nv_device(init); + struct nvkm_subdev *subdev = &init->subdev; + struct nvkm_device *device = subdev->device; uint32_t mask = (device->chipset >= 0x25 ? 0x300 : 0x900); uint32_t amount, off; struct io_mapping *fb; @@ -41,7 +41,7 @@ nv20_devinit_meminit(struct nvkm_devinit *devinit) /* Map the framebuffer aperture */ fb = fbmem_init(nv_device(init)); if (!fb) { - nv_error(init, "failed to map fb\n"); + nvkm_error(subdev, "failed to map fb\n"); return; } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c index 2533e96be7df..548b3fe09cbf 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c @@ -44,13 +44,13 @@ nv50_devinit_pll_set(struct nvkm_devinit *init, u32 type, u32 freq) ret = nvbios_pll_parse(bios, type, &info); if (ret) { - nv_error(subdev, "failed to retrieve pll data, %d\n", ret); + nvkm_error(subdev, "failed to retrieve pll data, %d\n", ret); return ret; } ret = nv04_pll_calc(subdev, &info, freq, &N1, &M1, &N2, &M2, &P); if (!ret) { - nv_error(subdev, "failed pll calculation\n"); + nvkm_error(subdev, "failed pll calculation\n"); return ret; } @@ -94,9 +94,11 @@ nv50_devinit_disable(struct nvkm_devinit *init) int nv50_devinit_init(struct nvkm_object *object) { - struct nvkm_bios *bios = nvkm_bios(object); - struct nvkm_ibus *ibus = nvkm_ibus(object); struct nv50_devinit *init = (void *)object; + struct nvkm_subdev *subdev = &init->base.subdev; + struct nvkm_device *device = subdev->device; + struct nvkm_bios *bios = device->bios; + struct nvkm_subdev *ibus = device->ibus; struct nvbios_outp info; struct dcb_output outp; u8 ver = 0xff, hdr, cnt, len; @@ -105,7 +107,7 @@ nv50_devinit_init(struct nvkm_object *object) if (!init->base.post) { if (!nv_rdvgac(init, 0, 0x00) && !nv_rdvgac(init, 0, 0x1a)) { - nv_info(init, "adaptor not initialised\n"); + nvkm_debug(subdev, "adaptor not initialised\n"); init->base.post = true; } } |