drm/nouveau/nvif: namespace of nvkm accessors (no binary change)
authorBen Skeggs <bskeggs@redhat.com>
Mon, 12 Jan 2015 02:33:37 +0000 (12:33 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 22 Jan 2015 02:17:49 +0000 (12:17 +1000)
NVKM is having it's namespace switched to nvkm_, which will conflict
with these functions (which are workarounds for the fact that as of
yet, we still aren't able to split DRM and NVKM completely).

A comparison of objdump disassemblies proves no code changes.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
28 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/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/nouveau_abi16.c
drivers/gpu/drm/nouveau/nouveau_agp.c
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_chan.c
drivers/gpu/drm/nouveau/nouveau_connector.c
drivers/gpu/drm/nouveau/nouveau_display.c
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nouveau_fence.c
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/nouveau/nouveau_hwmon.c
drivers/gpu/drm/nouveau/nouveau_platform.c
drivers/gpu/drm/nouveau/nouveau_sysfs.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

index f8ddae2..f32eecb 100644 (file)
@@ -112,8 +112,8 @@ 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 = nvkm_bios(&drm->device);
-       struct nouveau_clk *clk = nvkm_clk(&drm->device);
+       struct nouveau_bios *bios = nvxx_bios(&drm->device);
+       struct nouveau_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];
index 2d8056c..043e07b 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 = nvkm_timer(device);
+       struct nouveau_timer *ptimer = nvxx_timer(device);
        int i;
 
        for (i = 0; i < 2; i++) {
@@ -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 = nvkm_gpio(device);
+       struct nouveau_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 42a5435..a326f37 100644 (file)
@@ -623,7 +623,7 @@ 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 = nvkm_i2c(&drm->device);
+       struct nouveau_i2c *i2c = nvxx_i2c(&drm->device);
        struct nouveau_i2c_port *port = i2c->find(i2c, 2);
        struct nouveau_i2c_board_info info[] = {
                {
index bdf7cf4..3373a15 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 = nvkm_i2c(&drm->device);
+       struct nouveau_i2c *i2c = nvxx_i2c(&drm->device);
        struct dcb_table *dcb = &drm->vbios.dcb;
        struct drm_connector *connector, *ct;
        struct drm_encoder *encoder;
index 3ad3ee8..fe4901c 100644 (file)
@@ -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 = nvkm_bios(&drm->device);
+       struct nouveau_bios *bios = nvxx_bios(&drm->device);
        struct nvbios_init init = {
                .subdev = nv_subdev(bios),
                .bios = bios,
index f9491f9..a930c1e 100644 (file)
@@ -166,7 +166,7 @@ nouveau_hw_get_pllvals(struct drm_device *dev, enum nvbios_pll_type plltype,
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct nvif_device *device = &drm->device;
-       struct nouveau_bios *bios = nvkm_bios(device);
+       struct nouveau_bios *bios = nvxx_bios(device);
        uint32_t reg1, pll1, pll2 = 0;
        struct nvbios_pll pll_lim;
        int ret;
@@ -253,8 +253,8 @@ 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 = nvkm_clk(device);
-       struct nouveau_bios *bios = nvkm_bios(device);
+       struct nouveau_clk *clk = nvxx_clk(device);
+       struct nouveau_bios *bios = nvxx_bios(device);
        struct nvbios_pll pll_lim;
        struct nouveau_pll_vals pv;
        enum nvbios_pll_type pll = head ? PLL_VPLL1 : PLL_VPLL0;
@@ -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 = nvkm_clk(&drm->device);
+       struct nouveau_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 = nvkm_timer(device);
+       struct nouveau_timer *ptimer = nvxx_timer(device);
        struct nv04_crtc_reg *regp = &state->crtc_reg[head];
        uint32_t reg900;
        int i;
index 8061d8d..38a8196 100644 (file)
@@ -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 = nvkm_i2c(&drm->device);
+       struct nouveau_i2c *i2c = nvxx_i2c(&drm->device);
 
        return i2c->identify(i2c, i2c_index, "TV encoder",
                             nv04_tv_encoder_info, NULL, NULL);
@@ -204,7 +204,7 @@ 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 = nvkm_i2c(&drm->device);
+       struct nouveau_i2c *i2c = nvxx_i2c(&drm->device);
        struct nouveau_i2c_port *port = i2c->find(i2c, entry->i2c_index);
        int type, ret;
 
index 72d2ab0..b86e36b 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 = nvkm_gpio(&drm->device);
+       struct nouveau_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;
@@ -133,14 +133,14 @@ get_tv_detect_quirks(struct drm_device *dev, uint32_t *pin_mask)
        struct nvif_device *device = &drm->device;
 
        /* Zotac FX5200 */
-       if (nv_device_match(nvkm_object(device), 0x0322, 0x19da, 0x1035) ||
-           nv_device_match(nvkm_object(device), 0x0322, 0x19da, 0x2035)) {
+       if (nv_device_match(nvxx_object(device), 0x0322, 0x19da, 0x1035) ||
+           nv_device_match(nvxx_object(device), 0x0322, 0x19da, 0x2035)) {
                *pin_mask = 0xc;
                return false;
        }
 
        /* MSI nForce2 IGP */
-       if (nv_device_match(nvkm_object(device), 0x01f0, 0x1462, 0x5710)) {
+       if (nv_device_match(nvxx_object(device), 0x01f0, 0x1462, 0x5710)) {
                *pin_mask = 0xc;
                return false;
        }
@@ -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 = nvkm_gpio(&drm->device);
+       struct nouveau_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 8b00484..9769473 100644 (file)
@@ -31,7 +31,7 @@ int  nvif_client_resume(struct nvif_client *);
 
 /*XXX*/
 #include <core/client.h>
-#define nvkm_client(a) ({ \
+#define nvxx_client(a) ({ \
        struct nvif_client *_client = nvif_client(nvif_object(a)); \
        nouveau_client(_client->base.priv); \
 })
index 90e2d97..1d186e2 100644 (file)
@@ -37,26 +37,25 @@ void nvif_device_ref(struct nvif_device *, struct nvif_device **);
 #include <subdev/timer.h>
 #include <subdev/therm.h>
 
-#define nvkm_device(a) nv_device(nvkm_object((a)))
-#define nvkm_bios(a) nouveau_bios(nvkm_device(a))
-#define nvkm_fb(a) nouveau_fb(nvkm_device(a))
-#define nvkm_mmu(a) nouveau_mmu(nvkm_device(a))
-#define nvkm_bar(a) nouveau_bar(nvkm_device(a))
-#define nvkm_gpio(a) nouveau_gpio(nvkm_device(a))
-#define nvkm_clk(a) nouveau_clk(nvkm_device(a))
-#define nvkm_i2c(a) nouveau_i2c(nvkm_device(a))
-#define nvkm_timer(a) nouveau_timer(nvkm_device(a))
-#define nvkm_wait(a,b,c,d) nv_wait(nvkm_timer(a), (b), (c), (d))
-#define nvkm_wait_cb(a,b,c) nv_wait_cb(nvkm_timer(a), (b), (c))
-#define nvkm_therm(a) nouveau_therm(nvkm_device(a))
+#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_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))
 
 #include <engine/device.h>
 #include <engine/fifo.h>
 #include <engine/gr.h>
 #include <engine/sw.h>
 
-#define nvkm_fifo(a) nouveau_fifo(nvkm_device(a))
-#define nvkm_fifo_chan(a) ((struct nouveau_fifo_chan *)nvkm_object(a))
-#define nvkm_gr(a) ((struct nouveau_gr *)nouveau_engine(nvkm_object(a), NVDEV_ENGINE_GR))
-
+#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))
 #endif
index fe51917..d47f569 100644 (file)
@@ -70,6 +70,6 @@ void nvif_object_unmap(struct nvif_object *);
 
 /*XXX*/
 #include <core/object.h>
-#define nvkm_object(a) ((struct nouveau_object *)nvif_object(a)->priv)
+#define nvxx_object(a) ((struct nouveau_object *)nvif_object(a)->priv)
 
 #endif
index 16ab6b1..9322b51 100644 (file)
@@ -164,8 +164,8 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
        struct nouveau_cli *cli = nouveau_cli(file_priv);
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct nvif_device *device = &drm->device;
-       struct nouveau_timer *ptimer = nvkm_timer(device);
-       struct nouveau_gr *gr = nvkm_gr(device);
+       struct nouveau_timer *ptimer = nvxx_timer(device);
+       struct nouveau_gr *gr = nvxx_gr(device);
        struct drm_nouveau_getparam *getparam = data;
 
        switch (getparam->param) {
@@ -173,19 +173,19 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
                getparam->value = device->info.chipset;
                break;
        case NOUVEAU_GETPARAM_PCI_VENDOR:
-               if (nv_device_is_pci(nvkm_device(device)))
+               if (nv_device_is_pci(nvxx_device(device)))
                        getparam->value = dev->pdev->vendor;
                else
                        getparam->value = 0;
                break;
        case NOUVEAU_GETPARAM_PCI_DEVICE:
-               if (nv_device_is_pci(nvkm_device(device)))
+               if (nv_device_is_pci(nvxx_device(device)))
                        getparam->value = dev->pdev->device;
                else
                        getparam->value = 0;
                break;
        case NOUVEAU_GETPARAM_BUS_TYPE:
-               if (!nv_device_is_pci(nvkm_device(device)))
+               if (!nv_device_is_pci(nvxx_device(device)))
                        getparam->value = 3;
                else
                if (drm_pci_device_is_agp(dev))
index 1f6f6ba..0b59709 100644 (file)
@@ -45,8 +45,8 @@ get_agp_mode(struct nouveau_drm *drm, const struct drm_agp_info *info)
        while (agpmode == -1 && quirk->hostbridge_vendor) {
                if (info->id_vendor == quirk->hostbridge_vendor &&
                    info->id_device == quirk->hostbridge_device &&
-                   nvkm_device(device)->pdev->vendor == quirk->chip_vendor &&
-                   nvkm_device(device)->pdev->device == quirk->chip_device) {
+                   nvxx_device(device)->pdev->vendor == quirk->chip_vendor &&
+                   nvxx_device(device)->pdev->device == quirk->chip_device) {
                        agpmode = quirk->mode;
                        NV_INFO(drm, "Forcing agp mode to %dX. Use agpmode to override.\n",
                                agpmode);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge