From: Ben Skeggs Date: Mon, 12 Jan 2015 02:33:37 +0000 (+1000) Subject: drm/nouveau/nvif: namespace of nvkm accessors (no binary change) X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~75^2~34^2~36 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=989aa5b76ad2af7653353cf01bdebec2ba9436aa;p=pandora-kernel.git drm/nouveau/nvif: namespace of nvkm accessors (no binary change) 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 --- diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c index f8ddae26dfbf..f32eecbe3c95 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c @@ -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]; diff --git a/drivers/gpu/drm/nouveau/dispnv04/dac.c b/drivers/gpu/drm/nouveau/dispnv04/dac.c index 2d8056cde996..043e07b01fd0 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/dac.c +++ b/drivers/gpu/drm/nouveau/dispnv04/dac.c @@ -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, diff --git a/drivers/gpu/drm/nouveau/dispnv04/dfp.c b/drivers/gpu/drm/nouveau/dispnv04/dfp.c index 42a5435259f7..a326f374e37c 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/dfp.c +++ b/drivers/gpu/drm/nouveau/dispnv04/dfp.c @@ -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[] = { { diff --git a/drivers/gpu/drm/nouveau/dispnv04/disp.c b/drivers/gpu/drm/nouveau/dispnv04/disp.c index bdf7cf49afcd..3373a15eab5d 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv04/disp.c @@ -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; diff --git a/drivers/gpu/drm/nouveau/dispnv04/disp.h b/drivers/gpu/drm/nouveau/dispnv04/disp.h index 3ad3ee818c1a..fe4901cfae27 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/disp.h +++ b/drivers/gpu/drm/nouveau/dispnv04/disp.h @@ -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, diff --git a/drivers/gpu/drm/nouveau/dispnv04/hw.c b/drivers/gpu/drm/nouveau/dispnv04/hw.c index f9491f926c14..a930c1e71148 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/hw.c +++ b/drivers/gpu/drm/nouveau/dispnv04/hw.c @@ -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; diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c index 8061d8d0ce79..38a8196d1e92 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c +++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c @@ -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; diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c index 72d2ab04db47..b86e36b4077d 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c +++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c @@ -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); diff --git a/drivers/gpu/drm/nouveau/include/nvif/client.h b/drivers/gpu/drm/nouveau/include/nvif/client.h index 8b0048426ee5..97694738abcf 100644 --- a/drivers/gpu/drm/nouveau/include/nvif/client.h +++ b/drivers/gpu/drm/nouveau/include/nvif/client.h @@ -31,7 +31,7 @@ int nvif_client_resume(struct nvif_client *); /*XXX*/ #include -#define nvkm_client(a) ({ \ +#define nvxx_client(a) ({ \ struct nvif_client *_client = nvif_client(nvif_object(a)); \ nouveau_client(_client->base.priv); \ }) diff --git a/drivers/gpu/drm/nouveau/include/nvif/device.h b/drivers/gpu/drm/nouveau/include/nvif/device.h index 90e2d9706f23..1d186e21d123 100644 --- a/drivers/gpu/drm/nouveau/include/nvif/device.h +++ b/drivers/gpu/drm/nouveau/include/nvif/device.h @@ -37,26 +37,25 @@ void nvif_device_ref(struct nvif_device *, struct nvif_device **); #include #include -#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 #include #include #include -#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 diff --git a/drivers/gpu/drm/nouveau/include/nvif/object.h b/drivers/gpu/drm/nouveau/include/nvif/object.h index fe519179b76c..d47f5693cb5b 100644 --- a/drivers/gpu/drm/nouveau/include/nvif/object.h +++ b/drivers/gpu/drm/nouveau/include/nvif/object.h @@ -70,6 +70,6 @@ void nvif_object_unmap(struct nvif_object *); /*XXX*/ #include -#define nvkm_object(a) ((struct nouveau_object *)nvif_object(a)->priv) +#define nvxx_object(a) ((struct nouveau_object *)nvif_object(a)->priv) #endif diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index 16ab6b187a52..9322b515d305 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c @@ -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)) diff --git a/drivers/gpu/drm/nouveau/nouveau_agp.c b/drivers/gpu/drm/nouveau/nouveau_agp.c index 1f6f6ba6847a..0b5970955604 100644 --- a/drivers/gpu/drm/nouveau/nouveau_agp.c +++ b/drivers/gpu/drm/nouveau/nouveau_agp.c @@ -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); Reading git-diff-tree failed