RESEND Preparations for Fermi DRAM clock changes
Subsystems (3)
Two patches went missing as a result of PEBCAK. No v2 marks as nothing changed really. Just resending for easier enforcement of patch order in other people's trees. Sorry for the noise.
Original message:
No, no, these will not implement Fermi reclocking. This set of patches contains some of the preparatory work that I deem stable enough to move upstream. Notable changes
- Training pattern upload routines from GK104+ now shared with GT215+
- Timing calculation for Fermi
- GDDR5 MR calculation from VBIOS timing table v1.0. Also useful for that pesky GT 240.
- A routine to translate a VBIOS init script to a set of memx writes. Used by both "that GT 240" and Fermi.
- Misc clean-up
Testers should expect no changes in behaviour before/after. Keen eyes can double-check on their Tesla and Fermi GDDR5 graphics cards that training patterns are uploaded on boot.
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
A message that is not in the archive (sent off-list or not yet received): 20170410195050.29638-1-nouveau-NQbd8FSOZ1kdnm+yROfE0A@public.gmane.org
PATCH 1/13 nvkm/bios: Give timings a name
tFAW, tCKE, tXPDLL, derived from datasheets. Merge skeggsb's:
"bios/rammap: make unknown timing 1.0 fields match 2.0's naming"
--- .../drm/nouveau/include/nvkm/subdev/bios/ramcfg.h | 12 +++---- drivers/gpu/drm/nouveau/nvkm/subdev/bios/timing.c | 42 +++++++++++----------- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c | 14 ++++---- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c | 6 ++-- 4 files changed, 37 insertions(+), 37 deletions(-)
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/ramcfg.h +6 -6
@@ -127,17 +127,17 @@ struct nvbios_ramcfg { unsigned timing_10_RCDRD:8; unsigned timing_10_RCDWR:8; unsigned timing_10_RRD:8; - unsigned timing_10_13:8; + unsigned timing_10_XPDLL:8; unsigned timing_10_ODT:3;/* empty: 15 */ - unsigned timing_10_16:8; + unsigned timing_10_10:8;/* empty: 17 */ - unsigned timing_10_18:8; + unsigned timing_10_12:8; unsigned timing_10_CWL:8; - unsigned timing_10_20:8; - unsigned timing_10_21:8; + unsigned timing_10_FAW:8; + unsigned timing_10_CKE:8;/* empty: 22, 23 */ - unsigned timing_10_24:8; + unsigned timing_10_18:8; };struct {unsigned timing_20_2e_03:2 ;
drivers/gpu/drm/nouveau/nvkm/subdev/bios/timing.c +21 -21
55 lines not on this page · raw message
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c +7 -7
@@ -373,7 +373,7 @@ gt215_ram_timing_calc(struct gt215_ram *ram, u32 *timing) timing[0 ] = (T (RP ) <<24 |T (RAS ) <<16 |T (RFC ) <<8 |T (RC )); timing[1 ] = (T (WR ) +1 +T (CWL )) <<24 | -max_t (u8,T (18 ),1 ) <<16 | +max_t (u8,T (12 ),1 ) <<16 | (T (WTR ) +1 +T (CWL )) <<8 | (5 +T (CL ) -T (CWL )); timing[2] = (T(CWL) - 1) << 24 |
@@ -384,10 +384,10 @@ gt215_ram_timing_calc(struct gt215_ram *ram, u32 *timing) (0x30 +T (CL )) <<24 | (0xb +T (CL )) <<8 | (T (CL ) -1 ); - timing[4 ] =T (20 ) <<24 | -T (21 ) <<16 | -T (13 ) <<8 | -T (13 ); + timing[4 ] =T (FAW ) <<24 | +T (CKE ) <<16 | +T (XPDLL ) <<8 | +T (XPDLL ); timing[5 ] =T (RFC ) <<24 |max_t (u8,T (RCDRD ),T (RCDWR )) <<16 | max_t(u8, (T(CWL) + 6), (T(CL) + 2)) << 8 |
@@ -819,9 +819,9 @@ gt215_ram_calc(struct nvkm_ram *base, u32 freq) unk718 |=0x00000100 ;if (next->bios.ramcfg_10_02_01) unk71c |=0x00000100 ; -if (next->bios.timing_10_24 !=0xff ) { +if (next->bios.timing_10_18 !=0xff ) { unk718 &= ~0xf0000000 ; - unk718 |= next->bios.timing_10_24 <<28 ; + unk718 |= next->bios.timing_10_18 <<28 ; }if (next->bios.ramcfg_10_02_10) r111100 &= ~0x04020000 ;
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c +3 -3
@@ -108,7 +108,7 @@ nv50_ram_timing_calc(struct nv50_ram *ram, u32 *timing) timing[0 ] = (T (RP ) <<24 |T (RAS ) <<16 |T (RFC ) <<8 |T (RC )); timing[1 ] = (T (WR ) +1 +T (CWL )) <<24 | -max_t (u8,T (18 ),1 ) <<16 | +max_t (u8,T (12 ),1 ) <<16 | (T (WTR ) +1 +T (CWL )) <<8 | (3 +T (CL ) -T (CWL )); timing[2] = (T(CWL) - 1) << 24 |
@@ -120,8 +120,8 @@ nv50_ram_timing_calc(struct nv50_ram *ram, u32 *timing) (T (CL ) -1 ) <<8 | (T (CL ) -1 ); timing[4 ] = (cur4 &0xffff0000 ) | -T (13 ) <<8 | -T (13 ); +T (XPDLL ) <<8 | +T (XPDLL ); timing[5 ] =T (RFC ) <<24 |max_t (u8,T (RCDRD ),T (RCDWR )) <<16 |T (RP );
Signature · 6 lines
2.9.3 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
PATCH 2/13 nvkm/ramnv50: Split up various ramcfg bytes in nibbles
In reply to a message not in the archiveIn preparation for Fermi
--- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/ramcfg.h | 9 ++++++--- drivers/gpu/drm/nouveau/nvkm/subdev/bios/rammap.c | 9 ++++++--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c | 12 ++++++++---- 3 files changed, 20 insertions(+), 10 deletions(-)
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/ramcfg.h +6 -3
@@ -66,9 +66,12 @@ struct nvbios_ramcfg { unsigned ramcfg_10_02_20:1; unsigned ramcfg_10_03_0f:4; unsigned ramcfg_10_04_01:1; - unsigned ramcfg_10_05:8; - unsigned ramcfg_10_06:8; - unsigned ramcfg_10_07:8; + unsigned ramcfg_10_05_0f:4; + unsigned ramcfg_10_05_f0:8; + unsigned ramcfg_10_06_0f:4; + unsigned ramcfg_10_06_f0:4; + unsigned ramcfg_10_07_0f:4; + unsigned ramcfg_10_07_f0:4; unsigned ramcfg_10_08:8; unsigned ramcfg_10_09_0f:4; unsigned ramcfg_10_09_f0:4;
drivers/gpu/drm/nouveau/nvkm/subdev/bios/rammap.c +6 -3
@@ -207,9 +207,12 @@ nvbios_rammapSp(struct nvkm_bios *bios, u32 data, p->ramcfg_10_03_0f = (nvbios_rd08 (bios, data +0x03 ) &0x0f ) >>0 ; p->ramcfg_10_04_01 = (nvbios_rd08 (bios, data +0x04 ) &0x01 ) >>0 ; p->ramcfg_FBVDDQ = (nvbios_rd08 (bios, data +0x04 ) &0x08 ) >>3 ; - p->ramcfg_10_05 = (nvbios_rd08 (bios, data +0x05 ) &0xff ) >>0 ; - p->ramcfg_10_06 = (nvbios_rd08 (bios, data +0x06 ) &0xff ) >>0 ; - p->ramcfg_10_07 = (nvbios_rd08 (bios, data +0x07 ) &0xff ) >>0 ; + p->ramcfg_10_05_0f = (nvbios_rd08 (bios, data +0x05 ) &0x0f ) >>0 ; + p->ramcfg_10_05_f0 = (nvbios_rd08 (bios, data +0x05 ) &0xf0 ) >>4 ; + p->ramcfg_10_06_0f = (nvbios_rd08 (bios, data +0x06 ) &0x0f ) >>0 ; + p->ramcfg_10_06_f0 = (nvbios_rd08 (bios, data +0x06 ) &0xf0 ) >>4 ; + p->ramcfg_10_07_0f = (nvbios_rd08 (bios, data +0x07 ) &0x0f ) >>0 ; + p->ramcfg_10_07_f0 = (nvbios_rd08 (bios, data +0x07 ) &0xf0 ) >>4 ; p->ramcfg_10_08 = (nvbios_rd08 (bios, data +0x08 ) &0xff ) >>0 ; p->ramcfg_10_09_0f = (nvbios_rd08 (bios, data +0x09 ) &0x0f ) >>0 ; p->ramcfg_10_09_f0 = (nvbios_rd08 (bios, data +0x09 ) &0xf0 ) >>4 ;
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c +8 -4
@@ -705,11 +705,15 @@ gt215_ram_calc(struct nvkm_ram *base, u32 freq)ram_nsec (fuc,20000 );if (next->bios.rammap_10_04_08) { -ram_wr32 (fuc,0x1005a0 , next->bios.ramcfg_10_06 <<16 | - next->bios.ramcfg_10_05 <<8 | - next->bios.ramcfg_10_05); +ram_wr32 (fuc,0x1005a0 , next->bios.ramcfg_10_06_f0 <<20 | + next->bios.ramcfg_10_06_0f <<16 | + next->bios.ramcfg_10_05_f0 <<12 | + next->bios.ramcfg_10_05_0f <<8 | + next->bios.ramcfg_10_05_f0 <<4 | + next->bios.ramcfg_10_05_0f);ram_wr32 (fuc,0x1005a4 , next->bios.ramcfg_10_08 <<8 | - next->bios.ramcfg_10_07); + next->bios.ramcfg_10_07_f0 <<4 | + next->bios.ramcfg_10_07_0f); ram_wr32(fuc, 0x10f804, next->bios.ramcfg_10_09_f0 << 20 | next->bios.ramcfg_10_03_0f << 16 | next->bios.ramcfg_10_09_0f |
Signature · 6 lines
2.9.3 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
PATCH 3/13 nvkm/ramgf100: Get rid of (size, data) pairs for rammap, ramcfg, timing
In reply to a message not in the archiveIn correspondence with the other ram_calc implementations.
--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 37 ++++++++++++----------- 1 file changed, 19 insertions(+), 18 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c +19 -18
@@ -133,21 +133,22 @@ gf100_ram_calc(struct nvkm_ram *base, u32 freq)struct nvkm_device *device = subdev->device;struct nvkm_clk *clk = device->clk;struct nvkm_bios *bios = device->bios; -struct nvbios_ramcfg cfg; -u8 ver, cnt, len, strap; -struct { -u32 data; -u8 size; - } rammap, ramcfg, timing; +struct nvkm_ram_data *next; +u8 ver, hdr, cnt, len, strap; +u32 data;int ref, div, out;int from, mode;int N1 ,M1 ,P ;int ret; + next = &ram->base.target; + next->freq = freq; + ram->base.next = next; +/* lookup memory config data relevant to the target frequency */ - rammap.data =nvbios_rammapEm (bios, freq /1000 , &ver, &rammap.size, - &cnt, &ramcfg.size, &cfg); -if (!rammap.data || ver !=0x10 || rammap.size <0x0e ) { + data =nvbios_rammapEm (bios, freq /1000 , &ver, &hdr, + &cnt, &len, &next->bios); +if (!data || ver !=0x10 || len <0x0e ) {nvkm_error (subdev,"invalid/missing rammap entry\n" );return -EINVAL ; }
@@ -159,23 +160,23 @@ gf100_ram_calc(struct nvkm_ram *base, u32 freq)return -EINVAL ; } - ramcfg.data = rammap.data + rammap.size + (strap * ramcfg.size); -if (!ramcfg.data || ver !=0x10 || ramcfg.size <0x0e ) { + data =nvbios_rammapSp (bios, data, ver, hdr, cnt, len, strap, + &ver, &hdr, &next->bios); +if (!data || ver !=0x10 || hdr <0x0e ) {nvkm_error (subdev,"invalid/missing ramcfg entry\n" );return -EINVAL ; }/* lookup memory timings, if bios says they're present */ - strap =nvbios_rd08 (bios, ramcfg.data +0x01 ); -if (strap !=0xff ) { - timing.data =nvbios_timingEe (bios, strap, &ver, &timing.size, - &cnt, &len); -if (!timing.data || ver !=0x10 || timing.size <0x19 ) { + strap =nvbios_rd08 (bios, data +0x01 ); +if (next->bios.ramcfg_timing !=0xff ) { + data =nvbios_timingEp (bios, next->bios.ramcfg_timing, + &ver, &hdr, &cnt, &len, + &next->bios); +if (!data || ver !=0x10 || hdr <0x17 ) {nvkm_error (subdev,"invalid/missing timing entry\n" );return -EINVAL ; } - }else { - timing.data =0 ; } ret =ram_init (fuc, ram->base.fb);
Signature · 6 lines
2.9.3 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
PATCH 4/13 nvkm/ramgf100: Calculate timings
In reply to a message not in the archiveTodo:
- Determine source of R[10f298] & 0x11
--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 115 ++++++++++++++-------- 1 file changed, 76 insertions(+), 39 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c +76 -39
@@ -48,11 +48,7 @@ struct gf100_ramfuc {struct ramfuc_reg r_0x137390; -struct ramfuc_reg r_0x10f290; -struct ramfuc_reg r_0x10f294; -struct ramfuc_reg r_0x10f298; -struct ramfuc_reg r_0x10f29c; -struct ramfuc_reg r_0x10f2a0; +struct ramfuc_reg r_0x10f290[5 ];struct ramfuc_reg r_0x10f300;struct ramfuc_reg r_0x10f338;
@@ -104,6 +100,50 @@ struct gf100_ram {struct nvbios_pll mempll; }; +#define T (t) cfg->timing_10_##t +static int +gf100_ram_timing_calc (struct gf100_ram *ram,u32 *timing) +{ +struct nvbios_ramcfg *cfg = &ram->base.target.bios; +struct nvkm_subdev *subdev = &ram->base.fb->subdev; +struct nvkm_device *device = subdev->device; +u32 cur1, cur2, cur4; + + cur1 =nvkm_rd32 (device,0x10f294 ); + cur2 =nvkm_rd32 (device,0x10f298 ); + cur4 =nvkm_rd32 (device,0x10f2a0 ); + +/* XXX: (G)DDR3? */ +switch ((!T (CWL )) * ram->base.type) { +case NVKM_RAM_TYPE_GDDR5 : +T (CWL ) = (cur1 &0x00000380 ) >>7 ; +break ; + } + + timing[0 ] = (T (RP ) <<24 |T (RAS ) <<17 |T (RFC ) <<8 |T (RC )); + timing[1 ] = (cur1 & ~0x03ffc07f ) | + (T (RCDWR ) <<20 ) | + (T (RCDRD ) <<14 ) | + (T (CWL ) <<7 ) | + (T (CL )); +/* XXX: lower 8 bytes are two bits indicating "feature(s) X" */ + timing[2 ] = (cur2 & ~0x00ffffff ) | + (T (WR ) <<16 ) | + (T (WTR ) <<8 ); + timing[3 ] = (T (FAW )) <<9 | + (T (CKE )) <<5 | + (T (XPDLL )); + timing[4 ] = (cur4 & ~0x001f8000 ) | + (T (RRD ) <<15 ); + +nvkm_debug (subdev,"Entry: 290: %08x %08x %08x %08x\n" , + timing[0 ], timing[1 ], timing[2 ], timing[3 ]); +nvkm_debug (subdev," 2a0: %08x\n" , + timing[4 ]); +return 0 ; +} +#undef T +static void gf100_ram_train (struct gf100_ramfuc *fuc,u32 magic) {
@@ -136,10 +176,11 @@ gf100_ram_calc(struct nvkm_ram *base, u32 freq)struct nvkm_ram_data *next;u8 ver, hdr, cnt, len, strap;u32 data; +u32 timing[5 ];int ref, div, out;int from, mode;int N1 ,M1 ,P ; -int ret; +int i, ret; next = &ram->base.target; next->freq = freq;
@@ -179,6 +220,8 @@ gf100_ram_calc(struct nvkm_ram *base, u32 freq) } } +gf100_ram_timing_calc (ram, timing); + ret =ram_init (fuc, ram->base.fb);if (ret)return ret;
@@ -314,28 +357,6 @@ gf100_ram_calc(struct nvkm_ram *base, u32 freq)ram_wr32 (fuc,0x10f338 ,0x00300220 );ram_wr32 (fuc,0x10f300 ,0x0000011d );ram_nsec (fuc,1000 ); -ram_wr32 (fuc,0x10f290 ,0x02060505 ); -ram_wr32 (fuc,0x10f294 ,0x34208288 ); -ram_wr32 (fuc,0x10f298 ,0x44050411 ); -ram_wr32 (fuc,0x10f29c ,0x0000114c ); -ram_wr32 (fuc,0x10f2a0 ,0x42e10069 ); -ram_wr32 (fuc,0x10f614 ,0x40044f77 ); -ram_wr32 (fuc,0x10f610 ,0x40044f77 ); -ram_wr32 (fuc,0x10f344 ,0x00600009 ); -ram_nsec (fuc,1000 ); -ram_wr32 (fuc,0x10f348 ,0x00700008 ); -ram_wr32 (fuc,0x61c140 ,0x19240000 ); -ram_wr32 (fuc,0x10f830 ,0x00300017 ); -gf100_ram_train (fuc,0x80021001 ); -gf100_ram_train (fuc,0x80081001 ); -ram_wr32 (fuc,0x10f340 ,0x00500004 ); -ram_nsec (fuc,1000 ); -ram_wr32 (fuc,0x10f830 ,0x01300017 ); -ram_wr32 (fuc,0x10f830 ,0x00300017 ); -// 0x00030020 // 0x00000000 // 0x00000000 -// 0x00020034 // 0x0000000b -ram_wr32 (fuc,0x100b0c ,0x00080028 ); -ram_wr32 (fuc,0x611200 ,0x00003330 ); }else {ram_wr32 (fuc,0x10f800 ,0x00001800 );ram_wr32 (fuc,0x13d8f4 ,0x00000000 );
@@ -364,11 +385,30 @@ gf100_ram_calc(struct nvkm_ram *base, u32 freq)ram_wr32 (fuc,0x10f338 ,0x00300200 );ram_wr32 (fuc,0x10f300 ,0x0000084d );ram_nsec (fuc,1000 ); -ram_wr32 (fuc,0x10f290 ,0x0b343825 ); -ram_wr32 (fuc,0x10f294 ,0x3483028e ); -ram_wr32 (fuc,0x10f298 ,0x440c0600 ); -ram_wr32 (fuc,0x10f29c ,0x0000214c ); -ram_wr32 (fuc,0x10f2a0 ,0x42e20069 ); + } + +for (i =0 ; i <5 ; i++) +ram_wr32 (fuc,0x10f290 [i], timing[i]); + +if (mode ==0 ) { +ram_wr32 (fuc,0x10f614 ,0x40044f77 ); +ram_wr32 (fuc,0x10f610 ,0x40044f77 ); +ram_wr32 (fuc,0x10f344 ,0x00600009 ); +ram_nsec (fuc,1000 ); +ram_wr32 (fuc,0x10f348 ,0x00700008 ); +ram_wr32 (fuc,0x61c140 ,0x19240000 ); +ram_wr32 (fuc,0x10f830 ,0x00300017 ); +gf100_ram_train (fuc,0x80021001 ); +gf100_ram_train (fuc,0x80081001 ); +ram_wr32 (fuc,0x10f340 ,0x00500004 ); +ram_nsec (fuc,1000 ); +ram_wr32 (fuc,0x10f830 ,0x01300017 ); +ram_wr32 (fuc,0x10f830 ,0x00300017 ); +// 0x00030020 // 0x00000000 // 0x00000000 +// 0x00020034 // 0x0000000b +ram_wr32 (fuc,0x100b0c ,0x00080028 ); +ram_wr32 (fuc,0x611200 ,0x00003330 ); + }else {ram_wr32 (fuc,0x10f200 ,0x00ce0000 );ram_wr32 (fuc,0x10f614 ,0x60044e77 );ram_wr32 (fuc,0x10f610 ,0x60044e77 );
@@ -630,7 +670,7 @@ gf100_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)struct nvkm_subdev *subdev = &fb->subdev;struct nvkm_bios *bios = subdev->device->bios;struct gf100_ram *ram; -int ret; +int i, ret;if (!(ram =kzalloc (sizeof (*ram),GFP_KERNEL )))return -ENOMEM ;
@@ -663,11 +703,8 @@ gf100_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram) ram->fuc.r_0x137390 =ramfuc_reg (0x137390 ); - ram->fuc.r_0x10f290 =ramfuc_reg (0x10f290 ); - ram->fuc.r_0x10f294 =ramfuc_reg (0x10f294 ); - ram->fuc.r_0x10f298 =ramfuc_reg (0x10f298 ); - ram->fuc.r_0x10f29c =ramfuc_reg (0x10f29c ); - ram->fuc.r_0x10f2a0 =ramfuc_reg (0x10f2a0 ); +for (i =0 ; i <5 ; i++) + ram->fuc.r_0x10f290[i] =ramfuc_reg (0x10f290 + (i *4 )); ram->fuc.r_0x10f300 =ramfuc_reg (0x10f300 ); ram->fuc.r_0x10f338 =ramfuc_reg (0x10f338 );
Signature · 6 lines
2.9.3 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
PATCH 5/13 nvkm/gddr5: MR calculation for timing table v1.0
In reply to a message not in the archiveMerges in skeggsb's:
"fb/ram/gf10x: timing_10_0e_30"
Todo:
- find l3, rq
- triple-check
--- .../drm/nouveau/include/nvkm/subdev/bios/ramcfg.h | 12 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/bios/rammap.c | 22 ++++++++-- drivers/gpu/drm/nouveau/nvkm/subdev/bios/timing.c | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr5.c | 21 ++++++++-- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 49 ++++++++++++---------- 5 files changed, 71 insertions(+), 35 deletions(-)
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/ramcfg.h +7 -5
@@ -40,6 +40,10 @@ struct nvbios_ramcfg {unsigned ramcfg_DLLoff;unsigned ramcfg_RON;unsigned ramcfg_FBVDDQ; +unsigned ramcfg_LowFreq; +unsigned ramcfg_WCKPin; +unsigned ramcfg_Hf_VREF; +unsigned ramcfg_VREFD_off; union { struct { unsigned ramcfg_00_03_01:1;
@@ -82,12 +86,9 @@ struct nvbios_ramcfg { unsigned ramcfg_11_01_04:1; unsigned ramcfg_11_01_08:1; unsigned ramcfg_11_01_10:1; - unsigned ramcfg_11_01_40:1; - unsigned ramcfg_11_01_80:1; unsigned ramcfg_11_02_03:2; unsigned ramcfg_11_02_04:1; unsigned ramcfg_11_02_08:1; - unsigned ramcfg_11_02_10:1; unsigned ramcfg_11_02_40:1; unsigned ramcfg_11_02_80:1; unsigned ramcfg_11_03_0f:4;
@@ -95,7 +96,6 @@ struct nvbios_ramcfg { unsigned ramcfg_11_03_c0:2; unsigned ramcfg_11_03_f0:4; unsigned ramcfg_11_04:8; - unsigned ramcfg_11_06:8; unsigned ramcfg_11_07_02:1; unsigned ramcfg_11_07_04:1; unsigned ramcfg_11_07_08:1;
@@ -132,6 +132,7 @@ struct nvbios_ramcfg { unsigned timing_10_RRD:8; unsigned timing_10_XPDLL:8; unsigned timing_10_ODT:3; + unsigned timing_10_DS:2;/* empty: 15 */ unsigned timing_10_10:8;/* empty: 17 */
@@ -139,7 +140,8 @@ struct nvbios_ramcfg { unsigned timing_10_CWL:8; unsigned timing_10_FAW:8; unsigned timing_10_CKE:8; -/* empty: 22, 23 */ + unsigned timing_10_ADRCMD_T:8; /* XXX: [3:2]? */ +/* empty: 23 */ unsigned timing_10_18:8; };struct {
drivers/gpu/drm/nouveau/nvkm/subdev/bios/rammap.c +18 -4
@@ -205,8 +205,11 @@ nvbios_rammapSp(struct nvkm_bios *bios, u32 data, p->ramcfg_10_02_20 = (nvbios_rd08 (bios, data +0x02 ) &0x20 ) >>5 ; p->ramcfg_DLLoff = (nvbios_rd08 (bios, data +0x02 ) &0x40 ) >>6 ; p->ramcfg_10_03_0f = (nvbios_rd08 (bios, data +0x03 ) &0x0f ) >>0 ; + p->ramcfg_LowFreq = (nvbios_rd08 (bios, data +0x03 ) &0x20 ) >>5 ; + p->ramcfg_WCKPin = (nvbios_rd08 (bios, data +0x03 ) &0x40 ) >>6 ; p->ramcfg_10_04_01 = (nvbios_rd08 (bios, data +0x04 ) &0x01 ) >>0 ; p->ramcfg_FBVDDQ = (nvbios_rd08 (bios, data +0x04 ) &0x08 ) >>3 ; + p->ramcfg_Hf_VREF = (nvbios_rd08 (bios, data +0x04 ) &0x20 ) >>5 ; p->ramcfg_10_05_0f = (nvbios_rd08 (bios, data +0x05 ) &0x0f ) >>0 ; p->ramcfg_10_05_f0 = (nvbios_rd08 (bios, data +0x05 ) &0xf0 ) >>4 ; p->ramcfg_10_06_0f = (nvbios_rd08 (bios, data +0x06 ) &0x0f ) >>0 ;
@@ -216,6 +219,17 @@ nvbios_rammapSp(struct nvkm_bios *bios, u32 data, p->ramcfg_10_08 = (nvbios_rd08 (bios, data +0x08 ) &0xff ) >>0 ; p->ramcfg_10_09_0f = (nvbios_rd08 (bios, data +0x09 ) &0x0f ) >>0 ; p->ramcfg_10_09_f0 = (nvbios_rd08 (bios, data +0x09 ) &0xf0 ) >>4 ; + +switch (elen) { +case 0xe : +case 0xd : + p->ramcfg_VREFD_off =nvbios_rd08 (bios, data +0x0c ); +case 0xc : +case 0xb : +default : +break ; + } +break ;case 0x11 : p->ramcfg_timing =nvbios_rd08 (bios, data +0x00 );
@@ -225,12 +239,12 @@ nvbios_rammapSp(struct nvkm_bios *bios, u32 data, p->ramcfg_11_01_08 = (nvbios_rd08 (bios, data +0x01 ) &0x08 ) >>3 ; p->ramcfg_11_01_10 = (nvbios_rd08 (bios, data +0x01 ) &0x10 ) >>4 ; p->ramcfg_DLLoff = (nvbios_rd08 (bios, data +0x01 ) &0x20 ) >>5 ; - p->ramcfg_11_01_40 = (nvbios_rd08 (bios, data +0x01 ) &0x40 ) >>6 ; - p->ramcfg_11_01_80 = (nvbios_rd08 (bios, data +0x01 ) &0x80 ) >>7 ; + p->ramcfg_LowFreq = (nvbios_rd08 (bios, data +0x01 ) &0x40 ) >>6 ; + p->ramcfg_WCKPin = (nvbios_rd08 (bios, data +0x01 ) &0x80 ) >>7 ; p->ramcfg_11_02_03 = (nvbios_rd08 (bios, data +0x02 ) &0x03 ) >>0 ; p->ramcfg_11_02_04 = (nvbios_rd08 (bios, data +0x02 ) &0x04 ) >>2 ; p->ramcfg_11_02_08 = (nvbios_rd08 (bios, data +0x02 ) &0x08 ) >>3 ; - p->ramcfg_11_02_10 = (nvbios_rd08 (bios, data +0x02 ) &0x10 ) >>4 ; + p->ramcfg_Hf_VREF = (nvbios_rd08 (bios, data +0x02 ) &0x10 ) >>4 ; p->ramcfg_11_02_40 = (nvbios_rd08 (bios, data +0x02 ) &0x40 ) >>6 ; p->ramcfg_11_02_80 = (nvbios_rd08 (bios, data +0x02 ) &0x80 ) >>7 ; p->ramcfg_11_03_0f = (nvbios_rd08 (bios, data +0x03 ) &0x0f ) >>0 ;
@@ -238,7 +252,7 @@ nvbios_rammapSp(struct nvkm_bios *bios, u32 data, p->ramcfg_11_03_c0 = (nvbios_rd08 (bios, data +0x03 ) &0xc0 ) >>6 ; p->ramcfg_11_03_f0 = (nvbios_rd08 (bios, data +0x03 ) &0xf0 ) >>4 ; p->ramcfg_11_04 = (nvbios_rd08 (bios, data +0x04 ) &0xff ) >>0 ; - p->ramcfg_11_06 = (nvbios_rd08 (bios, data +0x06 ) &0xff ) >>0 ; + p->ramcfg_VREFD_off = (nvbios_rd08 (bios, data +0x06 ) &0xff ) >>0 ; p->ramcfg_11_07_02 = (nvbios_rd08 (bios, data +0x07 ) &0x02 ) >>1 ; p->ramcfg_11_07_04 = (nvbios_rd08 (bios, data +0x07 ) &0x04 ) >>2 ; p->ramcfg_11_07_08 = (nvbios_rd08 (bios, data +0x07 ) &0x08 ) >>3 ;
drivers/gpu/drm/nouveau/nvkm/subdev/bios/timing.c +2 -0
@@ -104,6 +104,7 @@ nvbios_timingEp(struct nvkm_bios *bios, int idx, p->timing_10_ODT =nvbios_rd08 (bios, data +0x0e ) &0x07 ;if (p->ramcfg_ver >=0x10 ) p->ramcfg_RON =nvbios_rd08 (bios, data +0x0e ) &0x07 ; + p->timing_10_DS =nvbios_rd08 (bios, data +0xe ) &0x30 >>4 ; p->timing_10_18 =0xff ; p->timing_10_CKE =0 ;
@@ -117,6 +118,7 @@ nvbios_timingEp(struct nvkm_bios *bios, int idx, p->timing_10_18 =nvbios_rd08 (bios, data +0x18 );case 0x18 :case 0x17 : + p->timing_10_ADRCMD_T =nvbios_rd08 (bios, data +0x16 );case 0x16 : p->timing_10_CKE =nvbios_rd08 (bios, data +0x15 );case 0x15 :
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr5.c +17 -4
@@ -39,14 +39,18 @@ nvkm_gddr5_calc(struct nvkm_ram *ram, bool nuts)int rq = ram->freq <1000000 ;/* XXX */ xd = !ram->next->bios.ramcfg_DLLoff; + lf = ram->next->bios.ramcfg_LowFreq; + pd = ram->next->bios.ramcfg_WCKPin; + vh = ram->next->bios.ramcfg_Hf_VREF; + vo = ram->next->bios.ramcfg_VREFD_off;switch (ram->next->bios.ramcfg_ver) { +case 0x10 : + vr =0 ; + l3 = (ram->mr[5 ] &0x4 ) >>2 ; +break ;case 0x11 : - pd = ram->next->bios.ramcfg_11_01_80; - lf = ram->next->bios.ramcfg_11_01_40; - vh = ram->next->bios.ramcfg_11_02_10; vr = ram->next->bios.ramcfg_11_02_04; - vo = ram->next->bios.ramcfg_11_06; l3 = !ram->next->bios.ramcfg_11_07_02;break ;default :
@@ -54,6 +58,15 @@ nvkm_gddr5_calc(struct nvkm_ram *ram, bool nuts) }switch (ram->next->bios.timing_ver) { +case 0x10 : +WL = ram->next->bios.timing_10_CWL; +CL = ram->next->bios.timing_10_CL; +WR = ram->next->bios.timing_10_WR; + at[0 ] = ram->next->bios.timing_10_ADRCMD_T &0x3 ; + at[1 ] =0 ; + dt = ram->next->bios.timing_10_ODT; + ds = ram->next->bios.timing_10_DS; +break ;case 0x20 :WL = (ram->next->bios.timing[1 ] &0x00000f80 ) >>7 ;CL = (ram->next->bios.timing[1 ] &0x0000001f );
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c +27 -22
100 lines not on this page · raw message
Signature · 6 lines
2.9.3 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
PATCH 6/13 nvkm/ramgt215: Move ram training up the chain
In reply to a message not in the archiveParts are re-used even on NVA3, others from GF100 on
--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h | 17 +++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 92 +++++++++----- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c | 140 +--------------------- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c | 61 ++++++++++ 4 files changed, 140 insertions(+), 170 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h +17 -0
@@ -1,6 +1,7 @@#ifndef __NVKM_FB_RAM_PRIV_H__#define __NVKM_FB_RAM_PRIV_H__#include "priv.h" +#include <subdev/bios/M0209.h> int nvkm_ram_ctor(const struct nvkm_ram_func *, struct nvkm_fb *, enum nvkm_ram_type, u64 size, u32 tags,
@@ -24,6 +25,22 @@ int gf100_ram_ctor(const struct nvkm_ram_func *, struct nvkm_fb *,int gf100_ram_get (struct nvkm_ram *,u64 ,u32 ,u32 ,u32 ,struct nvkm_mem **);void gf100_ram_put (struct nvkm_ram *,struct nvkm_mem **); +/* Training */ +struct gt215_ram_train { +u16 mask; +struct nvbios_M0209S remap; +struct nvbios_M0209S type00; +struct nvbios_M0209S type01; +struct nvbios_M0209S type04; +struct nvbios_M0209S type06; +struct nvbios_M0209S type07; +struct nvbios_M0209S type08; +struct nvbios_M0209S type09; +}; +int gt215_ram_train_type (struct nvkm_ram *ram,int i,u8 ramcfg, +struct gt215_ram_train *train); +int gf100_ram_train_init (struct nvkm_ram *ram); +int gk104_ram_ctor (struct nvkm_fb *,struct nvkm_ram **,u32 );int gk104_ram_init (struct nvkm_ram *ram);
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c +61 -31
112 lines not on this page · raw message
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c +1 -139
152 lines not on this page · raw message
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c +61 -0
67 lines not on this page · raw message
Signature · 6 lines
2.9.3 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
PATCH 7/13 nvkm/ramgf100: Don't mandate training pattern 4
In reply to a message not in the archiveIt's not found on Fermi.
--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c +8 -5
@@ -556,7 +556,7 @@ gf100_ram_train_init_0(struct nvkm_ram *ram, struct gt215_ram_train *train)struct nvkm_device *device = subdev->device;int i, j; -if ((train->mask &0x03d3 ) !=0x03d3 ) { +if ((train->mask &0x03c3 ) !=0x03c3 ) {nvkm_warn (subdev,"missing link training data\n" );return -EINVAL ; }
@@ -575,10 +575,13 @@ gf100_ram_train_init_0(struct nvkm_ram *ram, struct gt215_ram_train *train) } } -for (j =0 ; j <8 ; j +=4 ) { -for (i =0 ; i <0x100 ; i++) { -nvkm_wr32 (device,0x10f968 + j, i); -nvkm_wr32 (device,0x10f900 + j, train->type04.data[i]); +if (train->mask &0x10 ) { +for (j =0 ; j <8 ; j +=4 ) { +for (i =0 ; i <0x100 ; i++) { +nvkm_wr32 (device,0x10f968 + j, i); +nvkm_wr32 (device,0x10f900 + j, + train->type04.data[i]); + } } }
Signature · 6 lines
2.9.3 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
PATCH 8/13 nvkm/ramgf100: Unset bit before uploading train values
In reply to a message not in the archiveJust because the blob does it too...
--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c +6 -0
@@ -620,6 +620,12 @@ gf100_ram_train_init(struct nvkm_ram *ram)static int gf100_ram_init (struct nvkm_ram *base) { +struct nvkm_subdev *subdev = &base->fb->subdev; +struct nvkm_device *device = subdev->device; + +/* XXX Why does the blob do this? */ +nvkm_mask (device,0x137360 ,0x00000002 ,0x00000000 ); +/* XXX: Don't hook up yet for bisectability */ return 0 ; }
Signature · 6 lines
2.9.3 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
PATCH 9/13 nvkm/ramgf100: Reinstate default ram train pattern
In reply to a message not in the archive--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 59 +++++++++++++++++------ 1 file changed, 43 insertions(+), 16 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c +43 -16
@@ -556,22 +556,49 @@ gf100_ram_train_init_0(struct nvkm_ram *ram, struct gt215_ram_train *train)struct nvkm_device *device = subdev->device;int i, j; -if ((train->mask &0x03c3 ) !=0x03c3 ) { -nvkm_warn (subdev,"missing link training data\n" ); -return -EINVAL ; - } - -for (i =0 ; i <0x30 ; i++) { -for (j =0 ; j <8 ; j +=4 ) { -nvkm_wr32 (device,0x10f968 + j,0x00000000 | (i <<8 )); -nvkm_wr32 (device,0x10f920 + j,0x00000000 | - train->type08.data[i] <<4 | - train->type06.data[i]); -nvkm_wr32 (device,0x10f918 + j, train->type00.data[i]); -nvkm_wr32 (device,0x10f920 + j,0x00000100 | - train->type09.data[i] <<4 | - train->type07.data[i]); -nvkm_wr32 (device,0x10f918 + j, train->type01.data[i]); +static const u8 train0[] = { +0x00 ,0xff ,0x55 ,0xaa ,0x33 ,0xcc , +0x00 ,0xff ,0xff ,0x00 ,0xff ,0x00 , + }; + +static const u32 train1[] = { +0x00000000 ,0xffffffff , +0x55555555 ,0xaaaaaaaa , +0x33333333 ,0xcccccccc , +0xf0f0f0f0 ,0x0f0f0f0f , +0x00ff00ff ,0xff00ff00 , +0x0000ffff ,0xffff0000 , + }; + +if ((train->mask &0x03c3 ) ==0x03c3 ) { +for (i =0 ; i <0x30 ; i++) { +for (j =0 ; j <8 ; j +=4 ) { +nvkm_wr32 (device,0x10f968 + j, (i <<8 )); +nvkm_wr32 (device,0x10f920 + j,0x00000000 | + train->type08.data[i] <<4 | + train->type06.data[i]); +nvkm_wr32 (device,0x10f918 + j, + train->type00.data[i]); +nvkm_wr32 (device,0x10f920 + j,0x00000100 | + train->type09.data[i] <<4 | + train->type07.data[i]); +nvkm_wr32 (device,0x10f918 + j, + train->type01.data[i]); + } + } + }else { +nvkm_info (subdev,"missing link training data, using defaults\n" ); + +for (i =0 ; i <0x30 ; i++) { +for (j =0 ; j <8 ; j +=4 ) { +nvkm_wr32 (device,0x10f968 + j, (i <<8 )); +nvkm_wr32 (device,0x10f920 + j,0x00000100 | + train0[i %12 ]); +nvkm_wr32 (device,0x10f918 + j, train1[i %12 ]); +nvkm_wr32 (device,0x10f920 + j,0x00000000 | + train0[i %12 ]); +nvkm_wr32 (device,0x10f918 + j, train1[i %12 ]); + } } }
Signature · 6 lines
2.9.3 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
PATCH 10/13 nvkm/ramgt215: Add train ptrn upload for GDDR5
In reply to a message not in the archive--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c | 128 +++++++++++++++++----- 2 files changed, 99 insertions(+), 30 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h +1 -0
@@ -32,6 +32,7 @@ struct gt215_ram_train {struct nvbios_M0209S type00;struct nvbios_M0209S type01;struct nvbios_M0209S type04; +struct nvbios_M0209S type05;struct nvbios_M0209S type06;struct nvbios_M0209S type07;struct nvbios_M0209S type08;
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c +98 -30
215 lines not on this page · raw message
Signature · 6 lines
2.9.3 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
PATCH 11/13 nvkm/ramgf100: Hook up ram training pattern init for NVC0+
In reply to a message not in the archive--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c +1 -2
@@ -653,8 +653,7 @@ gf100_ram_init(struct nvkm_ram *base)/* XXX Why does the blob do this? */ nvkm_mask (device,0x137360 ,0x00000002 ,0x00000000 ); -/* XXX: Don't hook up yet for bisectability */ -return 0 ; +return gf100_ram_train_init (base); } static const struct nvkm_ram_func
Signature · 6 lines
2.9.3 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
PATCH 12/13 nvkm/pmu/memx: init script -> memx translation
In reply to a message not in the archive--- drivers/gpu/drm/nouveau/include/nvkm/subdev/pmu.h | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramfuc.h | 8 +++ drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c | 66 +++++++++++++++++++++++ 3 files changed, 76 insertions(+)
drivers/gpu/drm/nouveau/include/nvkm/subdev/pmu.h +2 -0
@@ -50,4 +50,6 @@ void nvkm_memx_train(struct nvkm_memx *);int nvkm_memx_train_result (struct nvkm_pmu *,u32 *,int );void nvkm_memx_block (struct nvkm_memx *);void nvkm_memx_unblock (struct nvkm_memx *); +void nvkm_memx_init_run (struct nvkm_memx *memx,struct nvkm_bios *bios, +u16 offset,u8 ramcfg);#endif
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramfuc.h +8 -0
@@ -160,6 +160,13 @@ ramfuc_unblock(struct ramfuc *ram)nvkm_memx_unblock (ram->memx); } +static inline void +ramfuc_init_run (struct ramfuc *ram,struct nvkm_bios *bios,u16 offset, +u8 ramcfg) +{ +nvkm_memx_init_run (ram->memx, bios, offset, ramcfg); +} +#define ram_init (s,p) ramfuc_init(&(s)->base, (p))#define ram_exec (s,e) ramfuc_exec(&(s)->base, (e))#define ram_have (s,r) ((s)->r_##r.addr != 0x000000)
@@ -174,4 +181,5 @@ ramfuc_unblock(struct ramfuc *ram)#define ram_train_result (s,r,l) ramfuc_train_result((s), (r), (l))#define ram_block (s) ramfuc_block(&(s)->base)#define ram_unblock (s) ramfuc_unblock(&(s)->base) +#define ram_init_run (s,b,o,r) ramfuc_init_run(&(s)->base, (b), (o), (r))#endif
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c +66 -0
76 lines not on this page · raw message
Signature · 6 lines
2.9.3 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
PATCH 13/13 nvkm/bios/perf: Retreive pointer to unk1c script
In reply to a message not in the archive--- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/perf.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bios/perf.c | 14 ++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 1 + 3 files changed, 16 insertions(+)
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/perf.h +1 -0
@@ -40,4 +40,5 @@ struct nvbios_perf_fan { };int nvbios_perf_fan_parse (struct nvkm_bios *,struct nvbios_perf_fan *); +u16 nvbios_perf_script_unk1c (struct nvkm_bios *bios);#endif
drivers/gpu/drm/nouveau/nvkm/subdev/bios/perf.c +14 -0
@@ -213,3 +213,17 @@ nvbios_perf_fan_parse(struct nvkm_bios *bios,return 0 ; } + +u16 +nvbios_perf_script_unk1c (struct nvkm_bios *bios) +{ +struct bit_entry bit_P; + +if (!bit_entry (bios,'P' , &bit_P)) { +if (bit_P.version ==2 ) { +return nvbios_rd16 (bios, bit_P.offset +0x1c ); + } + } + +return 0x0000 ; +}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c +1 -0
@@ -31,6 +31,7 @@#include <subdev/bios/M0205.h> #include <subdev/bios/rammap.h> #include <subdev/bios/timing.h> +#include <subdev/bios/perf.h> #include <subdev/clk.h> #include <subdev/clk/pll.h> #include <subdev/ltc.h>
Signature · 6 lines
2.9.3 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
A message that is not in the archive (sent off-list or not yet received): 20170410195050.29638-14-nouveau-NQbd8FSOZ1kdnm+yROfE0A@public.gmane.org
Re: [PATCH 13/13] nvkm/bios/perf: Retreive pointer to unk1c script
Minor nitpick in the patch title: s/Retreive/Retrieve/.
Quoted 44 lines · Roy Spliet
Signed-off-by Roy Spliet <[email protected]>--- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/perf.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bios/perf.c | 14 ++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 1 + 3 files changed, 16 insertions(+)drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/perf.h +1
-0@@ -40,4 +40,5 @@ struct nvbios_perf_fan { };int nvbios_perf_fan_parse (struct nvkm_bios *,struct nvbios_perf_fan *); +u16 nvbios_perf_script_unk1c (struct nvkm_bios *bios);#endif drivers/gpu/drm/nouveau/nvkm/subdev/bios/perf.c +14
-0@@ -213,3 +213,17 @@ nvbios_perf_fan_parse(struct nvkm_bios *bios,return 0 ; } + +u16 +nvbios_perf_script_unk1c (struct nvkm_bios *bios) +{ +struct bit_entry bit_P; + +if (!bit_entry (bios,'P' , &bit_P)) { +if (bit_P.version ==2 ) { +return nvbios_rd16 (bios, bit_P.offset +0x1c ); + } + } + +return 0x0000 ; +}drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c +0
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c line 37
Quoted 7 lines
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c +1
-0@@ -31,6 +31,7 @@#include <subdev/bios/M0205.h> #include <subdev/bios/rammap.h> #include <subdev/bios/timing.h> +#include <subdev/bios/perf.h> #include <subdev/clk.h> #include <subdev/clk/pll.h> #include <subdev/ltc.h>
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau