aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/nouveau/nv50_crtc.c12
-rw-r--r--drivers/gpu/drm/nouveau/nv50_cursor.c4
-rw-r--r--drivers/gpu/drm/nouveau/nv50_dac.c4
-rw-r--r--drivers/gpu/drm/nouveau/nv50_display.c4
-rw-r--r--drivers/gpu/drm/nouveau/nv50_display.h2
-rw-r--r--drivers/gpu/drm/nouveau/nv50_evo.c42
-rw-r--r--drivers/gpu/drm/nouveau/nv50_sor.c4
7 files changed, 36 insertions, 36 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c
index 62a563eedfec..bc5fa36677c1 100644
--- a/drivers/gpu/drm/nouveau/nv50_crtc.c
+++ b/drivers/gpu/drm/nouveau/nv50_crtc.c
@@ -65,7 +65,7 @@ nv50_crtc_blank(struct nouveau_crtc *nv_crtc, bool blanked)
65{ 65{
66 struct drm_device *dev = nv_crtc->base.dev; 66 struct drm_device *dev = nv_crtc->base.dev;
67 struct drm_nouveau_private *dev_priv = dev->dev_private; 67 struct drm_nouveau_private *dev_priv = dev->dev_private;
68 struct nouveau_channel *evo = nv50_display(dev)->evo; 68 struct nouveau_channel *evo = nv50_display(dev)->master;
69 int index = nv_crtc->index, ret; 69 int index = nv_crtc->index, ret;
70 70
71 NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index); 71 NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index);
@@ -135,7 +135,7 @@ static int
135nv50_crtc_set_dither(struct nouveau_crtc *nv_crtc, bool on, bool update) 135nv50_crtc_set_dither(struct nouveau_crtc *nv_crtc, bool on, bool update)
136{ 136{
137 struct drm_device *dev = nv_crtc->base.dev; 137 struct drm_device *dev = nv_crtc->base.dev;
138 struct nouveau_channel *evo = nv50_display(dev)->evo; 138 struct nouveau_channel *evo = nv50_display(dev)->master;
139 int ret; 139 int ret;
140 140
141 NV_DEBUG_KMS(dev, "\n"); 141 NV_DEBUG_KMS(dev, "\n");
@@ -185,7 +185,7 @@ nv50_crtc_set_scale(struct nouveau_crtc *nv_crtc, int scaling_mode, bool update)
185 struct nouveau_connector *nv_connector = 185 struct nouveau_connector *nv_connector =
186 nouveau_crtc_connector_get(nv_crtc); 186 nouveau_crtc_connector_get(nv_crtc);
187 struct drm_device *dev = nv_crtc->base.dev; 187 struct drm_device *dev = nv_crtc->base.dev;
188 struct nouveau_channel *evo = nv50_display(dev)->evo; 188 struct nouveau_channel *evo = nv50_display(dev)->master;
189 struct drm_display_mode *native_mode = NULL; 189 struct drm_display_mode *native_mode = NULL;
190 struct drm_display_mode *mode = &nv_crtc->base.mode; 190 struct drm_display_mode *mode = &nv_crtc->base.mode;
191 uint32_t outX, outY, horiz, vert; 191 uint32_t outX, outY, horiz, vert;
@@ -459,7 +459,7 @@ static void
459nv50_crtc_commit(struct drm_crtc *crtc) 459nv50_crtc_commit(struct drm_crtc *crtc)
460{ 460{
461 struct drm_device *dev = crtc->dev; 461 struct drm_device *dev = crtc->dev;
462 struct nouveau_channel *evo = nv50_display(dev)->evo; 462 struct nouveau_channel *evo = nv50_display(dev)->master;
463 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); 463 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
464 int ret; 464 int ret;
465 465
@@ -493,7 +493,7 @@ nv50_crtc_do_mode_set_base(struct drm_crtc *crtc,
493 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); 493 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
494 struct drm_device *dev = nv_crtc->base.dev; 494 struct drm_device *dev = nv_crtc->base.dev;
495 struct drm_nouveau_private *dev_priv = dev->dev_private; 495 struct drm_nouveau_private *dev_priv = dev->dev_private;
496 struct nouveau_channel *evo = nv50_display(dev)->evo; 496 struct nouveau_channel *evo = nv50_display(dev)->master;
497 struct drm_framebuffer *drm_fb = nv_crtc->base.fb; 497 struct drm_framebuffer *drm_fb = nv_crtc->base.fb;
498 struct nouveau_framebuffer *fb = nouveau_framebuffer(drm_fb); 498 struct nouveau_framebuffer *fb = nouveau_framebuffer(drm_fb);
499 int ret, format; 499 int ret, format;
@@ -616,7 +616,7 @@ nv50_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
616 struct drm_framebuffer *old_fb) 616 struct drm_framebuffer *old_fb)
617{ 617{
618 struct drm_device *dev = crtc->dev; 618 struct drm_device *dev = crtc->dev;
619 struct nouveau_channel *evo = nv50_display(dev)->evo; 619 struct nouveau_channel *evo = nv50_display(dev)->master;
620 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); 620 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
621 struct nouveau_connector *nv_connector = NULL; 621 struct nouveau_connector *nv_connector = NULL;
622 uint32_t hsync_dur, vsync_dur, hsync_start_to_end, vsync_start_to_end; 622 uint32_t hsync_dur, vsync_dur, hsync_start_to_end, vsync_start_to_end;
diff --git a/drivers/gpu/drm/nouveau/nv50_cursor.c b/drivers/gpu/drm/nouveau/nv50_cursor.c
index ba75f95ca529..9752c35bb84b 100644
--- a/drivers/gpu/drm/nouveau/nv50_cursor.c
+++ b/drivers/gpu/drm/nouveau/nv50_cursor.c
@@ -38,7 +38,7 @@ nv50_cursor_show(struct nouveau_crtc *nv_crtc, bool update)
38{ 38{
39 struct drm_device *dev = nv_crtc->base.dev; 39 struct drm_device *dev = nv_crtc->base.dev;
40 struct drm_nouveau_private *dev_priv = dev->dev_private; 40 struct drm_nouveau_private *dev_priv = dev->dev_private;
41 struct nouveau_channel *evo = nv50_display(dev)->evo; 41 struct nouveau_channel *evo = nv50_display(dev)->master;
42 int ret; 42 int ret;
43 43
44 NV_DEBUG_KMS(dev, "\n"); 44 NV_DEBUG_KMS(dev, "\n");
@@ -73,7 +73,7 @@ nv50_cursor_hide(struct nouveau_crtc *nv_crtc, bool update)
73{ 73{
74 struct drm_device *dev = nv_crtc->base.dev; 74 struct drm_device *dev = nv_crtc->base.dev;
75 struct drm_nouveau_private *dev_priv = dev->dev_private; 75 struct drm_nouveau_private *dev_priv = dev->dev_private;
76 struct nouveau_channel *evo = nv50_display(dev)->evo; 76 struct nouveau_channel *evo = nv50_display(dev)->master;
77 int ret; 77 int ret;
78 78
79 NV_DEBUG_KMS(dev, "\n"); 79 NV_DEBUG_KMS(dev, "\n");
diff --git a/drivers/gpu/drm/nouveau/nv50_dac.c b/drivers/gpu/drm/nouveau/nv50_dac.c
index ca9af5b30d24..808f3ec8f827 100644
--- a/drivers/gpu/drm/nouveau/nv50_dac.c
+++ b/drivers/gpu/drm/nouveau/nv50_dac.c
@@ -41,7 +41,7 @@ nv50_dac_disconnect(struct drm_encoder *encoder)
41{ 41{
42 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); 42 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
43 struct drm_device *dev = encoder->dev; 43 struct drm_device *dev = encoder->dev;
44 struct nouveau_channel *evo = nv50_display(dev)->evo; 44 struct nouveau_channel *evo = nv50_display(dev)->master;
45 int ret; 45 int ret;
46 46
47 if (!nv_encoder->crtc) 47 if (!nv_encoder->crtc)
@@ -215,7 +215,7 @@ nv50_dac_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
215{ 215{
216 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); 216 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
217 struct drm_device *dev = encoder->dev; 217 struct drm_device *dev = encoder->dev;
218 struct nouveau_channel *evo = nv50_display(dev)->evo; 218 struct nouveau_channel *evo = nv50_display(dev)->master;
219 struct nouveau_crtc *crtc = nouveau_crtc(encoder->crtc); 219 struct nouveau_crtc *crtc = nouveau_crtc(encoder->crtc);
220 uint32_t mode_ctl = 0, mode_ctl2 = 0; 220 uint32_t mode_ctl = 0, mode_ctl2 = 0;
221 int ret; 221 int ret;
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index 636d3a204f0a..0f3384aa6134 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -172,7 +172,7 @@ nv50_display_init(struct drm_device *dev)
172 ret = nv50_evo_init(dev); 172 ret = nv50_evo_init(dev);
173 if (ret) 173 if (ret)
174 return ret; 174 return ret;
175 evo = nv50_display(dev)->evo; 175 evo = nv50_display(dev)->master;
176 176
177 nv_wr32(dev, NV50_PDISPLAY_OBJECTS, (evo->ramin->vinst >> 8) | 9); 177 nv_wr32(dev, NV50_PDISPLAY_OBJECTS, (evo->ramin->vinst >> 8) | 9);
178 178
@@ -202,7 +202,7 @@ static int nv50_display_disable(struct drm_device *dev)
202{ 202{
203 struct drm_nouveau_private *dev_priv = dev->dev_private; 203 struct drm_nouveau_private *dev_priv = dev->dev_private;
204 struct nv50_display *disp = nv50_display(dev); 204 struct nv50_display *disp = nv50_display(dev);
205 struct nouveau_channel *evo = disp->evo; 205 struct nouveau_channel *evo = disp->master;
206 struct drm_crtc *drm_crtc; 206 struct drm_crtc *drm_crtc;
207 int ret, i; 207 int ret, i;
208 208
diff --git a/drivers/gpu/drm/nouveau/nv50_display.h b/drivers/gpu/drm/nouveau/nv50_display.h
index 7edd02059b80..0d9995173a10 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.h
+++ b/drivers/gpu/drm/nouveau/nv50_display.h
@@ -36,7 +36,7 @@
36#include "nv50_evo.h" 36#include "nv50_evo.h"
37 37
38struct nv50_display { 38struct nv50_display {
39 struct nouveau_channel *evo; 39 struct nouveau_channel *master;
40 u32 evo_alloc; 40 u32 evo_alloc;
41 41
42 struct { 42 struct {
diff --git a/drivers/gpu/drm/nouveau/nv50_evo.c b/drivers/gpu/drm/nouveau/nv50_evo.c
index d3222a73c28e..d837168b5aa5 100644
--- a/drivers/gpu/drm/nouveau/nv50_evo.c
+++ b/drivers/gpu/drm/nouveau/nv50_evo.c
@@ -62,7 +62,7 @@ nv50_evo_dmaobj_new(struct nouveau_channel *evo, u32 class, u32 name,
62 struct nouveau_gpuobj *obj = NULL; 62 struct nouveau_gpuobj *obj = NULL;
63 int ret; 63 int ret;
64 64
65 ret = nouveau_gpuobj_new(evo->dev, disp->evo, 6*4, 32, 0, &obj); 65 ret = nouveau_gpuobj_new(evo->dev, disp->master, 6*4, 32, 0, &obj);
66 if (ret) 66 if (ret)
67 return ret; 67 return ret;
68 obj->engine = NVOBJ_ENGINE_DISPLAY; 68 obj->engine = NVOBJ_ENGINE_DISPLAY;
@@ -139,8 +139,8 @@ nv50_evo_channel_new(struct drm_device *dev, struct nouveau_channel **pevo)
139 } 139 }
140 140
141 /* bind primary evo channel's ramht to the channel */ 141 /* bind primary evo channel's ramht to the channel */
142 if (disp->evo && evo != disp->evo) 142 if (disp->master && evo != disp->master)
143 nouveau_ramht_ref(disp->evo->ramht, &evo->ramht, NULL); 143 nouveau_ramht_ref(disp->master->ramht, &evo->ramht, NULL);
144 144
145 return 0; 145 return 0;
146} 146}
@@ -225,10 +225,10 @@ nv50_evo_create(struct drm_device *dev)
225 /* create primary evo channel, the one we use for modesetting 225 /* create primary evo channel, the one we use for modesetting
226 * purporses 226 * purporses
227 */ 227 */
228 ret = nv50_evo_channel_new(dev, &disp->evo); 228 ret = nv50_evo_channel_new(dev, &disp->master);
229 if (ret) 229 if (ret)
230 return ret; 230 return ret;
231 evo = disp->evo; 231 evo = disp->master;
232 232
233 /* setup object management on it, any other evo channel will 233 /* setup object management on it, any other evo channel will
234 * use this also as there's no per-channel support on the 234 * use this also as there's no per-channel support on the
@@ -238,28 +238,28 @@ nv50_evo_create(struct drm_device *dev)
238 NVOBJ_FLAG_ZERO_ALLOC, &evo->ramin); 238 NVOBJ_FLAG_ZERO_ALLOC, &evo->ramin);
239 if (ret) { 239 if (ret) {
240 NV_ERROR(dev, "Error allocating EVO channel memory: %d\n", ret); 240 NV_ERROR(dev, "Error allocating EVO channel memory: %d\n", ret);
241 nv50_evo_channel_del(&disp->evo); 241 nv50_evo_channel_del(&disp->master);
242 return ret; 242 return ret;
243 } 243 }
244 244
245 ret = drm_mm_init(&evo->ramin_heap, 0, 32768); 245 ret = drm_mm_init(&evo->ramin_heap, 0, 32768);
246 if (ret) { 246 if (ret) {
247 NV_ERROR(dev, "Error initialising EVO PRAMIN heap: %d\n", ret); 247 NV_ERROR(dev, "Error initialising EVO PRAMIN heap: %d\n", ret);
248 nv50_evo_channel_del(&disp->evo); 248 nv50_evo_channel_del(&disp->master);
249 return ret; 249 return ret;
250 } 250 }
251 251
252 ret = nouveau_gpuobj_new(dev, evo, 4096, 16, 0, &ramht); 252 ret = nouveau_gpuobj_new(dev, evo, 4096, 16, 0, &ramht);
253 if (ret) { 253 if (ret) {
254 NV_ERROR(dev, "Unable to allocate EVO RAMHT: %d\n", ret); 254 NV_ERROR(dev, "Unable to allocate EVO RAMHT: %d\n", ret);
255 nv50_evo_channel_del(&disp->evo); 255 nv50_evo_channel_del(&disp->master);
256 return ret; 256 return ret;
257 } 257 }
258 258
259 ret = nouveau_ramht_new(dev, ramht, &evo->ramht); 259 ret = nouveau_ramht_new(dev, ramht, &evo->ramht);
260 nouveau_gpuobj_ref(NULL, &ramht); 260 nouveau_gpuobj_ref(NULL, &ramht);
261 if (ret) { 261 if (ret) {
262 nv50_evo_channel_del(&disp->evo); 262 nv50_evo_channel_del(&disp->master);
263 return ret; 263 return ret;
264 } 264 }
265 265
@@ -268,28 +268,28 @@ nv50_evo_create(struct drm_device *dev)
268 ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB32, 0xfe, 0x19, 268 ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB32, 0xfe, 0x19,
269 0, 0xffffffff, 0x00000000); 269 0, 0xffffffff, 0x00000000);
270 if (ret) { 270 if (ret) {
271 nv50_evo_channel_del(&disp->evo); 271 nv50_evo_channel_del(&disp->master);
272 return ret; 272 return ret;
273 } 273 }
274 274
275 ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoVRAM, 0, 0x19, 275 ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoVRAM, 0, 0x19,
276 0, dev_priv->vram_size, 0x00020000); 276 0, dev_priv->vram_size, 0x00020000);
277 if (ret) { 277 if (ret) {
278 nv50_evo_channel_del(&disp->evo); 278 nv50_evo_channel_del(&disp->master);
279 return ret; 279 return ret;
280 } 280 }
281 281
282 ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoVRAM_LP, 0, 0x19, 282 ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoVRAM_LP, 0, 0x19,
283 0, dev_priv->vram_size, 0x00000000); 283 0, dev_priv->vram_size, 0x00000000);
284 if (ret) { 284 if (ret) {
285 nv50_evo_channel_del(&disp->evo); 285 nv50_evo_channel_del(&disp->master);
286 return ret; 286 return ret;
287 } 287 }
288 } else { 288 } else {
289 ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB16, 0x70, 0x19, 289 ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB16, 0x70, 0x19,
290 0, 0xffffffff, 0x00010000); 290 0, 0xffffffff, 0x00010000);
291 if (ret) { 291 if (ret) {
292 nv50_evo_channel_del(&disp->evo); 292 nv50_evo_channel_del(&disp->master);
293 return ret; 293 return ret;
294 } 294 }
295 295
@@ -297,21 +297,21 @@ nv50_evo_create(struct drm_device *dev)
297 ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB32, 0x7a, 0x19, 297 ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB32, 0x7a, 0x19,
298 0, 0xffffffff, 0x00010000); 298 0, 0xffffffff, 0x00010000);
299 if (ret) { 299 if (ret) {
300 nv50_evo_channel_del(&disp->evo); 300 nv50_evo_channel_del(&disp->master);
301 return ret; 301 return ret;
302 } 302 }
303 303
304 ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoVRAM, 0, 0x19, 304 ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoVRAM, 0, 0x19,
305 0, dev_priv->vram_size, 0x00010000); 305 0, dev_priv->vram_size, 0x00010000);
306 if (ret) { 306 if (ret) {
307 nv50_evo_channel_del(&disp->evo); 307 nv50_evo_channel_del(&disp->master);
308 return ret; 308 return ret;
309 } 309 }
310 310
311 ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoVRAM_LP, 0, 0x19, 311 ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoVRAM_LP, 0, 0x19,
312 0, dev_priv->vram_size, 0x00010000); 312 0, dev_priv->vram_size, 0x00010000);
313 if (ret) { 313 if (ret) {
314 nv50_evo_channel_del(&disp->evo); 314 nv50_evo_channel_del(&disp->master);
315 return ret; 315 return ret;
316 } 316 }
317 } 317 }
@@ -325,13 +325,13 @@ nv50_evo_init(struct drm_device *dev)
325 struct nv50_display *disp = nv50_display(dev); 325 struct nv50_display *disp = nv50_display(dev);
326 int ret; 326 int ret;
327 327
328 if (!disp->evo) { 328 if (!disp->master) {
329 ret = nv50_evo_create(dev); 329 ret = nv50_evo_create(dev);
330 if (ret) 330 if (ret)
331 return ret; 331 return ret;
332 } 332 }
333 333
334 return nv50_evo_channel_init(disp->evo); 334 return nv50_evo_channel_init(disp->master);
335} 335}
336 336
337void 337void
@@ -339,8 +339,8 @@ nv50_evo_fini(struct drm_device *dev)
339{ 339{
340 struct nv50_display *disp = nv50_display(dev); 340 struct nv50_display *disp = nv50_display(dev);
341 341
342 if (disp->evo) { 342 if (disp->master) {
343 nv50_evo_channel_fini(disp->evo); 343 nv50_evo_channel_fini(disp->master);
344 nv50_evo_channel_del(&disp->evo); 344 nv50_evo_channel_del(&disp->master);
345 } 345 }
346} 346}
diff --git a/drivers/gpu/drm/nouveau/nv50_sor.c b/drivers/gpu/drm/nouveau/nv50_sor.c
index 9138d1918ec3..c25c59386420 100644
--- a/drivers/gpu/drm/nouveau/nv50_sor.c
+++ b/drivers/gpu/drm/nouveau/nv50_sor.c
@@ -41,7 +41,7 @@ nv50_sor_disconnect(struct drm_encoder *encoder)
41{ 41{
42 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); 42 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
43 struct drm_device *dev = encoder->dev; 43 struct drm_device *dev = encoder->dev;
44 struct nouveau_channel *evo = nv50_display(dev)->evo; 44 struct nouveau_channel *evo = nv50_display(dev)->master;
45 int ret; 45 int ret;
46 46
47 if (!nv_encoder->crtc) 47 if (!nv_encoder->crtc)
@@ -183,7 +183,7 @@ static void
183nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, 183nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
184 struct drm_display_mode *adjusted_mode) 184 struct drm_display_mode *adjusted_mode)
185{ 185{
186 struct nouveau_channel *evo = nv50_display(encoder->dev)->evo; 186 struct nouveau_channel *evo = nv50_display(encoder->dev)->master;
187 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); 187 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
188 struct drm_device *dev = encoder->dev; 188 struct drm_device *dev = encoder->dev;
189 struct nouveau_crtc *crtc = nouveau_crtc(encoder->crtc); 189 struct nouveau_crtc *crtc = nouveau_crtc(encoder->crtc);