30 #define NOUVEAU_DMA_DEBUG (nouveau_reg_debug & NOUVEAU_REG_DEBUG_EVO)
50 if (!nv_encoder->
crtc)
54 NV_DEBUG(drm,
"Disconnecting DAC %d\n", nv_encoder->
or);
56 ret = RING_SPACE(evo, 4);
58 NV_ERROR(drm,
"no space while disconnecting DAC\n");
76 uint32_t dpms_state, load_pattern, load_state;
77 int or = nv_encoder->
or;
86 NV_ERROR(drm,
"timeout: DAC_DPMS_CTRL_PENDING(%d) == 0\n", or);
87 NV_ERROR(drm,
"DAC_DPMS_CTRL(%d) = 0x%08x\n", or,
93 if (drm->
vbios.dactestval) {
94 load_pattern = drm->
vbios.dactestval;
95 NV_DEBUG(drm,
"Using bios provided load_pattern of %d\n",
99 NV_DEBUG(drm,
"Using default load_pattern of %d\n",
113 NV50_PDISPLAY_DAC_LOAD_CTRL_PRESENT)
117 NV_DEBUG(drm,
"Load was detected on output with or %d\n", or);
119 NV_DEBUG(drm,
"Load was not detected on output with or %d\n", or);
131 int or = nv_encoder->
or;
133 NV_DEBUG(drm,
"or %d mode %d\n", or, mode);
138 NV_ERROR(drm,
"timeout: DAC_DPMS_CTRL_PENDING(%d) == 0\n", or);
139 NV_ERROR(drm,
"DAC_DPMS_CTRL(%d) = 0x%08x\n", or,
196 NV_ERROR(drm,
"Encoder has no connector\n");
221 uint32_t mode_ctl = 0, mode_ctl2 = 0;
224 NV_DEBUG(drm,
"or %d type %d crtc %d\n",
225 nv_encoder->
or, nv_encoder->
dcb->type, crtc->
index);
229 if (crtc->
index == 1)
247 ret = RING_SPACE(evo, 3);
249 NV_ERROR(drm,
"no space while connecting DAC\n");
266 .dpms = nv50_dac_dpms,
267 .save = nv50_dac_save,
268 .restore = nv50_dac_restore,
269 .mode_fixup = nv50_dac_mode_fixup,
270 .prepare = nv50_dac_disconnect,
271 .commit = nv50_dac_commit,
272 .mode_set = nv50_dac_mode_set,
273 .get_crtc = nv50_dac_crtc_get,
274 .detect = nv50_dac_detect,
275 .disable = nv50_dac_disconnect
294 .destroy = nv50_dac_destroy,
303 nv_encoder = kzalloc(
sizeof(*nv_encoder),
GFP_KERNEL);
306 encoder = to_drm_encoder(nv_encoder);
309 nv_encoder->
or =
ffs(entry->
or) - 1;
313 drm_encoder_helper_add(encoder, &nv50_dac_helper_funcs);