2008-05-29 08:09:59 +08:00
|
|
|
#
|
|
|
|
# Makefile for the drm device driver. This driver provides support for the
|
|
|
|
# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
|
|
|
|
|
2016-04-14 00:35:00 +08:00
|
|
|
subdir-ccflags-$(CONFIG_DRM_I915_WERROR) := -Werror
|
2016-08-12 19:39:59 +08:00
|
|
|
subdir-ccflags-y += \
|
|
|
|
$(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
|
2016-04-14 00:35:00 +08:00
|
|
|
|
2014-03-07 16:17:21 +08:00
|
|
|
# Please keep these build lists sorted!
|
|
|
|
|
|
|
|
# core driver code
|
|
|
|
i915-y := i915_drv.o \
|
2015-07-24 19:55:10 +08:00
|
|
|
i915_irq.o \
|
2016-08-12 19:39:59 +08:00
|
|
|
i915_memcpy.o \
|
2016-08-19 23:54:28 +08:00
|
|
|
i915_mm.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
i915_params.o \
|
2016-06-24 21:00:26 +08:00
|
|
|
i915_pci.o \
|
2008-07-31 03:06:12 +08:00
|
|
|
i915_suspend.o \
|
2017-05-03 17:39:21 +08:00
|
|
|
i915_syncmap.o \
|
2016-09-09 21:11:41 +08:00
|
|
|
i915_sw_fence.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
i915_sysfs.o \
|
2015-07-24 19:55:10 +08:00
|
|
|
intel_csr.o \
|
2016-07-05 17:40:20 +08:00
|
|
|
intel_device_info.o \
|
2014-09-30 16:56:38 +08:00
|
|
|
intel_pm.o \
|
2015-07-24 19:55:10 +08:00
|
|
|
intel_runtime_pm.o
|
2014-09-30 16:56:38 +08:00
|
|
|
|
2014-03-07 16:17:21 +08:00
|
|
|
i915-$(CONFIG_COMPAT) += i915_ioc32.o
|
2016-12-12 20:29:48 +08:00
|
|
|
i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o intel_pipe_crc.o
|
2014-03-07 16:17:21 +08:00
|
|
|
|
|
|
|
# GEM code
|
|
|
|
i915-y += i915_cmd_parser.o \
|
2014-12-12 04:13:08 +08:00
|
|
|
i915_gem_batch_pool.o \
|
2017-02-22 19:40:48 +08:00
|
|
|
i915_gem_clflush.o \
|
drm/i915: preliminary context support
Very basic code for context setup/destruction in the driver.
Adds the file i915_gem_context.c This file implements HW context
support. On gen5+ a HW context consists of an opaque GPU object which is
referenced at times of context saves and restores. With RC6 enabled,
the context is also referenced as the GPU enters and exists from RC6
(GPU has it's own internal power context, except on gen5). Though
something like a context does exist for the media ring, the code only
supports contexts for the render ring.
In software, there is a distinction between contexts created by the
user, and the default HW context. The default HW context is used by GPU
clients that do not request setup of their own hardware context. The
default context's state is never restored to help prevent programming
errors. This would happen if a client ran and piggy-backed off another
clients GPU state. The default context only exists to give the GPU some
offset to load as the current to invoke a save of the context we
actually care about. In fact, the code could likely be constructed,
albeit in a more complicated fashion, to never use the default context,
though that limits the driver's ability to swap out, and/or destroy
other contexts.
All other contexts are created as a request by the GPU client. These
contexts store GPU state, and thus allow GPU clients to not re-emit
state (and potentially query certain state) at any time. The kernel
driver makes certain that the appropriate commands are inserted.
There are 4 entry points into the contexts, init, fini, open, close.
The names are self-explanatory except that init can be called during
reset, and also during pm thaw/resume. As we expect our context to be
preserved across these events, we do not reinitialize in this case.
As Adam Jackson pointed out, The cutoff of 1MB where a HW context is
considered too big is arbitrary. The reason for this is even though
context sizes are increasing with every generation, they have yet to
eclipse even 32k. If we somehow read back way more than that, it
probably means BIOS has done something strange, or we're running on a
platform that wasn't designed for this.
v2: rename load/unload to init/fini (daniel)
remove ILK support for get_size() (indirectly daniel)
add HAS_HW_CONTEXTS macro to clarify supported platforms (daniel)
added comments (Ben)
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-05 05:42:42 +08:00
|
|
|
i915_gem_context.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
i915_gem_dmabuf.o \
|
2010-08-07 18:01:23 +08:00
|
|
|
i915_gem_evict.o \
|
2010-11-26 02:00:26 +08:00
|
|
|
i915_gem_execbuffer.o \
|
2016-11-11 18:43:54 +08:00
|
|
|
i915_gem_fence_reg.o \
|
2010-11-26 02:00:26 +08:00
|
|
|
i915_gem_gtt.o \
|
2016-10-28 20:58:30 +08:00
|
|
|
i915_gem_internal.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
i915_gem.o \
|
2015-07-24 19:55:10 +08:00
|
|
|
i915_gem_render_state.o \
|
2016-07-20 16:21:08 +08:00
|
|
|
i915_gem_request.o \
|
2015-03-18 17:46:04 +08:00
|
|
|
i915_gem_shrinker.o \
|
2012-04-24 22:47:39 +08:00
|
|
|
i915_gem_stolen.o \
|
DRM: i915: add mode setting support
This commit adds i915 driver support for the DRM mode setting APIs.
Currently, VGA, LVDS, SDVO DVI & VGA, TV and DVO LVDS outputs are
supported. HDMI, DisplayPort and additional SDVO output support will
follow.
Support for the mode setting code is controlled by the new 'modeset'
module option. A new config option, CONFIG_DRM_I915_KMS controls the
default behavior, and whether a PCI ID list is built into the module for
use by user level module utilities.
Note that if mode setting is enabled, user level drivers that access
display registers directly or that don't use the kernel graphics memory
manager will likely corrupt kernel graphics memory, disrupt output
configuration (possibly leading to hangs and/or blank displays), and
prevent panic/oops messages from appearing. So use caution when
enabling this code; be sure your user level code supports the new
interfaces.
A new SysRq key, 'g', provides emergency support for switching back to
the kernel's framebuffer console; which is useful for testing.
Co-authors: Dave Airlie <airlied@linux.ie>, Hong Liu <hong.liu@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-11-08 06:24:08 +08:00
|
|
|
i915_gem_tiling.o \
|
2016-10-28 20:58:46 +08:00
|
|
|
i915_gem_timeline.o \
|
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 21:22:37 +08:00
|
|
|
i915_gem_userptr.o \
|
2009-08-25 18:15:50 +08:00
|
|
|
i915_trace_points.o \
|
2016-11-11 18:43:54 +08:00
|
|
|
i915_vma.o \
|
drm/i915: Slaughter the thundering i915_wait_request herd
One particularly stressful scenario consists of many independent tasks
all competing for GPU time and waiting upon the results (e.g. realtime
transcoding of many, many streams). One bottleneck in particular is that
each client waits on its own results, but every client is woken up after
every batchbuffer - hence the thunder of hooves as then every client must
do its heavyweight dance to read a coherent seqno to see if it is the
lucky one.
Ideally, we only want one client to wake up after the interrupt and
check its request for completion. Since the requests must retire in
order, we can select the first client on the oldest request to be woken.
Once that client has completed his wait, we can then wake up the
next client and so on. However, all clients then incur latency as every
process in the chain may be delayed for scheduling - this may also then
cause some priority inversion. To reduce the latency, when a client
is added or removed from the list, we scan the tree for completed
seqno and wake up all the completed waiters in parallel.
Using igt/benchmarks/gem_latency, we can demonstrate this effect. The
benchmark measures the number of GPU cycles between completion of a
batch and the client waking up from a call to wait-ioctl. With many
concurrent waiters, with each on a different request, we observe that
the wakeup latency before the patch scales nearly linearly with the
number of waiters (before external factors kick in making the scaling much
worse). After applying the patch, we can see that only the single waiter
for the request is being woken up, providing a constant wakeup latency
for every operation. However, the situation is not quite as rosy for
many waiters on the same request, though to the best of my knowledge this
is much less likely in practice. Here, we can observe that the
concurrent waiters incur extra latency from being woken up by the
solitary bottom-half, rather than directly by the interrupt. This
appears to be scheduler induced (having discounted adverse effects from
having a rbtree walk/erase in the wakeup path), each additional
wake_up_process() costs approximately 1us on big core. Another effect of
performing the secondary wakeups from the first bottom-half is the
incurred delay this imposes on high priority threads - rather than
immediately returning to userspace and leaving the interrupt handler to
wake the others.
To offset the delay incurred with additional waiters on a request, we
could use a hybrid scheme that did a quick read in the interrupt handler
and dequeued all the completed waiters (incurring the overhead in the
interrupt handler, not the best plan either as we then incur GPU
submission latency) but we would still have to wake up the bottom-half
every time to do the heavyweight slow read. Or we could only kick the
waiters on the seqno with the same priority as the current task (i.e. in
the realtime waiter scenario, only it is woken up immediately by the
interrupt and simply queues the next waiter before returning to userspace,
minimising its delay at the expense of the chain, and also reducing
contention on its scheduler runqueue). This is effective at avoid long
pauses in the interrupt handler and at avoiding the extra latency in
realtime/high-priority waiters.
v2: Convert from a kworker per engine into a dedicated kthread for the
bottom-half.
v3: Rename request members and tweak comments.
v4: Use a per-engine spinlock in the breadcrumbs bottom-half.
v5: Fix race in locklessly checking waiter status and kicking the task on
adding a new waiter.
v6: Fix deciding when to force the timer to hide missing interrupts.
v7: Move the bottom-half from the kthread to the first client process.
v8: Reword a few comments
v9: Break the busy loop when the interrupt is unmasked or has fired.
v10: Comments, unnecessary churn, better debugging from Tvrtko
v11: Wake all completed waiters on removing the current bottom-half to
reduce the latency of waking up a herd of clients all waiting on the
same request.
v12: Rearrange missed-interrupt fault injection so that it works with
igt/drv_missed_irq_hang
v13: Rename intel_breadcrumb and friends to intel_wait in preparation
for signal handling.
v14: RCU commentary, assert_spin_locked
v15: Hide BUG_ON behind the compiler; report on gem_latency findings.
v16: Sort seqno-groups by priority so that first-waiter has the highest
task priority (and so avoid priority inversion).
v17: Add waiters to post-mortem GPU hang state.
v18: Return early for a completed wait after acquiring the spinlock.
Avoids adding ourselves to the tree if the is already complete, and
skips the awkward question of why we don't do completion wakeups for
waits earlier than or equal to ourselves.
v19: Prepare for init_breadcrumbs to fail. Later patches may want to
allocate during init, so be prepared to propagate back the error code.
Testcase: igt/gem_concurrent_blit
Testcase: igt/benchmarks/gem_latency
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: "Rogozhkin, Dmitry V" <dmitry.v.rogozhkin@intel.com>
Cc: "Gong, Zhipeng" <zhipeng.gong@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Dave Gordon <david.s.gordon@intel.com>
Cc: "Goel, Akash" <akash.goel@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> #v18
Link: http://patchwork.freedesktop.org/patch/msgid/1467390209-3576-6-git-send-email-chris@chris-wilson.co.uk
2016-07-02 00:23:15 +08:00
|
|
|
intel_breadcrumbs.o \
|
2016-07-13 23:03:40 +08:00
|
|
|
intel_engine_cs.o \
|
2016-11-02 00:43:03 +08:00
|
|
|
intel_hangcheck.o \
|
2014-07-25 00:04:10 +08:00
|
|
|
intel_lrc.o \
|
2015-07-11 01:13:11 +08:00
|
|
|
intel_mocs.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
intel_ringbuffer.o \
|
|
|
|
intel_uncore.o
|
|
|
|
|
2015-08-12 22:43:36 +08:00
|
|
|
# general-purpose microcontroller (GuC) support
|
2016-11-26 01:59:35 +08:00
|
|
|
i915-y += intel_uc.o \
|
2017-05-26 19:13:25 +08:00
|
|
|
intel_guc_ct.o \
|
2017-01-14 01:41:57 +08:00
|
|
|
intel_guc_log.o \
|
2016-11-26 01:59:35 +08:00
|
|
|
intel_guc_loader.o \
|
2017-01-19 00:05:53 +08:00
|
|
|
intel_huc.o \
|
2015-08-12 22:43:39 +08:00
|
|
|
i915_guc_submission.o
|
2015-08-12 22:43:36 +08:00
|
|
|
|
2014-05-14 22:02:16 +08:00
|
|
|
# autogenerated null render state
|
|
|
|
i915-y += intel_renderstate_gen6.o \
|
|
|
|
intel_renderstate_gen7.o \
|
2014-10-23 23:34:28 +08:00
|
|
|
intel_renderstate_gen8.o \
|
|
|
|
intel_renderstate_gen9.o
|
2014-05-14 22:02:16 +08:00
|
|
|
|
2014-03-07 16:17:21 +08:00
|
|
|
# modesetting core code
|
2014-10-27 22:26:43 +08:00
|
|
|
i915-y += intel_audio.o \
|
2015-07-24 19:55:10 +08:00
|
|
|
intel_atomic.o \
|
|
|
|
intel_atomic_plane.o \
|
2014-10-27 22:26:43 +08:00
|
|
|
intel_bios.o \
|
2017-02-08 02:33:05 +08:00
|
|
|
intel_cdclk.o \
|
2016-03-16 18:57:14 +08:00
|
|
|
intel_color.o \
|
DRM: i915: add mode setting support
This commit adds i915 driver support for the DRM mode setting APIs.
Currently, VGA, LVDS, SDVO DVI & VGA, TV and DVO LVDS outputs are
supported. HDMI, DisplayPort and additional SDVO output support will
follow.
Support for the mode setting code is controlled by the new 'modeset'
module option. A new config option, CONFIG_DRM_I915_KMS controls the
default behavior, and whether a PCI ID list is built into the module for
use by user level module utilities.
Note that if mode setting is enabled, user level drivers that access
display registers directly or that don't use the kernel graphics memory
manager will likely corrupt kernel graphics memory, disrupt output
configuration (possibly leading to hangs and/or blank displays), and
prevent panic/oops messages from appearing. So use caution when
enabling this code; be sure your user level code supports the new
interfaces.
A new SysRq key, 'g', provides emergency support for switching back to
the kernel's framebuffer console; which is useful for testing.
Co-authors: Dave Airlie <airlied@linux.ie>, Hong Liu <hong.liu@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-11-08 06:24:08 +08:00
|
|
|
intel_display.o \
|
2016-04-27 20:44:17 +08:00
|
|
|
intel_dpio_phy.o \
|
2016-03-08 23:46:15 +08:00
|
|
|
intel_dpll_mgr.o \
|
2014-12-09 00:09:10 +08:00
|
|
|
intel_fbc.o \
|
2014-09-30 16:56:46 +08:00
|
|
|
intel_fifo_underrun.o \
|
2014-09-20 00:27:27 +08:00
|
|
|
intel_frontbuffer.o \
|
2015-07-24 19:55:10 +08:00
|
|
|
intel_hotplug.o \
|
DRM: i915: add mode setting support
This commit adds i915 driver support for the DRM mode setting APIs.
Currently, VGA, LVDS, SDVO DVI & VGA, TV and DVO LVDS outputs are
supported. HDMI, DisplayPort and additional SDVO output support will
follow.
Support for the mode setting code is controlled by the new 'modeset'
module option. A new config option, CONFIG_DRM_I915_KMS controls the
default behavior, and whether a PCI ID list is built into the module for
use by user level module utilities.
Note that if mode setting is enabled, user level drivers that access
display registers directly or that don't use the kernel graphics memory
manager will likely corrupt kernel graphics memory, disrupt output
configuration (possibly leading to hangs and/or blank displays), and
prevent panic/oops messages from appearing. So use caution when
enabling this code; be sure your user level code supports the new
interfaces.
A new SysRq key, 'g', provides emergency support for switching back to
the kernel's framebuffer console; which is useful for testing.
Co-authors: Dave Airlie <airlied@linux.ie>, Hong Liu <hong.liu@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-11-08 06:24:08 +08:00
|
|
|
intel_modes.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
intel_overlay.o \
|
2014-11-15 00:52:28 +08:00
|
|
|
intel_psr.o \
|
2013-05-22 20:36:16 +08:00
|
|
|
intel_sideband.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
intel_sprite.o
|
2014-03-18 16:43:56 +08:00
|
|
|
i915-$(CONFIG_ACPI) += intel_acpi.o intel_opregion.o
|
2015-08-10 19:34:08 +08:00
|
|
|
i915-$(CONFIG_DRM_FBDEV_EMULATION) += intel_fbdev.o
|
2014-03-07 16:17:21 +08:00
|
|
|
|
|
|
|
# modesetting output/encoder code
|
|
|
|
i915-y += dvo_ch7017.o \
|
DRM: i915: add mode setting support
This commit adds i915 driver support for the DRM mode setting APIs.
Currently, VGA, LVDS, SDVO DVI & VGA, TV and DVO LVDS outputs are
supported. HDMI, DisplayPort and additional SDVO output support will
follow.
Support for the mode setting code is controlled by the new 'modeset'
module option. A new config option, CONFIG_DRM_I915_KMS controls the
default behavior, and whether a PCI ID list is built into the module for
use by user level module utilities.
Note that if mode setting is enabled, user level drivers that access
display registers directly or that don't use the kernel graphics memory
manager will likely corrupt kernel graphics memory, disrupt output
configuration (possibly leading to hangs and/or blank displays), and
prevent panic/oops messages from appearing. So use caution when
enabling this code; be sure your user level code supports the new
interfaces.
A new SysRq key, 'g', provides emergency support for switching back to
the kernel's framebuffer console; which is useful for testing.
Co-authors: Dave Airlie <airlied@linux.ie>, Hong Liu <hong.liu@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-11-08 06:24:08 +08:00
|
|
|
dvo_ch7xxx.o \
|
|
|
|
dvo_ivch.o \
|
2012-07-19 01:22:30 +08:00
|
|
|
dvo_ns2501.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
dvo_sil164.o \
|
|
|
|
dvo_tfp410.o \
|
|
|
|
intel_crt.o \
|
|
|
|
intel_ddi.o \
|
2016-04-05 22:10:52 +08:00
|
|
|
intel_dp_aux_backlight.o \
|
2015-10-23 18:01:48 +08:00
|
|
|
intel_dp_link_training.o \
|
2014-05-02 12:02:48 +08:00
|
|
|
intel_dp_mst.o \
|
2015-07-24 19:55:10 +08:00
|
|
|
intel_dp.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
intel_dsi.o \
|
2016-04-26 21:14:25 +08:00
|
|
|
intel_dsi_dcs_backlight.o \
|
2015-07-24 19:55:10 +08:00
|
|
|
intel_dsi_pll.o \
|
2017-03-06 22:31:29 +08:00
|
|
|
intel_dsi_vbt.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
intel_dvo.o \
|
|
|
|
intel_hdmi.o \
|
|
|
|
intel_i2c.o \
|
2016-10-14 22:26:49 +08:00
|
|
|
intel_lspcon.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
intel_lvds.o \
|
|
|
|
intel_panel.o \
|
|
|
|
intel_sdvo.o \
|
|
|
|
intel_tv.o
|
2013-10-09 15:18:51 +08:00
|
|
|
|
2016-10-12 17:05:18 +08:00
|
|
|
# Post-mortem debug and GPU hang state capture
|
|
|
|
i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
|
2017-02-14 01:15:12 +08:00
|
|
|
i915-$(CONFIG_DRM_I915_SELFTEST) += \
|
|
|
|
selftests/i915_random.o \
|
|
|
|
selftests/i915_selftest.o
|
2016-10-12 17:05:18 +08:00
|
|
|
|
2015-02-10 19:05:47 +08:00
|
|
|
# virtual gpu code
|
|
|
|
i915-y += i915_vgpu.o
|
|
|
|
|
drm/i915: Add i915 perf infrastructure
Adds base i915 perf infrastructure for Gen performance metrics.
This adds a DRM_IOCTL_I915_PERF_OPEN ioctl that takes an array of uint64
properties to configure a stream of metrics and returns a new fd usable
with standard VFS system calls including read() to read typed and sized
records; ioctl() to enable or disable capture and poll() to wait for
data.
A stream is opened something like:
uint64_t properties[] = {
/* Single context sampling */
DRM_I915_PERF_PROP_CTX_HANDLE, ctx_handle,
/* Include OA reports in samples */
DRM_I915_PERF_PROP_SAMPLE_OA, true,
/* OA unit configuration */
DRM_I915_PERF_PROP_OA_METRICS_SET, metrics_set_id,
DRM_I915_PERF_PROP_OA_FORMAT, report_format,
DRM_I915_PERF_PROP_OA_EXPONENT, period_exponent,
};
struct drm_i915_perf_open_param parm = {
.flags = I915_PERF_FLAG_FD_CLOEXEC |
I915_PERF_FLAG_FD_NONBLOCK |
I915_PERF_FLAG_DISABLED,
.properties_ptr = (uint64_t)properties,
.num_properties = sizeof(properties) / 16,
};
int fd = drmIoctl(drm_fd, DRM_IOCTL_I915_PERF_OPEN, ¶m);
Records read all start with a common { type, size } header with
DRM_I915_PERF_RECORD_SAMPLE being of most interest. Sample records
contain an extensible number of fields and it's the
DRM_I915_PERF_PROP_SAMPLE_xyz properties given when opening that
determine what's included in every sample.
No specific streams are supported yet so any attempt to open a stream
will return an error.
v2:
use i915_gem_context_get() - Chris Wilson
v3:
update read() interface to avoid passing state struct - Chris Wilson
fix some rebase fallout, with i915-perf init/deinit
v4:
s/DRM_IORW/DRM_IOW/ - Emil Velikov
Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Sourab Gupta <sourab.gupta@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-2-robert@sixbynine.org
2016-11-08 03:49:47 +08:00
|
|
|
# perf code
|
2016-11-08 03:49:51 +08:00
|
|
|
i915-y += i915_perf.o \
|
2017-06-13 19:23:02 +08:00
|
|
|
i915_oa_hsw.o \
|
|
|
|
i915_oa_bdw.o \
|
|
|
|
i915_oa_chv.o \
|
|
|
|
i915_oa_sklgt2.o \
|
|
|
|
i915_oa_sklgt3.o \
|
|
|
|
i915_oa_sklgt4.o \
|
2017-06-13 19:23:08 +08:00
|
|
|
i915_oa_bxt.o \
|
|
|
|
i915_oa_kblgt2.o \
|
|
|
|
i915_oa_kblgt3.o
|
drm/i915: Add i915 perf infrastructure
Adds base i915 perf infrastructure for Gen performance metrics.
This adds a DRM_IOCTL_I915_PERF_OPEN ioctl that takes an array of uint64
properties to configure a stream of metrics and returns a new fd usable
with standard VFS system calls including read() to read typed and sized
records; ioctl() to enable or disable capture and poll() to wait for
data.
A stream is opened something like:
uint64_t properties[] = {
/* Single context sampling */
DRM_I915_PERF_PROP_CTX_HANDLE, ctx_handle,
/* Include OA reports in samples */
DRM_I915_PERF_PROP_SAMPLE_OA, true,
/* OA unit configuration */
DRM_I915_PERF_PROP_OA_METRICS_SET, metrics_set_id,
DRM_I915_PERF_PROP_OA_FORMAT, report_format,
DRM_I915_PERF_PROP_OA_EXPONENT, period_exponent,
};
struct drm_i915_perf_open_param parm = {
.flags = I915_PERF_FLAG_FD_CLOEXEC |
I915_PERF_FLAG_FD_NONBLOCK |
I915_PERF_FLAG_DISABLED,
.properties_ptr = (uint64_t)properties,
.num_properties = sizeof(properties) / 16,
};
int fd = drmIoctl(drm_fd, DRM_IOCTL_I915_PERF_OPEN, ¶m);
Records read all start with a common { type, size } header with
DRM_I915_PERF_RECORD_SAMPLE being of most interest. Sample records
contain an extensible number of fields and it's the
DRM_I915_PERF_PROP_SAMPLE_xyz properties given when opening that
determine what's included in every sample.
No specific streams are supported yet so any attempt to open a stream
will return an error.
v2:
use i915_gem_context_get() - Chris Wilson
v3:
update read() interface to avoid passing state struct - Chris Wilson
fix some rebase fallout, with i915-perf init/deinit
v4:
s/DRM_IORW/DRM_IOW/ - Emil Velikov
Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Sourab Gupta <sourab.gupta@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-2-robert@sixbynine.org
2016-11-08 03:49:47 +08:00
|
|
|
|
drm/i915: gvt: Introduce the basic architecture of GVT-g
This patch introduces the very basic framework of GVT-g device model,
includes basic prototypes, definitions, initialization.
v12:
- Call intel_gvt_init() in driver early initialization stage. (Chris)
v8:
- Remove the GVT idr and mutex in intel_gvt_host. (Joonas)
v7:
- Refine the URL link in Kconfig. (Joonas)
- Refine the introduction of GVT-g host support in Kconfig. (Joonas)
- Remove the macro GVT_ALIGN(), use round_down() instead. (Joonas)
- Make "struct intel_gvt" a data member in struct drm_i915_private.(Joonas)
- Remove {alloc, free}_gvt_device()
- Rename intel_gvt_{create, destroy}_gvt_device()
- Expost intel_gvt_init_host()
- Remove the dummy "struct intel_gvt" declaration in intel_gvt.h (Joonas)
v6:
- Refine introduction in Kconfig. (Chris)
- The exposed API functions will take struct intel_gvt * instead of
void *. (Chris/Tvrtko)
- Remove most memebers of strct intel_gvt_device_info. Will add them
in the device model patches.(Chris)
- Remove gvt_info() and gvt_err() in debug.h. (Chris)
- Move GVT kernel parameter into i915_params. (Chris)
- Remove include/drm/i915_gvt.h, as GVT-g will be built within i915.
- Remove the redundant struct i915_gvt *, as the functions in i915
will directly take struct intel_gvt *.
- Add more comments for reviewer.
v5:
Take Tvrtko's comments:
- Fix the misspelled words in Kconfig
- Let functions take drm_i915_private * instead of struct drm_device *
- Remove redundant prints/local varible initialization
v3:
Take Joonas' comments:
- Change file name i915_gvt.* to intel_gvt.*
- Move GVT kernel parameter into intel_gvt.c
- Remove redundant debug macros
- Change error handling style
- Add introductions for some stub functions
- Introduce drm/i915_gvt.h.
Take Kevin's comments:
- Move GVT-g host/guest check into intel_vgt_balloon in i915_gem_gtt.c
v2:
- Introduce i915_gvt.c.
It's necessary to introduce the stubs between i915 driver and GVT-g host,
as GVT-g components is configurable in kernel config. When disabled, the
stubs here do nothing.
Take Joonas' comments:
- Replace boolean return value with int.
- Replace customized info/warn/debug macros with DRM macros.
- Document all non-static functions like i915.
- Remove empty and unused functions.
- Replace magic number with marcos.
- Set GVT-g in kernel config to "n" by default.
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1466078825-6662-5-git-send-email-zhi.a.wang@intel.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-16 20:07:00 +08:00
|
|
|
ifeq ($(CONFIG_DRM_I915_GVT),y)
|
|
|
|
i915-y += intel_gvt.o
|
|
|
|
include $(src)/gvt/Makefile
|
|
|
|
endif
|
|
|
|
|
2017-01-25 06:57:49 +08:00
|
|
|
# LPE Audio for VLV and CHT
|
|
|
|
i915-y += intel_lpe_audio.o
|
|
|
|
|
2016-08-19 23:54:28 +08:00
|
|
|
obj-$(CONFIG_DRM_I915) += i915.o
|
2010-05-03 20:24:41 +08:00
|
|
|
|
|
|
|
CFLAGS_i915_trace_points.o := -I$(src)
|