Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218248
b: refs/heads/master
c: a845fff
h: refs/heads/master
v: v3
  • Loading branch information
Roy Spliet authored and Ben Skeggs committed Oct 4, 2010
1 parent 83b182f commit 2ff9310
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ca8e7c6ccdfb9a77de9b9719e6ef768373fb607c
refs/heads/master: a845fff841b13678b2d80f10425aba87db840e4a
12 changes: 7 additions & 5 deletions trunk/drivers/gpu/drm/nouveau/nouveau_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#include "drm_sarea.h"
#include "nouveau_drv.h"

#define MIN(a,b) a < b ? a : b

/*
* NV10-NV40 tiling helpers
*/
Expand Down Expand Up @@ -717,14 +719,14 @@ nouveau_mem_timing_init(struct drm_device *dev)
tUNK_19 = 1;
tUNK_20 = 0;
tUNK_21 = 0;
switch (recordlen) {
case 0x21:
switch (MIN(recordlen,21)) {
case 21:
tUNK_21 = entry[21];
case 0x20:
case 20:
tUNK_20 = entry[20];
case 0x19:
case 19:
tUNK_19 = entry[19];
case 0x18:
case 18:
tUNK_18 = entry[18];
default:
tUNK_0 = entry[0];
Expand Down

0 comments on commit 2ff9310

Please sign in to comment.