aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanilo Krummrich <[email protected]>2023-10-02 15:46:47 +0200
committerDanilo Krummrich <[email protected]>2023-10-04 00:10:12 +0200
commitbbe08a0e11ae76fc466c11b9fa6dd6eb52544a46 (patch)
tree9be48f8165094f7748423b1a9ab94d6414484dfe
parent152be54224de182730cf4ee2fe073391623c97f9 (diff)
drm/nouveau: chan: use channel class definitions
Use channel class definitions instead of magic numbers. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Signed-off-by: Danilo Krummrich <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_chan.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c
index f44d19a50d39..68e9b08a4803 100644
--- a/drivers/gpu/drm/nouveau/nouveau_chan.c
+++ b/drivers/gpu/drm/nouveau/nouveau_chan.c
@@ -440,9 +440,11 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
}
/* initialise dma tracking parameters */
- switch (chan->user.oclass & 0x00ff) {
- case 0x006b:
- case 0x006e:
+ switch (chan->user.oclass) {
+ case NV03_CHANNEL_DMA:
+ case NV10_CHANNEL_DMA:
+ case NV17_CHANNEL_DMA:
+ case NV40_CHANNEL_DMA:
chan->user_put = 0x40;
chan->user_get = 0x44;
chan->dma.max = (0x10000 / 4) - 2;