diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-01-11 21:33:37 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-01-21 21:17:49 -0500 |
commit | 989aa5b76ad2af7653353cf01bdebec2ba9436aa (patch) | |
tree | 1101d4d85c6034c902f5956877f268dff1a144c9 | |
parent | c4345146dbee38d949efd3a7b96d1bea962a29f2 (diff) |
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 <bskeggs@redhat.com>
28 files changed, 124 insertions, 125 deletions
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 | |||
112 | { | 112 | { |
113 | struct drm_device *dev = crtc->dev; | 113 | struct drm_device *dev = crtc->dev; |
114 | struct nouveau_drm *drm = nouveau_drm(dev); | 114 | struct nouveau_drm *drm = nouveau_drm(dev); |
115 | struct nouveau_bios *bios = nvkm_bios(&drm->device); | 115 | struct nouveau_bios *bios = nvxx_bios(&drm->device); |
116 | struct nouveau_clk *clk = nvkm_clk(&drm->device); | 116 | struct nouveau_clk *clk = nvxx_clk(&drm->device); |
117 | struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); | 117 | struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); |
118 | struct nv04_mode_state *state = &nv04_display(dev)->mode_reg; | 118 | struct nv04_mode_state *state = &nv04_display(dev)->mode_reg; |
119 | struct nv04_crtc_reg *regp = &state->crtc_reg[nv_crtc->index]; | 119 | 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) | |||
66 | static int sample_load_twice(struct drm_device *dev, bool sense[2]) | 66 | static int sample_load_twice(struct drm_device *dev, bool sense[2]) |
67 | { | 67 | { |
68 | struct nvif_device *device = &nouveau_drm(dev)->device; | 68 | struct nvif_device *device = &nouveau_drm(dev)->device; |
69 | struct nouveau_timer *ptimer = nvkm_timer(device); | 69 | struct nouveau_timer *ptimer = nvxx_timer(device); |
70 | int i; | 70 | int i; |
71 | 71 | ||
72 | for (i = 0; i < 2; i++) { | 72 | for (i = 0; i < 2; i++) { |
@@ -232,7 +232,7 @@ uint32_t nv17_dac_sample_load(struct drm_encoder *encoder) | |||
232 | struct drm_device *dev = encoder->dev; | 232 | struct drm_device *dev = encoder->dev; |
233 | struct nouveau_drm *drm = nouveau_drm(dev); | 233 | struct nouveau_drm *drm = nouveau_drm(dev); |
234 | struct nvif_device *device = &nouveau_drm(dev)->device; | 234 | struct nvif_device *device = &nouveau_drm(dev)->device; |
235 | struct nouveau_gpio *gpio = nvkm_gpio(device); | 235 | struct nouveau_gpio *gpio = nvxx_gpio(device); |
236 | struct dcb_output *dcb = nouveau_encoder(encoder)->dcb; | 236 | struct dcb_output *dcb = nouveau_encoder(encoder)->dcb; |
237 | uint32_t sample, testval, regoffset = nv04_dac_output_offset(encoder); | 237 | uint32_t sample, testval, regoffset = nv04_dac_output_offset(encoder); |
238 | uint32_t saved_powerctrl_2 = 0, saved_powerctrl_4 = 0, saved_routput, | 238 | 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) | |||
623 | struct drm_device *dev = encoder->dev; | 623 | struct drm_device *dev = encoder->dev; |
624 | struct dcb_output *dcb = nouveau_encoder(encoder)->dcb; | 624 | struct dcb_output *dcb = nouveau_encoder(encoder)->dcb; |
625 | struct nouveau_drm *drm = nouveau_drm(dev); | 625 | struct nouveau_drm *drm = nouveau_drm(dev); |
626 | struct nouveau_i2c *i2c = nvkm_i2c(&drm->device); | 626 | struct nouveau_i2c *i2c = nvxx_i2c(&drm->device); |
627 | struct nouveau_i2c_port *port = i2c->find(i2c, 2); | 627 | struct nouveau_i2c_port *port = i2c->find(i2c, 2); |
628 | struct nouveau_i2c_board_info info[] = { | 628 | struct nouveau_i2c_board_info info[] = { |
629 | { | 629 | { |
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 | |||
35 | nv04_display_create(struct drm_device *dev) | 35 | nv04_display_create(struct drm_device *dev) |
36 | { | 36 | { |
37 | struct nouveau_drm *drm = nouveau_drm(dev); | 37 | struct nouveau_drm *drm = nouveau_drm(dev); |
38 | struct nouveau_i2c *i2c = nvkm_i2c(&drm->device); | 38 | struct nouveau_i2c *i2c = nvxx_i2c(&drm->device); |
39 | struct dcb_table *dcb = &drm->vbios.dcb; | 39 | struct dcb_table *dcb = &drm->vbios.dcb; |
40 | struct drm_connector *connector, *ct; | 40 | struct drm_connector *connector, *ct; |
41 | struct drm_encoder *encoder; | 41 | 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, | |||
170 | struct dcb_output *outp, int crtc) | 170 | struct dcb_output *outp, int crtc) |
171 | { | 171 | { |
172 | struct nouveau_drm *drm = nouveau_drm(dev); | 172 | struct nouveau_drm *drm = nouveau_drm(dev); |
173 | struct nouveau_bios *bios = nvkm_bios(&drm->device); | 173 | struct nouveau_bios *bios = nvxx_bios(&drm->device); |
174 | struct nvbios_init init = { | 174 | struct nvbios_init init = { |
175 | .subdev = nv_subdev(bios), | 175 | .subdev = nv_subdev(bios), |
176 | .bios = bios, | 176 | .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, | |||
166 | { | 166 | { |
167 | struct nouveau_drm *drm = nouveau_drm(dev); | 167 | struct nouveau_drm *drm = nouveau_drm(dev); |
168 | struct nvif_device *device = &drm->device; | 168 | struct nvif_device *device = &drm->device; |
169 | struct nouveau_bios *bios = nvkm_bios(device); | 169 | struct nouveau_bios *bios = nvxx_bios(device); |
170 | uint32_t reg1, pll1, pll2 = 0; | 170 | uint32_t reg1, pll1, pll2 = 0; |
171 | struct nvbios_pll pll_lim; | 171 | struct nvbios_pll pll_lim; |
172 | int ret; | 172 | int ret; |
@@ -253,8 +253,8 @@ nouveau_hw_fix_bad_vpll(struct drm_device *dev, int head) | |||
253 | 253 | ||
254 | struct nouveau_drm *drm = nouveau_drm(dev); | 254 | struct nouveau_drm *drm = nouveau_drm(dev); |
255 | struct nvif_device *device = &drm->device; | 255 | struct nvif_device *device = &drm->device; |
256 | struct nouveau_clk *clk = nvkm_clk(device); | 256 | struct nouveau_clk *clk = nvxx_clk(device); |
257 | struct nouveau_bios *bios = nvkm_bios(device); | 257 | struct nouveau_bios *bios = nvxx_bios(device); |
258 | struct nvbios_pll pll_lim; | 258 | struct nvbios_pll pll_lim; |
259 | struct nouveau_pll_vals pv; | 259 | struct nouveau_pll_vals pv; |
260 | enum nvbios_pll_type pll = head ? PLL_VPLL1 : PLL_VPLL0; | 260 | enum nvbios_pll_type pll = head ? PLL_VPLL1 : PLL_VPLL0; |
@@ -463,7 +463,7 @@ nv_load_state_ramdac(struct drm_device *dev, int head, | |||
463 | struct nv04_mode_state *state) | 463 | struct nv04_mode_state *state) |
464 | { | 464 | { |
465 | struct nouveau_drm *drm = nouveau_drm(dev); | 465 | struct nouveau_drm *drm = nouveau_drm(dev); |
466 | struct nouveau_clk *clk = nvkm_clk(&drm->device); | 466 | struct nouveau_clk *clk = nvxx_clk(&drm->device); |
467 | struct nv04_crtc_reg *regp = &state->crtc_reg[head]; | 467 | struct nv04_crtc_reg *regp = &state->crtc_reg[head]; |
468 | uint32_t pllreg = head ? NV_RAMDAC_VPLL2 : NV_PRAMDAC_VPLL_COEFF; | 468 | uint32_t pllreg = head ? NV_RAMDAC_VPLL2 : NV_PRAMDAC_VPLL_COEFF; |
469 | int i; | 469 | int i; |
@@ -661,7 +661,7 @@ nv_load_state_ext(struct drm_device *dev, int head, | |||
661 | { | 661 | { |
662 | struct nouveau_drm *drm = nouveau_drm(dev); | 662 | struct nouveau_drm *drm = nouveau_drm(dev); |
663 | struct nvif_device *device = &drm->device; | 663 | struct nvif_device *device = &drm->device; |
664 | struct nouveau_timer *ptimer = nvkm_timer(device); | 664 | struct nouveau_timer *ptimer = nvxx_timer(device); |
665 | struct nv04_crtc_reg *regp = &state->crtc_reg[head]; | 665 | struct nv04_crtc_reg *regp = &state->crtc_reg[head]; |
666 | uint32_t reg900; | 666 | uint32_t reg900; |
667 | int i; | 667 | 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[] = { | |||
54 | int nv04_tv_identify(struct drm_device *dev, int i2c_index) | 54 | int nv04_tv_identify(struct drm_device *dev, int i2c_index) |
55 | { | 55 | { |
56 | struct nouveau_drm *drm = nouveau_drm(dev); | 56 | struct nouveau_drm *drm = nouveau_drm(dev); |
57 | struct nouveau_i2c *i2c = nvkm_i2c(&drm->device); | 57 | struct nouveau_i2c *i2c = nvxx_i2c(&drm->device); |
58 | 58 | ||
59 | return i2c->identify(i2c, i2c_index, "TV encoder", | 59 | return i2c->identify(i2c, i2c_index, "TV encoder", |
60 | nv04_tv_encoder_info, NULL, NULL); | 60 | nv04_tv_encoder_info, NULL, NULL); |
@@ -204,7 +204,7 @@ nv04_tv_create(struct drm_connector *connector, struct dcb_output *entry) | |||
204 | struct drm_encoder *encoder; | 204 | struct drm_encoder *encoder; |
205 | struct drm_device *dev = connector->dev; | 205 | struct drm_device *dev = connector->dev; |
206 | struct nouveau_drm *drm = nouveau_drm(dev); | 206 | struct nouveau_drm *drm = nouveau_drm(dev); |
207 | struct nouveau_i2c *i2c = nvkm_i2c(&drm->device); | 207 | struct nouveau_i2c *i2c = nvxx_i2c(&drm->device); |
208 | struct nouveau_i2c_port *port = i2c->find(i2c, entry->i2c_index); | 208 | struct nouveau_i2c_port *port = i2c->find(i2c, entry->i2c_index); |
209 | int type, ret; | 209 | int type, ret; |
210 | 210 | ||
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) | |||
46 | { | 46 | { |
47 | struct drm_device *dev = encoder->dev; | 47 | struct drm_device *dev = encoder->dev; |
48 | struct nouveau_drm *drm = nouveau_drm(dev); | 48 | struct nouveau_drm *drm = nouveau_drm(dev); |
49 | struct nouveau_gpio *gpio = nvkm_gpio(&drm->device); | 49 | struct nouveau_gpio *gpio = nvxx_gpio(&drm->device); |
50 | uint32_t testval, regoffset = nv04_dac_output_offset(encoder); | 50 | uint32_t testval, regoffset = nv04_dac_output_offset(encoder); |
51 | uint32_t gpio0, gpio1, fp_htotal, fp_hsync_start, fp_hsync_end, | 51 | uint32_t gpio0, gpio1, fp_htotal, fp_hsync_start, fp_hsync_end, |
52 | fp_control, test_ctrl, dacclk, ctv_14, ctv_1c, ctv_6c; | 52 | 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) | |||
133 | struct nvif_device *device = &drm->device; | 133 | struct nvif_device *device = &drm->device; |
134 | 134 | ||
135 | /* Zotac FX5200 */ | 135 | /* Zotac FX5200 */ |
136 | if (nv_device_match(nvkm_object(device), 0x0322, 0x19da, 0x1035) || | 136 | if (nv_device_match(nvxx_object(device), 0x0322, 0x19da, 0x1035) || |
137 | nv_device_match(nvkm_object(device), 0x0322, 0x19da, 0x2035)) { | 137 | nv_device_match(nvxx_object(device), 0x0322, 0x19da, 0x2035)) { |
138 | *pin_mask = 0xc; | 138 | *pin_mask = 0xc; |
139 | return false; | 139 | return false; |
140 | } | 140 | } |
141 | 141 | ||
142 | /* MSI nForce2 IGP */ | 142 | /* MSI nForce2 IGP */ |
143 | if (nv_device_match(nvkm_object(device), 0x01f0, 0x1462, 0x5710)) { | 143 | if (nv_device_match(nvxx_object(device), 0x01f0, 0x1462, 0x5710)) { |
144 | *pin_mask = 0xc; | 144 | *pin_mask = 0xc; |
145 | return false; | 145 | return false; |
146 | } | 146 | } |
@@ -370,7 +370,7 @@ static void nv17_tv_dpms(struct drm_encoder *encoder, int mode) | |||
370 | { | 370 | { |
371 | struct drm_device *dev = encoder->dev; | 371 | struct drm_device *dev = encoder->dev; |
372 | struct nouveau_drm *drm = nouveau_drm(dev); | 372 | struct nouveau_drm *drm = nouveau_drm(dev); |
373 | struct nouveau_gpio *gpio = nvkm_gpio(&drm->device); | 373 | struct nouveau_gpio *gpio = nvxx_gpio(&drm->device); |
374 | struct nv17_tv_state *regs = &to_tv_enc(encoder)->state; | 374 | struct nv17_tv_state *regs = &to_tv_enc(encoder)->state; |
375 | struct nv17_tv_norm_params *tv_norm = get_tv_norm(encoder); | 375 | struct nv17_tv_norm_params *tv_norm = get_tv_norm(encoder); |
376 | 376 | ||
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 *); | |||
31 | 31 | ||
32 | /*XXX*/ | 32 | /*XXX*/ |
33 | #include <core/client.h> | 33 | #include <core/client.h> |
34 | #define nvkm_client(a) ({ \ | 34 | #define nvxx_client(a) ({ \ |
35 | struct nvif_client *_client = nvif_client(nvif_object(a)); \ | 35 | struct nvif_client *_client = nvif_client(nvif_object(a)); \ |
36 | nouveau_client(_client->base.priv); \ | 36 | nouveau_client(_client->base.priv); \ |
37 | }) | 37 | }) |
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 **); | |||
37 | #include <subdev/timer.h> | 37 | #include <subdev/timer.h> |
38 | #include <subdev/therm.h> | 38 | #include <subdev/therm.h> |
39 | 39 | ||
40 | #define nvkm_device(a) nv_device(nvkm_object((a))) | 40 | #define nvxx_device(a) nv_device(nvxx_object((a))) |
41 | #define nvkm_bios(a) nouveau_bios(nvkm_device(a)) | 41 | #define nvxx_bios(a) nouveau_bios(nvxx_device(a)) |
42 | #define nvkm_fb(a) nouveau_fb(nvkm_device(a)) | 42 | #define nvxx_fb(a) nouveau_fb(nvxx_device(a)) |
43 | #define nvkm_mmu(a) nouveau_mmu(nvkm_device(a)) | 43 | #define nvxx_mmu(a) nouveau_mmu(nvxx_device(a)) |
44 | #define nvkm_bar(a) nouveau_bar(nvkm_device(a)) | 44 | #define nvxx_bar(a) nouveau_bar(nvxx_device(a)) |
45 | #define nvkm_gpio(a) nouveau_gpio(nvkm_device(a)) | 45 | #define nvxx_gpio(a) nouveau_gpio(nvxx_device(a)) |
46 | #define nvkm_clk(a) nouveau_clk(nvkm_device(a)) | 46 | #define nvxx_clk(a) nouveau_clk(nvxx_device(a)) |
47 | #define nvkm_i2c(a) nouveau_i2c(nvkm_device(a)) | 47 | #define nvxx_i2c(a) nouveau_i2c(nvxx_device(a)) |
48 | #define nvkm_timer(a) nouveau_timer(nvkm_device(a)) | 48 | #define nvxx_timer(a) nouveau_timer(nvxx_device(a)) |
49 | #define nvkm_wait(a,b,c,d) nv_wait(nvkm_timer(a), (b), (c), (d)) | 49 | #define nvxx_wait(a,b,c,d) nv_wait(nvxx_timer(a), (b), (c), (d)) |
50 | #define nvkm_wait_cb(a,b,c) nv_wait_cb(nvkm_timer(a), (b), (c)) | 50 | #define nvxx_wait_cb(a,b,c) nv_wait_cb(nvxx_timer(a), (b), (c)) |
51 | #define nvkm_therm(a) nouveau_therm(nvkm_device(a)) | 51 | #define nvxx_therm(a) nouveau_therm(nvxx_device(a)) |
52 | 52 | ||
53 | #include <engine/device.h> | 53 | #include <engine/device.h> |
54 | #include <engine/fifo.h> | 54 | #include <engine/fifo.h> |
55 | #include <engine/gr.h> | 55 | #include <engine/gr.h> |
56 | #include <engine/sw.h> | 56 | #include <engine/sw.h> |
57 | 57 | ||
58 | #define nvkm_fifo(a) nouveau_fifo(nvkm_device(a)) | 58 | #define nvxx_fifo(a) nouveau_fifo(nvxx_device(a)) |
59 | #define nvkm_fifo_chan(a) ((struct nouveau_fifo_chan *)nvkm_object(a)) | 59 | #define nvxx_fifo_chan(a) ((struct nouveau_fifo_chan *)nvxx_object(a)) |
60 | #define nvkm_gr(a) ((struct nouveau_gr *)nouveau_engine(nvkm_object(a), NVDEV_ENGINE_GR)) | 60 | #define nvxx_gr(a) ((struct nouveau_gr *)nouveau_engine(nvxx_object(a), NVDEV_ENGINE_GR)) |
61 | |||
62 | #endif | 61 | #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 *); | |||
70 | 70 | ||
71 | /*XXX*/ | 71 | /*XXX*/ |
72 | #include <core/object.h> | 72 | #include <core/object.h> |
73 | #define nvkm_object(a) ((struct nouveau_object *)nvif_object(a)->priv) | 73 | #define nvxx_object(a) ((struct nouveau_object *)nvif_object(a)->priv) |
74 | 74 | ||
75 | #endif | 75 | #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) | |||
164 | struct nouveau_cli *cli = nouveau_cli(file_priv); | 164 | struct nouveau_cli *cli = nouveau_cli(file_priv); |
165 | struct nouveau_drm *drm = nouveau_drm(dev); | 165 | struct nouveau_drm *drm = nouveau_drm(dev); |
166 | struct nvif_device *device = &drm->device; | 166 | struct nvif_device *device = &drm->device; |
167 | struct nouveau_timer *ptimer = nvkm_timer(device); | 167 | struct nouveau_timer *ptimer = nvxx_timer(device); |
168 | struct nouveau_gr *gr = nvkm_gr(device); | 168 | struct nouveau_gr *gr = nvxx_gr(device); |
169 | struct drm_nouveau_getparam *getparam = data; | 169 | struct drm_nouveau_getparam *getparam = data; |
170 | 170 | ||
171 | switch (getparam->param) { | 171 | switch (getparam->param) { |
@@ -173,19 +173,19 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS) | |||
173 | getparam->value = device->info.chipset; | 173 | getparam->value = device->info.chipset; |
174 | break; | 174 | break; |
175 | case NOUVEAU_GETPARAM_PCI_VENDOR: | 175 | case NOUVEAU_GETPARAM_PCI_VENDOR: |
176 | if (nv_device_is_pci(nvkm_device(device))) | 176 | if (nv_device_is_pci(nvxx_device(device))) |
177 | getparam->value = dev->pdev->vendor; | 177 | getparam->value = dev->pdev->vendor; |
178 | else | 178 | else |
179 | getparam->value = 0; | 179 | getparam->value = 0; |
180 | break; | 180 | break; |
181 | case NOUVEAU_GETPARAM_PCI_DEVICE: | 181 | case NOUVEAU_GETPARAM_PCI_DEVICE: |
182 | if (nv_device_is_pci(nvkm_device(device))) | 182 | if (nv_device_is_pci(nvxx_device(device))) |
183 | getparam->value = dev->pdev->device; | 183 | getparam->value = dev->pdev->device; |
184 | else | 184 | else |
185 | getparam->value = 0; | 185 | getparam->value = 0; |
186 | break; | 186 | break; |
187 | case NOUVEAU_GETPARAM_BUS_TYPE: | 187 | case NOUVEAU_GETPARAM_BUS_TYPE: |
188 | if (!nv_device_is_pci(nvkm_device(device))) | 188 | if (!nv_device_is_pci(nvxx_device(device))) |
189 | getparam->value = 3; | 189 | getparam->value = 3; |
190 | else | 190 | else |
191 | if (drm_pci_device_is_agp(dev)) | 191 | 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) | |||
45 | while (agpmode == -1 && quirk->hostbridge_vendor) { | 45 | while (agpmode == -1 && quirk->hostbridge_vendor) { |
46 | if (info->id_vendor == quirk->hostbridge_vendor && | 46 | if (info->id_vendor == quirk->hostbridge_vendor && |
47 | info->id_device == quirk->hostbridge_device && | 47 | info->id_device == quirk->hostbridge_device && |
48 | nvkm_device(device)->pdev->vendor == quirk->chip_vendor && | 48 | nvxx_device(device)->pdev->vendor == quirk->chip_vendor && |
49 | nvkm_device(device)->pdev->device == quirk->chip_device) { | 49 | nvxx_device(device)->pdev->device == quirk->chip_device) { |
50 | agpmode = quirk->mode; | 50 | agpmode = quirk->mode; |
51 | NV_INFO(drm, "Forcing agp mode to %dX. Use agpmode to override.\n", | 51 | NV_INFO(drm, "Forcing agp mode to %dX. Use agpmode to override.\n", |
52 | agpmode); | 52 | agpmode); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 7df6acc8bb34..8058b68b0e3b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c | |||
@@ -2009,7 +2009,7 @@ uint8_t *nouveau_bios_embedded_edid(struct drm_device *dev) | |||
2009 | static bool NVInitVBIOS(struct drm_device *dev) | 2009 | static bool NVInitVBIOS(struct drm_device *dev) |
2010 | { | 2010 | { |
2011 | struct nouveau_drm *drm = nouveau_drm(dev); | 2011 | struct nouveau_drm *drm = nouveau_drm(dev); |
2012 | struct nouveau_bios *bios = nvkm_bios(&drm->device); | 2012 | struct nouveau_bios *bios = nvxx_bios(&drm->device); |
2013 | struct nvbios *legacy = &drm->vbios; | 2013 | struct nvbios *legacy = &drm->vbios; |
2014 | 2014 | ||
2015 | memset(legacy, 0, sizeof(struct nvbios)); | 2015 | memset(legacy, 0, sizeof(struct nvbios)); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index d2f0929c2d73..902d93fd72cc 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -48,7 +48,7 @@ nv10_bo_update_tile_region(struct drm_device *dev, struct nouveau_drm_tile *reg, | |||
48 | { | 48 | { |
49 | struct nouveau_drm *drm = nouveau_drm(dev); | 49 | struct nouveau_drm *drm = nouveau_drm(dev); |
50 | int i = reg - drm->tile.reg; | 50 | int i = reg - drm->tile.reg; |
51 | struct nouveau_fb *pfb = nvkm_fb(&drm->device); | 51 | struct nouveau_fb *pfb = nvxx_fb(&drm->device); |
52 | struct nouveau_fb_tile *tile = &pfb->tile.region[i]; | 52 | struct nouveau_fb_tile *tile = &pfb->tile.region[i]; |
53 | struct nouveau_engine *engine; | 53 | struct nouveau_engine *engine; |
54 | 54 | ||
@@ -105,7 +105,7 @@ nv10_bo_set_tiling(struct drm_device *dev, u32 addr, | |||
105 | u32 size, u32 pitch, u32 flags) | 105 | u32 size, u32 pitch, u32 flags) |
106 | { | 106 | { |
107 | struct nouveau_drm *drm = nouveau_drm(dev); | 107 | struct nouveau_drm *drm = nouveau_drm(dev); |
108 | struct nouveau_fb *pfb = nvkm_fb(&drm->device); | 108 | struct nouveau_fb *pfb = nvxx_fb(&drm->device); |
109 | struct nouveau_drm_tile *tile, *found = NULL; | 109 | struct nouveau_drm_tile *tile, *found = NULL; |
110 | int i; | 110 | int i; |
111 | 111 | ||
@@ -214,7 +214,7 @@ nouveau_bo_new(struct drm_device *dev, int size, int align, | |||
214 | nvbo->tile_flags = tile_flags; | 214 | nvbo->tile_flags = tile_flags; |
215 | nvbo->bo.bdev = &drm->ttm.bdev; | 215 | nvbo->bo.bdev = &drm->ttm.bdev; |
216 | 216 | ||
217 | if (!nv_device_is_cpu_coherent(nvkm_device(&drm->device))) | 217 | if (!nv_device_is_cpu_coherent(nvxx_device(&drm->device))) |
218 | nvbo->force_coherent = flags & TTM_PL_FLAG_UNCACHED; | 218 | nvbo->force_coherent = flags & TTM_PL_FLAG_UNCACHED; |
219 | 219 | ||
220 | nvbo->page_shift = 12; | 220 | nvbo->page_shift = 12; |
@@ -459,7 +459,7 @@ void | |||
459 | nouveau_bo_sync_for_device(struct nouveau_bo *nvbo) | 459 | nouveau_bo_sync_for_device(struct nouveau_bo *nvbo) |
460 | { | 460 | { |
461 | struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); | 461 | struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); |
462 | struct nouveau_device *device = nvkm_device(&drm->device); | 462 | struct nouveau_device *device = nvxx_device(&drm->device); |
463 | struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm; | 463 | struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm; |
464 | int i; | 464 | int i; |
465 | 465 | ||
@@ -479,7 +479,7 @@ void | |||
479 | nouveau_bo_sync_for_cpu(struct nouveau_bo *nvbo) | 479 | nouveau_bo_sync_for_cpu(struct nouveau_bo *nvbo) |
480 | { | 480 | { |
481 | struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); | 481 | struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); |
482 | struct nouveau_device *device = nvkm_device(&drm->device); | 482 | struct nouveau_device *device = nvxx_device(&drm->device); |
483 | struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm; | 483 | struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm; |
484 | int i; | 484 | int i; |
485 | 485 | ||
@@ -620,7 +620,7 @@ nouveau_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, | |||
620 | 620 | ||
621 | if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { | 621 | if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { |
622 | /* Some BARs do not support being ioremapped WC */ | 622 | /* Some BARs do not support being ioremapped WC */ |
623 | if (nvkm_bar(&drm->device)->iomap_uncached) { | 623 | if (nvxx_bar(&drm->device)->iomap_uncached) { |
624 | man->available_caching = TTM_PL_FLAG_UNCACHED; | 624 | man->available_caching = TTM_PL_FLAG_UNCACHED; |
625 | man->default_caching = TTM_PL_FLAG_UNCACHED; | 625 | man->default_caching = TTM_PL_FLAG_UNCACHED; |
626 | } | 626 | } |
@@ -1382,10 +1382,10 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) | |||
1382 | /* fallthrough, tiled memory */ | 1382 | /* fallthrough, tiled memory */ |
1383 | case TTM_PL_VRAM: | 1383 | case TTM_PL_VRAM: |
1384 | mem->bus.offset = mem->start << PAGE_SHIFT; | 1384 | mem->bus.offset = mem->start << PAGE_SHIFT; |
1385 | mem->bus.base = nv_device_resource_start(nvkm_device(&drm->device), 1); | 1385 | mem->bus.base = nv_device_resource_start(nvxx_device(&drm->device), 1); |
1386 | mem->bus.is_iomem = true; | 1386 | mem->bus.is_iomem = true; |
1387 | if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { | 1387 | if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { |
1388 | struct nouveau_bar *bar = nvkm_bar(&drm->device); | 1388 | struct nouveau_bar *bar = nvxx_bar(&drm->device); |
1389 | 1389 | ||
1390 | ret = bar->umap(bar, node, NV_MEM_ACCESS_RW, | 1390 | ret = bar->umap(bar, node, NV_MEM_ACCESS_RW, |
1391 | &node->bar_vma); | 1391 | &node->bar_vma); |
@@ -1405,7 +1405,7 @@ static void | |||
1405 | nouveau_ttm_io_mem_free(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) | 1405 | nouveau_ttm_io_mem_free(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) |
1406 | { | 1406 | { |
1407 | struct nouveau_drm *drm = nouveau_bdev(bdev); | 1407 | struct nouveau_drm *drm = nouveau_bdev(bdev); |
1408 | struct nouveau_bar *bar = nvkm_bar(&drm->device); | 1408 | struct nouveau_bar *bar = nvxx_bar(&drm->device); |
1409 | struct nouveau_mem *node = mem->mm_node; | 1409 | struct nouveau_mem *node = mem->mm_node; |
1410 | 1410 | ||
1411 | if (!node->bar_vma.node) | 1411 | if (!node->bar_vma.node) |
@@ -1420,7 +1420,7 @@ nouveau_ttm_fault_reserve_notify(struct ttm_buffer_object *bo) | |||
1420 | struct nouveau_drm *drm = nouveau_bdev(bo->bdev); | 1420 | struct nouveau_drm *drm = nouveau_bdev(bo->bdev); |
1421 | struct nouveau_bo *nvbo = nouveau_bo(bo); | 1421 | struct nouveau_bo *nvbo = nouveau_bo(bo); |
1422 | struct nvif_device *device = &drm->device; | 1422 | struct nvif_device *device = &drm->device; |
1423 | u32 mappable = nv_device_resource_len(nvkm_device(device), 1) >> PAGE_SHIFT; | 1423 | u32 mappable = nv_device_resource_len(nvxx_device(device), 1) >> PAGE_SHIFT; |
1424 | int i, ret; | 1424 | int i, ret; |
1425 | 1425 | ||
1426 | /* as long as the bo isn't in vram, and isn't tiled, we've got | 1426 | /* as long as the bo isn't in vram, and isn't tiled, we've got |
@@ -1484,7 +1484,7 @@ nouveau_ttm_tt_populate(struct ttm_tt *ttm) | |||
1484 | } | 1484 | } |
1485 | 1485 | ||
1486 | drm = nouveau_bdev(ttm->bdev); | 1486 | drm = nouveau_bdev(ttm->bdev); |
1487 | device = nvkm_device(&drm->device); | 1487 | device = nvxx_device(&drm->device); |
1488 | dev = drm->dev; | 1488 | dev = drm->dev; |
1489 | pdev = nv_device_base(device); | 1489 | pdev = nv_device_base(device); |
1490 | 1490 | ||
@@ -1549,7 +1549,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm) | |||
1549 | return; | 1549 | return; |
1550 | 1550 | ||
1551 | drm = nouveau_bdev(ttm->bdev); | 1551 | drm = nouveau_bdev(ttm->bdev); |
1552 | device = nvkm_device(&drm->device); | 1552 | device = nvxx_device(&drm->device); |
1553 | dev = drm->dev; | 1553 | dev = drm->dev; |
1554 | pdev = nv_device_base(device); | 1554 | pdev = nv_device_base(device); |
1555 | 1555 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c index 58b8b6423026..3bcbbd329cf2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_chan.c +++ b/drivers/gpu/drm/nouveau/nouveau_chan.c | |||
@@ -54,7 +54,7 @@ nouveau_channel_idle(struct nouveau_channel *chan) | |||
54 | 54 | ||
55 | if (ret) | 55 | if (ret) |
56 | NV_PRINTK(error, cli, "failed to idle channel 0x%08x [%s]\n", | 56 | NV_PRINTK(error, cli, "failed to idle channel 0x%08x [%s]\n", |
57 | chan->object->handle, nvkm_client(&cli->base)->name); | 57 | chan->object->handle, nvxx_client(&cli->base)->name); |
58 | return ret; | 58 | return ret; |
59 | } | 59 | } |
60 | 60 | ||
@@ -88,7 +88,7 @@ nouveau_channel_prep(struct nouveau_drm *drm, struct nvif_device *device, | |||
88 | u32 handle, u32 size, struct nouveau_channel **pchan) | 88 | u32 handle, u32 size, struct nouveau_channel **pchan) |
89 | { | 89 | { |
90 | struct nouveau_cli *cli = (void *)nvif_client(&device->base); | 90 | struct nouveau_cli *cli = (void *)nvif_client(&device->base); |
91 | struct nouveau_mmu *mmu = nvkm_mmu(device); | 91 | struct nouveau_mmu *mmu = nvxx_mmu(device); |
92 | struct nv_dma_v0 args = {}; | 92 | struct nv_dma_v0 args = {}; |
93 | struct nouveau_channel *chan; | 93 | struct nouveau_channel *chan; |
94 | u32 target; | 94 | u32 target; |
@@ -146,7 +146,7 @@ nouveau_channel_prep(struct nouveau_drm *drm, struct nvif_device *device, | |||
146 | */ | 146 | */ |
147 | args.target = NV_DMA_V0_TARGET_PCI; | 147 | args.target = NV_DMA_V0_TARGET_PCI; |
148 | args.access = NV_DMA_V0_ACCESS_RDWR; | 148 | args.access = NV_DMA_V0_ACCESS_RDWR; |
149 | args.start = nv_device_resource_start(nvkm_device(device), 1); | 149 | args.start = nv_device_resource_start(nvxx_device(device), 1); |
150 | args.limit = args.start + device->info.ram_user - 1; | 150 | args.limit = args.start + device->info.ram_user - 1; |
151 | } else { | 151 | } else { |
152 | args.target = NV_DMA_V0_TARGET_VRAM; | 152 | args.target = NV_DMA_V0_TARGET_VRAM; |
@@ -281,7 +281,7 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart) | |||
281 | { | 281 | { |
282 | struct nvif_device *device = chan->device; | 282 | struct nvif_device *device = chan->device; |
283 | struct nouveau_cli *cli = (void *)nvif_client(&device->base); | 283 | struct nouveau_cli *cli = (void *)nvif_client(&device->base); |
284 | struct nouveau_mmu *mmu = nvkm_mmu(device); | 284 | struct nouveau_mmu *mmu = nvxx_mmu(device); |
285 | struct nouveau_sw_chan *swch; | 285 | struct nouveau_sw_chan *swch; |
286 | struct nv_dma_v0 args = {}; | 286 | struct nv_dma_v0 args = {}; |
287 | int ret, i; | 287 | int ret, i; |
@@ -372,7 +372,7 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart) | |||
372 | if (ret) | 372 | if (ret) |
373 | return ret; | 373 | return ret; |
374 | 374 | ||
375 | swch = (void *)nvkm_object(&chan->nvsw)->parent; | 375 | swch = (void *)nvxx_object(&chan->nvsw)->parent; |
376 | swch->flip = nouveau_flip_complete; | 376 | swch->flip = nouveau_flip_complete; |
377 | swch->flip_data = chan; | 377 | swch->flip_data = chan; |
378 | 378 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 9c871f93cc1e..4ab6340b0dac 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c | |||
@@ -115,7 +115,7 @@ nouveau_connector_ddc_detect(struct drm_connector *connector) | |||
115 | struct drm_device *dev = connector->dev; | 115 | struct drm_device *dev = connector->dev; |
116 | struct nouveau_connector *nv_connector = nouveau_connector(connector); | 116 | struct nouveau_connector *nv_connector = nouveau_connector(connector); |
117 | struct nouveau_drm *drm = nouveau_drm(dev); | 117 | struct nouveau_drm *drm = nouveau_drm(dev); |
118 | struct nouveau_gpio *gpio = nvkm_gpio(&drm->device); | 118 | struct nouveau_gpio *gpio = nvxx_gpio(&drm->device); |
119 | struct nouveau_encoder *nv_encoder; | 119 | struct nouveau_encoder *nv_encoder; |
120 | struct drm_encoder *encoder; | 120 | struct drm_encoder *encoder; |
121 | int i, panel = -ENODEV; | 121 | int i, panel = -ENODEV; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index f972e9c1a23a..860b0e2d4181 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c | |||
@@ -450,7 +450,7 @@ nouveau_display_create(struct drm_device *dev) | |||
450 | drm_mode_create_dvi_i_properties(dev); | 450 | drm_mode_create_dvi_i_properties(dev); |
451 | 451 | ||
452 | dev->mode_config.funcs = &nouveau_mode_config_funcs; | 452 | dev->mode_config.funcs = &nouveau_mode_config_funcs; |
453 | dev->mode_config.fb_base = nv_device_resource_start(nvkm_device(&drm->device), 1); | 453 | dev->mode_config.fb_base = nv_device_resource_start(nvxx_device(&drm->device), 1); |
454 | 454 | ||
455 | dev->mode_config.min_width = 0; | 455 | dev->mode_config.min_width = 0; |
456 | dev->mode_config.min_height = 0; | 456 | dev->mode_config.min_height = 0; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index e684040ccf11..1de82ec6c276 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c | |||
@@ -124,7 +124,7 @@ nouveau_cli_create(u64 name, const char *sname, | |||
124 | static void | 124 | static void |
125 | nouveau_cli_destroy(struct nouveau_cli *cli) | 125 | nouveau_cli_destroy(struct nouveau_cli *cli) |
126 | { | 126 | { |
127 | nouveau_vm_ref(NULL, &nvkm_client(&cli->base)->vm, NULL); | 127 | nouveau_vm_ref(NULL, &nvxx_client(&cli->base)->vm, NULL); |
128 | nvif_client_fini(&cli->base); | 128 | nvif_client_fini(&cli->base); |
129 | usif_client_fini(cli); | 129 | usif_client_fini(cli); |
130 | } | 130 | } |
@@ -243,7 +243,7 @@ nouveau_accel_init(struct nouveau_drm *drm) | |||
243 | OUT_RING (drm->channel, 0x001f0000); | 243 | OUT_RING (drm->channel, 0x001f0000); |
244 | } | 244 | } |
245 | } | 245 | } |
246 | swch = (void *)nvkm_object(&drm->nvsw)->parent; | 246 | swch = (void *)nvxx_object(&drm->nvsw)->parent; |
247 | swch->flip = nouveau_flip_complete; | 247 | swch->flip = nouveau_flip_complete; |
248 | swch->flip_data = drm->channel; | 248 | swch->flip_data = drm->channel; |
249 | } | 249 | } |
@@ -255,7 +255,7 @@ nouveau_accel_init(struct nouveau_drm *drm) | |||
255 | } | 255 | } |
256 | 256 | ||
257 | if (device->info.family < NV_DEVICE_INFO_V0_FERMI) { | 257 | if (device->info.family < NV_DEVICE_INFO_V0_FERMI) { |
258 | ret = nouveau_gpuobj_new(nvkm_object(&drm->device), NULL, 32, | 258 | ret = nouveau_gpuobj_new(nvxx_object(&drm->device), NULL, 32, |
259 | 0, 0, &drm->notify); | 259 | 0, 0, &drm->notify); |
260 | if (ret) { | 260 | if (ret) { |
261 | NV_ERROR(drm, "failed to allocate notifier, %d\n", ret); | 261 | NV_ERROR(drm, "failed to allocate notifier, %d\n", ret); |
@@ -379,7 +379,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) | |||
379 | 379 | ||
380 | dev->dev_private = drm; | 380 | dev->dev_private = drm; |
381 | drm->dev = dev; | 381 | drm->dev = dev; |
382 | nvkm_client(&drm->client.base)->debug = | 382 | nvxx_client(&drm->client.base)->debug = |
383 | nouveau_dbgopt(nouveau_debug, "DRM"); | 383 | nouveau_dbgopt(nouveau_debug, "DRM"); |
384 | 384 | ||
385 | INIT_LIST_HEAD(&drm->clients); | 385 | INIT_LIST_HEAD(&drm->clients); |
@@ -435,12 +435,12 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) | |||
435 | nouveau_agp_init(drm); | 435 | nouveau_agp_init(drm); |
436 | 436 | ||
437 | if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { | 437 | if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { |
438 | ret = nouveau_vm_new(nvkm_device(&drm->device), 0, (1ULL << 40), | 438 | ret = nouveau_vm_new(nvxx_device(&drm->device), 0, (1ULL << 40), |
439 | 0x1000, &drm->client.vm); | 439 | 0x1000, &drm->client.vm); |
440 | if (ret) | 440 | if (ret) |
441 | goto fail_device; | 441 | goto fail_device; |
442 | 442 | ||
443 | nvkm_client(&drm->client.base)->vm = drm->client.vm; | 443 | nvxx_client(&drm->client.base)->vm = drm->client.vm; |
444 | } | 444 | } |
445 | 445 | ||
446 | ret = nouveau_ttm_init(drm); | 446 | ret = nouveau_ttm_init(drm); |
@@ -527,7 +527,7 @@ nouveau_drm_device_remove(struct drm_device *dev) | |||
527 | struct nouveau_object *device; | 527 | struct nouveau_object *device; |
528 | 528 | ||
529 | dev->irq_enabled = false; | 529 | dev->irq_enabled = false; |
530 | client = nvkm_client(&drm->client.base); | 530 | client = nvxx_client(&drm->client.base); |
531 | device = client->device; | 531 | device = client->device; |
532 | drm_put_dev(dev); | 532 | drm_put_dev(dev); |
533 | 533 | ||
@@ -831,14 +831,14 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv) | |||
831 | cli->base.super = false; | 831 | cli->base.super = false; |
832 | 832 | ||
833 | if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { | 833 | if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { |
834 | ret = nouveau_vm_new(nvkm_device(&drm->device), 0, (1ULL << 40), | 834 | ret = nouveau_vm_new(nvxx_device(&drm->device), 0, (1ULL << 40), |
835 | 0x1000, &cli->vm); | 835 | 0x1000, &cli->vm); |
836 | if (ret) { | 836 | if (ret) { |
837 | nouveau_cli_destroy(cli); | 837 | nouveau_cli_destroy(cli); |
838 | goto out_suspend; | 838 | goto out_suspend; |
839 | } | 839 | } |
840 | 840 | ||
841 | nvkm_client(&cli->base)->vm = cli->vm; | 841 | nvxx_client(&cli->base)->vm = cli->vm; |
842 | } | 842 | } |
843 | 843 | ||
844 | fpriv->driver_priv = cli; | 844 | fpriv->driver_priv = cli; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c index f32a434724e3..c6d56bef5823 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.c +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c | |||
@@ -182,7 +182,7 @@ nouveau_fence_context_new(struct nouveau_channel *chan, struct nouveau_fence_cha | |||
182 | else if (chan == chan->drm->channel) | 182 | else if (chan == chan->drm->channel) |
183 | strcpy(fctx->name, "generic kernel channel"); | 183 | strcpy(fctx->name, "generic kernel channel"); |
184 | else | 184 | else |
185 | strcpy(fctx->name, nvkm_client(&cli->base)->name); | 185 | strcpy(fctx->name, nvxx_client(&cli->base)->name); |
186 | 186 | ||
187 | kref_init(&fctx->fence_ref); | 187 | kref_init(&fctx->fence_ref); |
188 | if (!priv->uevent) | 188 | if (!priv->uevent) |
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 9eb8af4daeeb..8453d1aac0e2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c | |||
@@ -251,7 +251,7 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data, | |||
251 | { | 251 | { |
252 | struct nouveau_drm *drm = nouveau_drm(dev); | 252 | struct nouveau_drm *drm = nouveau_drm(dev); |
253 | struct nouveau_cli *cli = nouveau_cli(file_priv); | 253 | struct nouveau_cli *cli = nouveau_cli(file_priv); |
254 | struct nouveau_fb *pfb = nvkm_fb(&drm->device); | 254 | struct nouveau_fb *pfb = nvxx_fb(&drm->device); |
255 | struct drm_nouveau_gem_new *req = data; | 255 | struct drm_nouveau_gem_new *req = data; |
256 | struct nouveau_bo *nvbo = NULL; | 256 | struct nouveau_bo *nvbo = NULL; |
257 | int ret = 0; | 257 | int ret = 0; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c index afb36d66e78d..e63c15112f2e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c | |||
@@ -40,7 +40,7 @@ nouveau_hwmon_show_temp(struct device *d, struct device_attribute *a, char *buf) | |||
40 | { | 40 | { |
41 | struct drm_device *dev = dev_get_drvdata(d); | 41 | struct drm_device *dev = dev_get_drvdata(d); |
42 | struct nouveau_drm *drm = nouveau_drm(dev); | 42 | struct nouveau_drm *drm = nouveau_drm(dev); |
43 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 43 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
44 | int temp = therm->temp_get(therm); | 44 | int temp = therm->temp_get(therm); |
45 | 45 | ||
46 | if (temp < 0) | 46 | if (temp < 0) |
@@ -66,7 +66,7 @@ nouveau_hwmon_temp1_auto_point1_temp(struct device *d, | |||
66 | { | 66 | { |
67 | struct drm_device *dev = dev_get_drvdata(d); | 67 | struct drm_device *dev = dev_get_drvdata(d); |
68 | struct nouveau_drm *drm = nouveau_drm(dev); | 68 | struct nouveau_drm *drm = nouveau_drm(dev); |
69 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 69 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
70 | 70 | ||
71 | return snprintf(buf, PAGE_SIZE, "%d\n", | 71 | return snprintf(buf, PAGE_SIZE, "%d\n", |
72 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_FAN_BOOST) * 1000); | 72 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_FAN_BOOST) * 1000); |
@@ -78,7 +78,7 @@ nouveau_hwmon_set_temp1_auto_point1_temp(struct device *d, | |||
78 | { | 78 | { |
79 | struct drm_device *dev = dev_get_drvdata(d); | 79 | struct drm_device *dev = dev_get_drvdata(d); |
80 | struct nouveau_drm *drm = nouveau_drm(dev); | 80 | struct nouveau_drm *drm = nouveau_drm(dev); |
81 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 81 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
82 | long value; | 82 | long value; |
83 | 83 | ||
84 | if (kstrtol(buf, 10, &value) == -EINVAL) | 84 | if (kstrtol(buf, 10, &value) == -EINVAL) |
@@ -99,7 +99,7 @@ nouveau_hwmon_temp1_auto_point1_temp_hyst(struct device *d, | |||
99 | { | 99 | { |
100 | struct drm_device *dev = dev_get_drvdata(d); | 100 | struct drm_device *dev = dev_get_drvdata(d); |
101 | struct nouveau_drm *drm = nouveau_drm(dev); | 101 | struct nouveau_drm *drm = nouveau_drm(dev); |
102 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 102 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
103 | 103 | ||
104 | return snprintf(buf, PAGE_SIZE, "%d\n", | 104 | return snprintf(buf, PAGE_SIZE, "%d\n", |
105 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_FAN_BOOST_HYST) * 1000); | 105 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_FAN_BOOST_HYST) * 1000); |
@@ -111,7 +111,7 @@ nouveau_hwmon_set_temp1_auto_point1_temp_hyst(struct device *d, | |||
111 | { | 111 | { |
112 | struct drm_device *dev = dev_get_drvdata(d); | 112 | struct drm_device *dev = dev_get_drvdata(d); |
113 | struct nouveau_drm *drm = nouveau_drm(dev); | 113 | struct nouveau_drm *drm = nouveau_drm(dev); |
114 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 114 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
115 | long value; | 115 | long value; |
116 | 116 | ||
117 | if (kstrtol(buf, 10, &value) == -EINVAL) | 117 | if (kstrtol(buf, 10, &value) == -EINVAL) |
@@ -131,7 +131,7 @@ nouveau_hwmon_max_temp(struct device *d, struct device_attribute *a, char *buf) | |||
131 | { | 131 | { |
132 | struct drm_device *dev = dev_get_drvdata(d); | 132 | struct drm_device *dev = dev_get_drvdata(d); |
133 | struct nouveau_drm *drm = nouveau_drm(dev); | 133 | struct nouveau_drm *drm = nouveau_drm(dev); |
134 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 134 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
135 | 135 | ||
136 | return snprintf(buf, PAGE_SIZE, "%d\n", | 136 | return snprintf(buf, PAGE_SIZE, "%d\n", |
137 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_DOWN_CLK) * 1000); | 137 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_DOWN_CLK) * 1000); |
@@ -142,7 +142,7 @@ nouveau_hwmon_set_max_temp(struct device *d, struct device_attribute *a, | |||
142 | { | 142 | { |
143 | struct drm_device *dev = dev_get_drvdata(d); | 143 | struct drm_device *dev = dev_get_drvdata(d); |
144 | struct nouveau_drm *drm = nouveau_drm(dev); | 144 | struct nouveau_drm *drm = nouveau_drm(dev); |
145 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 145 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
146 | long value; | 146 | long value; |
147 | 147 | ||
148 | if (kstrtol(buf, 10, &value) == -EINVAL) | 148 | if (kstrtol(buf, 10, &value) == -EINVAL) |
@@ -162,7 +162,7 @@ nouveau_hwmon_max_temp_hyst(struct device *d, struct device_attribute *a, | |||
162 | { | 162 | { |
163 | struct drm_device *dev = dev_get_drvdata(d); | 163 | struct drm_device *dev = dev_get_drvdata(d); |
164 | struct nouveau_drm *drm = nouveau_drm(dev); | 164 | struct nouveau_drm *drm = nouveau_drm(dev); |
165 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 165 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
166 | 166 | ||
167 | return snprintf(buf, PAGE_SIZE, "%d\n", | 167 | return snprintf(buf, PAGE_SIZE, "%d\n", |
168 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_DOWN_CLK_HYST) * 1000); | 168 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_DOWN_CLK_HYST) * 1000); |
@@ -173,7 +173,7 @@ nouveau_hwmon_set_max_temp_hyst(struct device *d, struct device_attribute *a, | |||
173 | { | 173 | { |
174 | struct drm_device *dev = dev_get_drvdata(d); | 174 | struct drm_device *dev = dev_get_drvdata(d); |
175 | struct nouveau_drm *drm = nouveau_drm(dev); | 175 | struct nouveau_drm *drm = nouveau_drm(dev); |
176 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 176 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
177 | long value; | 177 | long value; |
178 | 178 | ||
179 | if (kstrtol(buf, 10, &value) == -EINVAL) | 179 | if (kstrtol(buf, 10, &value) == -EINVAL) |
@@ -194,7 +194,7 @@ nouveau_hwmon_critical_temp(struct device *d, struct device_attribute *a, | |||
194 | { | 194 | { |
195 | struct drm_device *dev = dev_get_drvdata(d); | 195 | struct drm_device *dev = dev_get_drvdata(d); |
196 | struct nouveau_drm *drm = nouveau_drm(dev); | 196 | struct nouveau_drm *drm = nouveau_drm(dev); |
197 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 197 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
198 | 198 | ||
199 | return snprintf(buf, PAGE_SIZE, "%d\n", | 199 | return snprintf(buf, PAGE_SIZE, "%d\n", |
200 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_CRITICAL) * 1000); | 200 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_CRITICAL) * 1000); |
@@ -206,7 +206,7 @@ nouveau_hwmon_set_critical_temp(struct device *d, struct device_attribute *a, | |||
206 | { | 206 | { |
207 | struct drm_device *dev = dev_get_drvdata(d); | 207 | struct drm_device *dev = dev_get_drvdata(d); |
208 | struct nouveau_drm *drm = nouveau_drm(dev); | 208 | struct nouveau_drm *drm = nouveau_drm(dev); |
209 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 209 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
210 | long value; | 210 | long value; |
211 | 211 | ||
212 | if (kstrtol(buf, 10, &value) == -EINVAL) | 212 | if (kstrtol(buf, 10, &value) == -EINVAL) |
@@ -227,7 +227,7 @@ nouveau_hwmon_critical_temp_hyst(struct device *d, struct device_attribute *a, | |||
227 | { | 227 | { |
228 | struct drm_device *dev = dev_get_drvdata(d); | 228 | struct drm_device *dev = dev_get_drvdata(d); |
229 | struct nouveau_drm *drm = nouveau_drm(dev); | 229 | struct nouveau_drm *drm = nouveau_drm(dev); |
230 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 230 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
231 | 231 | ||
232 | return snprintf(buf, PAGE_SIZE, "%d\n", | 232 | return snprintf(buf, PAGE_SIZE, "%d\n", |
233 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_CRITICAL_HYST) * 1000); | 233 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_CRITICAL_HYST) * 1000); |
@@ -240,7 +240,7 @@ nouveau_hwmon_set_critical_temp_hyst(struct device *d, | |||
240 | { | 240 | { |
241 | struct drm_device *dev = dev_get_drvdata(d); | 241 | struct drm_device *dev = dev_get_drvdata(d); |
242 | struct nouveau_drm *drm = nouveau_drm(dev); | 242 | struct nouveau_drm *drm = nouveau_drm(dev); |
243 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 243 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
244 | long value; | 244 | long value; |
245 | 245 | ||
246 | if (kstrtol(buf, 10, &value) == -EINVAL) | 246 | if (kstrtol(buf, 10, &value) == -EINVAL) |
@@ -260,7 +260,7 @@ nouveau_hwmon_emergency_temp(struct device *d, struct device_attribute *a, | |||
260 | { | 260 | { |
261 | struct drm_device *dev = dev_get_drvdata(d); | 261 | struct drm_device *dev = dev_get_drvdata(d); |
262 | struct nouveau_drm *drm = nouveau_drm(dev); | 262 | struct nouveau_drm *drm = nouveau_drm(dev); |
263 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 263 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
264 | 264 | ||
265 | return snprintf(buf, PAGE_SIZE, "%d\n", | 265 | return snprintf(buf, PAGE_SIZE, "%d\n", |
266 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_SHUTDOWN) * 1000); | 266 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_SHUTDOWN) * 1000); |
@@ -272,7 +272,7 @@ nouveau_hwmon_set_emergency_temp(struct device *d, struct device_attribute *a, | |||
272 | { | 272 | { |
273 | struct drm_device *dev = dev_get_drvdata(d); | 273 | struct drm_device *dev = dev_get_drvdata(d); |
274 | struct nouveau_drm *drm = nouveau_drm(dev); | 274 | struct nouveau_drm *drm = nouveau_drm(dev); |
275 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 275 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
276 | long value; | 276 | long value; |
277 | 277 | ||
278 | if (kstrtol(buf, 10, &value) == -EINVAL) | 278 | if (kstrtol(buf, 10, &value) == -EINVAL) |
@@ -293,7 +293,7 @@ nouveau_hwmon_emergency_temp_hyst(struct device *d, struct device_attribute *a, | |||
293 | { | 293 | { |
294 | struct drm_device *dev = dev_get_drvdata(d); | 294 | struct drm_device *dev = dev_get_drvdata(d); |
295 | struct nouveau_drm *drm = nouveau_drm(dev); | 295 | struct nouveau_drm *drm = nouveau_drm(dev); |
296 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 296 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
297 | 297 | ||
298 | return snprintf(buf, PAGE_SIZE, "%d\n", | 298 | return snprintf(buf, PAGE_SIZE, "%d\n", |
299 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_SHUTDOWN_HYST) * 1000); | 299 | therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_SHUTDOWN_HYST) * 1000); |
@@ -306,7 +306,7 @@ nouveau_hwmon_set_emergency_temp_hyst(struct device *d, | |||
306 | { | 306 | { |
307 | struct drm_device *dev = dev_get_drvdata(d); | 307 | struct drm_device *dev = dev_get_drvdata(d); |
308 | struct nouveau_drm *drm = nouveau_drm(dev); | 308 | struct nouveau_drm *drm = nouveau_drm(dev); |
309 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 309 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
310 | long value; | 310 | long value; |
311 | 311 | ||
312 | if (kstrtol(buf, 10, &value) == -EINVAL) | 312 | if (kstrtol(buf, 10, &value) == -EINVAL) |
@@ -346,7 +346,7 @@ nouveau_hwmon_show_fan1_input(struct device *d, struct device_attribute *attr, | |||
346 | { | 346 | { |
347 | struct drm_device *dev = dev_get_drvdata(d); | 347 | struct drm_device *dev = dev_get_drvdata(d); |
348 | struct nouveau_drm *drm = nouveau_drm(dev); | 348 | struct nouveau_drm *drm = nouveau_drm(dev); |
349 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 349 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
350 | 350 | ||
351 | return snprintf(buf, PAGE_SIZE, "%d\n", therm->fan_sense(therm)); | 351 | return snprintf(buf, PAGE_SIZE, "%d\n", therm->fan_sense(therm)); |
352 | } | 352 | } |
@@ -359,7 +359,7 @@ nouveau_hwmon_get_pwm1_enable(struct device *d, | |||
359 | { | 359 | { |
360 | struct drm_device *dev = dev_get_drvdata(d); | 360 | struct drm_device *dev = dev_get_drvdata(d); |
361 | struct nouveau_drm *drm = nouveau_drm(dev); | 361 | struct nouveau_drm *drm = nouveau_drm(dev); |
362 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 362 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
363 | int ret; | 363 | int ret; |
364 | 364 | ||
365 | ret = therm->attr_get(therm, NOUVEAU_THERM_ATTR_FAN_MODE); | 365 | ret = therm->attr_get(therm, NOUVEAU_THERM_ATTR_FAN_MODE); |
@@ -375,7 +375,7 @@ nouveau_hwmon_set_pwm1_enable(struct device *d, struct device_attribute *a, | |||
375 | { | 375 | { |
376 | struct drm_device *dev = dev_get_drvdata(d); | 376 | struct drm_device *dev = dev_get_drvdata(d); |
377 | struct nouveau_drm *drm = nouveau_drm(dev); | 377 | struct nouveau_drm *drm = nouveau_drm(dev); |
378 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 378 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
379 | long value; | 379 | long value; |
380 | int ret; | 380 | int ret; |
381 | 381 | ||
@@ -398,7 +398,7 @@ nouveau_hwmon_get_pwm1(struct device *d, struct device_attribute *a, char *buf) | |||
398 | { | 398 | { |
399 | struct drm_device *dev = dev_get_drvdata(d); | 399 | struct drm_device *dev = dev_get_drvdata(d); |
400 | struct nouveau_drm *drm = nouveau_drm(dev); | 400 | struct nouveau_drm *drm = nouveau_drm(dev); |
401 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 401 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
402 | int ret; | 402 | int ret; |
403 | 403 | ||
404 | ret = therm->fan_get(therm); | 404 | ret = therm->fan_get(therm); |
@@ -414,7 +414,7 @@ nouveau_hwmon_set_pwm1(struct device *d, struct device_attribute *a, | |||
414 | { | 414 | { |
415 | struct drm_device *dev = dev_get_drvdata(d); | 415 | struct drm_device *dev = dev_get_drvdata(d); |
416 | struct nouveau_drm *drm = nouveau_drm(dev); | 416 | struct nouveau_drm *drm = nouveau_drm(dev); |
417 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 417 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
418 | int ret = -ENODEV; | 418 | int ret = -ENODEV; |
419 | long value; | 419 | long value; |
420 | 420 | ||
@@ -438,7 +438,7 @@ nouveau_hwmon_get_pwm1_min(struct device *d, | |||
438 | { | 438 | { |
439 | struct drm_device *dev = dev_get_drvdata(d); | 439 | struct drm_device *dev = dev_get_drvdata(d); |
440 | struct nouveau_drm *drm = nouveau_drm(dev); | 440 | struct nouveau_drm *drm = nouveau_drm(dev); |
441 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 441 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
442 | int ret; | 442 | int ret; |
443 | 443 | ||
444 | ret = therm->attr_get(therm, NOUVEAU_THERM_ATTR_FAN_MIN_DUTY); | 444 | ret = therm->attr_get(therm, NOUVEAU_THERM_ATTR_FAN_MIN_DUTY); |
@@ -454,7 +454,7 @@ nouveau_hwmon_set_pwm1_min(struct device *d, struct device_attribute *a, | |||
454 | { | 454 | { |
455 | struct drm_device *dev = dev_get_drvdata(d); | 455 | struct drm_device *dev = dev_get_drvdata(d); |
456 | struct nouveau_drm *drm = nouveau_drm(dev); | 456 | struct nouveau_drm *drm = nouveau_drm(dev); |
457 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 457 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
458 | long value; | 458 | long value; |
459 | int ret; | 459 | int ret; |
460 | 460 | ||
@@ -478,7 +478,7 @@ nouveau_hwmon_get_pwm1_max(struct device *d, | |||
478 | { | 478 | { |
479 | struct drm_device *dev = dev_get_drvdata(d); | 479 | struct drm_device *dev = dev_get_drvdata(d); |
480 | struct nouveau_drm *drm = nouveau_drm(dev); | 480 | struct nouveau_drm *drm = nouveau_drm(dev); |
481 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 481 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
482 | int ret; | 482 | int ret; |
483 | 483 | ||
484 | ret = therm->attr_get(therm, NOUVEAU_THERM_ATTR_FAN_MAX_DUTY); | 484 | ret = therm->attr_get(therm, NOUVEAU_THERM_ATTR_FAN_MAX_DUTY); |
@@ -494,7 +494,7 @@ nouveau_hwmon_set_pwm1_max(struct device *d, struct device_attribute *a, | |||
494 | { | 494 | { |
495 | struct drm_device *dev = dev_get_drvdata(d); | 495 | struct drm_device *dev = dev_get_drvdata(d); |
496 | struct nouveau_drm *drm = nouveau_drm(dev); | 496 | struct nouveau_drm *drm = nouveau_drm(dev); |
497 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 497 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
498 | long value; | 498 | long value; |
499 | int ret; | 499 | int ret; |
500 | 500 | ||
@@ -561,7 +561,7 @@ nouveau_hwmon_init(struct drm_device *dev) | |||
561 | { | 561 | { |
562 | #if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE)) | 562 | #if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE)) |
563 | struct nouveau_drm *drm = nouveau_drm(dev); | 563 | struct nouveau_drm *drm = nouveau_drm(dev); |
564 | struct nouveau_therm *therm = nvkm_therm(&drm->device); | 564 | struct nouveau_therm *therm = nvxx_therm(&drm->device); |
565 | struct nouveau_hwmon *hwmon; | 565 | struct nouveau_hwmon *hwmon; |
566 | struct device *hwmon_dev; | 566 | struct device *hwmon_dev; |
567 | int ret = 0; | 567 | int ret = 0; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_platform.c b/drivers/gpu/drm/nouveau/nouveau_platform.c index 34d78b288f97..5e6a2c90b8e2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_platform.c +++ b/drivers/gpu/drm/nouveau/nouveau_platform.c | |||
@@ -152,7 +152,7 @@ static int nouveau_platform_remove(struct platform_device *pdev) | |||
152 | { | 152 | { |
153 | struct drm_device *drm_dev = platform_get_drvdata(pdev); | 153 | struct drm_device *drm_dev = platform_get_drvdata(pdev); |
154 | struct nouveau_drm *drm = nouveau_drm(drm_dev); | 154 | struct nouveau_drm *drm = nouveau_drm(drm_dev); |
155 | struct nouveau_device *device = nvkm_device(&drm->device); | 155 | struct nouveau_device *device = nvxx_device(&drm->device); |
156 | struct nouveau_platform_gpu *gpu = nv_device_to_platform(device)->gpu; | 156 | struct nouveau_platform_gpu *gpu = nv_device_to_platform(device)->gpu; |
157 | 157 | ||
158 | nouveau_drm_device_remove(drm_dev); | 158 | nouveau_drm_device_remove(drm_dev); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_sysfs.c b/drivers/gpu/drm/nouveau/nouveau_sysfs.c index 8fbbf3093d86..1ec8f38ae69a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_sysfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_sysfs.c | |||
@@ -165,7 +165,7 @@ nouveau_sysfs_fini(struct drm_device *dev) | |||
165 | struct nvif_device *device = &drm->device; | 165 | struct nvif_device *device = &drm->device; |
166 | 166 | ||
167 | if (sysfs && sysfs->ctrl.priv) { | 167 | if (sysfs && sysfs->ctrl.priv) { |
168 | device_remove_file(nv_device_base(nvkm_device(device)), &dev_attr_pstate); | 168 | device_remove_file(nv_device_base(nvxx_device(device)), &dev_attr_pstate); |
169 | nvif_object_fini(&sysfs->ctrl); | 169 | nvif_object_fini(&sysfs->ctrl); |
170 | } | 170 | } |
171 | 171 | ||
@@ -192,7 +192,7 @@ nouveau_sysfs_init(struct drm_device *dev) | |||
192 | NVIF_IOCTL_NEW_V0_CONTROL, NULL, 0, | 192 | NVIF_IOCTL_NEW_V0_CONTROL, NULL, 0, |
193 | &sysfs->ctrl); | 193 | &sysfs->ctrl); |
194 | if (ret == 0) | 194 | if (ret == 0) |
195 | device_create_file(nv_device_base(nvkm_device(device)), &dev_attr_pstate); | 195 | device_create_file(nv_device_base(nvxx_device(device)), &dev_attr_pstate); |
196 | 196 | ||
197 | return 0; | 197 | return 0; |
198 | } | 198 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index aa8321706103..7149f6d1fb43 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c | |||
@@ -33,7 +33,7 @@ static int | |||
33 | nouveau_vram_manager_init(struct ttm_mem_type_manager *man, unsigned long psize) | 33 | nouveau_vram_manager_init(struct ttm_mem_type_manager *man, unsigned long psize) |
34 | { | 34 | { |
35 | struct nouveau_drm *drm = nouveau_bdev(man->bdev); | 35 | struct nouveau_drm *drm = nouveau_bdev(man->bdev); |
36 | struct nouveau_fb *pfb = nvkm_fb(&drm->device); | 36 | struct nouveau_fb *pfb = nvxx_fb(&drm->device); |
37 | man->priv = pfb; | 37 | man->priv = pfb; |
38 | return 0; | 38 | return 0; |
39 | } | 39 | } |
@@ -64,7 +64,7 @@ nouveau_vram_manager_del(struct ttm_mem_type_manager *man, | |||
64 | struct ttm_mem_reg *mem) | 64 | struct ttm_mem_reg *mem) |
65 | { | 65 | { |
66 | struct nouveau_drm *drm = nouveau_bdev(man->bdev); | 66 | struct nouveau_drm *drm = nouveau_bdev(man->bdev); |
67 | struct nouveau_fb *pfb = nvkm_fb(&drm->device); | 67 | struct nouveau_fb *pfb = nvxx_fb(&drm->device); |
68 | nouveau_mem_node_cleanup(mem->mm_node); | 68 | nouveau_mem_node_cleanup(mem->mm_node); |
69 | pfb->ram->put(pfb, (struct nouveau_mem **)&mem->mm_node); | 69 | pfb->ram->put(pfb, (struct nouveau_mem **)&mem->mm_node); |
70 | } | 70 | } |
@@ -76,7 +76,7 @@ nouveau_vram_manager_new(struct ttm_mem_type_manager *man, | |||
76 | struct ttm_mem_reg *mem) | 76 | struct ttm_mem_reg *mem) |
77 | { | 77 | { |
78 | struct nouveau_drm *drm = nouveau_bdev(man->bdev); | 78 | struct nouveau_drm *drm = nouveau_bdev(man->bdev); |
79 | struct nouveau_fb *pfb = nvkm_fb(&drm->device); | 79 | struct nouveau_fb *pfb = nvxx_fb(&drm->device); |
80 | struct nouveau_bo *nvbo = nouveau_bo(bo); | 80 | struct nouveau_bo *nvbo = nouveau_bo(bo); |
81 | struct nouveau_mem *node; | 81 | struct nouveau_mem *node; |
82 | u32 size_nc = 0; | 82 | u32 size_nc = 0; |
@@ -208,7 +208,7 @@ static int | |||
208 | nv04_gart_manager_init(struct ttm_mem_type_manager *man, unsigned long psize) | 208 | nv04_gart_manager_init(struct ttm_mem_type_manager *man, unsigned long psize) |
209 | { | 209 | { |
210 | struct nouveau_drm *drm = nouveau_bdev(man->bdev); | 210 | struct nouveau_drm *drm = nouveau_bdev(man->bdev); |
211 | struct nouveau_mmu *mmu = nvkm_mmu(&drm->device); | 211 | struct nouveau_mmu *mmu = nvxx_mmu(&drm->device); |
212 | struct nv04_mmu_priv *priv = (void *)mmu; | 212 | struct nv04_mmu_priv *priv = (void *)mmu; |
213 | struct nouveau_vm *vm = NULL; | 213 | struct nouveau_vm *vm = NULL; |
214 | nouveau_vm_ref(priv->vm, &vm, NULL); | 214 | nouveau_vm_ref(priv->vm, &vm, NULL); |
@@ -354,8 +354,8 @@ nouveau_ttm_init(struct nouveau_drm *drm) | |||
354 | u32 bits; | 354 | u32 bits; |
355 | int ret; | 355 | int ret; |
356 | 356 | ||
357 | bits = nvkm_mmu(&drm->device)->dma_bits; | 357 | bits = nvxx_mmu(&drm->device)->dma_bits; |
358 | if (nv_device_is_pci(nvkm_device(&drm->device))) { | 358 | if (nv_device_is_pci(nvxx_device(&drm->device))) { |
359 | if (drm->agp.stat == ENABLED || | 359 | if (drm->agp.stat == ENABLED || |
360 | !pci_dma_supported(dev->pdev, DMA_BIT_MASK(bits))) | 360 | !pci_dma_supported(dev->pdev, DMA_BIT_MASK(bits))) |
361 | bits = 32; | 361 | bits = 32; |
@@ -396,12 +396,12 @@ nouveau_ttm_init(struct nouveau_drm *drm) | |||
396 | return ret; | 396 | return ret; |
397 | } | 397 | } |
398 | 398 | ||
399 | drm->ttm.mtrr = arch_phys_wc_add(nv_device_resource_start(nvkm_device(&drm->device), 1), | 399 | drm->ttm.mtrr = arch_phys_wc_add(nv_device_resource_start(nvxx_device(&drm->device), 1), |
400 | nv_device_resource_len(nvkm_device(&drm->device), 1)); | 400 | nv_device_resource_len(nvxx_device(&drm->device), 1)); |
401 | 401 | ||
402 | /* GART init */ | 402 | /* GART init */ |
403 | if (drm->agp.stat != ENABLED) { | 403 | if (drm->agp.stat != ENABLED) { |
404 | drm->gem.gart_available = nvkm_mmu(&drm->device)->limit; | 404 | drm->gem.gart_available = nvxx_mmu(&drm->device)->limit; |
405 | } else { | 405 | } else { |
406 | drm->gem.gart_available = drm->agp.size; | 406 | drm->gem.gart_available = drm->agp.size; |
407 | } | 407 | } |
diff --git a/drivers/gpu/drm/nouveau/nv04_fence.c b/drivers/gpu/drm/nouveau/nv04_fence.c index f9859deb108a..af0eaa7bcb33 100644 --- a/drivers/gpu/drm/nouveau/nv04_fence.c +++ b/drivers/gpu/drm/nouveau/nv04_fence.c | |||
@@ -57,7 +57,7 @@ nv04_fence_sync(struct nouveau_fence *fence, | |||
57 | static u32 | 57 | static u32 |
58 | nv04_fence_read(struct nouveau_channel *chan) | 58 | nv04_fence_read(struct nouveau_channel *chan) |
59 | { | 59 | { |
60 | struct nouveau_fifo_chan *fifo = nvkm_fifo_chan(chan);; | 60 | struct nouveau_fifo_chan *fifo = nvxx_fifo_chan(chan);; |
61 | return atomic_read(&fifo->refcnt); | 61 | return atomic_read(&fifo->refcnt); |
62 | } | 62 | } |
63 | 63 | ||
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index 113e8cdb0b2b..bba84448144e 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c | |||
@@ -200,7 +200,7 @@ nv50_dmac_destroy(struct nv50_dmac *dmac, struct nvif_object *disp) | |||
200 | nv50_chan_destroy(&dmac->base); | 200 | nv50_chan_destroy(&dmac->base); |
201 | 201 | ||
202 | if (dmac->ptr) { | 202 | if (dmac->ptr) { |
203 | struct pci_dev *pdev = nvkm_device(nvif_device(disp))->pdev; | 203 | struct pci_dev *pdev = nvxx_device(nvif_device(disp))->pdev; |
204 | pci_free_consistent(pdev, PAGE_SIZE, dmac->ptr, dmac->handle); | 204 | pci_free_consistent(pdev, PAGE_SIZE, dmac->ptr, dmac->handle); |
205 | } | 205 | } |
206 | } | 206 | } |
@@ -217,7 +217,7 @@ nv50_dmac_create(struct nvif_object *disp, const u32 *oclass, u8 head, | |||
217 | 217 | ||
218 | mutex_init(&dmac->lock); | 218 | mutex_init(&dmac->lock); |
219 | 219 | ||
220 | dmac->ptr = pci_alloc_consistent(nvkm_device(device)->pdev, | 220 | dmac->ptr = pci_alloc_consistent(nvxx_device(device)->pdev, |
221 | PAGE_SIZE, &dmac->handle); | 221 | PAGE_SIZE, &dmac->handle); |
222 | if (!dmac->ptr) | 222 | if (!dmac->ptr) |
223 | return -ENOMEM; | 223 | return -ENOMEM; |
@@ -420,9 +420,9 @@ evo_wait(void *evoc, int nr) | |||
420 | dmac->ptr[put] = 0x20000000; | 420 | dmac->ptr[put] = 0x20000000; |
421 | 421 | ||
422 | nvif_wr32(&dmac->base.user, 0x0000, 0x00000000); | 422 | nvif_wr32(&dmac->base.user, 0x0000, 0x00000000); |
423 | if (!nvkm_wait(&dmac->base.user, 0x0004, ~0, 0x00000000)) { | 423 | if (!nvxx_wait(&dmac->base.user, 0x0004, ~0, 0x00000000)) { |
424 | mutex_unlock(&dmac->lock); | 424 | mutex_unlock(&dmac->lock); |
425 | nv_error(nvkm_object(&dmac->base.user), "channel stalled\n"); | 425 | nv_error(nvxx_object(&dmac->base.user), "channel stalled\n"); |
426 | return NULL; | 426 | return NULL; |
427 | } | 427 | } |
428 | 428 | ||
@@ -480,7 +480,7 @@ evo_sync(struct drm_device *dev) | |||
480 | evo_data(push, 0x00000000); | 480 | evo_data(push, 0x00000000); |
481 | evo_data(push, 0x00000000); | 481 | evo_data(push, 0x00000000); |
482 | evo_kick(push, mast); | 482 | evo_kick(push, mast); |
483 | if (nv_wait_cb(nvkm_device(device), evo_sync_wait, disp->sync)) | 483 | if (nv_wait_cb(nvxx_device(device), evo_sync_wait, disp->sync)) |
484 | return 0; | 484 | return 0; |
485 | } | 485 | } |
486 | 486 | ||
@@ -535,7 +535,7 @@ nv50_display_flip_stop(struct drm_crtc *crtc) | |||
535 | evo_kick(push, flip.chan); | 535 | evo_kick(push, flip.chan); |
536 | } | 536 | } |
537 | 537 | ||
538 | nv_wait_cb(nvkm_device(device), nv50_display_flip_wait, &flip); | 538 | nv_wait_cb(nvxx_device(device), nv50_display_flip_wait, &flip); |
539 | } | 539 | } |
540 | 540 | ||
541 | int | 541 | int |
@@ -1677,7 +1677,7 @@ static int | |||
1677 | nv50_dac_create(struct drm_connector *connector, struct dcb_output *dcbe) | 1677 | nv50_dac_create(struct drm_connector *connector, struct dcb_output *dcbe) |
1678 | { | 1678 | { |
1679 | struct nouveau_drm *drm = nouveau_drm(connector->dev); | 1679 | struct nouveau_drm *drm = nouveau_drm(connector->dev); |
1680 | struct nouveau_i2c *i2c = nvkm_i2c(&drm->device); | 1680 | struct nouveau_i2c *i2c = nvxx_i2c(&drm->device); |
1681 | struct nouveau_encoder *nv_encoder; | 1681 | struct nouveau_encoder *nv_encoder; |
1682 | struct drm_encoder *encoder; | 1682 | struct drm_encoder *encoder; |
1683 | int type = DRM_MODE_ENCODER_DAC; | 1683 | int type = DRM_MODE_ENCODER_DAC; |
@@ -2062,7 +2062,7 @@ static int | |||
2062 | nv50_sor_create(struct drm_connector *connector, struct dcb_output *dcbe) | 2062 | nv50_sor_create(struct drm_connector *connector, struct dcb_output *dcbe) |
2063 | { | 2063 | { |
2064 | struct nouveau_drm *drm = nouveau_drm(connector->dev); | 2064 | struct nouveau_drm *drm = nouveau_drm(connector->dev); |
2065 | struct nouveau_i2c *i2c = nvkm_i2c(&drm->device); | 2065 | struct nouveau_i2c *i2c = nvxx_i2c(&drm->device); |
2066 | struct nouveau_encoder *nv_encoder; | 2066 | struct nouveau_encoder *nv_encoder; |
2067 | struct drm_encoder *encoder; | 2067 | struct drm_encoder *encoder; |
2068 | int type; | 2068 | int type; |
@@ -2233,7 +2233,7 @@ static int | |||
2233 | nv50_pior_create(struct drm_connector *connector, struct dcb_output *dcbe) | 2233 | nv50_pior_create(struct drm_connector *connector, struct dcb_output *dcbe) |
2234 | { | 2234 | { |
2235 | struct nouveau_drm *drm = nouveau_drm(connector->dev); | 2235 | struct nouveau_drm *drm = nouveau_drm(connector->dev); |
2236 | struct nouveau_i2c *i2c = nvkm_i2c(&drm->device); | 2236 | struct nouveau_i2c *i2c = nvxx_i2c(&drm->device); |
2237 | struct nouveau_i2c_port *ddc = NULL; | 2237 | struct nouveau_i2c_port *ddc = NULL; |
2238 | struct nouveau_encoder *nv_encoder; | 2238 | struct nouveau_encoder *nv_encoder; |
2239 | struct drm_encoder *encoder; | 2239 | struct drm_encoder *encoder; |
diff --git a/drivers/gpu/drm/nouveau/nv84_fence.c b/drivers/gpu/drm/nouveau/nv84_fence.c index cb5b88938d45..46fe1fb5c9be 100644 --- a/drivers/gpu/drm/nouveau/nv84_fence.c +++ b/drivers/gpu/drm/nouveau/nv84_fence.c | |||
@@ -213,7 +213,7 @@ nv84_fence_destroy(struct nouveau_drm *drm) | |||
213 | int | 213 | int |
214 | nv84_fence_create(struct nouveau_drm *drm) | 214 | nv84_fence_create(struct nouveau_drm *drm) |
215 | { | 215 | { |
216 | struct nouveau_fifo *pfifo = nvkm_fifo(&drm->device); | 216 | struct nouveau_fifo *pfifo = nvxx_fifo(&drm->device); |
217 | struct nv84_fence_priv *priv; | 217 | struct nv84_fence_priv *priv; |
218 | int ret; | 218 | int ret; |
219 | 219 | ||