projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c82b88d
)
drm/nv50: Make ctxprog wait until interrupt handler is done.
author
Marcin Kościelnicki
<koriakin@0x04.net>
Sun, 28 Feb 2010 23:45:38 +0000
(23:45 +0000)
committer
Ben Skeggs
<bskeggs@redhat.com>
Wed, 10 Mar 2010 06:06:57 +0000
(16:06 +1000)
This will fix races between generated ctxprogs and interrupt handler.
Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nv50_grctx.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/nouveau/nv50_grctx.c
b/drivers/gpu/drm/nouveau/nv50_grctx.c
index d105fcd42ca0d06febbed6db006b254928f8521e..9f909abfb5ab27ef014a00f62ed923395a7611a9 100644
(file)
--- a/
drivers/gpu/drm/nouveau/nv50_grctx.c
+++ b/
drivers/gpu/drm/nouveau/nv50_grctx.c
@@
-64,6
+64,9
@@
#define CP_FLAG_ALWAYS ((2 * 32) + 13)
#define CP_FLAG_ALWAYS_FALSE 0
#define CP_FLAG_ALWAYS_TRUE 1
+#define CP_FLAG_INTR ((2 * 32) + 15)
+#define CP_FLAG_INTR_NOT_PENDING 0
+#define CP_FLAG_INTR_PENDING 1
#define CP_CTX 0x00100000
#define CP_CTX_COUNT 0x000f0000
@@
-214,6
+217,8
@@
nv50_grctx_init(struct nouveau_grctx *ctx)
cp_name(ctx, cp_setup_save);
cp_set (ctx, UNK1D, SET);
cp_wait(ctx, STATUS, BUSY);
+ cp_wait(ctx, INTR, PENDING);
+ cp_bra (ctx, STATUS, BUSY, cp_setup_save);
cp_set (ctx, UNK01, SET);
cp_set (ctx, SWAP_DIRECTION, SAVE);