Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2
xf86-video-qxl
U_qxl-use-pci-io.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File U_qxl-use-pci-io.patch of Package xf86-video-qxl
From c1e88427d1763bf9bbf9f2dd738980cee644443f Mon Sep 17 00:00:00 2001 From: Adam Jackson <ajax@redhat.com> Date: Thu, 30 Apr 2015 14:32:16 +0200 Subject: Use pci_io_write8 instead of outb Patch-Mainline: Upstream Git-commit: c1e88427d1763bf9bbf9f2dd738980cee644443f This ensures better portability as some arches (eg aarch64) don't have outb. On linux pci_io_* try to open the sysfs map file corresponding to the I/O port range, which the kernel translates arch-appropriately. If there is no such file then it'll try to use port instructions if that's a thing the architecture has. So you only need one path, pciaccess exists to get the portability right for you. https://bugzilla.redhat.com/show_bug.cgi?id=1201877 Signed-off-by: Alexander Graf <agraf@suse.de> Index: xf86-video-qxl-0.1.4/src/qxl.h =================================================================== --- xf86-video-qxl-0.1.4.orig/src/qxl.h +++ xf86-video-qxl-0.1.4/src/qxl.h @@ -276,6 +276,7 @@ struct _qxl_screen_t #ifdef XSERVER_LIBPCIACCESS struct pci_device * pci; + struct pci_io_handle * io; #else pciVideoPtr pci; PCITAG pci_tag; @@ -634,7 +635,7 @@ void ioport_write(qxl_screen_t *qxl, uin #else static inline void ioport_write(qxl_screen_t *qxl, int port, int val) { - outb(qxl->io_base + port, val); + pci_io_write8(qxl->io, port, val); } #endif Index: xf86-video-qxl-0.1.4/src/qxl_driver.c =================================================================== --- xf86-video-qxl-0.1.4.orig/src/qxl_driver.c +++ xf86-video-qxl-0.1.4/src/qxl_driver.c @@ -220,6 +220,8 @@ unmap_memory_helper (qxl_screen_t *qxl) pci_device_unmap_range (qxl->pci, qxl->vram, qxl->pci->regions[1].size); if (qxl->rom) pci_device_unmap_range (qxl->pci, qxl->rom, qxl->pci->regions[2].size); + if (qxl->io) + pci_device_close_io (qxl->pci, qxl->io); #else if (qxl->ram) xf86UnMapVidMem (scrnIndex, qxl->ram, (1 << qxl->pci->size[0])); @@ -252,6 +254,9 @@ map_memory_helper (qxl_screen_t *qxl) qxl->pci->regions[2].size, 0, (void **)&qxl->rom); + qxl->io = pci_device_open_io(qxl->pci, + qxl->pci->regions[3].base_addr, + qxl->pci->regions[3].size); qxl->io_base = qxl->pci->regions[3].base_addr; #else qxl->ram = xf86MapPciMem (scrnIndex, VIDMEM_FRAMEBUFFER,
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor