License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 22:07:57 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
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.
|
|
|
|
|
2017-10-25 02:15:47 +08:00
|
|
|
# Add a set of useful warning flags and enable -Werror for CI to prevent
|
|
|
|
# trivial mistakes from creeping in. We have to do this piecemeal as we reject
|
|
|
|
# any patch that isn't warning clean, so turning on -Wall -Wextra (or W=1) we
|
|
|
|
# need to filter out dubious warnings. Still it is our interest
|
|
|
|
# to keep running locally with W=1 C=1 until we are completely clean.
|
|
|
|
#
|
|
|
|
# Note the danger in using -Wall -Wextra is that when CI updates gcc we
|
|
|
|
# will most likely get a sudden build breakage... Hopefully we will fix
|
|
|
|
# new warnings before CI updates!
|
2018-06-26 06:59:34 +08:00
|
|
|
subdir-ccflags-y := -Wall -Wextra
|
2017-10-31 01:29:27 +08:00
|
|
|
subdir-ccflags-y += $(call cc-disable-warning, unused-parameter)
|
|
|
|
subdir-ccflags-y += $(call cc-disable-warning, type-limits)
|
|
|
|
subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)
|
|
|
|
subdir-ccflags-y += $(call cc-disable-warning, implicit-fallthrough)
|
2018-02-09 00:16:39 +08:00
|
|
|
subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
|
2018-05-02 02:24:40 +08:00
|
|
|
# clang warnings
|
|
|
|
subdir-ccflags-y += $(call cc-disable-warning, sign-compare)
|
|
|
|
subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized)
|
|
|
|
subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
|
2019-01-26 15:11:23 +08:00
|
|
|
subdir-ccflags-y += $(call cc-disable-warning, uninitialized)
|
2017-10-25 02:15:47 +08:00
|
|
|
subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
|
|
|
|
|
|
|
|
# Fine grained warnings disable
|
2017-10-31 01:29:27 +08:00
|
|
|
CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init)
|
|
|
|
CFLAGS_intel_fbdev.o = $(call cc-disable-warning, override-init)
|
2017-10-25 02:15:47 +08:00
|
|
|
|
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
|
|
|
|
2019-04-03 21:52:36 +08:00
|
|
|
# Extra header tests
|
|
|
|
include $(src)/Makefile.header-test
|
|
|
|
|
2019-04-25 01:48:39 +08:00
|
|
|
subdir-ccflags-y += -I$(src)
|
|
|
|
|
2014-03-07 16:17:21 +08:00
|
|
|
# Please keep these build lists sorted!
|
|
|
|
|
|
|
|
# core driver code
|
2019-04-03 21:52:36 +08:00
|
|
|
i915-y += i915_drv.o \
|
2015-07-24 19:55:10 +08:00
|
|
|
i915_irq.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
i915_params.o \
|
2016-06-24 21:00:26 +08:00
|
|
|
i915_pci.o \
|
2019-05-28 17:29:50 +08:00
|
|
|
i915_scatterlist.o \
|
2018-12-05 19:06:08 +08:00
|
|
|
i915_suspend.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 \
|
2018-04-11 00:12:46 +08:00
|
|
|
intel_runtime_pm.o \
|
2019-04-25 04:07:13 +08:00
|
|
|
intel_wakeref.o \
|
2019-04-25 01:48:39 +08:00
|
|
|
intel_uncore.o
|
|
|
|
|
|
|
|
# core library code
|
|
|
|
i915-y += \
|
|
|
|
i915_memcpy.o \
|
|
|
|
i915_mm.o \
|
|
|
|
i915_sw_fence.o \
|
|
|
|
i915_syncmap.o \
|
|
|
|
i915_user_extensions.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
|
drm/i915/pmu: Expose a PMU interface for perf queries
From: Chris Wilson <chris@chris-wilson.co.uk>
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
From: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
The first goal is to be able to measure GPU (and invidual ring) busyness
without having to poll registers from userspace. (Which not only incurs
holding the forcewake lock indefinitely, perturbing the system, but also
runs the risk of hanging the machine.) As an alternative we can use the
perf event counter interface to sample the ring registers periodically
and send those results to userspace.
Functionality we are exporting to userspace is via the existing perf PMU
API and can be exercised via the existing tools. For example:
perf stat -a -e i915/rcs0-busy/ -I 1000
Will print the render engine busynnes once per second. All the performance
counters can be enumerated (perf list) and have their unit of measure
correctly reported in sysfs.
v1-v2 (Chris Wilson):
v2: Use a common timer for the ring sampling.
v3: (Tvrtko Ursulin)
* Decouple uAPI from i915 engine ids.
* Complete uAPI defines.
* Refactor some code to helpers for clarity.
* Skip sampling disabled engines.
* Expose counters in sysfs.
* Pass in fake regs to avoid null ptr deref in perf core.
* Convert to class/instance uAPI.
* Use shared driver code for rc6 residency, power and frequency.
v4: (Dmitry Rogozhkin)
* Register PMU with .task_ctx_nr=perf_invalid_context
* Expose cpumask for the PMU with the single CPU in the mask
* Properly support pmu->stop(): it should call pmu->read()
* Properly support pmu->del(): it should call stop(event, PERF_EF_UPDATE)
* Introduce refcounting of event subscriptions.
* Make pmu.busy_stats a refcounter to avoid busy stats going away
with some deleted event.
* Expose cpumask for i915 PMU to avoid multiple events creation of
the same type followed by counter aggregation by perf-stat.
* Track CPUs getting online/offline to migrate perf context. If (likely)
cpumask will initially set CPU0, CONFIG_BOOTPARAM_HOTPLUG_CPU0 will be
needed to see effect of CPU status tracking.
* End result is that only global events are supported and perf stat
works correctly.
* Deny perf driver level sampling - it is prohibited for uncore PMU.
v5: (Tvrtko Ursulin)
* Don't hardcode number of engine samplers.
* Rewrite event ref-counting for correctness and simplicity.
* Store initial counter value when starting already enabled events
to correctly report values to all listeners.
* Fix RC6 residency readout.
* Comments, GPL header.
v6:
* Add missing entry to v4 changelog.
* Fix accounting in CPU hotplug case by copying the approach from
arch/x86/events/intel/cstate.c. (Dmitry Rogozhkin)
v7:
* Log failure message only on failure.
* Remove CPU hotplug notification state on unregister.
v8:
* Fix error unwind on failed registration.
* Checkpatch cleanup.
v9:
* Drop the energy metric, it is available via intel_rapl_perf.
(Ville Syrjälä)
* Use HAS_RC6(p). (Chris Wilson)
* Handle unsupported non-engine events. (Dmitry Rogozhkin)
* Rebase for intel_rc6_residency_ns needing caller managed
runtime pm.
* Drop HAS_RC6 checks from the read callback since creating those
events will be rejected at init time already.
* Add counter units to sysfs so perf stat output is nicer.
* Cleanup the attribute tables for brevity and readability.
v10:
* Fixed queued accounting.
v11:
* Move intel_engine_lookup_user to intel_engine_cs.c
* Commit update. (Joonas Lahtinen)
v12:
* More accurate sampling. (Chris Wilson)
* Store and report frequency in MHz for better usability from
perf stat.
* Removed metrics: queued, interrupts, rc6 counters.
* Sample engine busyness based on seqno difference only
for less MMIO (and forcewake) on all platforms. (Chris Wilson)
v13:
* Comment spelling, use mul_u32_u32 to work around potential GCC
issue and somne code alignment changes. (Chris Wilson)
v14:
* Rebase.
v15:
* Rebase for RPS refactoring.
v16:
* Use the dynamic slot in the CPU hotplug state machine so that we are
free to setup our state as multi-instance. Previously we were re-using
the CPUHP_AP_PERF_X86_UNCORE_ONLINE slot which is neither used as
multi-instance, nor owned by our driver to start with.
* Register the CPU hotplug handlers after the PMU, otherwise the callback
will get called before the PMU is initialized which can end up in
perf_pmu_migrate_context with an un-initialized base.
* Added workaround for a probable bug in cpuhp core.
v17:
* Remove workaround for the cpuhp bug.
v18:
* Rebase for drm_i915_gem_engine_class getting upstream before us.
v19:
* Rebase. (trivial)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171121181852.16128-2-tvrtko.ursulin@linux.intel.com
2017-11-22 02:18:45 +08:00
|
|
|
i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
|
2014-03-07 16:17:21 +08:00
|
|
|
|
2019-04-25 01:48:39 +08:00
|
|
|
# "Graphics Technology" (aka we talk to the gpu)
|
|
|
|
obj-y += gt/
|
|
|
|
gt-y += \
|
|
|
|
gt/intel_breadcrumbs.o \
|
|
|
|
gt/intel_context.o \
|
|
|
|
gt/intel_engine_cs.o \
|
drm/i915: Invert the GEM wakeref hierarchy
In the current scheme, on submitting a request we take a single global
GEM wakeref, which trickles down to wake up all GT power domains. This
is undesirable as we would like to be able to localise our power
management to the available power domains and to remove the global GEM
operations from the heart of the driver. (The intent there is to push
global GEM decisions to the boundary as used by the GEM user interface.)
Now during request construction, each request is responsible via its
logical context to acquire a wakeref on each power domain it intends to
utilize. Currently, each request takes a wakeref on the engine(s) and
the engines themselves take a chipset wakeref. This gives us a
transition on each engine which we can extend if we want to insert more
powermangement control (such as soft rc6). The global GEM operations
that currently require a struct_mutex are reduced to listening to pm
events from the chipset GT wakeref. As we reduce the struct_mutex
requirement, these listeners should evaporate.
Perhaps the biggest immediate change is that this removes the
struct_mutex requirement around GT power management, allowing us greater
flexibility in request construction. Another important knock-on effect,
is that by tracking engine usage, we can insert a switch back to the
kernel context on that engine immediately, avoiding any extra delay or
inserting global synchronisation barriers. This makes tracking when an
engine and its associated contexts are idle much easier -- important for
when we forgo our assumed execution ordering and need idle barriers to
unpin used contexts. In the process, it means we remove a large chunk of
code whose only purpose was to switch back to the kernel context.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190424200717.1686-5-chris@chris-wilson.co.uk
2019-04-25 04:07:17 +08:00
|
|
|
gt/intel_engine_pm.o \
|
|
|
|
gt/intel_gt_pm.o \
|
2019-04-25 01:48:39 +08:00
|
|
|
gt/intel_hangcheck.o \
|
|
|
|
gt/intel_lrc.o \
|
|
|
|
gt/intel_reset.o \
|
|
|
|
gt/intel_ringbuffer.o \
|
|
|
|
gt/intel_mocs.o \
|
|
|
|
gt/intel_sseu.o \
|
|
|
|
gt/intel_workarounds.o
|
|
|
|
gt-$(CONFIG_DRM_I915_SELFTEST) += \
|
|
|
|
gt/mock_engine.o
|
|
|
|
i915-y += $(gt-y)
|
|
|
|
|
|
|
|
# GEM (Graphics Execution Management) code
|
2019-05-28 17:29:42 +08:00
|
|
|
obj-y += gem/
|
2019-05-28 17:29:44 +08:00
|
|
|
gem-y += \
|
2019-05-28 17:29:53 +08:00
|
|
|
gem/i915_gem_busy.o \
|
2019-05-28 17:29:49 +08:00
|
|
|
gem/i915_gem_clflush.o \
|
|
|
|
gem/i915_gem_context.o \
|
|
|
|
gem/i915_gem_dmabuf.o \
|
2019-05-28 17:29:48 +08:00
|
|
|
gem/i915_gem_domain.o \
|
2019-05-28 17:29:49 +08:00
|
|
|
gem/i915_gem_execbuffer.o \
|
2019-05-28 17:29:51 +08:00
|
|
|
gem/i915_gem_fence.o \
|
2019-05-28 17:29:49 +08:00
|
|
|
gem/i915_gem_internal.o \
|
2019-05-28 17:29:45 +08:00
|
|
|
gem/i915_gem_object.o \
|
2019-05-28 17:29:47 +08:00
|
|
|
gem/i915_gem_mman.o \
|
2019-05-28 17:29:46 +08:00
|
|
|
gem/i915_gem_pages.o \
|
|
|
|
gem/i915_gem_phys.o \
|
2019-05-28 17:29:49 +08:00
|
|
|
gem/i915_gem_pm.o \
|
|
|
|
gem/i915_gem_shmem.o \
|
|
|
|
gem/i915_gem_shrinker.o \
|
|
|
|
gem/i915_gem_stolen.o \
|
2019-05-28 17:29:54 +08:00
|
|
|
gem/i915_gem_throttle.o \
|
2019-05-28 17:29:49 +08:00
|
|
|
gem/i915_gem_tiling.o \
|
|
|
|
gem/i915_gem_userptr.o \
|
2019-05-28 17:29:52 +08:00
|
|
|
gem/i915_gem_wait.o \
|
2019-05-28 17:29:49 +08:00
|
|
|
gem/i915_gemfs.o
|
2019-02-05 21:00:02 +08:00
|
|
|
i915-y += \
|
2019-05-28 17:29:44 +08:00
|
|
|
$(gem-y) \
|
2019-02-05 21:00:02 +08:00
|
|
|
i915_active.o \
|
|
|
|
i915_cmd_parser.o \
|
2014-12-12 04:13:08 +08:00
|
|
|
i915_gem_batch_pool.o \
|
2010-08-07 18:01:23 +08:00
|
|
|
i915_gem_evict.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 \
|
2014-03-07 16:17:21 +08:00
|
|
|
i915_gem.o \
|
2015-07-24 19:55:10 +08:00
|
|
|
i915_gem_render_state.o \
|
2019-02-28 18:20:33 +08:00
|
|
|
i915_globals.o \
|
2018-03-06 20:28:56 +08:00
|
|
|
i915_query.o \
|
2018-02-21 17:56:36 +08:00
|
|
|
i915_request.o \
|
2018-10-01 22:47:54 +08:00
|
|
|
i915_scheduler.o \
|
2018-05-03 00:38:39 +08:00
|
|
|
i915_timeline.o \
|
2009-08-25 18:15:50 +08:00
|
|
|
i915_trace_points.o \
|
2016-11-11 18:43:54 +08:00
|
|
|
i915_vma.o \
|
2018-03-14 08:32:50 +08:00
|
|
|
intel_wopcm.o
|
2014-03-07 16:17:21 +08:00
|
|
|
|
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-10-04 23:33:25 +08:00
|
|
|
intel_uc_fw.o \
|
2017-10-05 02:13:41 +08:00
|
|
|
intel_guc.o \
|
2018-01-03 05:20:24 +08:00
|
|
|
intel_guc_ads.o \
|
2017-05-26 19:13:25 +08:00
|
|
|
intel_guc_ct.o \
|
2017-10-16 22:47:14 +08:00
|
|
|
intel_guc_fw.o \
|
2017-11-16 21:32:41 +08:00
|
|
|
intel_guc_log.o \
|
|
|
|
intel_guc_submission.o \
|
2018-03-02 00:45:45 +08:00
|
|
|
intel_huc.o \
|
|
|
|
intel_huc_fw.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 \
|
2019-05-24 23:36:14 +08:00
|
|
|
intel_bw.o \
|
2017-02-08 02:33:05 +08:00
|
|
|
intel_cdclk.o \
|
2016-03-16 18:57:14 +08:00
|
|
|
intel_color.o \
|
2018-11-07 00:06:18 +08:00
|
|
|
intel_combo_phy.o \
|
2018-10-10 15:52:04 +08:00
|
|
|
intel_connector.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 \
|
2018-01-09 03:55:39 +08:00
|
|
|
intel_hdcp.o \
|
2015-07-24 19:55:10 +08:00
|
|
|
intel_hotplug.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
intel_overlay.o \
|
2014-11-15 00:52:28 +08:00
|
|
|
intel_psr.o \
|
2018-10-16 22:42:27 +08:00
|
|
|
intel_quirks.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 \
|
2018-07-05 21:49:33 +08:00
|
|
|
icl_dsi.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
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 \
|
2018-10-15 22:27:50 +08:00
|
|
|
intel_dsi.o \
|
2016-04-26 21:14:25 +08:00
|
|
|
intel_dsi_dcs_backlight.o \
|
2017-03-06 22:31:29 +08:00
|
|
|
intel_dsi_vbt.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
intel_dvo.o \
|
2019-05-02 23:02:47 +08:00
|
|
|
intel_gmbus.o \
|
2014-03-07 16:17:21 +08:00
|
|
|
intel_hdmi.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 \
|
2018-07-05 21:25:07 +08:00
|
|
|
intel_tv.o \
|
|
|
|
vlv_dsi.o \
|
2018-11-30 03:38:27 +08:00
|
|
|
vlv_dsi_pll.o \
|
|
|
|
intel_vdsc.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) += \
|
2019-05-28 17:29:49 +08:00
|
|
|
gem/selftests/igt_gem_utils.o \
|
2017-02-14 01:15:12 +08:00
|
|
|
selftests/i915_random.o \
|
2018-05-05 17:10:13 +08:00
|
|
|
selftests/i915_selftest.o \
|
2018-11-30 16:02:53 +08:00
|
|
|
selftests/igt_flush_test.o \
|
2019-01-22 06:20:47 +08:00
|
|
|
selftests/igt_live_test.o \
|
2018-12-03 20:50:11 +08:00
|
|
|
selftests/igt_reset.o \
|
2018-11-30 16:02:53 +08:00
|
|
|
selftests/igt_spinner.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 \
|
2017-06-13 19:23:09 +08:00
|
|
|
i915_oa_kblgt3.o \
|
2017-09-18 19:21:24 +08:00
|
|
|
i915_oa_glk.o \
|
2017-11-11 03:08:40 +08:00
|
|
|
i915_oa_cflgt2.o \
|
2017-11-11 03:08:43 +08:00
|
|
|
i915_oa_cflgt3.o \
|
2018-03-26 21:39:48 +08:00
|
|
|
i915_oa_cnl.o \
|
|
|
|
i915_oa_icl.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
|
2018-12-07 16:16:53 +08:00
|
|
|
obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o
|