Skip to content

modesetting: match against Multimedia Video Controllers as well

Chang Liu requested to merge cl91/xserver:master into master

Some GPU devices such as those found in the Loongson 7A2000 bridge chips and 2K2000 SOCs identify as Multimedia Video Controllers (PCI device class 0x4 subclass 0x0) rather than VGA-Compatible Controllers (PCI device class 0x3 subclass 0x0). These have a barebone DRM KMS driver in the upstream kernel called loongson, located under drivers/gpu/drm/loongson. There is also a more feature-rich DRM driver called gsgpu which I have ported from the vendor-provided downstream v4.19 kernel to the mainline kernel ( Both are standard DRM KMS drivers and the modesetting driver works flawlessly on both, as long as we add the Multimedia Video Controllers to the list of device classes that xf86-video-modesetting recognizes.

As for why these devices identify as Multimedia Video Controllers rather than VGA-Compatible Controllers, I have no idea, but they function just like any regular GPUs.

lspci -vvv output for the LS7A2000 graphics chip on my machine:

00:06.0 Multimedia video controller: Loongson Technology LLC Device 7a25 (rev 01)
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop+ ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 62
        NUMA node: 0
        Region 0: Memory at e003136e400 (64-bit, non-prefetchable) [size=256]
        Region 2: Memory at e0020000000 (64-bit, non-prefetchable) [size=256M]
        Region 4: Memory at e0031300000 (64-bit, non-prefetchable) [size=64K]
        Kernel driver in use: gsgpu
        Kernel modules: gsgpu

Merge request reports