Commit f3fbaf34 authored by Ben Skeggs's avatar Ben Skeggs

drm/nv50/pm: rewrite clock management, and switch to the new pm hooks

This area is horrifically complicated on these chipsets, and it's likely we
will need at least a few more tweaks yet.

Oh yes, and it's completely disabled on IGPs for the moment.  From traces,
things look potentially different there yet again.  Sigh...
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent d4cca9e1
...@@ -493,6 +493,7 @@ struct nouveau_pm_level { ...@@ -493,6 +493,7 @@ struct nouveau_pm_level {
u32 copy; u32 copy;
u32 daemon; u32 daemon;
u32 vdec; u32 vdec;
u32 dom6;
u32 unka0; /* nva3:nvc0 */ u32 unka0; /* nva3:nvc0 */
u32 hub01; /* nvc0- */ u32 hub01; /* nvc0- */
u32 hub06; /* nvc0- */ u32 hub06; /* nvc0- */
......
...@@ -302,6 +302,7 @@ nouveau_perf_init(struct drm_device *dev) ...@@ -302,6 +302,7 @@ nouveau_perf_init(struct drm_device *dev)
perflvl->shader = ROM16(entry[10]) * 1000; perflvl->shader = ROM16(entry[10]) * 1000;
perflvl->memory = ROM16(entry[12]) * 1000; perflvl->memory = ROM16(entry[12]) * 1000;
perflvl->vdec = ROM16(entry[16]) * 1000; perflvl->vdec = ROM16(entry[16]) * 1000;
perflvl->dom6 = ROM16(entry[20]) * 1000;
break; break;
case 0x40: case 0x40:
#define subent(n) (ROM16(entry[perf[2] + ((n) * perf[3])]) & 0xfff) * 1000 #define subent(n) (ROM16(entry[perf[2] + ((n) * perf[3])]) & 0xfff) * 1000
......
...@@ -60,10 +60,9 @@ int nv40_pm_pwm_get(struct drm_device *, struct dcb_gpio_entry *, u32*, u32*); ...@@ -60,10 +60,9 @@ int nv40_pm_pwm_get(struct drm_device *, struct dcb_gpio_entry *, u32*, u32*);
int nv40_pm_pwm_set(struct drm_device *, struct dcb_gpio_entry *, u32, u32); int nv40_pm_pwm_set(struct drm_device *, struct dcb_gpio_entry *, u32, u32);
/* nv50_pm.c */ /* nv50_pm.c */
int nv50_pm_clock_get(struct drm_device *, u32 id); int nv50_pm_clocks_get(struct drm_device *, struct nouveau_pm_level *);
void *nv50_pm_clock_pre(struct drm_device *, struct nouveau_pm_level *, void *nv50_pm_clocks_pre(struct drm_device *, struct nouveau_pm_level *);
u32 id, int khz); int nv50_pm_clocks_set(struct drm_device *, void *);
void nv50_pm_clock_set(struct drm_device *, void *);
int nv50_pm_pwm_get(struct drm_device *, struct dcb_gpio_entry *, u32*, u32*); int nv50_pm_pwm_get(struct drm_device *, struct dcb_gpio_entry *, u32*, u32*);
int nv50_pm_pwm_set(struct drm_device *, struct dcb_gpio_entry *, u32, u32); int nv50_pm_pwm_set(struct drm_device *, struct dcb_gpio_entry *, u32, u32);
......
...@@ -356,9 +356,9 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) ...@@ -356,9 +356,9 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
case 0xaa: case 0xaa:
case 0xac: case 0xac:
case 0x50: case 0x50:
engine->pm.clock_get = nv50_pm_clock_get; engine->pm.clocks_get = nv50_pm_clocks_get;
engine->pm.clock_pre = nv50_pm_clock_pre; engine->pm.clocks_pre = nv50_pm_clocks_pre;
engine->pm.clock_set = nv50_pm_clock_set; engine->pm.clocks_set = nv50_pm_clocks_set;
break; break;
default: default:
engine->pm.clocks_get = nva3_pm_clocks_get; engine->pm.clocks_get = nva3_pm_clocks_get;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment