Commit Graph

9 Commits

Author SHA1 Message Date
Jean-Sébastien Pédron
740be6d755 drm/i915: Update to match Linux 3.8.13
This update brings initial support for Haswell GPUs.

Tested by:	Many users of FreeBSD, PC-BSD and HardenedBSD
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5554
2016-03-08 20:33:02 +00:00
Jean-Sébastien Pédron
1db7984861 drm/i915: Reduce diff with Linux 3.8
There is no functional change. The goal is to ease the future update to
Linux 3.8's i915 driver.

MFC after:	2 months
2015-11-01 19:55:32 +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
Konstantin Belousov
47671d1bab An update for the i915 GPU driver, which brings the code up to Linux
commit 4d93914ae3db4a897ead4b.  Some related drm infrastructure
changes are imported as needed.

Biggest update is the rewrite of the i915 gem io to more closely
follow Linux model, althought the mechanism used by FreeBSD port is
different.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 month
2015-01-21 16:10:37 +00:00
Konstantin Belousov
07a92f34d6 Add an argument to the x86 pmap_invalidate_cache_range() to request
forced invalidation of the cache range regardless of the presence of
self-snoop feature.  Some recent Intel GPUs in some modes are not
coherent, and dirty lines in CPU cache must be flushed before the
pages are transferred to GPU domain.

Reviewed by:	alc (previous version)
Tested by:	pho (amd64)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-10-08 16:48:03 +00:00
Jean-Sébastien Pédron
73547eeae9 drm/i915: Add HW context support
This feature is required by Mesa 9.2+. Without this, a GL application
crashes with the following message:
    # glxinfo
    name of display: :0.0
    Gen6+ requires Kernel 3.6 or later.
    Assertion failed: (ctx->Version > 0), function handle_first_current,
      file ../../src/mesa/main/context.c, line 1498.
    Abort (core dumped)

Now, Mesa 10.2.4 and 10.3-rc3 works fine:
    # glxinfo
    name of display: :0
    display: :0  screen: 0
    direct rendering: Yes
    ...
    OpenGL renderer string: Mesa DRI Intel(R) 965GM
    OpenGL version string: 2.1 Mesa 10.2.4
    ...

The code was imported from Linux 3.8.13.

Reviewed by:	kib@
Tested by:	kwm@, danfe@, Henry Hu,
		Lundberg, Johannes <johannes@brilliantservice.co.jp>,
		Johannes Dieterich <dieterich.joh@gmail.com>,
		Lutz Bichler <lutz.bichler@gmail.com>,
MFC after:	3 days
Relnotes:	yes
2014-09-17 08:28:50 +00:00
Jeff Roberson
5df87b21d3 Replace kernel virtual address space allocation with vmem. This provides
transparent layering and better fragmentation.

 - Normalize functions that allocate memory to use kmem_*
 - Those that allocate address space are named kva_*
 - Those that operate on maps are named kmap_*
 - Implement recursive allocation handling for kmem_arena in vmem.

Reviewed by:	alc
Tested by:	pho
Sponsored by:	EMC / Isilon Storage Division
2013-08-07 06:21:20 +00:00
Konstantin Belousov
49c1fb04b2 The pmap_qenter() and pmap_qremove() perform TLB invalidation on its
own, no need to call pmap_invalidate_range() one more time.

Noted by:	alc
MFC after:	1 week
2013-07-27 16:42:29 +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