2013-10-09 14:18:51 +07:00
|
|
|
config DRM_I915
|
|
|
|
tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics"
|
|
|
|
depends on DRM
|
2013-11-05 19:00:08 +07:00
|
|
|
depends on X86 && PCI
|
|
|
|
depends on (AGP || AGP=n)
|
|
|
|
select INTEL_GTT
|
|
|
|
select AGP_INTEL if AGP
|
drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl
By exporting the ability to map user address and inserting PTEs
representing their backing pages into the GTT, we can exploit UMA in order
to utilize normal application data as a texture source or even as a
render target (depending upon the capabilities of the chipset). This has
a number of uses, with zero-copy downloads to the GPU and efficient
readback making the intermixed streaming of CPU and GPU operations
fairly efficient. This ability has many widespread implications from
faster rendering of client-side software rasterisers (chromium),
mitigation of stalls due to read back (firefox) and to faster pipelining
of texture data (such as pixel buffer objects in GL or data blobs in CL).
v2: Compile with CONFIG_MMU_NOTIFIER
v3: We can sleep while performing invalidate-range, which we can utilise
to drop our page references prior to the kernel manipulating the vma
(for either discard or cloning) and so protect normal users.
v4: Only run the invalidate notifier if the range intercepts the bo.
v5: Prevent userspace from attempting to GTT mmap non-page aligned buffers
v6: Recheck after reacquire mutex for lost mmu.
v7: Fix implicit padding of ioctl struct by rounding to next 64bit boundary.
v8: Fix rebasing error after forwarding porting the back port.
v9: Limit the userptr to page aligned entries. We now expect userspace
to handle all the offset-in-page adjustments itself.
v10: Prevent vma from being copied across fork to avoid issues with cow.
v11: Drop vma behaviour changes -- locking is nigh on impossible.
Use a worker to load user pages to avoid lock inversions.
v12: Use get_task_mm()/mmput() for correct refcounting of mm.
v13: Use a worker to release the mmu_notifier to avoid lock inversion
v14: Decouple mmu_notifier from struct_mutex using a custom mmu_notifer
with its own locking and tree of objects for each mm/mmu_notifier.
v15: Prevent overlapping userptr objects, and invalidate all objects
within the mmu_notifier range
v16: Fix a typo for iterating over multiple objects in the range and
rearrange error path to destroy the mmu_notifier locklessly.
Also close a race between invalidate_range and the get_pages_worker.
v17: Close a race between get_pages_worker/invalidate_range and fresh
allocations of the same userptr range - and notice that
struct_mutex was presumed to be held when during creation it wasn't.
v18: Sigh. Fix the refactor of st_set_pages() to allocate enough memory
for the struct sg_table and to clear it before reporting an error.
v19: Always error out on read-only userptr requests as we don't have the
hardware infrastructure to support them at the moment.
v20: Refuse to implement read-only support until we have the required
infrastructure - but reserve the bit in flags for future use.
v21: use_mm() is not required for get_user_pages(). It is only meant to
be used to fix up the kernel thread's current->mm for use with
copy_user().
v22: Use sg_alloc_table_from_pages for that chunky feeling
v23: Export a function for sanity checking dma-buf rather than encode
userptr details elsewhere, and clean up comments based on
suggestions by Bradley.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: "Gong, Zhipeng" <zhipeng.gong@intel.com>
Cc: Akash Goel <akash.goel@intel.com>
Cc: "Volkin, Bradley D" <bradley.d.volkin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com>
[danvet: Frob ioctl allocation to pick the next one - will cause a bit
of fuss with create2 apparently, but such are the rules.]
[danvet2: oops, forgot to git add after manual patch application]
[danvet3: Appease sparse.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-16 20:22:37 +07:00
|
|
|
select INTERVAL_TREE
|
2013-10-09 14:18:51 +07:00
|
|
|
# we need shmfs for the swappable backing store, and in particular
|
|
|
|
# the shmem_readpage() which depends upon tmpfs
|
|
|
|
select SHMEM
|
|
|
|
select TMPFS
|
|
|
|
select DRM_KMS_HELPER
|
2015-01-23 20:30:56 +07:00
|
|
|
select DRM_PANEL
|
2015-01-16 19:27:23 +07:00
|
|
|
select DRM_MIPI_DSI
|
2013-10-09 14:18:51 +07:00
|
|
|
# i915 depends on ACPI_VIDEO when ACPI is enabled
|
|
|
|
# but for select to work, need to select ACPI_VIDEO's dependencies, ick
|
|
|
|
select BACKLIGHT_LCD_SUPPORT if ACPI
|
|
|
|
select BACKLIGHT_CLASS_DEVICE if ACPI
|
|
|
|
select INPUT if ACPI
|
|
|
|
select ACPI_VIDEO if ACPI
|
|
|
|
select ACPI_BUTTON if ACPI
|
|
|
|
help
|
|
|
|
Choose this option if you have a system that has "Intel Graphics
|
|
|
|
Media Accelerator" or "HD Graphics" integrated graphics,
|
|
|
|
including 830M, 845G, 852GM, 855GM, 865G, 915G, 945G, 965G,
|
|
|
|
G35, G41, G43, G45 chipsets and Celeron, Pentium, Core i3,
|
|
|
|
Core i5, Core i7 as well as Atom CPUs with integrated graphics.
|
|
|
|
If M is selected, the module will be called i915. AGP support
|
|
|
|
is required for this driver to work. This driver is used by
|
|
|
|
the Intel driver in X.org 6.8 and XFree86 4.4 and above. It
|
|
|
|
replaces the older i830 module that supported a subset of the
|
|
|
|
hardware in older X.org releases.
|
|
|
|
|
|
|
|
Note that the older i810/i815 chipsets require the use of the
|
|
|
|
i810 driver instead, and the Atom z5xx series has an entirely
|
|
|
|
different implementation.
|
|
|
|
|
|
|
|
config DRM_I915_KMS
|
|
|
|
bool "Enable modesetting on intel by default"
|
|
|
|
depends on DRM_I915
|
2013-11-14 04:11:25 +07:00
|
|
|
default y
|
2013-10-09 14:18:51 +07:00
|
|
|
help
|
2013-11-14 04:11:25 +07:00
|
|
|
Choose this option if you want kernel modesetting enabled by default.
|
|
|
|
|
|
|
|
If in doubt, say "Y".
|
2013-10-09 14:18:51 +07:00
|
|
|
|
|
|
|
config DRM_I915_FBDEV
|
2013-11-21 21:29:55 +07:00
|
|
|
bool "Enable legacy fbdev support for the modesetting intel driver"
|
2013-10-09 14:18:51 +07:00
|
|
|
depends on DRM_I915
|
|
|
|
select DRM_KMS_FB_HELPER
|
|
|
|
select FB_CFB_FILLRECT
|
|
|
|
select FB_CFB_COPYAREA
|
|
|
|
select FB_CFB_IMAGEBLIT
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Choose this option if you have a need for the legacy fbdev
|
|
|
|
support. Note that this support also provide the linux console
|
|
|
|
support on top of the intel modesetting driver.
|
|
|
|
|
2013-11-14 04:11:25 +07:00
|
|
|
If in doubt, say "Y".
|
|
|
|
|
2013-10-09 14:18:51 +07:00
|
|
|
config DRM_I915_PRELIMINARY_HW_SUPPORT
|
|
|
|
bool "Enable preliminary support for prerelease Intel hardware by default"
|
|
|
|
depends on DRM_I915
|
2013-11-14 04:11:25 +07:00
|
|
|
default n
|
2013-10-09 14:18:51 +07:00
|
|
|
help
|
|
|
|
Choose this option if you have prerelease Intel hardware and want the
|
|
|
|
i915 driver to support it by default. You can enable such support at
|
|
|
|
runtime with the module option i915.preliminary_hw_support=1; this
|
|
|
|
option changes the default for that module option.
|
|
|
|
|
|
|
|
If in doubt, say "N".
|
2015-05-20 20:12:47 +07:00
|
|
|
|
|
|
|
menu "DRM i915 Debugging"
|
|
|
|
|
|
|
|
depends on DRM_I915
|
|
|
|
|
|
|
|
source drivers/gpu/drm/i915/Kconfig.debug
|
|
|
|
|
|
|
|
endmenu
|