drm/nouveau/devinit: allow impl to select its own cold-boot method
authorBen Skeggs <bskeggs@redhat.com>
Tue, 23 Sep 2014 05:39:26 +0000 (15:39 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 2 Dec 2014 05:43:42 +0000 (15:43 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 files changed:
drivers/gpu/drm/nouveau/core/subdev/devinit/base.c
drivers/gpu/drm/nouveau/core/subdev/devinit/gm107.c
drivers/gpu/drm/nouveau/core/subdev/devinit/nv04.c
drivers/gpu/drm/nouveau/core/subdev/devinit/nv05.c
drivers/gpu/drm/nouveau/core/subdev/devinit/nv10.c
drivers/gpu/drm/nouveau/core/subdev/devinit/nv1a.c
drivers/gpu/drm/nouveau/core/subdev/devinit/nv20.c
drivers/gpu/drm/nouveau/core/subdev/devinit/nv50.c
drivers/gpu/drm/nouveau/core/subdev/devinit/nv84.c
drivers/gpu/drm/nouveau/core/subdev/devinit/nv98.c
drivers/gpu/drm/nouveau/core/subdev/devinit/nva3.c
drivers/gpu/drm/nouveau/core/subdev/devinit/nvaf.c
drivers/gpu/drm/nouveau/core/subdev/devinit/nvc0.c
drivers/gpu/drm/nouveau/core/subdev/devinit/priv.h

index 239acfe876c3ddb4262d2e696cd4a59e1e06d951..0e45cee82463af6553be67389282cbf74290b009 100644 (file)
@@ -24,8 +24,6 @@
 
 #include <core/option.h>
 
-#include <subdev/bios.h>
-#include <subdev/bios/init.h>
 #include <subdev/vga.h>
 
 #include "priv.h"
@@ -56,7 +54,7 @@ _nouveau_devinit_init(struct nouveau_object *object)
        if (ret)
                return ret;
 
-       ret = nvbios_init(&devinit->base, devinit->post);
+       ret = impl->post(&devinit->base, devinit->post);
        if (ret)
                return ret;
 
index c69bc7f54e371cf7ca016ec929082d6ecd3f3c5e..bc2b2a9aadfecdbaf019673a554fc7f580419243 100644 (file)
@@ -53,4 +53,5 @@ gm107_devinit_oclass = &(struct nouveau_devinit_impl) {
        },
        .pll_set = nvc0_devinit_pll_set,
        .disable = gm107_devinit_disable,
+       .post = nvbios_init,
 }.base;
index 052ad690b468da81ec1a95e04eace07834f70c88..65651c50f6ea3ddce07e754bcb2f681ff2af8256 100644 (file)
@@ -464,4 +464,5 @@ nv04_devinit_oclass = &(struct nouveau_devinit_impl) {
        },
        .meminit = nv04_devinit_meminit,
        .pll_set = nv04_devinit_pll_set,
+       .post = nvbios_init,
 }.base;
index 4a19c10e517809ab7b348803481bcb0c0e98a0eb..a2007a3efc4d48d803ca1150fa44741a8b7085cd 100644 (file)
@@ -136,4 +136,5 @@ nv05_devinit_oclass = &(struct nouveau_devinit_impl) {
        },
        .meminit = nv05_devinit_meminit,
        .pll_set = nv04_devinit_pll_set,
+       .post = nvbios_init,
 }.base;
index 3b8d657da2798445f620e9662467df8696304280..178b46f79b502920287a5710d311a9f83d722f92 100644 (file)
@@ -107,4 +107,5 @@ nv10_devinit_oclass = &(struct nouveau_devinit_impl) {
        },
        .meminit = nv10_devinit_meminit,
        .pll_set = nv04_devinit_pll_set,
+       .post = nvbios_init,
 }.base;
index 526d0c6faacd3d2623f1dae3aa2cd1b92087a00e..995dd97af3e923a074dc541603c0d39a03b825f3 100644 (file)
@@ -34,4 +34,5 @@ nv1a_devinit_oclass = &(struct nouveau_devinit_impl) {
                .fini = nv04_devinit_fini,
        },
        .pll_set = nv04_devinit_pll_set,
+       .post = nvbios_init,
 }.base;
index 04bc9732644ccd706c72fdc055d534e61272f625..915089fb46f7965bae615d81b1f3176c306128a0 100644 (file)
@@ -71,4 +71,5 @@ nv20_devinit_oclass = &(struct nouveau_devinit_impl) {
        },
        .meminit = nv20_devinit_meminit,
        .pll_set = nv04_devinit_pll_set,
+       .post = nvbios_init,
 }.base;
index b46c62a1d5d86a9a44a0db88932dacbca6a10598..0de7fa6e876460365df1823b3c4e7784a92b9ed8 100644 (file)
@@ -160,4 +160,5 @@ nv50_devinit_oclass = &(struct nouveau_devinit_impl) {
        },
        .pll_set = nv50_devinit_pll_set,
        .disable = nv50_devinit_disable,
+       .post = nvbios_init,
 }.base;
index 787422505d87b934b9f26af17bdab9542896fd47..a7c80ded77cdce591f65c035e8cd69f88db7dc8a 100644 (file)
@@ -60,4 +60,5 @@ nv84_devinit_oclass = &(struct nouveau_devinit_impl) {
        },
        .pll_set = nv50_devinit_pll_set,
        .disable = nv84_devinit_disable,
+       .post = nvbios_init,
 }.base;
index 2b0e963fc6f01358dc2d4c921af0b2ec3e845c43..a773253a17f6041a0b709274cf322933d947268c 100644 (file)
@@ -59,4 +59,5 @@ nv98_devinit_oclass = &(struct nouveau_devinit_impl) {
        },
        .pll_set = nv50_devinit_pll_set,
        .disable = nv98_devinit_disable,
+       .post = nvbios_init,
 }.base;
index 006cf348bda767e8219901ec63c70aadd7d89365..b9cd9e53f760dfaab68806c4bf9b61598acaf452 100644 (file)
@@ -142,4 +142,5 @@ nva3_devinit_oclass = &(struct nouveau_devinit_impl) {
        .pll_set = nva3_devinit_pll_set,
        .disable = nva3_devinit_disable,
        .mmio    = nva3_devinit_mmio,
+       .post = nvbios_init,
 }.base;
index 4fc68d27eff39e2f460f44dd63f89f9218eb3330..3729846a8e5c980e8354c8214d9c87eedad079c3 100644 (file)
@@ -60,4 +60,5 @@ nvaf_devinit_oclass = &(struct nouveau_devinit_impl) {
        },
        .pll_set = nva3_devinit_pll_set,
        .disable = nvaf_devinit_disable,
+       .post = nvbios_init,
 }.base;
index 30c765747eeaebb2c9a1526b31306587d64e4a5e..80bd7f5eda3d0def565711f8c8ba9db54f265bd4 100644 (file)
@@ -115,4 +115,5 @@ nvc0_devinit_oclass = &(struct nouveau_devinit_impl) {
        },
        .pll_set = nvc0_devinit_pll_set,
        .disable = nvc0_devinit_disable,
+       .post = nvbios_init,
 }.base;
index f0e8683ad8405639d0406c3dc7be0dad153395d5..cbcd51852472aa54ab0667bb0b9f3bac03cd2cac 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <subdev/bios.h>
 #include <subdev/bios/pll.h>
+#include <subdev/bios/init.h>
 #include <subdev/clock/pll.h>
 #include <subdev/devinit.h>
 
@@ -12,6 +13,7 @@ struct nouveau_devinit_impl {
        int  (*pll_set)(struct nouveau_devinit *, u32 type, u32 freq);
        u64  (*disable)(struct nouveau_devinit *);
        u32  (*mmio)(struct nouveau_devinit *, u32);
+       int  (*post)(struct nouveau_subdev *, bool);
 };
 
 #define nouveau_devinit_create(p,e,o,d)                                        \