Skip to content

Commit bbe08a0

Browse files
committed
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]
1 parent 152be54 commit bbe08a0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/gpu/drm/nouveau/nouveau_chan.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,11 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
440440
}
441441

442442
/* initialise dma tracking parameters */
443-
switch (chan->user.oclass & 0x00ff) {
444-
case 0x006b:
445-
case 0x006e:
443+
switch (chan->user.oclass) {
444+
case NV03_CHANNEL_DMA:
445+
case NV10_CHANNEL_DMA:
446+
case NV17_CHANNEL_DMA:
447+
case NV40_CHANNEL_DMA:
446448
chan->user_put = 0x40;
447449
chan->user_get = 0x44;
448450
chan->dma.max = (0x10000 / 4) - 2;

0 commit comments

Comments
 (0)