OSDN Git Service

drm/qxl: get vga ioports
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 5 Aug 2019 10:54:01 +0000 (12:54 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 23 Aug 2019 07:06:45 +0000 (09:06 +0200)
commitfbf0a7f44cdd4041b5a3e2b14deaa0adebaf40da
tree6fd2862a0c1da0891e3a21d769203f9c83bb6a2e
parent63daf4e166545363f3b875f5b81aecb46e1e1d19
drm/qxl: get vga ioports

qxl has two modes: "native" (used by the drm driver) and "vga" (vga
compatibility mode, typically used for boot display and firmware
framebuffers).

Accessing any vga ioport will switch the qxl device into vga mode.
The qxl driver never does that, but other drivers accessing vga ports
can trigger that too and therefore disturb qxl operation.  So aquire
the legacy vga ioports from vgaarb to avoid that.

Reproducer: Boot kvm guest with both qxl and i915 vgpu, with qxl being
first in pci scan order.

v2: Skip this for secondary qxl cards which don't have vga mode in the
    first place (Frediano).

Cc: Frediano Ziglio <fziglio@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190805105401.29874-1-kraxel@redhat.com
drivers/gpu/drm/qxl/qxl_drv.c