Commit Graph

8 Commits

Author SHA1 Message Date
Jean-Sébastien Pédron
fe8e65ae3d drm: Revert the part of r288653 about M_WAITOK vs M_NOWAIT
Using M_NOWAIT could lead to transient failures with ioctls.

Suggested by:	kib
2016-01-13 20:35:02 +00:00
Adrian Chadd
280bcab3d0 drm2: a few minor fixes after r280183
* Remove obsolete drm_agp_*_memory() prototypes.
* Fix comment in drm_fops.c (outisde -> outside).
* Fix some formatting issues in drm_stub.c (spaces -> tabs).
* Add missing case statement (gen == 3) in intel_gpu_reset().
* Restore pci_enable_busmaster() call in the init path (fixes gpu hang on i945GM).
* Replace M_WAITOK with M_NOWAIT when the return value of malloc is checked (may be incorrect).

Submitted by:	<s3erios@gmail.com>
Reviewed by:	dumbbell
Approved by:	dumbbell
Differential Revision:	https://reviews.freebsd.org/D3413
2015-10-04 07:45:36 +00:00
Jean-Sébastien Pédron
455fa6518a drm: Update the device-independent code to match Linux 3.8.13
This update brings few features:
    o  Support for the setmaster/dropmaster ioctls. For instance, they
       are used to run multiple X servers simultaneously.
    o  Support for minor devices. The only user-visible change is a new
       entry in /dev/dri but it is useless at the moment. This is a
       first step to support render nodes [1].

The main benefit is to greatly reduce the diff with Linux (at the
expense of an unreadable commit diff). Hopefully, next upgrades will be
easier.

No updates were made to the drivers, beside adapting them to API
changes.

[1] https://en.wikipedia.org/wiki/Direct_Rendering_Manager#Render_nodes

Tested by:	Many people
MFC after:	1 month
Relnotes:	yes
2015-03-17 18:50:33 +00:00
Jason A. Harmening
edf3c81a5c Using parent DMA tag in drm_pci_alloc(). This can allow drm2 devices to work with Intel DMAR enabled for the system, as long as DMAR is disabled for the drm2 device.
Approved by:	kib (mentor)
MFC after:	1 week
2015-03-12 14:18:36 +00:00
John Baldwin
aced5239b2 Add missing calls to bus_dmamap_unload() when freeing static DMA
allocations.

Reviewed by:	scottl
2014-06-13 18:20:44 +00:00
Jean-Sébastien Pédron
20fa47be09 drm: Read PCIER_LINK_CAP/PCIER_LINK_CAP2 from the PCI bridge
Before this fix, capabilities were read from vgapci and were incorrect.
2013-12-04 19:04:56 +00:00
Jean-Sébastien Pédron
e27c6c9fa2 drm: Import drm_pcie_get_speed_cap_mask() in drm_pci.c
This comes with several PCI_VENDOR_ID_* defines which should go in a
more central place.
2013-08-25 11:34:37 +00:00
Konstantin Belousov
e27f871969 Add the code for new Intel GPU driver, which supports GEM, KMS and
works with new generations of GPUs (IronLake, SandyBridge and
supposedly IvyBridge).

The driver is not connected to the build yet.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2012-05-22 11:07:44 +00:00