if (!runtime && !drm->headless)
cancel_work_sync(&drm->hpd_work);
if (!suspend) return;
/* Un-pin FB and cursors so they'll be evicted to system memory. */
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { struct drm_framebuffer *fb = crtc->primary->fb; struct nouveau_bo *nvbo;
if (!fb || !fb->obj[0]) continue;
nvbo = nouveau_gem_object(fb->obj[0]);
nouveau_bo_unpin(nvbo);
}
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); if (nv_crtc->cursor.nvbo) { if (nv_crtc->cursor.set_offset)
nouveau_bo_unmap(nv_crtc->cursor.nvbo);
nouveau_bo_unpin(nv_crtc->cursor.nvbo);
}
}
}
ret = nouveau_bo_pin(nv_crtc->cursor.nvbo,
NOUVEAU_GEM_DOMAIN_VRAM, true); if (!ret && nv_crtc->cursor.set_offset)
ret = nouveau_bo_map(nv_crtc->cursor.nvbo); if (ret)
NV_ERROR(drm, "Could not pin/map cursor.\n");
}
/* Force CLUT to get re-loaded during modeset. */
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
nv_crtc->lut.depth = 0;
}
/* This should ensure we don't hit a locking problem when someone *wakesusupviaaconnector.Weshouldnevergointosuspend *whilethedisplayisonanyways.
*/ if (runtime) return0;
/* Pre-nv50 doesn't support atomic, so don't expose the ioctls */
dev->driver_features &= ~DRIVER_ATOMIC;
/* Request page flip completion event. */ if (drm->channel) {
ret = nvif_event_ctor(&drm->channel->nvsw, "kmsFlip", 0, nv04_flip_complete, true, NULL, 0, &disp->flip); if (ret) return ret;
}
nouveau_hw_save_vga_fonts(dev, 1);
nv04_crtc_create(dev, 0); if (nv_two_heads(dev))
nv04_crtc_create(dev, 1);
for (i = 0; i < dcb->entries; i++) { struct dcb_output *dcbent = &dcb->entry[i];
connector = nouveau_connector_create(dev, dcbent->connector); if (IS_ERR(connector)) continue;
switch (dcbent->type) { case DCB_OUTPUT_ANALOG:
ret = nv04_dac_create(connector, dcbent); break; case DCB_OUTPUT_LVDS: case DCB_OUTPUT_TMDS:
ret = nv04_dfp_create(connector, dcbent); break; case DCB_OUTPUT_TV: if (dcbent->location == DCB_LOC_ON_CHIP)
ret = nv17_tv_create(connector, dcbent); else
ret = nv04_tv_create(connector, dcbent); break; default:
NV_WARN(drm, "DCB type %d not known\n", dcbent->type); continue;
}
if (ret) continue;
}
list_for_each_entry_safe(connector, ct,
&dev->mode_config.connector_list, head) { if (!connector->possible_encoders) {
NV_WARN(drm, "%s has no encoders, removing\n",
connector->name);
connector->funcs->destroy(connector);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.