projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca8e7c6
)
drm/nouveau: fix thinkos in mem timing table recordlen check
author
Roy Spliet
<r.spliet@student.tudelft.nl>
Mon, 4 Oct 2010 21:01:08 +0000
(23:01 +0200)
committer
Ben Skeggs
<bskeggs@redhat.com>
Mon, 4 Oct 2010 23:59:43 +0000
(09:59 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_mem.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/nouveau/nouveau_mem.c
b/drivers/gpu/drm/nouveau/nouveau_mem.c
index 00b31b5e16cd1c8e69c34c153959ede9a10e285a..a163c7c612e78eb6b6718620ee75773cd49a26f7 100644
(file)
--- a/
drivers/gpu/drm/nouveau/nouveau_mem.c
+++ b/
drivers/gpu/drm/nouveau/nouveau_mem.c
@@
-35,6
+35,8
@@
#include "drm_sarea.h"
#include "nouveau_drv.h"
+#define MIN(a,b) a < b ? a : b
+
/*
* NV10-NV40 tiling helpers
*/
@@
-717,14
+719,14
@@
nouveau_mem_timing_init(struct drm_device *dev)
tUNK_19 = 1;
tUNK_20 = 0;
tUNK_21 = 0;
- switch (
recordlen
) {
- case
0x
21:
+ switch (
MIN(recordlen,21)
) {
+ case 21:
tUNK_21 = entry[21];
- case
0x
20:
+ case 20:
tUNK_20 = entry[20];
- case
0x
19:
+ case 19:
tUNK_19 = entry[19];
- case
0x
18:
+ case 18:
tUNK_18 = entry[18];
default:
tUNK_0 = entry[0];