int nv04_pm_clocks_set(struct drm_device *dev, void *pre_state) { struct nouveau_device *device = nouveau_dev(dev); struct nouveau_timer *ptimer = nouveau_timer(device); struct nv04_pm_state *state = pre_state; prog_pll(dev, &state->core); if (state->memory.pll.reg) { prog_pll(dev, &state->memory); if (device->card_type < NV_30) { if (device->card_type == NV_20) nv_mask(device, 0x1002c4, 0, 1 << 20); /* Reset the DLLs */ nv_mask(device, 0x1002c0, 0, 1 << 8); } } nv_ofuncs(ptimer)->init(nv_object(ptimer)); kfree(state); return 0; }
void nouveau_subdev_reset(struct nouveau_object *subdev) { nv_trace(subdev, "resetting...\n"); nv_ofuncs(subdev)->fini(subdev, false); nv_debug(subdev, "reset\n"); }
int _nvkm_i2c_port_fini(struct nvkm_object *object, bool suspend) { struct nvkm_i2c_port *port = (void *)object; struct nvkm_i2c_pad *pad = nvkm_i2c_pad(port); nv_ofuncs(pad)->fini(nv_object(pad), suspend); return nvkm_object_fini(&port->base, suspend); }
void _nouveau_gpuobj_wr32(struct nouveau_object *object, u64 addr, u32 data) { struct nouveau_gpuobj *gpuobj = nv_gpuobj(object); struct nouveau_ofuncs *pfuncs = nv_ofuncs(gpuobj->parent); if (gpuobj->node) addr += gpuobj->node->offset; pfuncs->wr32(gpuobj->parent, addr, data); }
u32 _nouveau_gpuobj_rd32(struct nouveau_object *object, u64 addr) { struct nouveau_gpuobj *gpuobj = nv_gpuobj(object); struct nouveau_ofuncs *pfuncs = nv_ofuncs(gpuobj->parent); if (gpuobj->node) addr += gpuobj->node->offset; return pfuncs->rd32(gpuobj->parent, addr); }
int _nouveau_fb_fini(struct nouveau_object *object, bool suspend) { struct nouveau_fb *pfb = (void *)object; int ret; ret = nv_ofuncs(pfb->ram)->fini(nv_object(pfb->ram), suspend); if (ret && suspend) return ret; return nouveau_subdev_fini(&pfb->base, suspend); }
int _nouveau_fb_init(struct nouveau_object *object) { struct nouveau_fb *pfb = (void *)object; int ret, i; ret = nouveau_subdev_init(&pfb->base); if (ret) return ret; ret = nv_ofuncs(pfb->ram)->init(nv_object(pfb->ram)); if (ret) return ret; for (i = 0; i < pfb->tile.regions; i++) pfb->tile.prog(pfb, i, &pfb->tile.region[i]); return 0; }