drm/nouveau: finalise nvkm namespace switch (no binary change)
authorBen Skeggs <bskeggs@redhat.com>
Wed, 14 Jan 2015 05:36:34 +0000 (15:36 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 22 Jan 2015 02:18:07 +0000 (12:18 +1000)
The namespace of NVKM is being changed to nvkm_ instead of nouveau_,
which will be used for the DRM part of the driver.  This is being
done in order to make it very clear as to what part of the driver a
given symbol belongs to, and as a minor step towards splitting the
DRM driver out to be able to stand on its own (for virt).

Because there's already a large amount of churn here anyway, this is
as good a time as any to also switch to NVIDIA's device and chipset
naming to ease collaboration with them.

A comparison of objdump disassemblies proves no code changes.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
44 files changed:
drivers/gpu/drm/nouveau/dispnv04/crtc.c
drivers/gpu/drm/nouveau/dispnv04/dac.c
drivers/gpu/drm/nouveau/dispnv04/dfp.c
drivers/gpu/drm/nouveau/dispnv04/disp.c
drivers/gpu/drm/nouveau/dispnv04/disp.h
drivers/gpu/drm/nouveau/dispnv04/hw.c
drivers/gpu/drm/nouveau/dispnv04/hw.h
drivers/gpu/drm/nouveau/dispnv04/tvnv04.c
drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
drivers/gpu/drm/nouveau/include/nvif/client.h
drivers/gpu/drm/nouveau/include/nvif/device.h
drivers/gpu/drm/nouveau/include/nvif/object.h
drivers/gpu/drm/nouveau/include/nvkm/core/os.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/mxm.h
drivers/gpu/drm/nouveau/nouveau_abi16.c
drivers/gpu/drm/nouveau/nouveau_abi16.h
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_bo.h
drivers/gpu/drm/nouveau/nouveau_chan.c
drivers/gpu/drm/nouveau/nouveau_chan.h
drivers/gpu/drm/nouveau/nouveau_connector.c
drivers/gpu/drm/nouveau/nouveau_connector.h
drivers/gpu/drm/nouveau/nouveau_display.h
drivers/gpu/drm/nouveau/nouveau_dma.c
drivers/gpu/drm/nouveau/nouveau_dp.c
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nouveau_drm.h
drivers/gpu/drm/nouveau/nouveau_encoder.h
drivers/gpu/drm/nouveau/nouveau_fence.h
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/nouveau/nouveau_hwmon.c
drivers/gpu/drm/nouveau/nouveau_nvif.c
drivers/gpu/drm/nouveau/nouveau_platform.c
drivers/gpu/drm/nouveau/nouveau_platform.h
drivers/gpu/drm/nouveau/nouveau_sgdma.c
drivers/gpu/drm/nouveau/nouveau_ttm.c
drivers/gpu/drm/nouveau/nv04_fence.c
drivers/gpu/drm/nouveau/nv50_display.c
drivers/gpu/drm/nouveau/nv84_fence.c
drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/mxm/mxms.c
drivers/gpu/drm/nouveau/nvkm/subdev/mxm/mxms.h
drivers/gpu/drm/nouveau/nvkm/subdev/mxm/nv50.c

index f32eecb..542bb26 100644 (file)
@@ -112,12 +112,12 @@ static void nv_crtc_calc_state_ext(struct drm_crtc *crtc, struct drm_display_mod
 {
        struct drm_device *dev = crtc->dev;
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nouveau_bios *bios = nvxx_bios(&drm->device);
-       struct nouveau_clk *clk = nvxx_clk(&drm->device);
+       struct nvkm_bios *bios = nvxx_bios(&drm->device);
+       struct nvkm_clk *clk = nvxx_clk(&drm->device);
        struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
        struct nv04_mode_state *state = &nv04_display(dev)->mode_reg;
        struct nv04_crtc_reg *regp = &state->crtc_reg[nv_crtc->index];
-       struct nouveau_pll_vals *pv = &regp->pllvals;
+       struct nvkm_pll_vals *pv = &regp->pllvals;
        struct nvbios_pll pll_lim;
 
        if (nvbios_pll_parse(bios, nv_crtc->index ? PLL_VPLL1 : PLL_VPLL0,
index 043e07b..d7b495a 100644 (file)
@@ -66,7 +66,7 @@ int nv04_dac_output_offset(struct drm_encoder *encoder)
 static int sample_load_twice(struct drm_device *dev, bool sense[2])
 {
        struct nvif_device *device = &nouveau_drm(dev)->device;
-       struct nouveau_timer *ptimer = nvxx_timer(device);
+       struct nvkm_timer *ptimer = nvxx_timer(device);
        int i;
 
        for (i = 0; i < 2; i++) {
@@ -80,17 +80,17 @@ static int sample_load_twice(struct drm_device *dev, bool sense[2])
                 * use a 10ms timeout (guards against crtc being inactive, in
                 * which case blank state would never change)
                 */
-               if (!nouveau_timer_wait_eq(ptimer, 10000000,
-                                          NV_PRMCIO_INP0__COLOR,
-                                          0x00000001, 0x00000000))
+               if (!nvkm_timer_wait_eq(ptimer, 10000000,
+                                       NV_PRMCIO_INP0__COLOR,
+                                       0x00000001, 0x00000000))
                        return -EBUSY;
-               if (!nouveau_timer_wait_eq(ptimer, 10000000,
-                                          NV_PRMCIO_INP0__COLOR,
-                                          0x00000001, 0x00000001))
+               if (!nvkm_timer_wait_eq(ptimer, 10000000,
+                                       NV_PRMCIO_INP0__COLOR,
+                                       0x00000001, 0x00000001))
                        return -EBUSY;
-               if (!nouveau_timer_wait_eq(ptimer, 10000000,
-                                          NV_PRMCIO_INP0__COLOR,
-                                          0x00000001, 0x00000000))
+               if (!nvkm_timer_wait_eq(ptimer, 10000000,
+                                       NV_PRMCIO_INP0__COLOR,
+                                       0x00000001, 0x00000000))
                        return -EBUSY;
 
                udelay(100);
@@ -232,7 +232,7 @@ uint32_t nv17_dac_sample_load(struct drm_encoder *encoder)
        struct drm_device *dev = encoder->dev;
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct nvif_device *device = &nouveau_drm(dev)->device;
-       struct nouveau_gpio *gpio = nvxx_gpio(device);
+       struct nvkm_gpio *gpio = nvxx_gpio(device);
        struct dcb_output *dcb = nouveau_encoder(encoder)->dcb;
        uint32_t sample, testval, regoffset = nv04_dac_output_offset(encoder);
        uint32_t saved_powerctrl_2 = 0, saved_powerctrl_4 = 0, saved_routput,
index a326f37..f6ca343 100644 (file)
@@ -623,9 +623,9 @@ static void nv04_tmds_slave_init(struct drm_encoder *encoder)
        struct drm_device *dev = encoder->dev;
        struct dcb_output *dcb = nouveau_encoder(encoder)->dcb;
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nouveau_i2c *i2c = nvxx_i2c(&drm->device);
-       struct nouveau_i2c_port *port = i2c->find(i2c, 2);
-       struct nouveau_i2c_board_info info[] = {
+       struct nvkm_i2c *i2c = nvxx_i2c(&drm->device);
+       struct nvkm_i2c_port *port = i2c->find(i2c, 2);
+       struct nvkm_i2c_board_info info[] = {
                {
                    {
                        .type = "sil164",
index 3373a15..f96237e 100644 (file)
@@ -35,7 +35,7 @@ int
 nv04_display_create(struct drm_device *dev)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nouveau_i2c *i2c = nvxx_i2c(&drm->device);
+       struct nvkm_i2c *i2c = nvxx_i2c(&drm->device);
        struct dcb_table *dcb = &drm->vbios.dcb;
        struct drm_connector *connector, *ct;
        struct drm_encoder *encoder;
index fe4901c..c910c5d 100644 (file)
@@ -36,7 +36,7 @@ struct nv04_crtc_reg {
 
        /* PRAMDAC regs */
        uint32_t nv10_cursync;
-       struct nouveau_pll_vals pllvals;
+       struct nvkm_pll_vals pllvals;
        uint32_t ramdac_gen_ctrl;
        uint32_t ramdac_630;
        uint32_t ramdac_634;
@@ -170,7 +170,7 @@ nouveau_bios_run_init_table(struct drm_device *dev, u16 table,
                            struct dcb_output *outp, int crtc)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nouveau_bios *bios = nvxx_bios(&drm->device);
+       struct nvkm_bios *bios = nvxx_bios(&drm->device);
        struct nvbios_init init = {
                .subdev = nv_subdev(bios),
                .bios = bios,
index a930c1e..42e07af 100644 (file)
@@ -130,7 +130,7 @@ NVBlankScreen(struct drm_device *dev, int head, bool blank)
 
 static void
 nouveau_hw_decode_pll(struct drm_device *dev, uint32_t reg1, uint32_t pll1,
-                     uint32_t pll2, struct nouveau_pll_vals *pllvals)
+                     uint32_t pll2, struct nvkm_pll_vals *pllvals)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
 
@@ -162,11 +162,11 @@ nouveau_hw_decode_pll(struct drm_device *dev, uint32_t reg1, uint32_t pll1,
 
 int
 nouveau_hw_get_pllvals(struct drm_device *dev, enum nvbios_pll_type plltype,
-                      struct nouveau_pll_vals *pllvals)
+                      struct nvkm_pll_vals *pllvals)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct nvif_device *device = &drm->device;
-       struct nouveau_bios *bios = nvxx_bios(device);
+       struct nvkm_bios *bios = nvxx_bios(device);
        uint32_t reg1, pll1, pll2 = 0;
        struct nvbios_pll pll_lim;
        int ret;
@@ -202,7 +202,7 @@ nouveau_hw_get_pllvals(struct drm_device *dev, enum nvbios_pll_type plltype,
 }
 
 int
-nouveau_hw_pllvals_to_clk(struct nouveau_pll_vals *pv)
+nouveau_hw_pllvals_to_clk(struct nvkm_pll_vals *pv)
 {
        /* Avoid divide by zero if called at an inappropriate time */
        if (!pv->M1 || !pv->M2)
@@ -214,7 +214,7 @@ nouveau_hw_pllvals_to_clk(struct nouveau_pll_vals *pv)
 int
 nouveau_hw_get_clock(struct drm_device *dev, enum nvbios_pll_type plltype)
 {
-       struct nouveau_pll_vals pllvals;
+       struct nvkm_pll_vals pllvals;
        int ret;
 
        if (plltype == PLL_MEMORY &&
@@ -253,10 +253,10 @@ nouveau_hw_fix_bad_vpll(struct drm_device *dev, int head)
 
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct nvif_device *device = &drm->device;
-       struct nouveau_clk *clk = nvxx_clk(device);
-       struct nouveau_bios *bios = nvxx_bios(device);
+       struct nvkm_clk *clk = nvxx_clk(device);
+       struct nvkm_bios *bios = nvxx_bios(device);
        struct nvbios_pll pll_lim;
-       struct nouveau_pll_vals pv;
+       struct nvkm_pll_vals pv;
        enum nvbios_pll_type pll = head ? PLL_VPLL1 : PLL_VPLL0;
 
        if (nvbios_pll_parse(bios, pll, &pll_lim))
@@ -463,7 +463,7 @@ nv_load_state_ramdac(struct drm_device *dev, int head,
                     struct nv04_mode_state *state)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nouveau_clk *clk = nvxx_clk(&drm->device);
+       struct nvkm_clk *clk = nvxx_clk(&drm->device);
        struct nv04_crtc_reg *regp = &state->crtc_reg[head];
        uint32_t pllreg = head ? NV_RAMDAC_VPLL2 : NV_PRAMDAC_VPLL_COEFF;
        int i;
@@ -661,7 +661,7 @@ nv_load_state_ext(struct drm_device *dev, int head,
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct nvif_device *device = &drm->device;
-       struct nouveau_timer *ptimer = nvxx_timer(device);
+       struct nvkm_timer *ptimer = nvxx_timer(device);
        struct nv04_crtc_reg *regp = &state->crtc_reg[head];
        uint32_t reg900;
        int i;
@@ -741,8 +741,8 @@ nv_load_state_ext(struct drm_device *dev, int head,
                if (drm->device.info.family < NV_DEVICE_INFO_V0_KELVIN) {
                        /* Not waiting for vertical retrace before modifying
                           CRE_53/CRE_54 causes lockups. */
-                       nouveau_timer_wait_eq(ptimer, 650000000, NV_PRMCIO_INP0__COLOR, 0x8, 0x8);
-                       nouveau_timer_wait_eq(ptimer, 650000000, NV_PRMCIO_INP0__COLOR, 0x8, 0x0);
+                       nvkm_timer_wait_eq(ptimer, 650000000, NV_PRMCIO_INP0__COLOR, 0x8, 0x8);
+                       nvkm_timer_wait_eq(ptimer, 650000000, NV_PRMCIO_INP0__COLOR, 0x8, 0x0);
                }
 
                wr_cio_state(dev, head, regp, NV_CIO_CRE_42);
index 7f53c57..6c79617 100644 (file)
@@ -42,8 +42,8 @@ uint8_t NVReadVgaGr(struct drm_device *, int head, uint8_t index);
 void NVSetOwner(struct drm_device *, int owner);
 void NVBlankScreen(struct drm_device *, int head, bool blank);
 int nouveau_hw_get_pllvals(struct drm_device *, enum nvbios_pll_type plltype,
-                          struct nouveau_pll_vals *pllvals);
-int nouveau_hw_pllvals_to_clk(struct nouveau_pll_vals *pllvals);
+                          struct nvkm_pll_vals *pllvals);
+int nouveau_hw_pllvals_to_clk(struct nvkm_pll_vals *pllvals);
 int nouveau_hw_get_clock(struct drm_device *, enum nvbios_pll_type plltype);
 void nouveau_hw_save_vga_fonts(struct drm_device *, bool save);
 void nouveau_hw_save_state(struct drm_device *, int head,
index 38a8196..d9664b3 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <drm/i2c/ch7006.h>
 
-static struct nouveau_i2c_board_info nv04_tv_encoder_info[] = {
+static struct nvkm_i2c_board_info nv04_tv_encoder_info[] = {
        {
                {
                        I2C_BOARD_INFO("ch7006", 0x75),
@@ -54,7 +54,7 @@ static struct nouveau_i2c_board_info nv04_tv_encoder_info[] = {
 int nv04_tv_identify(struct drm_device *dev, int i2c_index)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nouveau_i2c *i2c = nvxx_i2c(&drm->device);
+       struct nvkm_i2c *i2c = nvxx_i2c(&drm->device);
 
        return i2c->identify(i2c, i2c_index, "TV encoder",
                             nv04_tv_encoder_info, NULL, NULL);
@@ -204,8 +204,8 @@ nv04_tv_create(struct drm_connector *connector, struct dcb_output *entry)
        struct drm_encoder *encoder;
        struct drm_device *dev = connector->dev;
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nouveau_i2c *i2c = nvxx_i2c(&drm->device);
-       struct nouveau_i2c_port *port = i2c->find(i2c, entry->i2c_index);
+       struct nvkm_i2c *i2c = nvxx_i2c(&drm->device);
+       struct nvkm_i2c_port *port = i2c->find(i2c, entry->i2c_index);
        int type, ret;
 
        /* Ensure that we can talk to this encoder */
index b86e36b..731d74e 100644 (file)
@@ -46,7 +46,7 @@ static uint32_t nv42_tv_sample_load(struct drm_encoder *encoder)
 {
        struct drm_device *dev = encoder->dev;
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nouveau_gpio *gpio = nvxx_gpio(&drm->device);
+       struct nvkm_gpio *gpio = nvxx_gpio(&drm->device);
        uint32_t testval, regoffset = nv04_dac_output_offset(encoder);
        uint32_t gpio0, gpio1, fp_htotal, fp_hsync_start, fp_hsync_end,
                fp_control, test_ctrl, dacclk, ctv_14, ctv_1c, ctv_6c;
@@ -370,7 +370,7 @@ static void  nv17_tv_dpms(struct drm_encoder *encoder, int mode)
 {
        struct drm_device *dev = encoder->dev;
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nouveau_gpio *gpio = nvxx_gpio(&drm->device);
+       struct nvkm_gpio *gpio = nvxx_gpio(&drm->device);
        struct nv17_tv_state *regs = &to_tv_enc(encoder)->state;
        struct nv17_tv_norm_params *tv_norm = get_tv_norm(encoder);
 
index 9769473..eca648e 100644 (file)
@@ -33,7 +33,7 @@ int  nvif_client_resume(struct nvif_client *);
 #include <core/client.h>
 #define nvxx_client(a) ({ \
        struct nvif_client *_client = nvif_client(nvif_object(a)); \
-       nouveau_client(_client->base.priv); \
+       nvkm_client(_client->base.priv); \
 })
 
 #endif
index 1fafcac..88553a7 100644 (file)
@@ -38,24 +38,24 @@ void nvif_device_ref(struct nvif_device *, struct nvif_device **);
 #include <subdev/therm.h>
 
 #define nvxx_device(a) nv_device(nvxx_object((a)))
-#define nvxx_bios(a) nouveau_bios(nvxx_device(a))
-#define nvxx_fb(a) nouveau_fb(nvxx_device(a))
-#define nvxx_mmu(a) nouveau_mmu(nvxx_device(a))
-#define nvxx_bar(a) nouveau_bar(nvxx_device(a))
-#define nvxx_gpio(a) nouveau_gpio(nvxx_device(a))
-#define nvxx_clk(a) nouveau_clk(nvxx_device(a))
-#define nvxx_i2c(a) nouveau_i2c(nvxx_device(a))
-#define nvxx_timer(a) nouveau_timer(nvxx_device(a))
+#define nvxx_bios(a) nvkm_bios(nvxx_device(a))
+#define nvxx_fb(a) nvkm_fb(nvxx_device(a))
+#define nvxx_mmu(a) nvkm_mmu(nvxx_device(a))
+#define nvxx_bar(a) nvkm_bar(nvxx_device(a))
+#define nvxx_gpio(a) nvkm_gpio(nvxx_device(a))
+#define nvxx_clk(a) nvkm_clk(nvxx_device(a))
+#define nvxx_i2c(a) nvkm_i2c(nvxx_device(a))
+#define nvxx_timer(a) nvkm_timer(nvxx_device(a))
 #define nvxx_wait(a,b,c,d) nv_wait(nvxx_timer(a), (b), (c), (d))
 #define nvxx_wait_cb(a,b,c) nv_wait_cb(nvxx_timer(a), (b), (c))
-#define nvxx_therm(a) nouveau_therm(nvxx_device(a))
+#define nvxx_therm(a) nvkm_therm(nvxx_device(a))
 
 #include <core/device.h>
 #include <engine/fifo.h>
 #include <engine/gr.h>
 #include <engine/sw.h>
 
-#define nvxx_fifo(a) nouveau_fifo(nvxx_device(a))
-#define nvxx_fifo_chan(a) ((struct nouveau_fifo_chan *)nvxx_object(a))
-#define nvxx_gr(a) ((struct nouveau_gr *)nouveau_engine(nvxx_object(a), NVDEV_ENGINE_GR))
+#define nvxx_fifo(a) nvkm_fifo(nvxx_device(a))
+#define nvxx_fifo_chan(a) ((struct nvkm_fifo_chan *)nvxx_object(a))
+#define nvxx_gr(a) ((struct nvkm_gr *)nvkm_engine(nvxx_object(a), NVDEV_ENGINE_GR))
 #endif
index d47f569..04c8747 100644 (file)
@@ -70,6 +70,6 @@ void nvif_object_unmap(struct nvif_object *);
 
 /*XXX*/
 #include <core/object.h>
-#define nvxx_object(a) ((struct nouveau_object *)nvif_object(a)->priv)
+#define nvxx_object(a) ((struct nvkm_object *)nvif_object(a)->priv)
 
 #endif
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge