aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvd0_display.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-11-11 21:53:36 -0500
committerBen Skeggs <bskeggs@redhat.com>2011-12-21 04:01:36 -0500
commit2eac77b793196b97a35f9c5579411eb0aa085047 (patch)
treea77bcd780c1e288fc42b7f9c64115ae17e9beb85 /drivers/gpu/drm/nouveau/nvd0_display.c
parentbdb8c212bec7410dadcf7c406d43f5b9219f0e56 (diff)
drm/nvd0/disp: have evo names now, use them
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvd0_display.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvd0_display.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/gpu/drm/nouveau/nvd0_display.c b/drivers/gpu/drm/nouveau/nvd0_display.c
index 649a4a6e9227..3179f2a9ed23 100644
--- a/drivers/gpu/drm/nouveau/nvd0_display.c
+++ b/drivers/gpu/drm/nouveau/nvd0_display.c
@@ -218,7 +218,7 @@ nvd0_crtc_set_dither(struct nouveau_crtc *nv_crtc, bool update)
218 mode |= nv_connector->dithering_depth; 218 mode |= nv_connector->dithering_depth;
219 } 219 }
220 220
221 push = evo_wait(dev, 0, 4); 221 push = evo_wait(dev, EVO_MASTER, 4);
222 if (push) { 222 if (push) {
223 evo_mthd(push, 0x0490 + (nv_crtc->index * 0x300), 1); 223 evo_mthd(push, 0x0490 + (nv_crtc->index * 0x300), 1);
224 evo_data(push, mode); 224 evo_data(push, mode);
@@ -226,7 +226,7 @@ nvd0_crtc_set_dither(struct nouveau_crtc *nv_crtc, bool update)
226 evo_mthd(push, 0x0080, 1); 226 evo_mthd(push, 0x0080, 1);
227 evo_data(push, 0x00000000); 227 evo_data(push, 0x00000000);
228 } 228 }
229 evo_kick(push, dev, 0); 229 evo_kick(push, dev, EVO_MASTER);
230 } 230 }
231 231
232 return 0; 232 return 0;
@@ -302,7 +302,7 @@ nvd0_crtc_set_scale(struct nouveau_crtc *nv_crtc, bool update)
302 break; 302 break;
303 } 303 }
304 304
305 push = evo_wait(dev, 0, 16); 305 push = evo_wait(dev, EVO_MASTER, 16);
306 if (push) { 306 if (push) {
307 evo_mthd(push, 0x04c0 + (nv_crtc->index * 0x300), 3); 307 evo_mthd(push, 0x04c0 + (nv_crtc->index * 0x300), 3);
308 evo_data(push, (oY << 16) | oX); 308 evo_data(push, (oY << 16) | oX);
@@ -316,7 +316,7 @@ nvd0_crtc_set_scale(struct nouveau_crtc *nv_crtc, bool update)
316 evo_mthd(push, 0x0080, 1); 316 evo_mthd(push, 0x0080, 1);
317 evo_data(push, 0x00000000); 317 evo_data(push, 0x00000000);
318 } 318 }
319 evo_kick(push, dev, 0); 319 evo_kick(push, dev, EVO_MASTER);
320 } 320 }
321 321
322 return 0; 322 return 0;
@@ -329,7 +329,7 @@ nvd0_crtc_set_image(struct nouveau_crtc *nv_crtc, struct drm_framebuffer *fb,
329 struct nouveau_framebuffer *nvfb = nouveau_framebuffer(fb); 329 struct nouveau_framebuffer *nvfb = nouveau_framebuffer(fb);
330 u32 *push; 330 u32 *push;
331 331
332 push = evo_wait(fb->dev, 0, 16); 332 push = evo_wait(fb->dev, EVO_MASTER, 16);
333 if (push) { 333 if (push) {
334 evo_mthd(push, 0x0460 + (nv_crtc->index * 0x300), 1); 334 evo_mthd(push, 0x0460 + (nv_crtc->index * 0x300), 1);
335 evo_data(push, nvfb->nvbo->bo.offset >> 8); 335 evo_data(push, nvfb->nvbo->bo.offset >> 8);
@@ -344,7 +344,7 @@ nvd0_crtc_set_image(struct nouveau_crtc *nv_crtc, struct drm_framebuffer *fb,
344 evo_mthd(push, 0x0080, 1); 344 evo_mthd(push, 0x0080, 1);
345 evo_data(push, 0x00000000); 345 evo_data(push, 0x00000000);
346 } 346 }
347 evo_kick(push, fb->dev, 0); 347 evo_kick(push, fb->dev, EVO_MASTER);
348 } 348 }
349 349
350 nv_crtc->fb.tile_flags = nvfb->r_dma; 350 nv_crtc->fb.tile_flags = nvfb->r_dma;
@@ -355,7 +355,7 @@ static void
355nvd0_crtc_cursor_show(struct nouveau_crtc *nv_crtc, bool show, bool update) 355nvd0_crtc_cursor_show(struct nouveau_crtc *nv_crtc, bool show, bool update)
356{ 356{
357 struct drm_device *dev = nv_crtc->base.dev; 357 struct drm_device *dev = nv_crtc->base.dev;
358 u32 *push = evo_wait(dev, 0, 16); 358 u32 *push = evo_wait(dev, EVO_MASTER, 16);
359 if (push) { 359 if (push) {
360 if (show) { 360 if (show) {
361 evo_mthd(push, 0x0480 + (nv_crtc->index * 0x300), 2); 361 evo_mthd(push, 0x0480 + (nv_crtc->index * 0x300), 2);
@@ -375,7 +375,7 @@ nvd0_crtc_cursor_show(struct nouveau_crtc *nv_crtc, bool show, bool update)
375 evo_data(push, 0x00000000); 375 evo_data(push, 0x00000000);
376 } 376 }
377 377
378 evo_kick(push, dev, 0); 378 evo_kick(push, dev, EVO_MASTER);
379 } 379 }
380} 380}
381 381
@@ -390,7 +390,7 @@ nvd0_crtc_prepare(struct drm_crtc *crtc)
390 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); 390 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
391 u32 *push; 391 u32 *push;
392 392
393 push = evo_wait(crtc->dev, 0, 2); 393 push = evo_wait(crtc->dev, EVO_MASTER, 2);
394 if (push) { 394 if (push) {
395 evo_mthd(push, 0x0474 + (nv_crtc->index * 0x300), 1); 395 evo_mthd(push, 0x0474 + (nv_crtc->index * 0x300), 1);
396 evo_data(push, 0x00000000); 396 evo_data(push, 0x00000000);
@@ -398,7 +398,7 @@ nvd0_crtc_prepare(struct drm_crtc *crtc)
398 evo_data(push, 0x03000000); 398 evo_data(push, 0x03000000);
399 evo_mthd(push, 0x045c + (nv_crtc->index * 0x300), 1); 399 evo_mthd(push, 0x045c + (nv_crtc->index * 0x300), 1);
400 evo_data(push, 0x00000000); 400 evo_data(push, 0x00000000);
401 evo_kick(push, crtc->dev, 0); 401 evo_kick(push, crtc->dev, EVO_MASTER);
402 } 402 }
403 403
404 nvd0_crtc_cursor_show(nv_crtc, false, false); 404 nvd0_crtc_cursor_show(nv_crtc, false, false);
@@ -410,7 +410,7 @@ nvd0_crtc_commit(struct drm_crtc *crtc)
410 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); 410 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
411 u32 *push; 411 u32 *push;
412 412
413 push = evo_wait(crtc->dev, 0, 32); 413 push = evo_wait(crtc->dev, EVO_MASTER, 32);
414 if (push) { 414 if (push) {
415 evo_mthd(push, 0x0474 + (nv_crtc->index * 0x300), 1); 415 evo_mthd(push, 0x0474 + (nv_crtc->index * 0x300), 1);
416 evo_data(push, nv_crtc->fb.tile_flags); 416 evo_data(push, nv_crtc->fb.tile_flags);
@@ -423,7 +423,7 @@ nvd0_crtc_commit(struct drm_crtc *crtc)
423 evo_data(push, NvEvoVRAM); 423 evo_data(push, NvEvoVRAM);
424 evo_mthd(push, 0x0430 + (nv_crtc->index * 0x300), 1); 424 evo_mthd(push, 0x0430 + (nv_crtc->index * 0x300), 1);
425 evo_data(push, 0xffffff00); 425 evo_data(push, 0xffffff00);
426 evo_kick(push, crtc->dev, 0); 426 evo_kick(push, crtc->dev, EVO_MASTER);
427 } 427 }
428 428
429 nvd0_crtc_cursor_show(nv_crtc, nv_crtc->cursor.visible, true); 429 nvd0_crtc_cursor_show(nv_crtc, nv_crtc->cursor.visible, true);
@@ -500,7 +500,7 @@ nvd0_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *umode,
500 if (ret) 500 if (ret)
501 return ret; 501 return ret;
502 502
503 push = evo_wait(crtc->dev, 0, 64); 503 push = evo_wait(crtc->dev, EVO_MASTER, 64);
504 if (push) { 504 if (push) {
505 evo_mthd(push, 0x0410 + (nv_crtc->index * 0x300), 6); 505 evo_mthd(push, 0x0410 + (nv_crtc->index * 0x300), 6);
506 evo_data(push, 0x00000000); 506 evo_data(push, 0x00000000);
@@ -518,7 +518,7 @@ nvd0_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *umode,
518 evo_mthd(push, 0x0404 + (nv_crtc->index * 0x300), 2); 518 evo_mthd(push, 0x0404 + (nv_crtc->index * 0x300), 2);
519 evo_data(push, syncs); 519 evo_data(push, syncs);
520 evo_data(push, magic); 520 evo_data(push, magic);
521 evo_kick(push, crtc->dev, 0); 521 evo_kick(push, crtc->dev, EVO_MASTER);
522 } 522 }
523 523
524 nv_connector = nouveau_crtc_connector_get(nv_crtc); 524 nv_connector = nouveau_crtc_connector_get(nv_crtc);
@@ -803,12 +803,12 @@ nvd0_dac_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
803 803
804 nvd0_dac_dpms(encoder, DRM_MODE_DPMS_ON); 804 nvd0_dac_dpms(encoder, DRM_MODE_DPMS_ON);
805 805
806 push = evo_wait(encoder->dev, 0, 4); 806 push = evo_wait(encoder->dev, EVO_MASTER, 4);
807 if (push) { 807 if (push) {
808 evo_mthd(push, 0x0180 + (nv_encoder->or * 0x20), 2); 808 evo_mthd(push, 0x0180 + (nv_encoder->or * 0x20), 2);
809 evo_data(push, 1 << nv_crtc->index); 809 evo_data(push, 1 << nv_crtc->index);
810 evo_data(push, 0x00ff); 810 evo_data(push, 0x00ff);
811 evo_kick(push, encoder->dev, 0); 811 evo_kick(push, encoder->dev, EVO_MASTER);
812 } 812 }
813 813
814 nv_encoder->crtc = encoder->crtc; 814 nv_encoder->crtc = encoder->crtc;
@@ -824,13 +824,13 @@ nvd0_dac_disconnect(struct drm_encoder *encoder)
824 if (nv_encoder->crtc) { 824 if (nv_encoder->crtc) {
825 nvd0_crtc_prepare(nv_encoder->crtc); 825 nvd0_crtc_prepare(nv_encoder->crtc);
826 826
827 push = evo_wait(dev, 0, 4); 827 push = evo_wait(dev, EVO_MASTER, 4);
828 if (push) { 828 if (push) {
829 evo_mthd(push, 0x0180 + (nv_encoder->or * 0x20), 1); 829 evo_mthd(push, 0x0180 + (nv_encoder->or * 0x20), 1);
830 evo_data(push, 0x00000000); 830 evo_data(push, 0x00000000);
831 evo_mthd(push, 0x0080, 1); 831 evo_mthd(push, 0x0080, 1);
832 evo_data(push, 0x00000000); 832 evo_data(push, 0x00000000);
833 evo_kick(push, dev, 0); 833 evo_kick(push, dev, EVO_MASTER);
834 } 834 }
835 835
836 nv_encoder->crtc = NULL; 836 nv_encoder->crtc = NULL;
@@ -1138,12 +1138,12 @@ nvd0_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *umode,
1138 1138
1139 nvd0_sor_dpms(encoder, DRM_MODE_DPMS_ON); 1139 nvd0_sor_dpms(encoder, DRM_MODE_DPMS_ON);
1140 1140
1141 push = evo_wait(dev, 0, 4); 1141 push = evo_wait(dev, EVO_MASTER, 4);
1142 if (push) { 1142 if (push) {
1143 evo_mthd(push, 0x0200 + (nv_encoder->or * 0x20), 2); 1143 evo_mthd(push, 0x0200 + (nv_encoder->or * 0x20), 2);
1144 evo_data(push, mode_ctrl); 1144 evo_data(push, mode_ctrl);
1145 evo_data(push, or_config); 1145 evo_data(push, or_config);
1146 evo_kick(push, dev, 0); 1146 evo_kick(push, dev, EVO_MASTER);
1147 } 1147 }
1148 1148
1149 nv_encoder->crtc = encoder->crtc; 1149 nv_encoder->crtc = encoder->crtc;
@@ -1159,13 +1159,13 @@ nvd0_sor_disconnect(struct drm_encoder *encoder)
1159 if (nv_encoder->crtc) { 1159 if (nv_encoder->crtc) {
1160 nvd0_crtc_prepare(nv_encoder->crtc); 1160 nvd0_crtc_prepare(nv_encoder->crtc);
1161 1161
1162 push = evo_wait(dev, 0, 4); 1162 push = evo_wait(dev, EVO_MASTER, 4);
1163 if (push) { 1163 if (push) {
1164 evo_mthd(push, 0x0200 + (nv_encoder->or * 0x20), 1); 1164 evo_mthd(push, 0x0200 + (nv_encoder->or * 0x20), 1);
1165 evo_data(push, 0x00000000); 1165 evo_data(push, 0x00000000);
1166 evo_mthd(push, 0x0080, 1); 1166 evo_mthd(push, 0x0080, 1);
1167 evo_data(push, 0x00000000); 1167 evo_data(push, 0x00000000);
1168 evo_kick(push, dev, 0); 1168 evo_kick(push, dev, EVO_MASTER);
1169 } 1169 }
1170 1170
1171 nvd0_hdmi_disconnect(encoder); 1171 nvd0_hdmi_disconnect(encoder);
@@ -1536,7 +1536,7 @@ nvd0_display_init(struct drm_device *dev)
1536 goto error; 1536 goto error;
1537 } 1537 }
1538 1538
1539 push = evo_wait(dev, 0, 32); 1539 push = evo_wait(dev, EVO_MASTER, 32);
1540 if (!push) { 1540 if (!push) {
1541 ret = -EBUSY; 1541 ret = -EBUSY;
1542 goto error; 1542 goto error;
@@ -1549,7 +1549,7 @@ nvd0_display_init(struct drm_device *dev)
1549 evo_data(push, 0x80000000); 1549 evo_data(push, 0x80000000);
1550 evo_mthd(push, 0x008c, 1); 1550 evo_mthd(push, 0x008c, 1);
1551 evo_data(push, 0x00000000); 1551 evo_data(push, 0x00000000);
1552 evo_kick(push, dev, 0); 1552 evo_kick(push, dev, EVO_MASTER);
1553 1553
1554error: 1554error:
1555 if (ret) 1555 if (ret)