diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-01-14 00:36:34 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-01-21 21:18:07 -0500 |
commit | be83cd4ef9a2a56bd35550bf96146b7b837daf02 (patch) | |
tree | 7cd92cdbb6c9fa473f4b896e8bd22e9dc8cbc28e | |
parent | 9719047b4d985ca7a46819956047cca04213d63e (diff) |
drm/nouveau: finalise nvkm namespace switch (no binary change)
The namespace of NVKM is being changed to nvkm_ instead of nouveau_,
which will be used for the DRM part of the driver. This is being
done in order to make it very clear as to what part of the driver a
given symbol belongs to, and as a minor step towards splitting the
DRM driver out to be able to stand on its own (for virt).
Because there's already a large amount of churn here anyway, this is
as good a time as any to also switch to NVIDIA's device and chipset
naming to ease collaboration with them.
A comparison of objdump disassemblies proves no code changes.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
44 files changed, 328 insertions, 593 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c index f32eecbe3c95..542bb266a0ab 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c | |||
@@ -112,12 +112,12 @@ 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 = nvxx_bios(&drm->device); | 115 | struct nvkm_bios *bios = nvxx_bios(&drm->device); |
116 | struct nouveau_clk *clk = nvxx_clk(&drm->device); | 116 | struct nvkm_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]; |
120 | struct nouveau_pll_vals *pv = ®p->pllvals; | 120 | struct nvkm_pll_vals *pv = ®p->pllvals; |
121 | struct nvbios_pll pll_lim; | 121 | struct nvbios_pll pll_lim; |
122 | 122 | ||
123 | if (nvbios_pll_parse(bios, nv_crtc->index ? PLL_VPLL1 : PLL_VPLL0, | 123 | if (nvbios_pll_parse(bios, nv_crtc->index ? PLL_VPLL1 : PLL_VPLL0, |
diff --git a/drivers/gpu/drm/nouveau/dispnv04/dac.c b/drivers/gpu/drm/nouveau/dispnv04/dac.c index 043e07b01fd0..d7b495a5f30c 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 = nvxx_timer(device); | 69 | struct nvkm_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++) { |
@@ -80,17 +80,17 @@ static int sample_load_twice(struct drm_device *dev, bool sense[2]) | |||
80 | * use a 10ms timeout (guards against crtc being inactive, in | 80 | * use a 10ms timeout (guards against crtc being inactive, in |
81 | * which case blank state would never change) | 81 | * which case blank state would never change) |
82 | */ | 82 | */ |
83 | if (!nouveau_timer_wait_eq(ptimer, 10000000, | 83 | if (!nvkm_timer_wait_eq(ptimer, 10000000, |
84 | NV_PRMCIO_INP0__COLOR, | 84 | NV_PRMCIO_INP0__COLOR, |
85 | 0x00000001, 0x00000000)) | 85 | 0x00000001, 0x00000000)) |
86 | return -EBUSY; | 86 | return -EBUSY; |
87 | if (!nouveau_timer_wait_eq(ptimer, 10000000, | 87 | if (!nvkm_timer_wait_eq(ptimer, 10000000, |
88 | NV_PRMCIO_INP0__COLOR, | 88 | NV_PRMCIO_INP0__COLOR, |
89 | 0x00000001, 0x00000001)) | 89 | 0x00000001, 0x00000001)) |
90 | return -EBUSY; | 90 | return -EBUSY; |
91 | if (!nouveau_timer_wait_eq(ptimer, 10000000, | 91 | if (!nvkm_timer_wait_eq(ptimer, 10000000, |
92 | NV_PRMCIO_INP0__COLOR, | 92 | NV_PRMCIO_INP0__COLOR, |
93 | 0x00000001, 0x00000000)) | 93 | 0x00000001, 0x00000000)) |
94 | return -EBUSY; | 94 | return -EBUSY; |
95 | 95 | ||
96 | udelay(100); | 96 | udelay(100); |
@@ -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 = nvxx_gpio(device); | 235 | struct nvkm_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 a326f374e37c..f6ca343fd34a 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/dfp.c +++ b/drivers/gpu/drm/nouveau/dispnv04/dfp.c | |||
@@ -623,9 +623,9 @@ 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 = nvxx_i2c(&drm->device); | 626 | struct nvkm_i2c *i2c = nvxx_i2c(&drm->device); |
627 | struct nouveau_i2c_port *port = i2c->find(i2c, 2); | 627 | struct nvkm_i2c_port *port = i2c->find(i2c, 2); |
628 | struct nouveau_i2c_board_info info[] = { | 628 | struct nvkm_i2c_board_info info[] = { |
629 | { | 629 | { |
630 | { | 630 | { |
631 | .type = "sil164", | 631 | .type = "sil164", |
diff --git a/drivers/gpu/drm/nouveau/dispnv04/disp.c b/drivers/gpu/drm/nouveau/dispnv04/disp.c index 3373a15eab5d..f96237ef2a6b 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 = nvxx_i2c(&drm->device); | 38 | struct nvkm_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 fe4901cfae27..c910c5d5c662 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/disp.h +++ b/drivers/gpu/drm/nouveau/dispnv04/disp.h | |||
@@ -36,7 +36,7 @@ struct nv04_crtc_reg { | |||
36 | 36 | ||
37 | /* PRAMDAC regs */ | 37 | /* PRAMDAC regs */ |
38 | uint32_t nv10_cursync; | 38 | uint32_t nv10_cursync; |
39 | struct nouveau_pll_vals pllvals; | 39 | struct nvkm_pll_vals pllvals; |
40 | uint32_t ramdac_gen_ctrl; | 40 | uint32_t ramdac_gen_ctrl; |
41 | uint32_t ramdac_630; | 41 | uint32_t ramdac_630; |
42 | uint32_t ramdac_634; | 42 | uint32_t ramdac_634; |
@@ -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 = nvxx_bios(&drm->device); | 173 | struct nvkm_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 a930c1e71148..42e07afc4c2b 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/hw.c +++ b/drivers/gpu/drm/nouveau/dispnv04/hw.c | |||
@@ -130,7 +130,7 @@ NVBlankScreen(struct drm_device *dev, int head, bool blank) | |||
130 | 130 | ||
131 | static void | 131 | static void |
132 | nouveau_hw_decode_pll(struct drm_device *dev, uint32_t reg1, uint32_t pll1, | 132 | nouveau_hw_decode_pll(struct drm_device *dev, uint32_t reg1, uint32_t pll1, |
133 | uint32_t pll2, struct nouveau_pll_vals *pllvals) | 133 | uint32_t pll2, struct nvkm_pll_vals *pllvals) |
134 | { | 134 | { |
135 | struct nouveau_drm *drm = nouveau_drm(dev); | 135 | struct nouveau_drm *drm = nouveau_drm(dev); |
136 | 136 | ||
@@ -162,11 +162,11 @@ nouveau_hw_decode_pll(struct drm_device *dev, uint32_t reg1, uint32_t pll1, | |||
162 | 162 | ||
163 | int | 163 | int |
164 | nouveau_hw_get_pllvals(struct drm_device *dev, enum nvbios_pll_type plltype, | 164 | nouveau_hw_get_pllvals(struct drm_device *dev, enum nvbios_pll_type plltype, |
165 | struct nouveau_pll_vals *pllvals) | 165 | struct nvkm_pll_vals *pllvals) |
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 = nvxx_bios(device); | 169 | struct nvkm_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; |
@@ -202,7 +202,7 @@ nouveau_hw_get_pllvals(struct drm_device *dev, enum nvbios_pll_type plltype, | |||
202 | } | 202 | } |
203 | 203 | ||
204 | int | 204 | int |
205 | nouveau_hw_pllvals_to_clk(struct nouveau_pll_vals *pv) | 205 | nouveau_hw_pllvals_to_clk(struct nvkm_pll_vals *pv) |
206 | { | 206 | { |
207 | /* Avoid divide by zero if called at an inappropriate time */ | 207 | /* Avoid divide by zero if called at an inappropriate time */ |
208 | if (!pv->M1 || !pv->M2) | 208 | if (!pv->M1 || !pv->M2) |
@@ -214,7 +214,7 @@ nouveau_hw_pllvals_to_clk(struct nouveau_pll_vals *pv) | |||
214 | int | 214 | int |
215 | nouveau_hw_get_clock(struct drm_device *dev, enum nvbios_pll_type plltype) | 215 | nouveau_hw_get_clock(struct drm_device *dev, enum nvbios_pll_type plltype) |
216 | { | 216 | { |
217 | struct nouveau_pll_vals pllvals; | 217 | struct nvkm_pll_vals pllvals; |
218 | int ret; | 218 | int ret; |
219 | 219 | ||
220 | if (plltype == PLL_MEMORY && | 220 | if (plltype == PLL_MEMORY && |
@@ -253,10 +253,10 @@ 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 = nvxx_clk(device); | 256 | struct nvkm_clk *clk = nvxx_clk(device); |
257 | struct nouveau_bios *bios = nvxx_bios(device); | 257 | struct nvkm_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 nvkm_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; |
261 | 261 | ||
262 | if (nvbios_pll_parse(bios, pll, &pll_lim)) | 262 | if (nvbios_pll_parse(bios, pll, &pll_lim)) |
@@ -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 = nvxx_clk(&drm->device); | 466 | struct nvkm_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 = nvxx_timer(device); | 664 | struct nvkm_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; |
@@ -741,8 +741,8 @@ nv_load_state_ext(struct drm_device *dev, int head, | |||
741 | if (drm->device.info.family < NV_DEVICE_INFO_V0_KELVIN) { | 741 | if (drm->device.info.family < NV_DEVICE_INFO_V0_KELVIN) { |
742 | /* Not waiting for vertical retrace before modifying | 742 | /* Not waiting for vertical retrace before modifying |
743 | CRE_53/CRE_54 causes lockups. */ | 743 | CRE_53/CRE_54 causes lockups. */ |
744 | nouveau_timer_wait_eq(ptimer, 650000000, NV_PRMCIO_INP0__COLOR, 0x8, 0x8); | 744 | nvkm_timer_wait_eq(ptimer, 650000000, NV_PRMCIO_INP0__COLOR, 0x8, 0x8); |
745 | nouveau_timer_wait_eq(ptimer, 650000000, NV_PRMCIO_INP0__COLOR, 0x8, 0x0); | 745 | nvkm_timer_wait_eq(ptimer, 650000000, NV_PRMCIO_INP0__COLOR, 0x8, 0x0); |
746 | } | 746 | } |
747 | 747 | ||
748 | wr_cio_state(dev, head, regp, NV_CIO_CRE_42); | 748 | wr_cio_state(dev, head, regp, NV_CIO_CRE_42); |
diff --git a/drivers/gpu/drm/nouveau/dispnv04/hw.h b/drivers/gpu/drm/nouveau/dispnv04/hw.h index 7f53c571f31f..6c796178bf0c 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/hw.h +++ b/drivers/gpu/drm/nouveau/dispnv04/hw.h | |||
@@ -42,8 +42,8 @@ uint8_t NVReadVgaGr(struct drm_device *, int head, uint8_t index); | |||
42 | void NVSetOwner(struct drm_device *, int owner); | 42 | void NVSetOwner(struct drm_device *, int owner); |
43 | void NVBlankScreen(struct drm_device *, int head, bool blank); | 43 | void NVBlankScreen(struct drm_device *, int head, bool blank); |
44 | int nouveau_hw_get_pllvals(struct drm_device *, enum nvbios_pll_type plltype, | 44 | int nouveau_hw_get_pllvals(struct drm_device *, enum nvbios_pll_type plltype, |
45 | struct nouveau_pll_vals *pllvals); | 45 | struct nvkm_pll_vals *pllvals); |
46 | int nouveau_hw_pllvals_to_clk(struct nouveau_pll_vals *pllvals); | 46 | int nouveau_hw_pllvals_to_clk(struct nvkm_pll_vals *pllvals); |
47 | int nouveau_hw_get_clock(struct drm_device *, enum nvbios_pll_type plltype); | 47 | int nouveau_hw_get_clock(struct drm_device *, enum nvbios_pll_type plltype); |
48 | void nouveau_hw_save_vga_fonts(struct drm_device *, bool save); | 48 | void nouveau_hw_save_vga_fonts(struct drm_device *, bool save); |
49 | void nouveau_hw_save_state(struct drm_device *, int head, | 49 | void nouveau_hw_save_state(struct drm_device *, int head, |
diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c index 38a8196d1e92..d9664b37def1 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c +++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | #include <drm/i2c/ch7006.h> | 36 | #include <drm/i2c/ch7006.h> |
37 | 37 | ||
38 | static struct nouveau_i2c_board_info nv04_tv_encoder_info[] = { | 38 | static struct nvkm_i2c_board_info nv04_tv_encoder_info[] = { |
39 | { | 39 | { |
40 | { | 40 | { |
41 | I2C_BOARD_INFO("ch7006", 0x75), | 41 | I2C_BOARD_INFO("ch7006", 0x75), |
@@ -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 = nvxx_i2c(&drm->device); | 57 | struct nvkm_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,8 +204,8 @@ 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 = nvxx_i2c(&drm->device); | 207 | struct nvkm_i2c *i2c = nvxx_i2c(&drm->device); |
208 | struct nouveau_i2c_port *port = i2c->find(i2c, entry->i2c_index); | 208 | struct nvkm_i2c_port *port = i2c->find(i2c, entry->i2c_index); |
209 | int type, ret; | 209 | int type, ret; |
210 | 210 | ||
211 | /* Ensure that we can talk to this encoder */ | 211 | /* Ensure that we can talk to this encoder */ |
diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c index b86e36b4077d..731d74efc1e5 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 = nvxx_gpio(&drm->device); | 49 | struct nvkm_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; |
@@ -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 = nvxx_gpio(&drm->device); | 373 | struct nvkm_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 97694738abcf..eca648ef0f7a 100644 --- a/drivers/gpu/drm/nouveau/include/nvif/client.h +++ b/drivers/gpu/drm/nouveau/include/nvif/client.h | |||
@@ -33,7 +33,7 @@ int nvif_client_resume(struct nvif_client *); | |||
33 | #include <core/client.h> | 33 | #include <core/client.h> |
34 | #define nvxx_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 | nvkm_client(_client->base.priv); \ |
37 | }) | 37 | }) |
38 | 38 | ||
39 | #endif | 39 | #endif |
diff --git a/drivers/gpu/drm/nouveau/include/nvif/device.h b/drivers/gpu/drm/nouveau/include/nvif/device.h index 1fafcac299d3..88553a741ab7 100644 --- a/drivers/gpu/drm/nouveau/include/nvif/device.h +++ b/drivers/gpu/drm/nouveau/include/nvif/device.h | |||
@@ -38,24 +38,24 @@ void nvif_device_ref(struct nvif_device *, struct nvif_device **); | |||
38 | #include <subdev/therm.h> | 38 | #include <subdev/therm.h> |
39 | 39 | ||
40 | #define nvxx_device(a) nv_device(nvxx_object((a))) | 40 | #define nvxx_device(a) nv_device(nvxx_object((a))) |
41 | #define nvxx_bios(a) nouveau_bios(nvxx_device(a)) | 41 | #define nvxx_bios(a) nvkm_bios(nvxx_device(a)) |
42 | #define nvxx_fb(a) nouveau_fb(nvxx_device(a)) | 42 | #define nvxx_fb(a) nvkm_fb(nvxx_device(a)) |
43 | #define nvxx_mmu(a) nouveau_mmu(nvxx_device(a)) | 43 | #define nvxx_mmu(a) nvkm_mmu(nvxx_device(a)) |
44 | #define nvxx_bar(a) nouveau_bar(nvxx_device(a)) | 44 | #define nvxx_bar(a) nvkm_bar(nvxx_device(a)) |
45 | #define nvxx_gpio(a) nouveau_gpio(nvxx_device(a)) | 45 | #define nvxx_gpio(a) nvkm_gpio(nvxx_device(a)) |
46 | #define nvxx_clk(a) nouveau_clk(nvxx_device(a)) | 46 | #define nvxx_clk(a) nvkm_clk(nvxx_device(a)) |
47 | #define nvxx_i2c(a) nouveau_i2c(nvxx_device(a)) | 47 | #define nvxx_i2c(a) nvkm_i2c(nvxx_device(a)) |
48 | #define nvxx_timer(a) nouveau_timer(nvxx_device(a)) | 48 | #define nvxx_timer(a) nvkm_timer(nvxx_device(a)) |
49 | #define nvxx_wait(a,b,c,d) nv_wait(nvxx_timer(a), (b), (c), (d)) | 49 | #define nvxx_wait(a,b,c,d) nv_wait(nvxx_timer(a), (b), (c), (d)) |
50 | #define nvxx_wait_cb(a,b,c) nv_wait_cb(nvxx_timer(a), (b), (c)) | 50 | #define nvxx_wait_cb(a,b,c) nv_wait_cb(nvxx_timer(a), (b), (c)) |
51 | #define nvxx_therm(a) nouveau_therm(nvxx_device(a)) | 51 | #define nvxx_therm(a) nvkm_therm(nvxx_device(a)) |
52 | 52 | ||
53 | #include <core/device.h> | 53 | #include <core/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 nvxx_fifo(a) nouveau_fifo(nvxx_device(a)) | 58 | #define nvxx_fifo(a) nvkm_fifo(nvxx_device(a)) |
59 | #define nvxx_fifo_chan(a) ((struct nouveau_fifo_chan *)nvxx_object(a)) | 59 | #define nvxx_fifo_chan(a) ((struct nvkm_fifo_chan *)nvxx_object(a)) |
60 | #define nvxx_gr(a) ((struct nouveau_gr *)nouveau_engine(nvxx_object(a), NVDEV_ENGINE_GR)) | 60 | #define nvxx_gr(a) ((struct nvkm_gr *)nvkm_engine(nvxx_object(a), NVDEV_ENGINE_GR)) |
61 | #endif | 61 | #endif |
diff --git a/drivers/gpu/drm/nouveau/include/nvif/object.h b/drivers/gpu/drm/nouveau/include/nvif/object.h index d47f5693cb5b..04c874707b96 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 nvxx_object(a) ((struct nouveau_object *)nvif_object(a)->priv) | 73 | #define nvxx_object(a) ((struct nvkm_object *)nvif_object(a)->priv) |
74 | 74 | ||
75 | #endif | 75 | #endif |
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/os.h b/drivers/gpu/drm/nouveau/include/nvkm/core/os.h index 537db3a512c8..cd57e238ddd3 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/os.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/os.h | |||
@@ -1,259 +1,4 @@ | |||
1 | #ifndef __NVKM_OS_H__ | 1 | #ifndef __NVKM_OS_H__ |
2 | #define __NVKM_OS_H__ | 2 | #define __NVKM_OS_H__ |
3 | #include <nvif/os.h> | 3 | #include <nvif/os.h> |
4 | |||
5 | #define nouveau_client nvkm_client | ||
6 | #define nouveau_client_name nvkm_client_name | ||
7 | #define nouveau_client_create nvkm_client_create | ||
8 | #define nouveau_client_init nvkm_client_init | ||
9 | #define nouveau_client_fini nvkm_client_fini | ||
10 | #define nouveau_engctx nvkm_engctx | ||
11 | #define nouveau_engctx_create nvkm_engctx_create | ||
12 | #define nouveau_engctx_create_ nvkm_engctx_create_ | ||
13 | #define nouveau_engctx_destroy nvkm_engctx_destroy | ||
14 | #define nouveau_engctx_init nvkm_engctx_init | ||
15 | #define nouveau_engctx_fini nvkm_engctx_fini | ||
16 | #define _nouveau_engctx_ctor _nvkm_engctx_ctor | ||
17 | #define _nouveau_engctx_dtor _nvkm_engctx_dtor | ||
18 | #define _nouveau_engctx_init _nvkm_engctx_init | ||
19 | #define _nouveau_engctx_fini _nvkm_engctx_fini | ||
20 | #define _nouveau_engctx_rd32 _nvkm_engctx_rd32 | ||
21 | #define _nouveau_engctx_wr32 _nvkm_engctx_wr32 | ||
22 | #define nouveau_engctx_get nvkm_engctx_get | ||
23 | #define nouveau_engctx_put nvkm_engctx_put | ||
24 | #define nouveau_engine nvkm_engine | ||
25 | #define nouveau_engine_create nvkm_engine_create | ||
26 | #define nouveau_engine_create_ nvkm_engine_create_ | ||
27 | #define nouveau_engine_destroy nvkm_engine_destroy | ||
28 | #define nouveau_engine_init nvkm_engine_init | ||
29 | #define nouveau_engine_fini nvkm_engine_fini | ||
30 | #define _nouveau_engine_ctor _nvkm_engine_ctor | ||
31 | #define _nouveau_engine_dtor _nvkm_engine_dtor | ||
32 | #define _nouveau_engine_init _nvkm_engine_init | ||
33 | #define _nouveau_engine_fini _nvkm_engine_fini | ||
34 | #define nouveau_enum nvkm_enum | ||
35 | #define nouveau_gpuobj nvkm_gpuobj | ||
36 | #define nouveau_gpuobj_create nvkm_gpuobj_create | ||
37 | #define nouveau_gpuobj_destroy nvkm_gpuobj_destroy | ||
38 | #define _nouveau_gpuobj_ctor _nvkm_gpuobj_ctor | ||
39 | #define _nouveau_gpuobj_dtor _nvkm_gpuobj_dtor | ||
40 | #define _nouveau_gpuobj_init _nvkm_gpuobj_init | ||
41 | #define _nouveau_gpuobj_fini _nvkm_gpuobj_fini | ||
42 | #define _nouveau_gpuobj_rd32 _nvkm_gpuobj_rd32 | ||
43 | #define _nouveau_gpuobj_wr32 _nvkm_gpuobj_wr32 | ||
44 | #define nouveau_gpuobj_new nvkm_gpuobj_new | ||
45 | #define nouveau_gpuobj_dup nvkm_gpuobj_dup | ||
46 | #define nouveau_gpuobj_ref nvkm_gpuobj_ref | ||
47 | #define nouveau_gpuobj_map nvkm_gpuobj_map | ||
48 | #define nouveau_gpuobj_map_vm nvkm_gpuobj_map_vm | ||
49 | #define nouveau_gpuobj_unmap nvkm_gpuobj_unmap | ||
50 | #define nouveau_handle nvkm_handle | ||
51 | #define nouveau_handle_ref nvkm_handle_ref | ||
52 | #define nouveau_handle_put nvkm_handle_put | ||
53 | #define nouveau_handle_get_class nvkm_handle_get_class | ||
54 | #define nouveau_handle_get_vinst nvkm_handle_get_vinst | ||
55 | #define nouveau_handle_get_cinst nvkm_handle_get_cinst | ||
56 | #define nouveau_mm nvkm_mm | ||
57 | #define nouveau_mm_node nvkm_mm_node | ||
58 | #define nouveau_mm_init nvkm_mm_init | ||
59 | #define nouveau_mm_fini nvkm_mm_fini | ||
60 | #define nouveau_mm_head nvkm_mm_head | ||
61 | #define nouveau_mm_tail nvkm_mm_tail | ||
62 | #define nouveau_mm_free nvkm_mm_free | ||
63 | #define nouveau_mm_initialised nvkm_mm_initialised | ||
64 | #define nouveau_namedb nvkm_namedb | ||
65 | #define nouveau_namedb_create nvkm_namedb_create | ||
66 | #define nouveau_namedb_create_ nvkm_namedb_create_ | ||
67 | #define nouveau_namedb_destroy nvkm_namedb_destroy | ||
68 | #define nouveau_namedb_init nvkm_namedb_init | ||
69 | #define nouveau_namedb_fini nvkm_namedb_fini | ||
70 | #define _nouveau_namedb_ctor _nvkm_namedb_ctor | ||
71 | #define _nouveau_namedb_dtor _nvkm_namedb_dtor | ||
72 | #define _nouveau_namedb_init _nvkm_namedb_init | ||
73 | #define _nouveau_namedb_fini _nvkm_namedb_fini | ||
74 | #define nouveau_namedb_ref nvkm_namedb_ref | ||
75 | #define nouveau_namedb_put nvkm_namedb_put | ||
76 | #define nouveau_namedb_get nvkm_namedb_get | ||
77 | #define nouveau_namedb_get_class nvkm_namedb_get_class | ||
78 | #define nouveau_namedb_get_vinst nvkm_namedb_get_vinst | ||
79 | #define nouveau_namedb_get_cinst nvkm_namedb_get_cinst | ||
80 | #define nouveau_object_debug nvkm_object_debug | ||
81 | #define nouveau_object nvkm_object | ||
82 | #define nouveau_object_create nvkm_object_create | ||
83 | #define nouveau_object_create_ nvkm_object_create_ | ||
84 | #define nouveau_object_destroy nvkm_object_destroy | ||
85 | #define nouveau_object_init nvkm_object_init | ||
86 | #define nouveau_object_fini nvkm_object_fini | ||
87 | #define _nouveau_object_ctor _nvkm_object_ctor | ||
88 | #define nouveau_object_ctor nvkm_object_ctor | ||
89 | #define nouveau_object_ref nvkm_object_ref | ||
90 | #define nouveau_object_ofuncs nvkm_object_ofuncs | ||
91 | #define nouveau_object_inc nvkm_object_inc | ||
92 | #define nouveau_object_dec nvkm_object_dec | ||
93 | #define nouveau_ofuncs nvkm_ofuncs | ||
94 | #define nouveau_oclass nvkm_oclass | ||
95 | #define nouveau_omthds nvkm_omthds | ||
96 | #define nouveau_parent nvkm_parent | ||
97 | #define nouveau_parent_create nvkm_parent_create | ||
98 | #define nouveau_parent_create_ nvkm_parent_create_ | ||
99 | #define nouveau_parent_destroy nvkm_parent_destroy | ||
100 | #define nouveau_parent_init nvkm_parent_init | ||
101 | #define nouveau_parent_fini nvkm_parent_fini | ||
102 | #define _nouveau_parent_ctor _nvkm_parent_ctor | ||
103 | #define _nouveau_parent_dtor _nvkm_parent_dtor | ||
104 | #define _nouveau_parent_init _nvkm_parent_init | ||
105 | #define _nouveau_parent_fini _nvkm_parent_fini | ||
106 | #define nouveau_printk nvkm_printk | ||
107 | #define nouveau_ramht nvkm_ramht | ||
108 | #define nouveau_ramht_new nvkm_ramht_new | ||
109 | #define nouveau_ramht_ref nvkm_ramht_ref | ||
110 | #define nouveau_ramht_insert nvkm_ramht_insert | ||
111 | #define nouveau_ramht_remove nvkm_ramht_remove | ||
112 | #define nouveau_subdev nvkm_subdev | ||
113 | #define nouveau_subdev_create nvkm_subdev_create | ||
114 | #define nouveau_subdev_create_ nvkm_subdev_create_ | ||
115 | #define nouveau_subdev_destroy nvkm_subdev_destroy | ||
116 | #define nouveau_subdev_init nvkm_subdev_init | ||
117 | #define nouveau_subdev_fini nvkm_subdev_fini | ||
118 | #define _nouveau_subdev_ctor _nvkm_subdev_ctor | ||
119 | #define _nouveau_subdev_dtor _nvkm_subdev_dtor | ||
120 | #define _nouveau_subdev_init _nvkm_subdev_init | ||
121 | #define _nouveau_subdev_fini _nvkm_subdev_fini | ||
122 | #define nouveau_subdev_reset nvkm_subdev_reset | ||
123 | #define nouveau_bitfield nvkm_bitfield | ||
124 | #define nouveau_bitfield_print nvkm_bitfield_print | ||
125 | #define nouveau_enum nvkm_enum | ||
126 | #define nouveau_enum_find nvkm_enum_find | ||
127 | #define nouveau_enum_print nvkm_enum_print | ||
128 | #define nouveau_stropt nvkm_stropt | ||
129 | #define nouveau_boolopt nvkm_boolopt | ||
130 | #define nouveau_dbgopt nvkm_dbgopt | ||
131 | #define nouveau_device nvkm_device | ||
132 | #define nouveau_device_find nvkm_device_find | ||
133 | #define nouveau_device_list nvkm_device_list | ||
134 | #define nouveau_vma nvkm_vma | ||
135 | #define nouveau_vm nvkm_vm | ||
136 | #define nouveau_vm_get nvkm_vm_get | ||
137 | #define nouveau_vm_put nvkm_vm_put | ||
138 | #define nouveau_vm_map nvkm_vm_map | ||
139 | #define nouveau_vm_unmap nvkm_vm_unmap | ||
140 | #define nouveau_vm_new nvkm_vm_new | ||
141 | #define nouveau_vm_ref nvkm_vm_ref | ||
142 | #define nouveau_instmem nvkm_instmem | ||
143 | #define nouveau_instobj nvkm_instobj | ||
144 | #define nouveau_mem nvkm_mem | ||
145 | #define nouveau_bar nvkm_bar | ||
146 | #define nouveau_falcon nvkm_falcon | ||
147 | #define nouveau_falcon_create nvkm_falcon_create | ||
148 | #define nouveau_falcon_create_ nvkm_falcon_create_ | ||
149 | #define nouveau_falcon_destroy nvkm_falcon_destroy | ||
150 | #define nouveau_falcon_init nvkm_falcon_init | ||
151 | #define nouveau_falcon_fini nvkm_falcon_fini | ||
152 | #define _nouveau_falcon_ctor _nvkm_falcon_ctor | ||
153 | #define _nouveau_falcon_dtor _nvkm_falcon_dtor | ||
154 | #define _nouveau_falcon_init _nvkm_falcon_init | ||
155 | #define _nouveau_falcon_fini _nvkm_falcon_fini | ||
156 | #define _nouveau_falcon_rd32 _nvkm_falcon_rd32 | ||
157 | #define _nouveau_falcon_wr32 _nvkm_falcon_wr32 | ||
158 | #define nouveau_falcon_context nvkm_falcon_context | ||
159 | #define nouveau_falcon_context_create nvkm_falcon_context_create | ||
160 | #define nouveau_falcon_context_create_ nvkm_falcon_context_create_ | ||
161 | #define nouveau_falcon_context_destroy nvkm_falcon_context_destroy | ||
162 | #define nouveau_falcon_context_init nvkm_falcon_context_init | ||
163 | #define nouveau_falcon_context_fini nvkm_falcon_context_fini | ||
164 | #define _nouveau_falcon_context_ctor _nvkm_falcon_context_ctor | ||
165 | #define _nouveau_falcon_context_dtor _nvkm_falcon_context_dtor | ||
166 | #define _nouveau_falcon_context_init _nvkm_falcon_context_init | ||
167 | #define _nouveau_falcon_context_fini _nvkm_falcon_context_fini | ||
168 | #define _nouveau_falcon_context_rd32 _nvkm_falcon_context_rd32 | ||
169 | #define _nouveau_falcon_context_wr32 _nvkm_falcon_context_wr32 | ||
170 | #define nouveau_falcon_intr nvkm_falcon_intr | ||
171 | #define nouveau_xtensa nvkm_xtensa | ||
172 | #define nouveau_xtensa_create nvkm_xtensa_create | ||
173 | #define nouveau_xtensa_create_ nvkm_xtensa_create_ | ||
174 | #define nouveau_xtensa_destroy nvkm_xtensa_destroy | ||
175 | #define nouveau_xtensa_init nvkm_xtensa_init | ||
176 | #define nouveau_xtensa_fini nvkm_xtensa_fini | ||
177 | #define _nouveau_xtensa_ctor _nvkm_xtensa_ctor | ||
178 | #define _nouveau_xtensa_dtor _nvkm_xtensa_dtor | ||
179 | #define _nouveau_xtensa_init _nvkm_xtensa_init | ||
180 | #define _nouveau_xtensa_fini _nvkm_xtensa_fini | ||
181 | #define _nouveau_xtensa_rd32 _nvkm_xtensa_rd32 | ||
182 | #define _nouveau_xtensa_wr32 _nvkm_xtensa_wr32 | ||
183 | #define nouveau_xtensa_context nvkm_xtensa_context | ||
184 | #define nouveau_xtensa_context_create nvkm_xtensa_context_create | ||
185 | #define nouveau_xtensa_context_create_ nvkm_xtensa_context_create_ | ||
186 | #define nouveau_xtensa_context_destroy nvkm_xtensa_context_destroy | ||
187 | #define nouveau_xtensa_context_init nvkm_xtensa_context_init | ||
188 | #define nouveau_xtensa_context_fini nvkm_xtensa_context_fini | ||
189 | #define _nouveau_xtensa_engctx_ctor _nvkm_xtensa_engctx_ctor | ||
190 | #define _nouveau_xtensa_context_dtor _nvkm_xtensa_context_dtor | ||
191 | #define _nouveau_xtensa_context_init _nvkm_xtensa_context_init | ||
192 | #define _nouveau_xtensa_context_fini _nvkm_xtensa_context_fini | ||
193 | #define _nouveau_xtensa_context_rd32 _nvkm_xtensa_context_rd32 | ||
194 | #define _nouveau_xtensa_context_wr32 _nvkm_xtensa_context_wr32 | ||
195 | #define nouveau_xtensa_intr nvkm_xtensa_intr | ||
196 | #define nouveau_gpio nvkm_gpio | ||
197 | #define nouveau_i2c nvkm_i2c | ||
198 | #define nouveau_i2c_port nvkm_i2c_port | ||
199 | #define nouveau_i2c_board_info nvkm_i2c_board_info | ||
200 | #define nouveau_devinit nvkm_devinit | ||
201 | #define nouveau_bios nvkm_bios | ||
202 | #define nouveau_bios_oclass nvkm_bios_oclass | ||
203 | #define nouveau_pll_vals nvkm_pll_vals | ||
204 | #define nouveau_therm_trip_point nvkm_therm_trip_point | ||
205 | #define nouveau_fb nvkm_fb | ||
206 | #define nouveau_fifo nvkm_fifo | ||
207 | #define nouveau_therm nvkm_therm | ||
208 | #define nouveau_therm_cstate nvkm_therm_cstate | ||
209 | #define nouveau_volt nvkm_volt | ||
210 | #define nouveau_timer nvkm_timer | ||
211 | #define nouveau_timer_wait_eq nvkm_timer_wait_eq | ||
212 | #define nouveau_timer_alarm nvkm_timer_alarm | ||
213 | #define nouveau_alarm nvkm_alarm | ||
214 | #define nouveau_timer_alarm_cancel nvkm_timer_alarm_cancel | ||
215 | #define nouveau_alarm_init nvkm_alarm_init | ||
216 | #define nva3_pll_calc gt215_pll_calc | ||
217 | #define nouveau_clk nvkm_clk | ||
218 | #define nouveau_domain nvkm_domain | ||
219 | #define nouveau_cstate nvkm_cstate | ||
220 | #define nouveau_pstate nvkm_pstate | ||
221 | #define nouveau_clk_astate nvkm_clk_astate | ||
222 | #define nouveau_clk_ustate nvkm_clk_ustate | ||
223 | #define nva3_clk_pre gt215_clk_pre | ||
224 | #define nva3_clk_post gt215_clk_post | ||
225 | #define nva3_clk_info gt215_clk_info | ||
226 | #define nva3_pll_info gt215_pll_info | ||
227 | #define nouveau_ibus nvkm_ibus | ||
228 | #define nouveau_memx nvkm_memx | ||
229 | #define nouveau_memx_block nvkm_memx_block | ||
230 | #define nouveau_memx_unblock nvkm_memx_unblock | ||
231 | #define nouveau_memx_train nvkm_memx_train | ||
232 | #define nouveau_memx_train_result nvkm_memx_train_result | ||
233 | #define nouveau_memx_wait_vblank nvkm_memx_wait_vblank | ||
234 | #define nouveau_memx_rd32 nvkm_memx_rd32 | ||
235 | #define nouveau_memx_wr32 nvkm_memx_wr32 | ||
236 | #define nouveau_memx_wait nvkm_memx_wait | ||
237 | #define nouveau_memx_init nvkm_memx_init | ||
238 | #define nouveau_memx_fini nvkm_memx_fini | ||
239 | #define nouveau_memx_nsec nvkm_memx_nsec | ||
240 | #define nouveau_ltc nvkm_ltc | ||
241 | #define nouveau_pmu nvkm_pmu | ||
242 | #define nouveau_fb nvkm_fb | ||
243 | #define nouveau_fb_tile nvkm_fb_tile | ||
244 | #define nvc0_pte_storage_type_map gf100_pte_storage_type_map | ||
245 | #define nouveau_fuse nvkm_fuse | ||
246 | #define nouveau_mc nvkm_mc | ||
247 | #define nouveau_mmu nvkm_mmu | ||
248 | #define nouveau_dmaeng nvkm_dmaeng | ||
249 | #define nouveau_dmaobj nvkm_dmaobj | ||
250 | #define nouveau_disp nvkm_disp | ||
251 | #define nouveau_fifo_chan nvkm_fifo_chan | ||
252 | #define nouveau_fifo nvkm_fifo | ||
253 | #define nouveau_gr nvkm_gr | ||
254 | #define nouveau_sw nvkm_sw | ||
255 | #define nouveau_sw_chan nvkm_sw_chan | ||
256 | #define nouveau_device_create nvkm_device_create | ||
257 | #define nouveau_device_create_ nvkm_device_create_ | ||
258 | |||
259 | #endif | 4 | #endif |
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/mxm.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/mxm.h index 94b8af23c33e..fba613477b1a 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/mxm.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/mxm.h | |||
@@ -1,37 +1,34 @@ | |||
1 | #ifndef __NOUVEAU_MXM_H__ | 1 | #ifndef __NVKM_MXM_H__ |
2 | #define __NOUVEAU_MXM_H__ | 2 | #define __NVKM_MXM_H__ |
3 | |||
4 | #include <core/subdev.h> | 3 | #include <core/subdev.h> |
5 | #include <core/device.h> | ||
6 | 4 | ||
7 | #define MXM_SANITISE_DCB 0x00000001 | 5 | #define MXM_SANITISE_DCB 0x00000001 |
8 | 6 | ||
9 | struct nouveau_mxm { | 7 | struct nvkm_mxm { |
10 | struct nouveau_subdev base; | 8 | struct nvkm_subdev base; |
11 | u32 action; | 9 | u32 action; |
12 | u8 *mxms; | 10 | u8 *mxms; |
13 | }; | 11 | }; |
14 | 12 | ||
15 | static inline struct nouveau_mxm * | 13 | static inline struct nvkm_mxm * |
16 | nouveau_mxm(void *obj) | 14 | nvkm_mxm(void *obj) |
17 | { | 15 | { |
18 | return (void *)nouveau_subdev(obj, NVDEV_SUBDEV_MXM); | 16 | return (void *)nvkm_subdev(obj, NVDEV_SUBDEV_MXM); |
19 | } | 17 | } |
20 | 18 | ||
21 | #define nouveau_mxm_create(p,e,o,d) \ | 19 | #define nvkm_mxm_create(p,e,o,d) \ |
22 | nouveau_mxm_create_((p), (e), (o), sizeof(**d), (void **)d) | 20 | nvkm_mxm_create_((p), (e), (o), sizeof(**d), (void **)d) |
23 | #define nouveau_mxm_init(p) \ | 21 | #define nvkm_mxm_init(p) \ |
24 | nouveau_subdev_init(&(p)->base) | 22 | nvkm_subdev_init(&(p)->base) |
25 | #define nouveau_mxm_fini(p,s) \ | 23 | #define nvkm_mxm_fini(p,s) \ |
26 | nouveau_subdev_fini(&(p)->base, (s)) | 24 | nvkm_subdev_fini(&(p)->base, (s)) |
27 | int nouveau_mxm_create_(struct nouveau_object *, struct nouveau_object *, | 25 | int nvkm_mxm_create_(struct nvkm_object *, struct nvkm_object *, |
28 | struct nouveau_oclass *, int, void **); | 26 | struct nvkm_oclass *, int, void **); |
29 | void nouveau_mxm_destroy(struct nouveau_mxm *); | 27 | void nvkm_mxm_destroy(struct nvkm_mxm *); |
30 | 28 | ||
31 | #define _nouveau_mxm_dtor _nouveau_subdev_dtor | 29 | #define _nvkm_mxm_dtor _nvkm_subdev_dtor |
32 | #define _nouveau_mxm_init _nouveau_subdev_init | 30 | #define _nvkm_mxm_init _nvkm_subdev_init |
33 | #define _nouveau_mxm_fini _nouveau_subdev_fini | 31 | #define _nvkm_mxm_fini _nvkm_subdev_fini |
34 | 32 | ||
35 | extern struct nouveau_oclass nv50_mxm_oclass; | 33 | extern struct nvkm_oclass nv50_mxm_oclass; |
36 | |||
37 | #endif | 34 | #endif |
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index 9322b515d305..d8b0891a141c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c | |||
@@ -100,7 +100,7 @@ static void | |||
100 | nouveau_abi16_ntfy_fini(struct nouveau_abi16_chan *chan, | 100 | nouveau_abi16_ntfy_fini(struct nouveau_abi16_chan *chan, |
101 | struct nouveau_abi16_ntfy *ntfy) | 101 | struct nouveau_abi16_ntfy *ntfy) |
102 | { | 102 | { |
103 | nouveau_mm_free(&chan->heap, &ntfy->node); | 103 | nvkm_mm_free(&chan->heap, &ntfy->node); |
104 | list_del(&ntfy->head); | 104 | list_del(&ntfy->head); |
105 | kfree(ntfy); | 105 | kfree(ntfy); |
106 | } | 106 | } |
@@ -128,7 +128,7 @@ nouveau_abi16_chan_fini(struct nouveau_abi16 *abi16, | |||
128 | } | 128 | } |
129 | 129 | ||
130 | if (chan->heap.block_size) | 130 | if (chan->heap.block_size) |
131 | nouveau_mm_fini(&chan->heap); | 131 | nvkm_mm_fini(&chan->heap); |
132 | 132 | ||
133 | /* destroy channel object, all children will be killed too */ | 133 | /* destroy channel object, all children will be killed too */ |
134 | if (chan->chan) { | 134 | if (chan->chan) { |
@@ -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 = nvxx_timer(device); | 167 | struct nvkm_timer *ptimer = nvxx_timer(device); |
168 | struct nouveau_gr *gr = nvxx_gr(device); | 168 | struct nvkm_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) { |
@@ -324,7 +324,7 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS) | |||
324 | if (ret) | 324 | if (ret) |
325 | goto done; | 325 | goto done; |
326 | 326 | ||
327 | ret = nouveau_mm_init(&chan->heap, 0, PAGE_SIZE, 1); | 327 | ret = nvkm_mm_init(&chan->heap, 0, PAGE_SIZE, 1); |
328 | done: | 328 | done: |
329 | if (ret) | 329 | if (ret) |
330 | nouveau_abi16_chan_fini(abi16, chan); | 330 | nouveau_abi16_chan_fini(abi16, chan); |
@@ -448,8 +448,8 @@ nouveau_abi16_ioctl_notifierobj_alloc(ABI16_IOCTL_ARGS) | |||
448 | list_add(&ntfy->head, &chan->notifiers); | 448 | list_add(&ntfy->head, &chan->notifiers); |
449 | ntfy->handle = info->handle; | 449 | ntfy->handle = info->handle; |
450 | 450 | ||
451 | ret = nouveau_mm_head(&chan->heap, 0, 1, info->size, info->size, 1, | 451 | ret = nvkm_mm_head(&chan->heap, 0, 1, info->size, info->size, 1, |
452 | &ntfy->node); | 452 | &ntfy->node); |
453 | if (ret) | 453 | if (ret) |
454 | goto done; | 454 | goto done; |
455 | 455 | ||
@@ -527,7 +527,7 @@ nouveau_abi16_ioctl_gpuobj_free(ABI16_IOCTL_ARGS) | |||
527 | /* cleanup extra state if this object was a notifier */ | 527 | /* cleanup extra state if this object was a notifier */ |
528 | list_for_each_entry(ntfy, &chan->notifiers, head) { | 528 | list_for_each_entry(ntfy, &chan->notifiers, head) { |
529 | if (ntfy->handle == fini->handle) { | 529 | if (ntfy->handle == fini->handle) { |
530 | nouveau_mm_free(&chan->heap, &ntfy->node); | 530 | nvkm_mm_free(&chan->heap, &ntfy->node); |
531 | list_del(&ntfy->head); | 531 | list_del(&ntfy->head); |
532 | break; | 532 | break; |
533 | } | 533 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.h b/drivers/gpu/drm/nouveau/nouveau_abi16.h index 39844e6bfbff..86eb1caf4957 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.h +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.h | |||
@@ -14,7 +14,7 @@ int nouveau_abi16_ioctl_gpuobj_free(ABI16_IOCTL_ARGS); | |||
14 | 14 | ||
15 | struct nouveau_abi16_ntfy { | 15 | struct nouveau_abi16_ntfy { |
16 | struct list_head head; | 16 | struct list_head head; |
17 | struct nouveau_mm_node *node; | 17 | struct nvkm_mm_node *node; |
18 | u32 handle; | 18 | u32 handle; |
19 | }; | 19 | }; |
20 | 20 | ||
@@ -23,8 +23,8 @@ struct nouveau_abi16_chan { | |||
23 | struct nouveau_channel *chan; | 23 | struct nouveau_channel *chan; |
24 | struct list_head notifiers; | 24 | struct list_head notifiers; |
25 | struct nouveau_bo *ntfy; | 25 | struct nouveau_bo *ntfy; |
26 | struct nouveau_vma ntfy_vma; | 26 | struct nvkm_vma ntfy_vma; |
27 | struct nouveau_mm heap; | 27 | struct nvkm_mm heap; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | struct nouveau_abi16 { | 30 | struct nouveau_abi16 { |
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 8058b68b0e3b..0190b69bbe25 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 = nvxx_bios(&drm->device); | 2012 | struct nvkm_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 902d93fd72cc..77326e344dad 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -48,9 +48,9 @@ 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 = nvxx_fb(&drm->device); | 51 | struct nvkm_fb *pfb = nvxx_fb(&drm->device); |
52 | struct nouveau_fb_tile *tile = &pfb->tile.region[i]; | 52 | struct nvkm_fb_tile *tile = &pfb->tile.region[i]; |
53 | struct nouveau_engine *engine; | 53 | struct nvkm_engine *engine; |
54 | 54 | ||
55 | nouveau_fence_unref(®->fence); | 55 | nouveau_fence_unref(®->fence); |
56 | 56 | ||
@@ -62,9 +62,9 @@ nv10_bo_update_tile_region(struct drm_device *dev, struct nouveau_drm_tile *reg, | |||
62 | 62 | ||
63 | pfb->tile.prog(pfb, i, tile); | 63 | pfb->tile.prog(pfb, i, tile); |
64 | 64 | ||
65 | if ((engine = nouveau_engine(pfb, NVDEV_ENGINE_GR))) | 65 | if ((engine = nvkm_engine(pfb, NVDEV_ENGINE_GR))) |
66 | engine->tile_prog(engine, i); | 66 | engine->tile_prog(engine, i); |
67 | if ((engine = nouveau_engine(pfb, NVDEV_ENGINE_MPEG))) | 67 | if ((engine = nvkm_engine(pfb, NVDEV_ENGINE_MPEG))) |
68 | engine->tile_prog(engine, i); | 68 | engine->tile_prog(engine, i); |
69 | } | 69 | } |
70 | 70 | ||
@@ -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 = nvxx_fb(&drm->device); | 108 | struct nvkm_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 | ||
@@ -325,7 +325,7 @@ nouveau_bo_pin(struct nouveau_bo *nvbo, uint32_t memtype, bool contig) | |||
325 | memtype == TTM_PL_FLAG_VRAM && contig) { | 325 | memtype == TTM_PL_FLAG_VRAM && contig) { |
326 | if (nvbo->tile_flags & NOUVEAU_GEM_TILE_NONCONTIG) { | 326 | if (nvbo->tile_flags & NOUVEAU_GEM_TILE_NONCONTIG) { |
327 | if (bo->mem.mem_type == TTM_PL_VRAM) { | 327 | if (bo->mem.mem_type == TTM_PL_VRAM) { |
328 | struct nouveau_mem *mem = bo->mem.mm_node; | 328 | struct nvkm_mem *mem = bo->mem.mm_node; |
329 | if (!list_is_singular(&mem->regions)) | 329 | if (!list_is_singular(&mem->regions)) |
330 | evict = true; | 330 | evict = true; |
331 | } | 331 | } |
@@ -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 = nvxx_device(&drm->device); | 462 | struct nvkm_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 = nvxx_device(&drm->device); | 482 | struct nvkm_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 | ||
@@ -695,7 +695,7 @@ static int | |||
695 | nve0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | 695 | nve0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo, |
696 | struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) | 696 | struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) |
697 | { | 697 | { |
698 | struct nouveau_mem *node = old_mem->mm_node; | 698 | struct nvkm_mem *node = old_mem->mm_node; |
699 | int ret = RING_SPACE(chan, 10); | 699 | int ret = RING_SPACE(chan, 10); |
700 | if (ret == 0) { | 700 | if (ret == 0) { |
701 | BEGIN_NVC0(chan, NvSubCopy, 0x0400, 8); | 701 | BEGIN_NVC0(chan, NvSubCopy, 0x0400, 8); |
@@ -727,7 +727,7 @@ static int | |||
727 | nvc0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | 727 | nvc0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo, |
728 | struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) | 728 | struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) |
729 | { | 729 | { |
730 | struct nouveau_mem *node = old_mem->mm_node; | 730 | struct nvkm_mem *node = old_mem->mm_node; |
731 | u64 src_offset = node->vma[0].offset; | 731 | u64 src_offset = node->vma[0].offset; |
732 | u64 dst_offset = node->vma[1].offset; | 732 | u64 dst_offset = node->vma[1].offset; |
733 | u32 page_count = new_mem->num_pages; | 733 | u32 page_count = new_mem->num_pages; |
@@ -765,7 +765,7 @@ static int | |||
765 | nvc0_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | 765 | nvc0_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, |
766 | struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) | 766 | struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) |
767 | { | 767 | { |
768 | struct nouveau_mem *node = old_mem->mm_node; | 768 | struct nvkm_mem *node = old_mem->mm_node; |
769 | u64 src_offset = node->vma[0].offset; | 769 | u64 src_offset = node->vma[0].offset; |
770 | u64 dst_offset = node->vma[1].offset; | 770 | u64 dst_offset = node->vma[1].offset; |
771 | u32 page_count = new_mem->num_pages; | 771 | u32 page_count = new_mem->num_pages; |
@@ -804,7 +804,7 @@ static int | |||
804 | nva3_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | 804 | nva3_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo, |
805 | struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) | 805 | struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) |
806 | { | 806 | { |
807 | struct nouveau_mem *node = old_mem->mm_node; | 807 | struct nvkm_mem *node = old_mem->mm_node; |
808 | u64 src_offset = node->vma[0].offset; | 808 | u64 src_offset = node->vma[0].offset; |
809 | u64 dst_offset = node->vma[1].offset; | 809 | u64 dst_offset = node->vma[1].offset; |
810 | u32 page_count = new_mem->num_pages; | 810 | u32 page_count = new_mem->num_pages; |
@@ -842,7 +842,7 @@ static int | |||
842 | nv98_bo_move_exec(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | 842 | nv98_bo_move_exec(struct nouveau_channel *chan, struct ttm_buffer_object *bo, |
843 | struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) | 843 | struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) |
844 | { | 844 | { |
845 | struct nouveau_mem *node = old_mem->mm_node; | 845 | struct nvkm_mem *node = old_mem->mm_node; |
846 | int ret = RING_SPACE(chan, 7); | 846 | int ret = RING_SPACE(chan, 7); |
847 | if (ret == 0) { | 847 | if (ret == 0) { |
848 | BEGIN_NV04(chan, NvSubCopy, 0x0320, 6); | 848 | BEGIN_NV04(chan, NvSubCopy, 0x0320, 6); |
@@ -860,7 +860,7 @@ static int | |||
860 | nv84_bo_move_exec(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | 860 | nv84_bo_move_exec(struct nouveau_channel *chan, struct ttm_buffer_object *bo, |
861 | struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) | 861 | struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) |
862 | { | 862 | { |
863 | struct nouveau_mem *node = old_mem->mm_node; | 863 | struct nvkm_mem *node = old_mem->mm_node; |
864 | int ret = RING_SPACE(chan, 7); | 864 | int ret = RING_SPACE(chan, 7); |
865 | if (ret == 0) { | 865 | if (ret == 0) { |
866 | BEGIN_NV04(chan, NvSubCopy, 0x0304, 6); | 866 | BEGIN_NV04(chan, NvSubCopy, 0x0304, 6); |
@@ -894,12 +894,12 @@ static int | |||
894 | nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | 894 | nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, |
895 | struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) | 895 | struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) |
896 | { | 896 | { |
897 | struct nouveau_mem *node = old_mem->mm_node; | 897 | struct nvkm_mem *node = old_mem->mm_node; |
898 | u64 length = (new_mem->num_pages << PAGE_SHIFT); | 898 | u64 length = (new_mem->num_pages << PAGE_SHIFT); |
899 | u64 src_offset = node->vma[0].offset; | 899 | u64 src_offset = node->vma[0].offset; |
900 | u64 dst_offset = node->vma[1].offset; | 900 | u64 dst_offset = node->vma[1].offset; |
901 | int src_tiled = !!node->memtype; | 901 | int src_tiled = !!node->memtype; |
902 | int dst_tiled = !!((struct nouveau_mem *)new_mem->mm_node)->memtype; | 902 | int dst_tiled = !!((struct nvkm_mem *)new_mem->mm_node)->memtype; |
903 | int ret; | 903 | int ret; |
904 | 904 | ||
905 | while (length) { | 905 | while (length) { |
@@ -1036,25 +1036,25 @@ static int | |||
1036 | nouveau_bo_move_prep(struct nouveau_drm *drm, struct ttm_buffer_object *bo, | 1036 | nouveau_bo_move_prep(struct nouveau_drm *drm, struct ttm_buffer_object *bo, |
1037 | struct ttm_mem_reg *mem) | 1037 | struct ttm_mem_reg *mem) |
1038 | { | 1038 | { |
1039 | struct nouveau_mem *old_node = bo->mem.mm_node; | 1039 | struct nvkm_mem *old_node = bo->mem.mm_node; |
1040 | struct nouveau_mem *new_node = mem->mm_node; | 1040 | struct nvkm_mem *new_node = mem->mm_node; |
1041 | u64 size = (u64)mem->num_pages << PAGE_SHIFT; | 1041 | u64 size = (u64)mem->num_pages << PAGE_SHIFT; |
1042 | int ret; | 1042 | int ret; |
1043 | 1043 | ||
1044 | ret = nouveau_vm_get(drm->client.vm, size, old_node->page_shift, | 1044 | ret = nvkm_vm_get(drm->client.vm, size, old_node->page_shift, |
1045 | NV_MEM_ACCESS_RW, &old_node->vma[0]); | 1045 | NV_MEM_ACCESS_RW, &old_node->vma[0]); |
1046 | if (ret) | 1046 | if (ret) |
1047 | return ret; | 1047 | return ret; |
1048 | 1048 | ||
1049 | ret = nouveau_vm_get(drm->client.vm, size, new_node->page_shift, | 1049 | ret = nvkm_vm_get(drm->client.vm, size, new_node->page_shift, |
1050 | NV_MEM_ACCESS_RW, &old_node->vma[1]); | 1050 | NV_MEM_ACCESS_RW, &old_node->vma[1]); |
1051 | if (ret) { | 1051 | if (ret) { |
1052 | nouveau_vm_put(&old_node->vma[0]); | 1052 | nvkm_vm_put(&old_node->vma[0]); |
1053 | return ret; | 1053 | return ret; |
1054 | } | 1054 | } |
1055 | 1055 | ||
1056 | nouveau_vm_map(&old_node->vma[0], old_node); | 1056 | nvkm_vm_map(&old_node->vma[0], old_node); |
1057 | nouveau_vm_map(&old_node->vma[1], new_node); | 1057 | nvkm_vm_map(&old_node->vma[1], new_node); |
1058 | return 0; | 1058 | return 0; |
1059 | } | 1059 | } |
1060 | 1060 | ||
@@ -1069,7 +1069,7 @@ nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict, bool intr, | |||
1069 | int ret; | 1069 | int ret; |
1070 | 1070 | ||
1071 | /* create temporary vmas for the transfer and attach them to the | 1071 | /* create temporary vmas for the transfer and attach them to the |
1072 | * old nouveau_mem node, these will get cleaned up after ttm has | 1072 | * old nvkm_mem node, these will get cleaned up after ttm has |
1073 | * destroyed the ttm_mem_reg | 1073 | * destroyed the ttm_mem_reg |
1074 | */ | 1074 | */ |
1075 | if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { | 1075 | if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { |
@@ -1231,7 +1231,7 @@ static void | |||
1231 | nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem) | 1231 | nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem) |
1232 | { | 1232 | { |
1233 | struct nouveau_bo *nvbo = nouveau_bo(bo); | 1233 | struct nouveau_bo *nvbo = nouveau_bo(bo); |
1234 | struct nouveau_vma *vma; | 1234 | struct nvkm_vma *vma; |
1235 | 1235 | ||
1236 | /* ttm can now (stupidly) pass the driver bos it didn't create... */ | 1236 | /* ttm can now (stupidly) pass the driver bos it didn't create... */ |
1237 | if (bo->destroy != nouveau_bo_del_ttm) | 1237 | if (bo->destroy != nouveau_bo_del_ttm) |
@@ -1241,9 +1241,9 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem) | |||
1241 | if (new_mem && new_mem->mem_type != TTM_PL_SYSTEM && | 1241 | if (new_mem && new_mem->mem_type != TTM_PL_SYSTEM && |
1242 | (new_mem->mem_type == TTM_PL_VRAM || | 1242 | (new_mem->mem_type == TTM_PL_VRAM || |
1243 | nvbo->page_shift != vma->vm->mmu->lpg_shift)) { | 1243 | nvbo->page_shift != vma->vm->mmu->lpg_shift)) { |
1244 | nouveau_vm_map(vma, new_mem->mm_node); | 1244 | nvkm_vm_map(vma, new_mem->mm_node); |
1245 | } else { | 1245 | } else { |
1246 | nouveau_vm_unmap(vma); | 1246 | nvkm_vm_unmap(vma); |
1247 | } | 1247 | } |
1248 | } | 1248 | } |
1249 | } | 1249 | } |
@@ -1354,7 +1354,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) | |||
1354 | { | 1354 | { |
1355 | struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; | 1355 | struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; |
1356 | struct nouveau_drm *drm = nouveau_bdev(bdev); | 1356 | struct nouveau_drm *drm = nouveau_bdev(bdev); |
1357 | struct nouveau_mem *node = mem->mm_node; | 1357 | struct nvkm_mem *node = mem->mm_node; |
1358 | int ret; | 1358 | int ret; |
1359 | 1359 | ||
1360 | mem->bus.addr = NULL; | 1360 | mem->bus.addr = NULL; |
@@ -1385,7 +1385,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) | |||
1385 | mem->bus.base = nv_device_resource_start(nvxx_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 = nvxx_bar(&drm->device); | 1388 | struct nvkm_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,8 +1405,8 @@ 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 = nvxx_bar(&drm->device); | 1408 | struct nvkm_bar *bar = nvxx_bar(&drm->device); |
1409 | struct nouveau_mem *node = mem->mm_node; | 1409 | struct nvkm_mem *node = mem->mm_node; |
1410 | 1410 | ||
1411 | if (!node->bar_vma.node) | 1411 | if (!node->bar_vma.node) |
1412 | return; | 1412 | return; |
@@ -1465,7 +1465,7 @@ nouveau_ttm_tt_populate(struct ttm_tt *ttm) | |||
1465 | { | 1465 | { |
1466 | struct ttm_dma_tt *ttm_dma = (void *)ttm; | 1466 | struct ttm_dma_tt *ttm_dma = (void *)ttm; |
1467 | struct nouveau_drm *drm; | 1467 | struct nouveau_drm *drm; |
1468 | struct nouveau_device *device; | 1468 | struct nvkm_device *device; |
1469 | struct drm_device *dev; | 1469 | struct drm_device *dev; |
1470 | struct device *pdev; | 1470 | struct device *pdev; |
1471 | unsigned i; | 1471 | unsigned i; |
@@ -1539,7 +1539,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm) | |||
1539 | { | 1539 | { |
1540 | struct ttm_dma_tt *ttm_dma = (void *)ttm; | 1540 | struct ttm_dma_tt *ttm_dma = (void *)ttm; |
1541 | struct nouveau_drm *drm; | 1541 | struct nouveau_drm *drm; |
1542 | struct nouveau_device *device; | 1542 | struct nvkm_device *device; |
1543 | struct drm_device *dev; | 1543 | struct drm_device *dev; |
1544 | struct device *pdev; | 1544 | struct device *pdev; |
1545 | unsigned i; | 1545 | unsigned i; |
@@ -1613,10 +1613,10 @@ struct ttm_bo_driver nouveau_bo_driver = { | |||
1613 | .io_mem_free = &nouveau_ttm_io_mem_free, | 1613 | .io_mem_free = &nouveau_ttm_io_mem_free, |
1614 | }; | 1614 | }; |
1615 | 1615 | ||
1616 | struct nouveau_vma * | 1616 | struct nvkm_vma * |
1617 | nouveau_bo_vma_find(struct nouveau_bo *nvbo, struct nouveau_vm *vm) | 1617 | nouveau_bo_vma_find(struct nouveau_bo *nvbo, struct nvkm_vm *vm) |
1618 | { | 1618 | { |
1619 | struct nouveau_vma *vma; | 1619 | struct nvkm_vma *vma; |
1620 | list_for_each_entry(vma, &nvbo->vma_list, head) { | 1620 | list_for_each_entry(vma, &nvbo->vma_list, head) { |
1621 | if (vma->vm == vm) | 1621 | if (vma->vm == vm) |
1622 | return vma; | 1622 | return vma; |
@@ -1626,13 +1626,13 @@ nouveau_bo_vma_find(struct nouveau_bo *nvbo, struct nouveau_vm *vm) | |||
1626 | } | 1626 | } |
1627 | 1627 | ||
1628 | int | 1628 | int |
1629 | nouveau_bo_vma_add(struct nouveau_bo *nvbo, struct nouveau_vm *vm, | 1629 | nouveau_bo_vma_add(struct nouveau_bo *nvbo, struct nvkm_vm *vm, |
1630 | struct nouveau_vma *vma) | 1630 | struct nvkm_vma *vma) |
1631 | { | 1631 | { |
1632 | const u32 size = nvbo->bo.mem.num_pages << PAGE_SHIFT; | 1632 | const u32 size = nvbo->bo.mem.num_pages << PAGE_SHIFT; |
1633 | int ret; | 1633 | int ret; |
1634 | 1634 | ||
1635 | ret = nouveau_vm_get(vm, size, nvbo->page_shift, | 1635 | ret = nvkm_vm_get(vm, size, nvbo->page_shift, |
1636 | NV_MEM_ACCESS_RW, vma); | 1636 | NV_MEM_ACCESS_RW, vma); |
1637 | if (ret) | 1637 | if (ret) |
1638 | return ret; | 1638 | return ret; |
@@ -1640,7 +1640,7 @@ nouveau_bo_vma_add(struct nouveau_bo *nvbo, struct nouveau_vm *vm, | |||
1640 | if ( nvbo->bo.mem.mem_type != TTM_PL_SYSTEM && | 1640 | if ( nvbo->bo.mem.mem_type != TTM_PL_SYSTEM && |
1641 | (nvbo->bo.mem.mem_type == TTM_PL_VRAM || | 1641 | (nvbo->bo.mem.mem_type == TTM_PL_VRAM || |
1642 | nvbo->page_shift != vma->vm->mmu->lpg_shift)) | 1642 | nvbo->page_shift != vma->vm->mmu->lpg_shift)) |
1643 | nouveau_vm_map(vma, nvbo->bo.mem.mm_node); | 1643 | nvkm_vm_map(vma, nvbo->bo.mem.mm_node); |
1644 | 1644 | ||
1645 | list_add_tail(&vma->head, &nvbo->vma_list); | 1645 | list_add_tail(&vma->head, &nvbo->vma_list); |
1646 | vma->refcount = 1; | 1646 | vma->refcount = 1; |
@@ -1648,12 +1648,12 @@ nouveau_bo_vma_add(struct nouveau_bo *nvbo, struct nouveau_vm *vm, | |||
1648 | } | 1648 | } |
1649 | 1649 | ||
1650 | void | 1650 | void |
1651 | nouveau_bo_vma_del(struct nouveau_bo *nvbo, struct nouveau_vma *vma) | 1651 | nouveau_bo_vma_del(struct nouveau_bo *nvbo, struct nvkm_vma *vma) |
1652 | { | 1652 | { |
1653 | if (vma->node) { | 1653 | if (vma->node) { |
1654 | if (nvbo->bo.mem.mem_type != TTM_PL_SYSTEM) | 1654 | if (nvbo->bo.mem.mem_type != TTM_PL_SYSTEM) |
1655 | nouveau_vm_unmap(vma); | 1655 | nvkm_vm_unmap(vma); |
1656 | nouveau_vm_put(vma); | 1656 | nvkm_vm_put(vma); |
1657 | list_del(&vma->head); | 1657 | list_del(&vma->head); |
1658 | } | 1658 | } |
1659 | } | 1659 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.h b/drivers/gpu/drm/nouveau/nouveau_bo.h index 302aa63b81a4..e42360983229 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.h +++ b/drivers/gpu/drm/nouveau/nouveau_bo.h | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | struct nouveau_channel; | 6 | struct nouveau_channel; |
7 | struct nouveau_fence; | 7 | struct nouveau_fence; |
8 | struct nouveau_vma; | 8 | struct nvkm_vma; |
9 | 9 | ||
10 | struct nouveau_bo { | 10 | struct nouveau_bo { |
11 | struct ttm_buffer_object bo; | 11 | struct ttm_buffer_object bo; |
@@ -87,12 +87,12 @@ int nouveau_bo_validate(struct nouveau_bo *, bool interruptible, | |||
87 | void nouveau_bo_sync_for_device(struct nouveau_bo *nvbo); | 87 | void nouveau_bo_sync_for_device(struct nouveau_bo *nvbo); |
88 | void nouveau_bo_sync_for_cpu(struct nouveau_bo *nvbo); | 88 | void nouveau_bo_sync_for_cpu(struct nouveau_bo *nvbo); |
89 | 89 | ||
90 | struct nouveau_vma * | 90 | struct nvkm_vma * |
91 | nouveau_bo_vma_find(struct nouveau_bo *, struct nouveau_vm *); | 91 | nouveau_bo_vma_find(struct nouveau_bo *, struct nvkm_vm *); |
92 | 92 | ||
93 | int nouveau_bo_vma_add(struct nouveau_bo *, struct nouveau_vm *, | 93 | int nouveau_bo_vma_add(struct nouveau_bo *, struct nvkm_vm *, |
94 | struct nouveau_vma *); | 94 | struct nvkm_vma *); |
95 | void nouveau_bo_vma_del(struct nouveau_bo *, struct nouveau_vma *); | 95 | void nouveau_bo_vma_del(struct nouveau_bo *, struct nvkm_vma *); |
96 | 96 | ||
97 | /* TODO: submit equivalent to TTM generic API upstream? */ | 97 | /* TODO: submit equivalent to TTM generic API upstream? */ |
98 | static inline void __iomem * | 98 | static inline void __iomem * |
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c index 3bcbbd329cf2..e581f63cbf25 100644 --- a/drivers/gpu/drm/nouveau/nouveau_chan.c +++ b/drivers/gpu/drm/nouveau/nouveau_chan.c | |||
@@ -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 = nvxx_mmu(device); | 91 | struct nvkm_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; |
@@ -281,8 +281,8 @@ 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 = nvxx_mmu(device); | 284 | struct nvkm_mmu *mmu = nvxx_mmu(device); |
285 | struct nouveau_sw_chan *swch; | 285 | struct nvkm_sw_chan *swch; |
286 | struct nv_dma_v0 args = {}; | 286 | struct nv_dma_v0 args = {}; |
287 | int ret, i; | 287 | int ret, i; |
288 | 288 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.h b/drivers/gpu/drm/nouveau/nouveau_chan.h index 8309c24ee698..8b3640f69e4f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_chan.h +++ b/drivers/gpu/drm/nouveau/nouveau_chan.h | |||
@@ -16,7 +16,7 @@ struct nouveau_channel { | |||
16 | 16 | ||
17 | struct { | 17 | struct { |
18 | struct nouveau_bo *buffer; | 18 | struct nouveau_bo *buffer; |
19 | struct nouveau_vma vma; | 19 | struct nvkm_vma vma; |
20 | struct nvif_object ctxdma; | 20 | struct nvif_object ctxdma; |
21 | } push; | 21 | } push; |
22 | 22 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 4ab6340b0dac..db7095ae4ebb 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 = nvxx_gpio(&drm->device); | 118 | struct nvkm_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; |
@@ -241,7 +241,7 @@ nouveau_connector_detect(struct drm_connector *connector, bool force) | |||
241 | struct nouveau_connector *nv_connector = nouveau_connector(connector); | 241 | struct nouveau_connector *nv_connector = nouveau_connector(connector); |
242 | struct nouveau_encoder *nv_encoder = NULL; | 242 | struct nouveau_encoder *nv_encoder = NULL; |
243 | struct nouveau_encoder *nv_partner; | 243 | struct nouveau_encoder *nv_partner; |
244 | struct nouveau_i2c_port *i2c; | 244 | struct nvkm_i2c_port *i2c; |
245 | int type; | 245 | int type; |
246 | int ret; | 246 | int ret; |
247 | enum drm_connector_status conn_status = connector_status_disconnected; | 247 | enum drm_connector_status conn_status = connector_status_disconnected; |
@@ -985,7 +985,7 @@ nouveau_connector_aux_xfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg) | |||
985 | struct nouveau_connector *nv_connector = | 985 | struct nouveau_connector *nv_connector = |
986 | container_of(aux, typeof(*nv_connector), aux); | 986 | container_of(aux, typeof(*nv_connector), aux); |
987 | struct nouveau_encoder *nv_encoder; | 987 | struct nouveau_encoder *nv_encoder; |
988 | struct nouveau_i2c_port *port; | 988 | struct nvkm_i2c_port *port; |
989 | int ret; | 989 | int ret; |
990 | 990 | ||
991 | nv_encoder = find_encoder(&nv_connector->base, DCB_OUTPUT_DP); | 991 | nv_encoder = find_encoder(&nv_connector->base, DCB_OUTPUT_DP); |
@@ -996,13 +996,13 @@ nouveau_connector_aux_xfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg) | |||
996 | if (msg->size == 0) | 996 | if (msg->size == 0) |
997 | return msg->size; | 997 | return msg->size; |
998 | 998 | ||
999 | ret = nouveau_i2c(port)->acquire(port, 0); | 999 | ret = nvkm_i2c(port)->acquire(port, 0); |
1000 | if (ret) | 1000 | if (ret) |
1001 | return ret; | 1001 | return ret; |
1002 | 1002 | ||
1003 | ret = port->func->aux(port, false, msg->request, msg->address, | 1003 | ret = port->func->aux(port, false, msg->request, msg->address, |
1004 | msg->buffer, msg->size); | 1004 | msg->buffer, msg->size); |
1005 | nouveau_i2c(port)->release(port); | 1005 | nvkm_i2c(port)->release(port); |
1006 | if (ret >= 0) { | 1006 | if (ret >= 0) { |
1007 | msg->reply = ret; | 1007 | msg->reply = ret; |
1008 | return msg->size; | 1008 | return msg->size; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.h b/drivers/gpu/drm/nouveau/nouveau_connector.h index a2d099142d96..7446ee66ea04 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.h +++ b/drivers/gpu/drm/nouveau/nouveau_connector.h | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <drm/drm_dp_helper.h> | 33 | #include <drm/drm_dp_helper.h> |
34 | #include "nouveau_crtc.h" | 34 | #include "nouveau_crtc.h" |
35 | 35 | ||
36 | struct nouveau_i2c_port; | 36 | struct nvkm_i2c_port; |
37 | 37 | ||
38 | enum nouveau_underscan_type { | 38 | enum nouveau_underscan_type { |
39 | UNDERSCAN_OFF, | 39 | UNDERSCAN_OFF, |
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.h b/drivers/gpu/drm/nouveau/nouveau_display.h index a94dcdaccf59..a6213e2425c5 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.h +++ b/drivers/gpu/drm/nouveau/nouveau_display.h | |||
@@ -8,7 +8,7 @@ | |||
8 | struct nouveau_framebuffer { | 8 | struct nouveau_framebuffer { |
9 | struct drm_framebuffer base; | 9 | struct drm_framebuffer base; |
10 | struct nouveau_bo *nvbo; | 10 | struct nouveau_bo *nvbo; |
11 | struct nouveau_vma vma; | 11 | struct nvkm_vma vma; |
12 | u32 r_handle; | 12 | u32 r_handle; |
13 | u32 r_format; | 13 | u32 r_format; |
14 | u32 r_pitch; | 14 | u32 r_pitch; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.c b/drivers/gpu/drm/nouveau/nouveau_dma.c index 8508603cc8c3..6d9245aa81a6 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dma.c +++ b/drivers/gpu/drm/nouveau/nouveau_dma.c | |||
@@ -84,7 +84,7 @@ nv50_dma_push(struct nouveau_channel *chan, struct nouveau_bo *bo, | |||
84 | { | 84 | { |
85 | struct nouveau_cli *cli = (void *)nvif_client(&chan->device->base); | 85 | struct nouveau_cli *cli = (void *)nvif_client(&chan->device->base); |
86 | struct nouveau_bo *pb = chan->push.buffer; | 86 | struct nouveau_bo *pb = chan->push.buffer; |
87 | struct nouveau_vma *vma; | 87 | struct nvkm_vma *vma; |
88 | int ip = (chan->dma.ib_put * 2) + chan->dma.ib_base; | 88 | int ip = (chan->dma.ib_put * 2) + chan->dma.ib_base; |
89 | u64 offset; | 89 | u64 offset; |
90 | 90 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c index c5137cccce7d..c3ef30b3a5ec 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dp.c +++ b/drivers/gpu/drm/nouveau/nouveau_dp.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include "nouveau_crtc.h" | 31 | #include "nouveau_crtc.h" |
32 | 32 | ||
33 | static void | 33 | static void |
34 | nouveau_dp_probe_oui(struct drm_device *dev, struct nouveau_i2c_port *auxch, | 34 | nouveau_dp_probe_oui(struct drm_device *dev, struct nvkm_i2c_port *auxch, |
35 | u8 *dpcd) | 35 | u8 *dpcd) |
36 | { | 36 | { |
37 | struct nouveau_drm *drm = nouveau_drm(dev); | 37 | struct nouveau_drm *drm = nouveau_drm(dev); |
@@ -55,7 +55,7 @@ nouveau_dp_detect(struct nouveau_encoder *nv_encoder) | |||
55 | { | 55 | { |
56 | struct drm_device *dev = nv_encoder->base.base.dev; | 56 | struct drm_device *dev = nv_encoder->base.base.dev; |
57 | struct nouveau_drm *drm = nouveau_drm(dev); | 57 | struct nouveau_drm *drm = nouveau_drm(dev); |
58 | struct nouveau_i2c_port *auxch; | 58 | struct nvkm_i2c_port *auxch; |
59 | u8 *dpcd = nv_encoder->dp.dpcd; | 59 | u8 *dpcd = nv_encoder->dp.dpcd; |
60 | int ret; | 60 | int ret; |
61 | 61 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index f4ac7b5af85e..8763deb5188b 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, &nvxx_client(&cli->base)->vm, NULL); | 127 | nvkm_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 | } |
@@ -134,7 +134,7 @@ nouveau_accel_fini(struct nouveau_drm *drm) | |||
134 | { | 134 | { |
135 | nouveau_channel_del(&drm->channel); | 135 | nouveau_channel_del(&drm->channel); |
136 | nvif_object_fini(&drm->ntfy); | 136 | nvif_object_fini(&drm->ntfy); |
137 | nouveau_gpuobj_ref(NULL, &drm->notify); | 137 | nvkm_gpuobj_ref(NULL, &drm->notify); |
138 | nvif_object_fini(&drm->nvsw); | 138 | nvif_object_fini(&drm->nvsw); |
139 | nouveau_channel_del(&drm->cechan); | 139 | nouveau_channel_del(&drm->cechan); |
140 | nvif_object_fini(&drm->ttm.copy); | 140 | nvif_object_fini(&drm->ttm.copy); |
@@ -231,7 +231,7 @@ nouveau_accel_init(struct nouveau_drm *drm) | |||
231 | ret = nvif_object_init(drm->channel->object, NULL, NVDRM_NVSW, | 231 | ret = nvif_object_init(drm->channel->object, NULL, NVDRM_NVSW, |
232 | nouveau_abi16_swclass(drm), NULL, 0, &drm->nvsw); | 232 | nouveau_abi16_swclass(drm), NULL, 0, &drm->nvsw); |
233 | if (ret == 0) { | 233 | if (ret == 0) { |
234 | struct nouveau_sw_chan *swch; | 234 | struct nvkm_sw_chan *swch; |
235 | ret = RING_SPACE(drm->channel, 2); | 235 | ret = RING_SPACE(drm->channel, 2); |
236 | if (ret == 0) { | 236 | if (ret == 0) { |
237 | if (device->info.family < NV_DEVICE_INFO_V0_FERMI) { | 237 | if (device->info.family < NV_DEVICE_INFO_V0_FERMI) { |
@@ -255,8 +255,8 @@ 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(nvxx_object(&drm->device), NULL, 32, | 258 | ret = nvkm_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); |
262 | nouveau_accel_fini(drm); | 262 | nouveau_accel_fini(drm); |
@@ -285,7 +285,7 @@ nouveau_accel_init(struct nouveau_drm *drm) | |||
285 | static int nouveau_drm_probe(struct pci_dev *pdev, | 285 | static int nouveau_drm_probe(struct pci_dev *pdev, |
286 | const struct pci_device_id *pent) | 286 | const struct pci_device_id *pent) |
287 | { | 287 | { |
288 | struct nouveau_device *device; | 288 | struct nvkm_device *device; |
289 | struct apertures_struct *aper; | 289 | struct apertures_struct *aper; |
290 | bool boot = false; | 290 | bool boot = false; |
291 | int ret; | 291 | int ret; |
@@ -318,9 +318,9 @@ static int nouveau_drm_probe(struct pci_dev *pdev, | |||
318 | remove_conflicting_framebuffers(aper, "nouveaufb", boot); | 318 | remove_conflicting_framebuffers(aper, "nouveaufb", boot); |
319 | kfree(aper); | 319 | kfree(aper); |
320 | 320 | ||
321 | ret = nouveau_device_create(pdev, NVKM_BUS_PCI, | 321 | ret = nvkm_device_create(pdev, NVKM_BUS_PCI, |
322 | nouveau_pci_name(pdev), pci_name(pdev), | 322 | nouveau_pci_name(pdev), pci_name(pdev), |
323 | nouveau_config, nouveau_debug, &device); | 323 | nouveau_config, nouveau_debug, &device); |
324 | if (ret) | 324 | if (ret) |
325 | return ret; | 325 | return ret; |
326 | 326 | ||
@@ -328,7 +328,7 @@ static int nouveau_drm_probe(struct pci_dev *pdev, | |||
328 | 328 | ||
329 | ret = drm_get_pci_dev(pdev, pent, &driver_pci); | 329 | ret = drm_get_pci_dev(pdev, pent, &driver_pci); |
330 | if (ret) { | 330 | if (ret) { |
331 | nouveau_object_ref(NULL, (struct nouveau_object **)&device); | 331 | nvkm_object_ref(NULL, (struct nvkm_object **)&device); |
332 | return ret; | 332 | return ret; |
333 | } | 333 | } |
334 | 334 | ||
@@ -380,7 +380,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) | |||
380 | dev->dev_private = drm; | 380 | dev->dev_private = drm; |
381 | drm->dev = dev; | 381 | drm->dev = dev; |
382 | nvxx_client(&drm->client.base)->debug = | 382 | nvxx_client(&drm->client.base)->debug = |
383 | nouveau_dbgopt(nouveau_debug, "DRM"); | 383 | nvkm_dbgopt(nouveau_debug, "DRM"); |
384 | 384 | ||
385 | INIT_LIST_HEAD(&drm->clients); | 385 | INIT_LIST_HEAD(&drm->clients); |
386 | spin_lock_init(&drm->tile.lock); | 386 | spin_lock_init(&drm->tile.lock); |
@@ -435,8 +435,8 @@ 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(nvxx_device(&drm->device), 0, (1ULL << 40), | 438 | ret = nvkm_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 | ||
@@ -523,16 +523,16 @@ void | |||
523 | nouveau_drm_device_remove(struct drm_device *dev) | 523 | nouveau_drm_device_remove(struct drm_device *dev) |
524 | { | 524 | { |
525 | struct nouveau_drm *drm = nouveau_drm(dev); | 525 | struct nouveau_drm *drm = nouveau_drm(dev); |
526 | struct nouveau_client *client; | 526 | struct nvkm_client *client; |
527 | struct nouveau_object *device; | 527 | struct nvkm_object *device; |
528 | 528 | ||
529 | dev->irq_enabled = false; | 529 | dev->irq_enabled = false; |
530 | client = nvxx_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 | ||
534 | nouveau_object_ref(NULL, &device); | 534 | nvkm_object_ref(NULL, &device); |
535 | nouveau_object_debug(); | 535 | nvkm_object_debug(); |
536 | } | 536 | } |
537 | 537 | ||
538 | static void | 538 | static void |
@@ -831,8 +831,8 @@ 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(nvxx_device(&drm->device), 0, (1ULL << 40), | 834 | ret = nvkm_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; |
@@ -1056,10 +1056,10 @@ nouveau_platform_device_create_(struct platform_device *pdev, int size, | |||
1056 | struct drm_device *drm; | 1056 | struct drm_device *drm; |
1057 | int err; | 1057 | int err; |
1058 | 1058 | ||
1059 | err = nouveau_device_create_(pdev, NVKM_BUS_PLATFORM, | 1059 | err = nvkm_device_create_(pdev, NVKM_BUS_PLATFORM, |
1060 | nouveau_platform_name(pdev), | 1060 | nouveau_platform_name(pdev), |
1061 | dev_name(&pdev->dev), nouveau_config, | 1061 | dev_name(&pdev->dev), nouveau_config, |
1062 | nouveau_debug, size, pobject); | 1062 | nouveau_debug, size, pobject); |
1063 | if (err) | 1063 | if (err) |
1064 | return ERR_PTR(err); | 1064 | return ERR_PTR(err); |
1065 | 1065 | ||
@@ -1079,7 +1079,7 @@ nouveau_platform_device_create_(struct platform_device *pdev, int size, | |||
1079 | return drm; | 1079 | return drm; |
1080 | 1080 | ||
1081 | err_free: | 1081 | err_free: |
1082 | nouveau_object_ref(NULL, (struct nouveau_object **)pobject); | 1082 | nvkm_object_ref(NULL, (struct nvkm_object **)pobject); |
1083 | 1083 | ||
1084 | return ERR_PTR(err); | 1084 | return ERR_PTR(err); |
1085 | } | 1085 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.h b/drivers/gpu/drm/nouveau/nouveau_drm.h index 8ae36f265fb8..fc68f0973f9e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.h +++ b/drivers/gpu/drm/nouveau/nouveau_drm.h | |||
@@ -80,7 +80,7 @@ enum nouveau_drm_handle { | |||
80 | 80 | ||
81 | struct nouveau_cli { | 81 | struct nouveau_cli { |
82 | struct nvif_client base; | 82 | struct nvif_client base; |
83 | struct nouveau_vm *vm; /*XXX*/ | 83 | struct nvkm_vm *vm; /*XXX*/ |
84 | struct list_head head; | 84 | struct list_head head; |
85 | struct mutex mutex; | 85 | struct mutex mutex; |
86 | void *abi16; | 86 | void *abi16; |
@@ -142,7 +142,7 @@ struct nouveau_drm { | |||
142 | /* context for accelerated drm-internal operations */ | 142 | /* context for accelerated drm-internal operations */ |
143 | struct nouveau_channel *cechan; | 143 | struct nouveau_channel *cechan; |
144 | struct nouveau_channel *channel; | 144 | struct nouveau_channel *channel; |
145 | struct nouveau_gpuobj *notify; | 145 | struct nvkm_gpuobj *notify; |
146 | struct nouveau_fbdev *fbcon; | 146 | struct nouveau_fbdev *fbcon; |
147 | struct nvif_object nvsw; | 147 | struct nvif_object nvsw; |
148 | struct nvif_object ntfy; | 148 | struct nvif_object ntfy; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_encoder.h b/drivers/gpu/drm/nouveau/nouveau_encoder.h index 5f0e37fc2849..c57a37e8e1eb 100644 --- a/drivers/gpu/drm/nouveau/nouveau_encoder.h +++ b/drivers/gpu/drm/nouveau/nouveau_encoder.h | |||
@@ -34,14 +34,14 @@ | |||
34 | 34 | ||
35 | #define NV_DPMS_CLEARED 0x80 | 35 | #define NV_DPMS_CLEARED 0x80 |
36 | 36 | ||
37 | struct nouveau_i2c_port; | 37 | struct nvkm_i2c_port; |
38 | 38 | ||
39 | struct nouveau_encoder { | 39 | struct nouveau_encoder { |
40 | struct drm_encoder_slave base; | 40 | struct drm_encoder_slave base; |
41 | 41 | ||
42 | struct dcb_output *dcb; | 42 | struct dcb_output *dcb; |
43 | int or; | 43 | int or; |
44 | struct nouveau_i2c_port *i2c; | 44 | struct nvkm_i2c_port *i2c; |
45 | 45 | ||
46 | /* different to drm_encoder.crtc, this reflects what's | 46 | /* different to drm_encoder.crtc, this reflects what's |
47 | * actually programmed on the hw, not the proposed crtc */ | 47 | * actually programmed on the hw, not the proposed crtc */ |
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.h b/drivers/gpu/drm/nouveau/nouveau_fence.h index 96e461c6f68f..d9241d8247fb 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.h +++ b/drivers/gpu/drm/nouveau/nouveau_fence.h | |||
@@ -89,9 +89,9 @@ int nouveau_flip_complete(void *chan); | |||
89 | 89 | ||
90 | struct nv84_fence_chan { | 90 | struct nv84_fence_chan { |
91 | struct nouveau_fence_chan base; | 91 | struct nouveau_fence_chan base; |
92 | struct nouveau_vma vma; | 92 | struct nvkm_vma vma; |
93 | struct nouveau_vma vma_gart; | 93 | struct nvkm_vma vma_gart; |
94 | struct nouveau_vma dispc_vma[4]; | 94 | struct nvkm_vma dispc_vma[4]; |
95 | }; | 95 | }; |
96 | 96 | ||
97 | struct nv84_fence_priv { | 97 | struct nv84_fence_priv { |
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 8453d1aac0e2..7c077fced1d1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c | |||
@@ -64,7 +64,7 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv) | |||
64 | struct nouveau_cli *cli = nouveau_cli(file_priv); | 64 | struct nouveau_cli *cli = nouveau_cli(file_priv); |
65 | struct nouveau_bo *nvbo = nouveau_gem_object(gem); | 65 | struct nouveau_bo *nvbo = nouveau_gem_object(gem); |
66 | struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); | 66 | struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); |
67 | struct nouveau_vma *vma; | 67 | struct nvkm_vma *vma; |
68 | struct device *dev = drm->dev->dev; | 68 | struct device *dev = drm->dev->dev; |
69 | int ret; | 69 | int ret; |
70 | 70 | ||
@@ -105,14 +105,14 @@ out: | |||
105 | static void | 105 | static void |
106 | nouveau_gem_object_delete(void *data) | 106 | nouveau_gem_object_delete(void *data) |
107 | { | 107 | { |
108 | struct nouveau_vma *vma = data; | 108 | struct nvkm_vma *vma = data; |
109 | nouveau_vm_unmap(vma); | 109 | nvkm_vm_unmap(vma); |
110 | nouveau_vm_put(vma); | 110 | nvkm_vm_put(vma); |
111 | kfree(vma); | 111 | kfree(vma); |
112 | } | 112 | } |
113 | 113 | ||
114 | static void | 114 | static void |
115 | nouveau_gem_object_unmap(struct nouveau_bo *nvbo, struct nouveau_vma *vma) | 115 | nouveau_gem_object_unmap(struct nouveau_bo *nvbo, struct nvkm_vma *vma) |
116 | { | 116 | { |
117 | const bool mapped = nvbo->bo.mem.mem_type != TTM_PL_SYSTEM; | 117 | const bool mapped = nvbo->bo.mem.mem_type != TTM_PL_SYSTEM; |
118 | struct reservation_object *resv = nvbo->bo.resv; | 118 | struct reservation_object *resv = nvbo->bo.resv; |
@@ -135,8 +135,8 @@ nouveau_gem_object_unmap(struct nouveau_bo *nvbo, struct nouveau_vma *vma) | |||
135 | nouveau_fence_work(fence, nouveau_gem_object_delete, vma); | 135 | nouveau_fence_work(fence, nouveau_gem_object_delete, vma); |
136 | } else { | 136 | } else { |
137 | if (mapped) | 137 | if (mapped) |
138 | nouveau_vm_unmap(vma); | 138 | nvkm_vm_unmap(vma); |
139 | nouveau_vm_put(vma); | 139 | nvkm_vm_put(vma); |
140 | kfree(vma); | 140 | kfree(vma); |
141 | } | 141 | } |
142 | } | 142 | } |
@@ -148,7 +148,7 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv) | |||
148 | struct nouveau_bo *nvbo = nouveau_gem_object(gem); | 148 | struct nouveau_bo *nvbo = nouveau_gem_object(gem); |
149 | struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); | 149 | struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); |
150 | struct device *dev = drm->dev->dev; | 150 | struct device *dev = drm->dev->dev; |
151 | struct nouveau_vma *vma; | 151 | struct nvkm_vma *vma; |
152 | int ret; | 152 | int ret; |
153 | 153 | ||
154 | if (!cli->vm) | 154 | if (!cli->vm) |
@@ -222,7 +222,7 @@ nouveau_gem_info(struct drm_file *file_priv, struct drm_gem_object *gem, | |||
222 | { | 222 | { |
223 | struct nouveau_cli *cli = nouveau_cli(file_priv); | 223 | struct nouveau_cli *cli = nouveau_cli(file_priv); |
224 | struct nouveau_bo *nvbo = nouveau_gem_object(gem); | 224 | struct nouveau_bo *nvbo = nouveau_gem_object(gem); |
225 | struct nouveau_vma *vma; | 225 | struct nvkm_vma *vma; |
226 | 226 | ||
227 | if (nvbo->bo.mem.mem_type == TTM_PL_TT) | 227 | if (nvbo->bo.mem.mem_type == TTM_PL_TT) |
228 | rep->domain = NOUVEAU_GEM_DOMAIN_GART; | 228 | rep->domain = NOUVEAU_GEM_DOMAIN_GART; |
@@ -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 = nvxx_fb(&drm->device); | 254 | struct nvkm_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 b5c445e02bfc..0dbe0060f86e 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 = nvxx_therm(&drm->device); | 43 | struct nvkm_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 = nvxx_therm(&drm->device); | 69 | struct nvkm_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, NVKM_THERM_ATTR_THRS_FAN_BOOST) * 1000); | 72 | therm->attr_get(therm, NVKM_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 = nvxx_therm(&drm->device); | 81 | struct nvkm_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 = nvxx_therm(&drm->device); | 102 | struct nvkm_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, NVKM_THERM_ATTR_THRS_FAN_BOOST_HYST) * 1000); | 105 | therm->attr_get(therm, NVKM_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 = nvxx_therm(&drm->device); | 114 | struct nvkm_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 = nvxx_therm(&drm->device); | 134 | struct nvkm_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, NVKM_THERM_ATTR_THRS_DOWN_CLK) * 1000); | 137 | therm->attr_get(therm, NVKM_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 = nvxx_therm(&drm->device); | 145 | struct nvkm_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 = nvxx_therm(&drm->device); | 165 | struct nvkm_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, NVKM_THERM_ATTR_THRS_DOWN_CLK_HYST) * 1000); | 168 | therm->attr_get(therm, NVKM_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 = nvxx_therm(&drm->device); | 176 | struct nvkm_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 = nvxx_therm(&drm->device); | 197 | struct nvkm_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, NVKM_THERM_ATTR_THRS_CRITICAL) * 1000); | 200 | therm->attr_get(therm, NVKM_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 = nvxx_therm(&drm->device); | 209 | struct nvkm_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 = nvxx_therm(&drm->device); | 230 | struct nvkm_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, NVKM_THERM_ATTR_THRS_CRITICAL_HYST) * 1000); | 233 | therm->attr_get(therm, NVKM_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 = nvxx_therm(&drm->device); | 243 | struct nvkm_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 = nvxx_therm(&drm->device); | 263 | struct nvkm_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, NVKM_THERM_ATTR_THRS_SHUTDOWN) * 1000); | 266 | therm->attr_get(therm, NVKM_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 = nvxx_therm(&drm->device); | 275 | struct nvkm_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 = nvxx_therm(&drm->device); | 296 | struct nvkm_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, NVKM_THERM_ATTR_THRS_SHUTDOWN_HYST) * 1000); | 299 | therm->attr_get(therm, NVKM_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 = nvxx_therm(&drm->device); | 309 | struct nvkm_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 = nvxx_therm(&drm->device); | 349 | struct nvkm_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 = nvxx_therm(&drm->device); | 362 | struct nvkm_therm *therm = nvxx_therm(&drm->device); |
363 | int ret; | 363 | int ret; |
364 | 364 | ||
365 | ret = therm->attr_get(therm, NVKM_THERM_ATTR_FAN_MODE); | 365 | ret = therm->attr_get(therm, NVKM_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 = nvxx_therm(&drm->device); | 378 | struct nvkm_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 = nvxx_therm(&drm->device); | 401 | struct nvkm_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 = nvxx_therm(&drm->device); | 417 | struct nvkm_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 = nvxx_therm(&drm->device); | 441 | struct nvkm_therm *therm = nvxx_therm(&drm->device); |
442 | int ret; | 442 | int ret; |
443 | 443 | ||
444 | ret = therm->attr_get(therm, NVKM_THERM_ATTR_FAN_MIN_DUTY); | 444 | ret = therm->attr_get(therm, NVKM_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 = nvxx_therm(&drm->device); | 457 | struct nvkm_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 = nvxx_therm(&drm->device); | 481 | struct nvkm_therm *therm = nvxx_therm(&drm->device); |
482 | int ret; | 482 | int ret; |
483 | 483 | ||
484 | ret = therm->attr_get(therm, NVKM_THERM_ATTR_FAN_MAX_DUTY); | 484 | ret = therm->attr_get(therm, NVKM_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 = nvxx_therm(&drm->device); | 497 | struct nvkm_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 = nvxx_therm(&drm->device); | 564 | struct nvkm_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_nvif.c b/drivers/gpu/drm/nouveau/nouveau_nvif.c index 7f7bd329425e..ca0ad9d1563d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_nvif.c +++ b/drivers/gpu/drm/nouveau/nouveau_nvif.c | |||
@@ -60,22 +60,22 @@ nvkm_client_ioctl(void *priv, bool super, void *data, u32 size, void **hack) | |||
60 | static int | 60 | static int |
61 | nvkm_client_resume(void *priv) | 61 | nvkm_client_resume(void *priv) |
62 | { | 62 | { |
63 | return nouveau_client_init(priv); | 63 | return nvkm_client_init(priv); |
64 | } | 64 | } |
65 | 65 | ||
66 | static int | 66 | static int |
67 | nvkm_client_suspend(void *priv) | 67 | nvkm_client_suspend(void *priv) |
68 | { | 68 | { |
69 | return nouveau_client_fini(priv, true); | 69 | return nvkm_client_fini(priv, true); |
70 | } | 70 | } |
71 | 71 | ||
72 | static void | 72 | static void |
73 | nvkm_client_driver_fini(void *priv) | 73 | nvkm_client_driver_fini(void *priv) |
74 | { | 74 | { |
75 | struct nouveau_object *client = priv; | 75 | struct nvkm_object *client = priv; |
76 | nouveau_client_fini(nv_client(client), false); | 76 | nvkm_client_fini(nv_client(client), false); |
77 | atomic_set(&client->refcount, 1); | 77 | atomic_set(&client->refcount, 1); |
78 | nouveau_object_ref(NULL, &client); | 78 | nvkm_object_ref(NULL, &client); |
79 | } | 79 | } |
80 | 80 | ||
81 | static int | 81 | static int |
@@ -110,10 +110,10 @@ static int | |||
110 | nvkm_client_driver_init(const char *name, u64 device, const char *cfg, | 110 | nvkm_client_driver_init(const char *name, u64 device, const char *cfg, |
111 | const char *dbg, void **ppriv) | 111 | const char *dbg, void **ppriv) |
112 | { | 112 | { |
113 | struct nouveau_client *client; | 113 | struct nvkm_client *client; |
114 | int ret; | 114 | int ret; |
115 | 115 | ||
116 | ret = nouveau_client_create(name, device, cfg, dbg, &client); | 116 | ret = nvkm_client_create(name, device, cfg, dbg, &client); |
117 | *ppriv = client; | 117 | *ppriv = client; |
118 | if (ret) | 118 | if (ret) |
119 | return ret; | 119 | return ret; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_platform.c b/drivers/gpu/drm/nouveau/nouveau_platform.c index 5e6a2c90b8e2..dc5900bf54ff 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 = nvxx_device(&drm->device); | 155 | struct nvkm_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_platform.h b/drivers/gpu/drm/nouveau/nouveau_platform.h index ca22c525329a..268bb7213681 100644 --- a/drivers/gpu/drm/nouveau/nouveau_platform.h +++ b/drivers/gpu/drm/nouveau/nouveau_platform.h | |||
@@ -39,7 +39,7 @@ struct nouveau_platform_gpu { | |||
39 | }; | 39 | }; |
40 | 40 | ||
41 | struct nouveau_platform_device { | 41 | struct nouveau_platform_device { |
42 | struct nouveau_device device; | 42 | struct nvkm_device device; |
43 | 43 | ||
44 | struct nouveau_platform_gpu *gpu; | 44 | struct nouveau_platform_gpu *gpu; |
45 | 45 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c index 23c377a6c761..8c3053a177d6 100644 --- a/drivers/gpu/drm/nouveau/nouveau_sgdma.c +++ b/drivers/gpu/drm/nouveau/nouveau_sgdma.c | |||
@@ -9,7 +9,7 @@ struct nouveau_sgdma_be { | |||
9 | * nouve_bo.c works properly, otherwise have to move them here | 9 | * nouve_bo.c works properly, otherwise have to move them here |
10 | */ | 10 | */ |
11 | struct ttm_dma_tt ttm; | 11 | struct ttm_dma_tt ttm; |
12 | struct nouveau_mem *node; | 12 | struct nvkm_mem *node; |
13 | }; | 13 | }; |
14 | 14 | ||
15 | static void | 15 | static void |
@@ -27,7 +27,7 @@ static int | |||
27 | nv04_sgdma_bind(struct ttm_tt *ttm, struct ttm_mem_reg *mem) | 27 | nv04_sgdma_bind(struct ttm_tt *ttm, struct ttm_mem_reg *mem) |
28 | { | 28 | { |
29 | struct nouveau_sgdma_be *nvbe = (struct nouveau_sgdma_be *)ttm; | 29 | struct nouveau_sgdma_be *nvbe = (struct nouveau_sgdma_be *)ttm; |
30 | struct nouveau_mem *node = mem->mm_node; | 30 | struct nvkm_mem *node = mem->mm_node; |
31 | 31 | ||
32 | if (ttm->sg) { | 32 | if (ttm->sg) { |
33 | node->sg = ttm->sg; | 33 | node->sg = ttm->sg; |
@@ -38,7 +38,7 @@ nv04_sgdma_bind(struct ttm_tt *ttm, struct ttm_mem_reg *mem) | |||
38 | } | 38 | } |
39 | node->size = (mem->num_pages << PAGE_SHIFT) >> 12; | 39 | node->size = (mem->num_pages << PAGE_SHIFT) >> 12; |
40 | 40 | ||
41 | nouveau_vm_map(&node->vma[0], node); | 41 | nvkm_vm_map(&node->vma[0], node); |
42 | nvbe->node = node; | 42 | nvbe->node = node; |
43 | return 0; | 43 | return 0; |
44 | } | 44 | } |
@@ -47,7 +47,7 @@ static int | |||
47 | nv04_sgdma_unbind(struct ttm_tt *ttm) | 47 | nv04_sgdma_unbind(struct ttm_tt *ttm) |
48 | { | 48 | { |
49 | struct nouveau_sgdma_be *nvbe = (struct nouveau_sgdma_be *)ttm; | 49 | struct nouveau_sgdma_be *nvbe = (struct nouveau_sgdma_be *)ttm; |
50 | nouveau_vm_unmap(&nvbe->node->vma[0]); | 50 | nvkm_vm_unmap(&nvbe->node->vma[0]); |
51 | return 0; | 51 | return 0; |
52 | } | 52 | } |
53 | 53 | ||
@@ -61,7 +61,7 @@ static int | |||
61 | nv50_sgdma_bind(struct ttm_tt *ttm, struct ttm_mem_reg *mem) | 61 | nv50_sgdma_bind(struct ttm_tt *ttm, struct ttm_mem_reg *mem) |
62 | { | 62 | { |
63 | struct nouveau_sgdma_be *nvbe = (struct nouveau_sgdma_be *)ttm; | 63 | struct nouveau_sgdma_be *nvbe = (struct nouveau_sgdma_be *)ttm; |
64 | struct nouveau_mem *node = mem->mm_node; | 64 | struct nvkm_mem *node = mem->mm_node; |
65 | 65 | ||
66 | /* noop: bound in move_notify() */ | 66 | /* noop: bound in move_notify() */ |
67 | if (ttm->sg) { | 67 | if (ttm->sg) { |
diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index 7149f6d1fb43..273e50110ec3 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 = nvxx_fb(&drm->device); | 36 | struct nvkm_fb *pfb = nvxx_fb(&drm->device); |
37 | man->priv = pfb; | 37 | man->priv = pfb; |
38 | return 0; | 38 | return 0; |
39 | } | 39 | } |
@@ -46,16 +46,16 @@ nouveau_vram_manager_fini(struct ttm_mem_type_manager *man) | |||
46 | } | 46 | } |
47 | 47 | ||
48 | static inline void | 48 | static inline void |
49 | nouveau_mem_node_cleanup(struct nouveau_mem *node) | 49 | nvkm_mem_node_cleanup(struct nvkm_mem *node) |
50 | { | 50 | { |
51 | if (node->vma[0].node) { | 51 | if (node->vma[0].node) { |
52 | nouveau_vm_unmap(&node->vma[0]); | 52 | nvkm_vm_unmap(&node->vma[0]); |
53 | nouveau_vm_put(&node->vma[0]); | 53 | nvkm_vm_put(&node->vma[0]); |
54 | } | 54 | } |
55 | 55 | ||
56 | if (node->vma[1].node) { | 56 | if (node->vma[1].node) { |
57 | nouveau_vm_unmap(&node->vma[1]); | 57 | nvkm_vm_unmap(&node->vma[1]); |
58 | nouveau_vm_put(&node->vma[1]); | 58 | nvkm_vm_put(&node->vma[1]); |
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 | ||
@@ -64,9 +64,9 @@ 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 = nvxx_fb(&drm->device); | 67 | struct nvkm_fb *pfb = nvxx_fb(&drm->device); |
68 | nouveau_mem_node_cleanup(mem->mm_node); | 68 | nvkm_mem_node_cleanup(mem->mm_node); |
69 | pfb->ram->put(pfb, (struct nouveau_mem **)&mem->mm_node); | 69 | pfb->ram->put(pfb, (struct nvkm_mem **)&mem->mm_node); |
70 | } | 70 | } |
71 | 71 | ||
72 | static int | 72 | static int |
@@ -76,9 +76,9 @@ 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 = nvxx_fb(&drm->device); | 79 | struct nvkm_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 nvkm_mem *node; |
82 | u32 size_nc = 0; | 82 | u32 size_nc = 0; |
83 | int ret; | 83 | int ret; |
84 | 84 | ||
@@ -103,9 +103,9 @@ nouveau_vram_manager_new(struct ttm_mem_type_manager *man, | |||
103 | static void | 103 | static void |
104 | nouveau_vram_manager_debug(struct ttm_mem_type_manager *man, const char *prefix) | 104 | nouveau_vram_manager_debug(struct ttm_mem_type_manager *man, const char *prefix) |
105 | { | 105 | { |
106 | struct nouveau_fb *pfb = man->priv; | 106 | struct nvkm_fb *pfb = man->priv; |
107 | struct nouveau_mm *mm = &pfb->vram; | 107 | struct nvkm_mm *mm = &pfb->vram; |
108 | struct nouveau_mm_node *r; | 108 | struct nvkm_mm_node *r; |
109 | u32 total = 0, free = 0; | 109 | u32 total = 0, free = 0; |
110 | 110 | ||
111 | mutex_lock(&nv_subdev(pfb)->mutex); | 111 | mutex_lock(&nv_subdev(pfb)->mutex); |
@@ -150,7 +150,7 @@ static void | |||
150 | nouveau_gart_manager_del(struct ttm_mem_type_manager *man, | 150 | nouveau_gart_manager_del(struct ttm_mem_type_manager *man, |
151 | struct ttm_mem_reg *mem) | 151 | struct ttm_mem_reg *mem) |
152 | { | 152 | { |
153 | nouveau_mem_node_cleanup(mem->mm_node); | 153 | nvkm_mem_node_cleanup(mem->mm_node); |
154 | kfree(mem->mm_node); | 154 | kfree(mem->mm_node); |
155 | mem->mm_node = NULL; | 155 | mem->mm_node = NULL; |
156 | } | 156 | } |
@@ -163,7 +163,7 @@ nouveau_gart_manager_new(struct ttm_mem_type_manager *man, | |||
163 | { | 163 | { |
164 | struct nouveau_drm *drm = nouveau_bdev(bo->bdev); | 164 | struct nouveau_drm *drm = nouveau_bdev(bo->bdev); |
165 | struct nouveau_bo *nvbo = nouveau_bo(bo); | 165 | struct nouveau_bo *nvbo = nouveau_bo(bo); |
166 | struct nouveau_mem *node; | 166 | struct nvkm_mem *node; |
167 | 167 | ||
168 | node = kzalloc(sizeof(*node), GFP_KERNEL); | 168 | node = kzalloc(sizeof(*node), GFP_KERNEL); |
169 | if (!node) | 169 | if (!node) |
@@ -208,10 +208,10 @@ 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 = nvxx_mmu(&drm->device); | 211 | struct nvkm_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 nvkm_vm *vm = NULL; |
214 | nouveau_vm_ref(priv->vm, &vm, NULL); | 214 | nvkm_vm_ref(priv->vm, &vm, NULL); |
215 | man->priv = vm; | 215 | man->priv = vm; |
216 | return 0; | 216 | return 0; |
217 | } | 217 | } |
@@ -219,8 +219,8 @@ nv04_gart_manager_init(struct ttm_mem_type_manager *man, unsigned long psize) | |||
219 | static int | 219 | static int |
220 | nv04_gart_manager_fini(struct ttm_mem_type_manager *man) | 220 | nv04_gart_manager_fini(struct ttm_mem_type_manager *man) |
221 | { | 221 | { |
222 | struct nouveau_vm *vm = man->priv; | 222 | struct nvkm_vm *vm = man->priv; |
223 | nouveau_vm_ref(NULL, &vm, NULL); | 223 | nvkm_vm_ref(NULL, &vm, NULL); |
224 | man->priv = NULL; | 224 | man->priv = NULL; |
225 | return 0; | 225 | return 0; |
226 | } | 226 | } |
@@ -228,9 +228,9 @@ nv04_gart_manager_fini(struct ttm_mem_type_manager *man) | |||
228 | static void | 228 | static void |
229 | nv04_gart_manager_del(struct ttm_mem_type_manager *man, struct ttm_mem_reg *mem) | 229 | nv04_gart_manager_del(struct ttm_mem_type_manager *man, struct ttm_mem_reg *mem) |
230 | { | 230 | { |
231 | struct nouveau_mem *node = mem->mm_node; | 231 | struct nvkm_mem *node = mem->mm_node; |
232 | if (node->vma[0].node) | 232 | if (node->vma[0].node) |
233 | nouveau_vm_put(&node->vma[0]); | 233 | nvkm_vm_put(&node->vma[0]); |
234 | kfree(mem->mm_node); | 234 | kfree(mem->mm_node); |
235 | mem->mm_node = NULL; | 235 | mem->mm_node = NULL; |
236 | } | 236 | } |
@@ -241,7 +241,7 @@ nv04_gart_manager_new(struct ttm_mem_type_manager *man, | |||
241 | const struct ttm_place *place, | 241 | const struct ttm_place *place, |
242 | struct ttm_mem_reg *mem) | 242 | struct ttm_mem_reg *mem) |
243 | { | 243 | { |
244 | struct nouveau_mem *node; | 244 | struct nvkm_mem *node; |
245 | int ret; | 245 | int ret; |
246 | 246 | ||
247 | node = kzalloc(sizeof(*node), GFP_KERNEL); | 247 | node = kzalloc(sizeof(*node), GFP_KERNEL); |
@@ -250,8 +250,8 @@ nv04_gart_manager_new(struct ttm_mem_type_manager *man, | |||
250 | 250 | ||
251 | node->page_shift = 12; | 251 | node->page_shift = 12; |
252 | 252 | ||
253 | ret = nouveau_vm_get(man->priv, mem->num_pages << 12, node->page_shift, | 253 | ret = nvkm_vm_get(man->priv, mem->num_pages << 12, node->page_shift, |
254 | NV_MEM_ACCESS_RW, &node->vma[0]); | 254 | NV_MEM_ACCESS_RW, &node->vma[0]); |
255 | if (ret) { | 255 | if (ret) { |
256 | kfree(node); | 256 | kfree(node); |
257 | return ret; | 257 | return ret; |
diff --git a/drivers/gpu/drm/nouveau/nv04_fence.c b/drivers/gpu/drm/nouveau/nv04_fence.c index af0eaa7bcb33..c2e05e64cd6f 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 = nvxx_fifo_chan(chan);; | 60 | struct nvkm_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 bba84448144e..7da7958556a3 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c | |||
@@ -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 = nvxx_i2c(&drm->device); | 1680 | struct nvkm_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 = nvxx_i2c(&drm->device); | 2065 | struct nvkm_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,8 +2233,8 @@ 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 = nvxx_i2c(&drm->device); | 2236 | struct nvkm_i2c *i2c = nvxx_i2c(&drm->device); |
2237 | struct nouveau_i2c_port *ddc = NULL; | 2237 | struct nvkm_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; |
2240 | int type; | 2240 | int type; |
diff --git a/drivers/gpu/drm/nouveau/nv84_fence.c b/drivers/gpu/drm/nouveau/nv84_fence.c index 46fe1fb5c9be..bf429cabbaa8 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 = nvxx_fifo(&drm->device); | 216 | struct nvkm_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 | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c index 51fcf7960417..0ca9dcabb6d3 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c | |||
@@ -21,18 +21,16 @@ | |||
21 | * | 21 | * |
22 | * Authors: Ben Skeggs | 22 | * Authors: Ben Skeggs |
23 | */ | 23 | */ |
24 | #include "mxms.h" | ||
24 | 25 | ||
26 | #include <core/device.h> | ||
25 | #include <core/option.h> | 27 | #include <core/option.h> |
26 | |||
27 | #include <subdev/i2c.h> | ||
28 | #include <subdev/mxm.h> | ||
29 | #include <subdev/bios.h> | 28 | #include <subdev/bios.h> |
30 | #include <subdev/bios/mxm.h> | 29 | #include <subdev/bios/mxm.h> |
31 | 30 | #include <subdev/i2c.h> | |
32 | #include "mxms.h" | ||
33 | 31 | ||
34 | static bool | 32 | static bool |
35 | mxm_shadow_rom_fetch(struct nouveau_i2c_port *i2c, u8 addr, | 33 | mxm_shadow_rom_fetch(struct nvkm_i2c_port *i2c, u8 addr, |
36 | u8 offset, u8 size, u8 *data) | 34 | u8 offset, u8 size, u8 *data) |
37 | { | 35 | { |
38 | struct i2c_msg msgs[] = { | 36 | struct i2c_msg msgs[] = { |
@@ -44,11 +42,11 @@ mxm_shadow_rom_fetch(struct nouveau_i2c_port *i2c, u8 addr, | |||
44 | } | 42 | } |
45 | 43 | ||
46 | static bool | 44 | static bool |
47 | mxm_shadow_rom(struct nouveau_mxm *mxm, u8 version) | 45 | mxm_shadow_rom(struct nvkm_mxm *mxm, u8 version) |
48 | { | 46 | { |
49 | struct nouveau_bios *bios = nouveau_bios(mxm); | 47 | struct nvkm_bios *bios = nvkm_bios(mxm); |
50 | struct nouveau_i2c *i2c = nouveau_i2c(mxm); | 48 | struct nvkm_i2c *i2c = nvkm_i2c(mxm); |
51 | struct nouveau_i2c_port *port = NULL; | 49 | struct nvkm_i2c_port *port = NULL; |
52 | u8 i2cidx, mxms[6], addr, size; | 50 | u8 i2cidx, mxms[6], addr, size; |
53 | 51 | ||
54 | i2cidx = mxm_ddc_map(bios, 1 /* LVDS_DDC */) & 0x0f; | 52 | i2cidx = mxm_ddc_map(bios, 1 /* LVDS_DDC */) & 0x0f; |
@@ -79,9 +77,9 @@ mxm_shadow_rom(struct nouveau_mxm *mxm, u8 version) | |||
79 | 77 | ||
80 | #if defined(CONFIG_ACPI) | 78 | #if defined(CONFIG_ACPI) |
81 | static bool | 79 | static bool |
82 | mxm_shadow_dsm(struct nouveau_mxm *mxm, u8 version) | 80 | mxm_shadow_dsm(struct nvkm_mxm *mxm, u8 version) |
83 | { | 81 | { |
84 | struct nouveau_device *device = nv_device(mxm); | 82 | struct nvkm_device *device = nv_device(mxm); |
85 | static char muid[] = { | 83 | static char muid[] = { |
86 | 0x00, 0xA4, 0x04, 0x40, 0x7D, 0x91, 0xF2, 0x4C, | 84 | 0x00, 0xA4, 0x04, 0x40, 0x7D, 0x91, 0xF2, 0x4C, |
87 | 0xB8, 0x9C, 0x79, 0xB6, 0x2F, 0xD5, 0x56, 0x65 | 85 | 0xB8, 0x9C, 0x79, 0xB6, 0x2F, 0xD5, 0x56, 0x65 |
@@ -129,7 +127,7 @@ mxm_shadow_dsm(struct nouveau_mxm *mxm, u8 version) | |||
129 | #define WMI_WMMX_GUID "F6CB5C3C-9CAE-4EBD-B577-931EA32A2CC0" | 127 | #define WMI_WMMX_GUID "F6CB5C3C-9CAE-4EBD-B577-931EA32A2CC0" |
130 | 128 | ||
131 | static u8 | 129 | static u8 |
132 | wmi_wmmx_mxmi(struct nouveau_mxm *mxm, u8 version) | 130 | wmi_wmmx_mxmi(struct nvkm_mxm *mxm, u8 version) |
133 | { | 131 | { |
134 | u32 mxmi_args[] = { 0x494D584D /* MXMI */, version, 0 }; | 132 | u32 mxmi_args[] = { 0x494D584D /* MXMI */, version, 0 }; |
135 | struct acpi_buffer args = { sizeof(mxmi_args), mxmi_args }; | 133 | struct acpi_buffer args = { sizeof(mxmi_args), mxmi_args }; |
@@ -158,7 +156,7 @@ wmi_wmmx_mxmi(struct nouveau_mxm *mxm, u8 version) | |||
158 | } | 156 | } |
159 | 157 | ||
160 | static bool | 158 | static bool |
161 | mxm_shadow_wmi(struct nouveau_mxm *mxm, u8 version) | 159 | mxm_shadow_wmi(struct nvkm_mxm *mxm, u8 version) |
162 | { | 160 | { |
163 | u32 mxms_args[] = { 0x534D584D /* MXMS */, version, 0 }; | 161 | u32 mxms_args[] = { 0x534D584D /* MXMS */, version, 0 }; |
164 | struct acpi_buffer args = { sizeof(mxms_args), mxms_args }; | 162 | struct acpi_buffer args = { sizeof(mxms_args), mxms_args }; |
@@ -186,7 +184,7 @@ mxm_shadow_wmi(struct nouveau_mxm *mxm, u8 version) | |||
186 | obj = retn.pointer; | 184 | obj = retn.pointer; |
187 | if (obj->type == ACPI_TYPE_BUFFER) { | 185 | if (obj->type == ACPI_TYPE_BUFFER) { |
188 | mxm->mxms = kmemdup(obj->buffer.pointer, | 186 | mxm->mxms = kmemdup(obj->buffer.pointer, |
189 | obj->buffer.length, GFP_KERNEL); | 187 | obj->buffer.length, GFP_KERNEL); |
190 | } | 188 | } |
191 | 189 | ||
192 | kfree(obj); | 190 | kfree(obj); |
@@ -196,7 +194,7 @@ mxm_shadow_wmi(struct nouveau_mxm *mxm, u8 version) | |||
196 | 194 | ||
197 | static struct mxm_shadow_h { | 195 | static struct mxm_shadow_h { |
198 | const char *name; | 196 | const char *name; |
199 | bool (*exec)(struct nouveau_mxm *, u8 version); | 197 | bool (*exec)(struct nvkm_mxm *, u8 version); |
200 | } _mxm_shadow[] = { | 198 | } _mxm_shadow[] = { |
201 | { "ROM", mxm_shadow_rom }, | 199 | { "ROM", mxm_shadow_rom }, |
202 | #if defined(CONFIG_ACPI) | 200 | #if defined(CONFIG_ACPI) |
@@ -209,7 +207,7 @@ static struct mxm_shadow_h { | |||
209 | }; | 207 | }; |
210 | 208 | ||
211 | static int | 209 | static int |
212 | mxm_shadow(struct nouveau_mxm *mxm, u8 version) | 210 | mxm_shadow(struct nvkm_mxm *mxm, u8 version) |
213 | { | 211 | { |
214 | struct mxm_shadow_h *shadow = _mxm_shadow; | 212 | struct mxm_shadow_h *shadow = _mxm_shadow; |
215 | do { | 213 | do { |
@@ -225,19 +223,18 @@ mxm_shadow(struct nouveau_mxm *mxm, u8 version) | |||
225 | } | 223 | } |
226 | 224 | ||
227 | int | 225 | int |
228 | nouveau_mxm_create_(struct nouveau_object *parent, | 226 | nvkm_mxm_create_(struct nvkm_object *parent, struct nvkm_object *engine, |
229 | struct nouveau_object *engine, | 227 | struct nvkm_oclass *oclass, int length, void **pobject) |
230 | struct nouveau_oclass *oclass, int length, void **pobject) | ||
231 | { | 228 | { |
232 | struct nouveau_device *device = nv_device(parent); | 229 | struct nvkm_device *device = nv_device(parent); |
233 | struct nouveau_bios *bios = nouveau_bios(device); | 230 | struct nvkm_bios *bios = nvkm_bios(device); |
234 | struct nouveau_mxm *mxm; | 231 | struct nvkm_mxm *mxm; |
235 | u8 ver, len; | 232 | u8 ver, len; |
236 | u16 data; | 233 | u16 data; |
237 | int ret; | 234 | int ret; |
238 | 235 | ||
239 | ret = nouveau_subdev_create_(parent, engine, oclass, 0, "MXM", "mxm", | 236 | ret = nvkm_subdev_create_(parent, engine, oclass, 0, "MXM", "mxm", |
240 | length, pobject); | 237 | length, pobject); |
241 | mxm = *pobject; | 238 | mxm = *pobject; |
242 | if (ret) | 239 | if (ret) |
243 | return ret; | 240 | return ret; |
@@ -268,7 +265,7 @@ nouveau_mxm_create_(struct nouveau_object *parent, | |||
268 | mxms_version(mxm) >> 8, mxms_version(mxm) & 0xff); | 265 | mxms_version(mxm) >> 8, mxms_version(mxm) & 0xff); |
269 | mxms_foreach(mxm, 0, NULL, NULL); | 266 | mxms_foreach(mxm, 0, NULL, NULL); |
270 | 267 | ||
271 | if (nouveau_boolopt(device->cfgopt, "NvMXMDCB", true)) | 268 | if (nvkm_boolopt(device->cfgopt, "NvMXMDCB", true)) |
272 | mxm->action |= MXM_SANITISE_DCB; | 269 | mxm->action |= MXM_SANITISE_DCB; |
273 | return 0; | 270 | return 0; |
274 | } | 271 | } |
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/mxms.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/mxms.c index 4bde7f7f7b81..a9b1d63fed58 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/mxms.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/mxms.c | |||
@@ -21,22 +21,20 @@ | |||
21 | * | 21 | * |
22 | * Authors: Ben Skeggs | 22 | * Authors: Ben Skeggs |
23 | */ | 23 | */ |
24 | |||
25 | #include <subdev/mxm.h> | ||
26 | #include "mxms.h" | 24 | #include "mxms.h" |
27 | 25 | ||
28 | #define ROM16(x) le16_to_cpu(*(u16 *)&(x)) | 26 | #define ROM16(x) le16_to_cpu(*(u16 *)&(x)) |
29 | #define ROM32(x) le32_to_cpu(*(u32 *)&(x)) | 27 | #define ROM32(x) le32_to_cpu(*(u32 *)&(x)) |
30 | 28 | ||
31 | static u8 * | 29 | static u8 * |
32 | mxms_data(struct nouveau_mxm *mxm) | 30 | mxms_data(struct nvkm_mxm *mxm) |
33 | { | 31 | { |
34 | return mxm->mxms; | 32 | return mxm->mxms; |
35 | 33 | ||
36 | } | 34 | } |
37 | 35 | ||
38 | u16 | 36 | u16 |
39 | mxms_version(struct nouveau_mxm *mxm) | 37 | mxms_version(struct nvkm_mxm *mxm) |
40 | { | 38 | { |
41 | u8 *mxms = mxms_data(mxm); | 39 | u8 *mxms = mxms_data(mxm); |
42 | u16 version = (mxms[4] << 8) | mxms[5]; | 40 | u16 version = (mxms[4] << 8) | mxms[5]; |
@@ -54,19 +52,19 @@ mxms_version(struct nouveau_mxm *mxm) | |||
54 | } | 52 | } |
55 | 53 | ||
56 | u16 | 54 | u16 |
57 | mxms_headerlen(struct nouveau_mxm *mxm) | 55 | mxms_headerlen(struct nvkm_mxm *mxm) |
58 | { | 56 | { |
59 | return 8; | 57 | return 8; |
60 | } | 58 | } |
61 | 59 | ||
62 | u16 | 60 | u16 |
63 | mxms_structlen(struct nouveau_mxm *mxm) | 61 | mxms_structlen(struct nvkm_mxm *mxm) |
64 | { | 62 | { |
65 | return *(u16 *)&mxms_data(mxm)[6]; | 63 | return *(u16 *)&mxms_data(mxm)[6]; |
66 | } | 64 | } |
67 | 65 | ||
68 | bool | 66 | bool |
69 | mxms_checksum(struct nouveau_mxm *mxm) | 67 | mxms_checksum(struct nvkm_mxm *mxm) |
70 | { | 68 | { |
71 | u16 size = mxms_headerlen(mxm) + mxms_structlen(mxm); | 69 | u16 size = mxms_headerlen(mxm) + mxms_structlen(mxm); |
72 | u8 *mxms = mxms_data(mxm), sum = 0; | 70 | u8 *mxms = mxms_data(mxm), sum = 0; |
@@ -80,7 +78,7 @@ mxms_checksum(struct nouveau_mxm *mxm) | |||
80 | } | 78 | } |
81 | 79 | ||
82 | bool | 80 | bool |
83 | mxms_valid(struct nouveau_mxm *mxm) | 81 | mxms_valid(struct nvkm_mxm *mxm) |
84 | { | 82 | { |
85 | u8 *mxms = mxms_data(mxm); | 83 | u8 *mxms = mxms_data(mxm); |
86 | if (*(u32 *)mxms != 0x5f4d584d) { | 84 | if (*(u32 *)mxms != 0x5f4d584d) { |
@@ -95,8 +93,8 @@ mxms_valid(struct nouveau_mxm *mxm) | |||
95 | } | 93 | } |
96 | 94 | ||
97 | bool | 95 | bool |
98 | mxms_foreach(struct nouveau_mxm *mxm, u8 types, | 96 | mxms_foreach(struct nvkm_mxm *mxm, u8 types, |
99 | bool (*exec)(struct nouveau_mxm *, u8 *, void *), void *info) | 97 | bool (*exec)(struct nvkm_mxm *, u8 *, void *), void *info) |
100 | { | 98 | { |
101 | u8 *mxms = mxms_data(mxm); | 99 | u8 *mxms = mxms_data(mxm); |
102 | u8 *desc = mxms + mxms_headerlen(mxm); | 100 | u8 *desc = mxms + mxms_headerlen(mxm); |
@@ -180,7 +178,7 @@ mxms_foreach(struct nouveau_mxm *mxm, u8 types, | |||
180 | } | 178 | } |
181 | 179 | ||
182 | void | 180 | void |
183 | mxms_output_device(struct nouveau_mxm *mxm, u8 *pdata, struct mxms_odev *desc) | 181 | mxms_output_device(struct nvkm_mxm *mxm, u8 *pdata, struct mxms_odev *desc) |
184 | { | 182 | { |
185 | u64 data = ROM32(pdata[0]); | 183 | u64 data = ROM32(pdata[0]); |
186 | if (mxms_version(mxm) >= 0x0300) | 184 | if (mxms_version(mxm) >= 0x0300) |
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/mxms.h b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/mxms.h index 5e0be0c591ca..4ef804012d06 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/mxms.h +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/mxms.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #ifndef __NVMXM_MXMS_H__ | 1 | #ifndef __NVMXM_MXMS_H__ |
2 | #define __NVMXM_MXMS_H__ | 2 | #define __NVMXM_MXMS_H__ |
3 | #include <subdev/mxm.h> | ||
3 | 4 | ||
4 | struct mxms_odev { | 5 | struct mxms_odev { |
5 | u8 outp_type; | 6 | u8 outp_type; |
@@ -8,15 +9,14 @@ struct mxms_odev { | |||
8 | u8 dig_conn; | 9 | u8 dig_conn; |
9 | }; | 10 | }; |
10 | 11 | ||
11 | void mxms_output_device(struct nouveau_mxm *, u8 *, struct mxms_odev *); | 12 | void mxms_output_device(struct nvkm_mxm *, u8 *, struct mxms_odev *); |
12 | 13 | ||
13 | u16 mxms_version(struct nouveau_mxm *); | 14 | u16 mxms_version(struct nvkm_mxm *); |
14 | u16 mxms_headerlen(struct nouveau_mxm *); | 15 | u16 mxms_headerlen(struct nvkm_mxm *); |
15 | u16 mxms_structlen(struct nouveau_mxm *); | 16 | u16 mxms_structlen(struct nvkm_mxm *); |
16 | bool mxms_checksum(struct nouveau_mxm *); | 17 | bool mxms_checksum(struct nvkm_mxm *); |
17 | bool mxms_valid(struct nouveau_mxm *); | 18 | bool mxms_valid(struct nvkm_mxm *); |
18 | |||
19 | bool mxms_foreach(struct nouveau_mxm *, u8, | ||
20 | bool (*)(struct nouveau_mxm *, u8 *, void *), void *); | ||
21 | 19 | ||
20 | bool mxms_foreach(struct nvkm_mxm *, u8, | ||
21 | bool (*)(struct nvkm_mxm *, u8 *, void *), void *); | ||
22 | #endif | 22 | #endif |
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/nv50.c index fcaabe8456e3..42cac13ca629 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/nv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/nv50.c | |||
@@ -21,17 +21,15 @@ | |||
21 | * | 21 | * |
22 | * Authors: Ben Skeggs | 22 | * Authors: Ben Skeggs |
23 | */ | 23 | */ |
24 | #include "mxms.h" | ||
24 | 25 | ||
25 | #include <subdev/mxm.h> | ||
26 | #include <subdev/bios.h> | 26 | #include <subdev/bios.h> |
27 | #include <subdev/bios/conn.h> | 27 | #include <subdev/bios/conn.h> |
28 | #include <subdev/bios/dcb.h> | 28 | #include <subdev/bios/dcb.h> |
29 | #include <subdev/bios/mxm.h> | 29 | #include <subdev/bios/mxm.h> |
30 | 30 | ||
31 | #include "mxms.h" | ||
32 | |||
33 | struct nv50_mxm_priv { | 31 | struct nv50_mxm_priv { |
34 | struct nouveau_mxm base; | 32 | struct nvkm_mxm base; |
35 | }; | 33 | }; |
36 | 34 | ||
37 | struct context { | 35 | struct context { |
@@ -40,7 +38,7 @@ struct context { | |||
40 | }; | 38 | }; |
41 | 39 | ||
42 | static bool | 40 | static bool |
43 | mxm_match_tmds_partner(struct nouveau_mxm *mxm, u8 *data, void *info) | 41 | mxm_match_tmds_partner(struct nvkm_mxm *mxm, u8 *data, void *info) |
44 | { | 42 | { |
45 | struct context *ctx = info; | 43 | struct context *ctx = info; |
46 | struct mxms_odev desc; | 44 | struct mxms_odev desc; |
@@ -53,9 +51,9 @@ mxm_match_tmds_partner(struct nouveau_mxm *mxm, u8 *data, void *info) | |||
53 | } | 51 | } |
54 | 52 | ||
55 | static bool | 53 | static bool |
56 | mxm_match_dcb(struct nouveau_mxm *mxm, u8 *data, void *info) | 54 | mxm_match_dcb(struct nvkm_mxm *mxm, u8 *data, void *info) |
57 | { | 55 | { |
58 | struct nouveau_bios *bios = nouveau_bios(mxm); | 56 | struct nvkm_bios *bios = nvkm_bios(mxm); |
59 | struct context *ctx = info; | 57 | struct context *ctx = info; |
60 | u64 desc = *(u64 *)data; | 58 | u64 desc = *(u64 *)data; |
61 | 59 | ||
@@ -98,9 +96,9 @@ mxm_match_dcb(struct nouveau_mxm *mxm, u8 *data, void *info) | |||
98 | } | 96 | } |
99 | 97 | ||
100 | static int | 98 | static int |
101 | mxm_dcb_sanitise_entry(struct nouveau_bios *bios, void *data, int idx, u16 pdcb) | 99 | mxm_dcb_sanitise_entry(struct nvkm_bios *bios, void *data, int idx, u16 pdcb) |
102 | { | 100 | { |
103 | struct nouveau_mxm *mxm = data; | 101 | struct nvkm_mxm *mxm = data; |
104 | struct context ctx = { .outp = (u32 *)(bios->data + pdcb) }; | 102 | struct context ctx = { .outp = (u32 *)(bios->data + pdcb) }; |
105 | u8 type, i2cidx, link, ver, len; | 103 | u8 type, i2cidx, link, ver, len; |
106 | u8 *conn; | 104 | u8 *conn; |
@@ -180,7 +178,7 @@ mxm_dcb_sanitise_entry(struct nouveau_bios *bios, void *data, int idx, u16 pdcb) | |||
180 | } | 178 | } |
181 | 179 | ||
182 | static bool | 180 | static bool |
183 | mxm_show_unmatched(struct nouveau_mxm *mxm, u8 *data, void *info) | 181 | mxm_show_unmatched(struct nvkm_mxm *mxm, u8 *data, void *info) |
184 | { | 182 | { |
185 | u64 desc = *(u64 *)data; | 183 | u64 desc = *(u64 *)data; |
186 | if ((desc & 0xf0) != 0xf0) | 184 | if ((desc & 0xf0) != 0xf0) |
@@ -189,9 +187,9 @@ mxm_show_unmatched(struct nouveau_mxm *mxm, u8 *data, void *info) | |||
189 | } | 187 | } |
190 | 188 | ||
191 | static void | 189 | static void |
192 | mxm_dcb_sanitise(struct nouveau_mxm *mxm) | 190 | mxm_dcb_sanitise(struct nvkm_mxm *mxm) |
193 | { | 191 | { |
194 | struct nouveau_bios *bios = nouveau_bios(mxm); | 192 | struct nvkm_bios *bios = nvkm_bios(mxm); |
195 | u8 ver, hdr, cnt, len; | 193 | u8 ver, hdr, cnt, len; |
196 | u16 dcb = dcb_table(bios, &ver, &hdr, &cnt, &len); | 194 | u16 dcb = dcb_table(bios, &ver, &hdr, &cnt, &len); |
197 | if (dcb == 0x0000 || ver != 0x40) { | 195 | if (dcb == 0x0000 || ver != 0x40) { |
@@ -204,14 +202,14 @@ mxm_dcb_sanitise(struct nouveau_mxm *mxm) | |||
204 | } | 202 | } |
205 | 203 | ||
206 | static int | 204 | static int |
207 | nv50_mxm_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | 205 | nv50_mxm_ctor(struct nvkm_object *parent, struct nvkm_object *engine, |
208 | struct nouveau_oclass *oclass, void *data, u32 size, | 206 | struct nvkm_oclass *oclass, void *data, u32 size, |
209 | struct nouveau_object **pobject) | 207 | struct nvkm_object **pobject) |
210 | { | 208 | { |
211 | struct nv50_mxm_priv *priv; | 209 | struct nv50_mxm_priv *priv; |
212 | int ret; | 210 | int ret; |
213 | 211 | ||
214 | ret = nouveau_mxm_create(parent, engine, oclass, &priv); | 212 | ret = nvkm_mxm_create(parent, engine, oclass, &priv); |
215 | *pobject = nv_object(priv); | 213 | *pobject = nv_object(priv); |
216 | if (ret) | 214 | if (ret) |
217 | return ret; | 215 | return ret; |
@@ -221,13 +219,13 @@ nv50_mxm_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
221 | return 0; | 219 | return 0; |
222 | } | 220 | } |
223 | 221 | ||
224 | struct nouveau_oclass | 222 | struct nvkm_oclass |
225 | nv50_mxm_oclass = { | 223 | nv50_mxm_oclass = { |
226 | .handle = NV_SUBDEV(MXM, 0x50), | 224 | .handle = NV_SUBDEV(MXM, 0x50), |
227 | .ofuncs = &(struct nouveau_ofuncs) { | 225 | .ofuncs = &(struct nvkm_ofuncs) { |
228 | .ctor = nv50_mxm_ctor, | 226 | .ctor = nv50_mxm_ctor, |
229 | .dtor = _nouveau_mxm_dtor, | 227 | .dtor = _nvkm_mxm_dtor, |
230 | .init = _nouveau_mxm_init, | 228 | .init = _nvkm_mxm_init, |
231 | .fini = _nouveau_mxm_fini, | 229 | .fini = _nvkm_mxm_fini, |
232 | }, | 230 | }, |
233 | }; | 231 | }; |