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 <airlied@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Danilo Krummrich <dakr@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231002135008.10651-2-dakr@redhat.com
1 parent 152be54 commit bbe08a0

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

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)