diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-01-17 21:10:58 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-03-13 17:08:03 +1000 |
commit | fd99fd6100d3b7aaa8dc76888a38bbb15e8041bc (patch) | |
tree | 5bda24f2755bde247eb1e3a8ae143632351130ff /drivers/gpu/drm/nouveau/nouveau_drv.h | |
parent | 68a64cad07057c3395b3b18c282df884e87ff3d6 (diff) |
drm/nouveau/pm: calculate memory timings at perflvl creation time
Statically generating the PFB register and MR values for each timing set
turns out to be insufficient. There's at least one (so far) known piece
of information which effects MR values which is stored in the perflvl
entry on some chipsets (and in another table on later ones), which is
disconnected from the timing table entries.
After this change we will generate a timing set based on an input clock
frequency instead, and have this data stored in the performance level
data.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drv.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index f5700418da3..a8344c321ab 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -526,14 +526,6 @@ struct nouveau_pm_threshold_temp { s16 fan_boost; }; -struct nouveau_pm_memtimings { - bool supported; - struct nouveau_pm_memtiming boot; - struct nouveau_pm_memtiming *timing; - int nr_timing; - int nr_timing_valid; -}; - struct nouveau_pm_fan { u32 percent; u32 min_duty; @@ -546,11 +538,11 @@ struct nouveau_pm_engine { struct nouveau_pm_voltage voltage; struct nouveau_pm_level perflvl[NOUVEAU_PM_MAX_LEVEL]; int nr_perflvl; - struct nouveau_pm_memtimings memtimings; struct nouveau_pm_temp_sensor_constants sensor_constants; struct nouveau_pm_threshold_temp threshold_temp; struct nouveau_pm_fan fan; + struct nouveau_pm_memtiming boot_timing; struct nouveau_pm_level boot; struct nouveau_pm_level *cur; @@ -922,6 +914,10 @@ extern int nouveau_mem_init_agp(struct drm_device *); extern int nouveau_mem_reset_agp(struct drm_device *); extern void nouveau_mem_close(struct drm_device *); extern bool nouveau_mem_flags_valid(struct drm_device *, u32 tile_flags); +extern void nouveau_mem_timing_read(struct drm_device *, + struct nouveau_pm_memtiming *); +extern struct nouveau_pm_memtiming * +nouveau_mem_timing(struct drm_device *, u32 freq); extern int nouveau_mem_vbios_type(struct drm_device *); extern struct nouveau_tile_reg *nv10_mem_set_tiling( struct drm_device *dev, uint32_t addr, uint32_t size, |