12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #include <nvif/disp.h>
- #include <nvif/device.h>
- #include <nvif/class.h>
- void
- nvif_disp_dtor(struct nvif_disp *disp)
- {
- nvif_object_fini(&disp->object);
- }
- int
- nvif_disp_ctor(struct nvif_device *device, s32 oclass, struct nvif_disp *disp)
- {
- static const struct nvif_mclass disps[] = {
- { GV100_DISP, -1 },
- { GP102_DISP, -1 },
- { GP100_DISP, -1 },
- { GM200_DISP, -1 },
- { GM107_DISP, -1 },
- { GK110_DISP, -1 },
- { GK104_DISP, -1 },
- { GF110_DISP, -1 },
- { GT214_DISP, -1 },
- { GT206_DISP, -1 },
- { GT200_DISP, -1 },
- { G82_DISP, -1 },
- { NV50_DISP, -1 },
- { NV04_DISP, -1 },
- {}
- };
- int cid = nvif_sclass(&device->object, disps, oclass);
- disp->object.client = NULL;
- if (cid < 0)
- return cid;
- return nvif_object_init(&device->object, 0, disps[cid].oclass,
- NULL, 0, &disp->object);
- }
|