Lines Matching defs:drm

96 			nouveau_fence(chan->drm)->context_del(chan);
145 nouveau_channel_prep(struct nouveau_drm *drm, struct nvif_device *device,
159 chan->drm = drm;
231 if (chan->drm->agp.bridge) {
234 args.start = chan->drm->agp.base;
235 args.limit = chan->drm->agp.base +
236 chan->drm->agp.size - 1;
257 nouveau_channel_ctor(struct nouveau_drm *drm, struct nvif_device *device, bool priv, u64 runm,
301 ret = nouveau_channel_prep(drm, device, size, &chan);
367 struct nouveau_drm *drm = chan->drm;
390 NV_ERROR(drm, "Failed to request channel kill "
422 if (chan->drm->agp.bridge) {
425 args.start = chan->drm->agp.base;
426 args.limit = chan->drm->agp.base +
427 chan->drm->agp.size - 1;
492 return nouveau_fence(chan->drm)->context_new(chan);
496 nouveau_channel_new(struct nouveau_drm *drm, struct nvif_device *device,
502 ret = nouveau_channel_ctor(drm, device, priv, runm, pchan);
523 nouveau_channels_fini(struct nouveau_drm *drm)
525 kfree(drm->runl);
529 nouveau_channels_init(struct nouveau_drm *drm)
543 struct nvif_object *device = &drm->client.device.object;
552 drm->chan_nr = drm->chan_total = args.v.channels.data;
553 drm->runl_nr = fls64(args.v.runlists.data);
554 drm->runl = kcalloc(drm->runl_nr, sizeof(*drm->runl), GFP_KERNEL);
555 if (!drm->runl)
558 if (drm->chan_nr == 0) {
559 for (i = 0; i < drm->runl_nr; i++) {
570 drm->runl[i].chan_nr = args.v.channels.data;
571 drm->runl[i].chan_id_base = drm->chan_total;
572 drm->runl[i].context_base = dma_fence_context_alloc(drm->runl[i].chan_nr);
574 drm->chan_total += drm->runl[i].chan_nr;
577 drm->runl[0].context_base = dma_fence_context_alloc(drm->chan_nr);
578 for (i = 1; i < drm->runl_nr; i++)
579 drm->runl[i].context_base = drm->runl[0].context_base;