<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/gpu/drm/i915/selftests/mock_gem_device.c, branch linux-4.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.17.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.17.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-02-21T20:57:22Z</updated>
<entry>
<title>drm/i915: Rename drm_i915_gem_request to i915_request</title>
<updated>2018-02-21T20:57:22Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2018-02-21T09:56:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e61e0f51ba7974bb575cdc23220b573e5cd4ff2a'/>
<id>urn:sha1:e61e0f51ba7974bb575cdc23220b573e5cd4ff2a</id>
<content type='text'>
We want to de-emphasize the link between the request (dependency,
execution and fence tracking) from GEM and so rename the struct from
drm_i915_gem_request to i915_request. That is we may implement the GEM
user interface on top of requests, but they are an abstraction for
tracking execution rather than an implementation detail of GEM. (Since
they are not tied to HW, we keep the i915 prefix as opposed to intel.)

In short, the spatch:
@@

@@
- struct drm_i915_gem_request
+ struct i915_request

A corollary to contracting the type name, we also harmonise on using
'rq' shorthand for local variables where space if of the essence and
repetition makes 'request' unwieldy. For globals and struct members,
'request' is still much preferred for its clarity.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Cc: Mika Kuoppala &lt;mika.kuoppala@linux.intel.com&gt;
Cc: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
Cc: Michał Winiarski &lt;michal.winiarski@intel.com&gt;
Cc: Michal Wajdeczko &lt;michal.wajdeczko@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180221095636.6649-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala &lt;mika.kuoppala@linux.intel.com&gt;
Reviewed-by: Michał Winiarski &lt;michal.winiarski@intel.com&gt;
Acked-by: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>drm/i915: Only allocate preempt context when required</title>
<updated>2018-02-08T07:30:16Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2018-02-07T21:05:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d63763749127b483ba042b2939ba39fd79792330'/>
<id>urn:sha1:d63763749127b483ba042b2939ba39fd79792330</id>
<content type='text'>
If we remove some hardcoded assumptions about the preempt context having
a fixed id, reserved from use by normal user contexts, we may only
allocate the i915_gem_context when required. Then the subsequent
decisions on using preemption reduce to having the preempt context
available.

v2: Include an assert that we don't allocate the preempt context twice.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Michal Winiarski &lt;michal.winiarski@intel.com&gt;
Cc: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
Cc: Arkadiusz Hiler &lt;arkadiusz.hiler@intel.com&gt;
Cc: Mika Kuoppala &lt;mika.kuoppala@intel.com&gt;
Cc: Daniele Ceraolo Spurio &lt;daniele.ceraolospurio@intel.com&gt;
Acked-by: Daniele Ceraolo Spurio &lt;daniele.ceraolospurio@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180207210544.26351-3-chris@chris-wilson.co.uk
Reviewed-by: Michel Thierry &lt;michel.thierry@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/i915/selftests: Free mock_i915-&gt;drm.mode_config</title>
<updated>2017-12-11T11:24:30Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2017-12-09T21:08:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=19553d57dcddf659133739cd073bf2049f2b0ea9'/>
<id>urn:sha1:19553d57dcddf659133739cd073bf2049f2b0ea9</id>
<content type='text'>
Even for the mock i915 device, we need to initialise the
drm.mode_config, as we may ultimately query whether there are any KMS
users deep in the bowels of some paths (e.g. eviction). As we initialise
drm.mode_config we must cleanup after ourselves!

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Matthew Auld &lt;matthew.auld@intel.com&gt;
Cc: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Reviewed-by: Matthew Auld &lt;matthew.auld@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20171209210835.32609-1-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>drm/i915/selftests: Yet another forgotten mock_i915-&gt;mm initialiser</title>
<updated>2017-11-10T23:42:49Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2017-11-10T23:24:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9c52d1c816baa5b8c97485b20d95af29c98d26ee'/>
<id>urn:sha1:9c52d1c816baa5b8c97485b20d95af29c98d26ee</id>
<content type='text'>
Move all of the i915-&gt;mm initialisation to a private function that can
be reused by the mock i915 device to save forgetting any more steps.

For example,
&lt;7&gt;[ 1542.046332] [IGT] drv_selftest: starting subtest mock_objects
&lt;4&gt;[ 1542.123924] Setting dangerous option mock_selftests - tainting kernel
&lt;6&gt;[ 1542.167941] i915: Performing mock selftests with st_random_seed=0x246f5ab5 st_timeout=1000
&lt;4&gt;[ 1542.178012] INFO: trying to register non-static key.
&lt;4&gt;[ 1542.178027] the code is fine but needs lockdep annotation.
&lt;4&gt;[ 1542.178032] turning off the locking correctness validator.
&lt;4&gt;[ 1542.178041] CPU: 3 PID: 6008 Comm: kworker/3:7 Tainted: G     U          4.14.0-rc8-CI-CI_DRM_3332+ #1
&lt;4&gt;[ 1542.178049] Hardware name:                  /NUC6CAYB, BIOS AYAPLCEL.86A.0040.2017.0619.1722 06/19/2017
&lt;4&gt;[ 1542.178144] Workqueue: events __i915_gem_free_work [i915]
&lt;4&gt;[ 1542.178152] Call Trace:
&lt;4&gt;[ 1542.178163]  dump_stack+0x68/0x9f
&lt;4&gt;[ 1542.178170]  register_lock_class+0x3fd/0x580
&lt;4&gt;[ 1542.178177]  ? unwind_next_frame+0x14/0x20
&lt;4&gt;[ 1542.178184]  ? __save_stack_trace+0x73/0xd0
&lt;4&gt;[ 1542.178191]  __lock_acquire+0xa4/0x1b00
&lt;4&gt;[ 1542.178254]  ? __i915_gem_free_work+0x28/0xa0 [i915]
&lt;4&gt;[ 1542.178261]  ? __lock_acquire+0x4ab/0x1b00
&lt;4&gt;[ 1542.178268]  lock_acquire+0xb0/0x200
&lt;4&gt;[ 1542.178273]  ? lock_acquire+0xb0/0x200
&lt;4&gt;[ 1542.178336]  ? __i915_gem_free_work+0x28/0xa0 [i915]
&lt;4&gt;[ 1542.178344]  _raw_spin_lock+0x32/0x50
&lt;4&gt;[ 1542.178405]  ? __i915_gem_free_work+0x28/0xa0 [i915]
&lt;4&gt;[ 1542.178468]  __i915_gem_free_work+0x28/0xa0 [i915]
&lt;4&gt;[ 1542.178476]  process_one_work+0x221/0x650
&lt;4&gt;[ 1542.178483]  worker_thread+0x4e/0x3c0
&lt;4&gt;[ 1542.178489]  kthread+0x114/0x150
&lt;4&gt;[ 1542.178494]  ? process_one_work+0x650/0x650
&lt;4&gt;[ 1542.178499]  ? kthread_create_on_node+0x40/0x40
&lt;4&gt;[ 1542.178506]  ret_from_fork+0x27/0x40

v2: Fish out i915-&gt;mm.object_stat_lock which was being inited over in
i915_drv.c (Matthew)

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Matthew Auld &lt;matthew.auld@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20171110232447.21618-1-chris@chris-wilson.co.uk
Reviewed-by: Matthew Auld &lt;matthew.auld@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/i915/selftests: Initialise mock_i915-&gt;mm.obj_lock</title>
<updated>2017-11-10T16:21:17Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2017-11-10T15:19:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9511ce1ce7299029acc985ce5f96a1e2e703f084'/>
<id>urn:sha1:9511ce1ce7299029acc985ce5f96a1e2e703f084</id>
<content type='text'>
lockdep spotted that the mock tests were using the i915-&gt;mm.obj_lock
without first initialiasing it:

&gt;[ 1303.217043] [IGT] drv_selftest: starting subtest mock_objects
&lt;4&gt;[ 1303.240898] Setting dangerous option mock_selftests - tainting kernel
&lt;6&gt;[ 1303.253665] i915: Performing mock selftests with st_random_seed=0xd87ea6c6 st_timeout=1000
&lt;4&gt;[ 1303.254812] INFO: trying to register non-static key.
&lt;4&gt;[ 1303.254816] the code is fine but needs lockdep annotation.
&lt;4&gt;[ 1303.254818] turning off the locking correctness validator.
&lt;4&gt;[ 1303.254820] CPU: 4 PID: 13112 Comm: drv_selftest Tainted: G     U  W       4.14.0-rc8-CI-Patchwork_7058+ #1
&lt;4&gt;[ 1303.254823] Hardware name: MSI MS-7924/Z97M-G43(MS-7924), BIOS V1.12 02/15/2016
&lt;4&gt;[ 1303.254825] Call Trace:
&lt;4&gt;[ 1303.254829]  dump_stack+0x68/0x9f
&lt;4&gt;[ 1303.254832]  register_lock_class+0x3fd/0x580
&lt;4&gt;[ 1303.254835]  ? ___slab_alloc.constprop.29+0x157/0x3d0
&lt;4&gt;[ 1303.254837]  ? ___slab_alloc.constprop.29+0x157/0x3d0
&lt;4&gt;[ 1303.254840]  ? sg_kmalloc+0x1e/0x50
&lt;4&gt;[ 1303.254842]  ? debug_smp_processor_id+0x17/0x20
&lt;4&gt;[ 1303.254845]  __lock_acquire+0xa4/0x1b00
&lt;4&gt;[ 1303.254884]  ? __i915_gem_object_set_pages+0x116/0x1f0 [i915]
&lt;4&gt;[ 1303.254887]  ? __this_cpu_preempt_check+0x13/0x20
&lt;4&gt;[ 1303.254889]  ? sg_kmalloc+0x1e/0x50
&lt;4&gt;[ 1303.254891]  lock_acquire+0xb0/0x200
&lt;4&gt;[ 1303.254893]  ? lock_acquire+0xb0/0x200
&lt;4&gt;[ 1303.254917]  ? __i915_gem_object_set_pages+0x116/0x1f0 [i915]
&lt;4&gt;[ 1303.254920]  _raw_spin_lock+0x32/0x50
&lt;4&gt;[ 1303.254944]  ? __i915_gem_object_set_pages+0x116/0x1f0 [i915]
&lt;4&gt;[ 1303.254967]  __i915_gem_object_set_pages+0x116/0x1f0 [i915]
&lt;4&gt;[ 1303.254991]  i915_gem_object_get_pages_phys+0x286/0x2b0 [i915]
&lt;4&gt;[ 1303.255015]  ____i915_gem_object_get_pages+0x20/0x60 [i915]
&lt;4&gt;[ 1303.255039]  i915_gem_object_attach_phys+0x137/0x1a0 [i915]
&lt;4&gt;[ 1303.255063]  igt_phys_object+0x45/0x120 [i915]
&lt;4&gt;[ 1303.255094]  __i915_subtests+0x40/0xd0 [i915]
&lt;4&gt;[ 1303.255099]  ? work_on_cpu_safe+0x60/0x60
&lt;4&gt;[ 1303.255131]  i915_gem_object_mock_selftests+0x34/0x50 [i915]

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Matthew Auld &lt;matthew.william.auld@gmail.com&gt;
Cc: Mika Kuoppala &lt;mika.kuoppala@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20171110151919.18451-1-chris@chris-wilson.co.uk
Reviewed-by: Matthew Auld &lt;matthew.william.auld@gmail.com&gt;
Reviewed-by: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/i915: enable platform support for 2M pages</title>
<updated>2017-10-07T09:12:05Z</updated>
<author>
<name>Matthew Auld</name>
<email>matthew.auld@intel.com</email>
</author>
<published>2017-10-06T22:18:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a883241c3922000b21b58b5740c55badfe09940f'/>
<id>urn:sha1:a883241c3922000b21b58b5740c55badfe09940f</id>
<content type='text'>
For gen8+ platforms which support the 48b PPGTT, enable platform level
support for 2M pages. Also enable for mock testing.

Signed-off-by: Matthew Auld &lt;matthew.auld@intel.com&gt;
Cc: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-22-matthew.auld@intel.com
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-21-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>drm/i915: enable platform support for 64K pages</title>
<updated>2017-10-07T09:12:04Z</updated>
<author>
<name>Matthew Auld</name>
<email>matthew.auld@intel.com</email>
</author>
<published>2017-10-06T22:18:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f1f3f98272b9bb1ba87c2ccbc811b038574cec43'/>
<id>urn:sha1:f1f3f98272b9bb1ba87c2ccbc811b038574cec43</id>
<content type='text'>
For gen9+ enable platform level support for 64K pages. Also enable for
mock testing.

Signed-off-by: Matthew Auld &lt;matthew.auld@intel.com&gt;
Cc: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-21-matthew.auld@intel.com
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-20-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>drm/i915: introduce page_sizes field to dev_info</title>
<updated>2017-10-07T09:11:44Z</updated>
<author>
<name>Matthew Auld</name>
<email>matthew.auld@intel.com</email>
</author>
<published>2017-10-06T22:18:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2a9654b2cdd8f9ef51b91dfd4448973a47284825'/>
<id>urn:sha1:2a9654b2cdd8f9ef51b91dfd4448973a47284825</id>
<content type='text'>
In preparation for huge gtt pages expose page_sizes as part of the
device info, to indicate the page sizes supported by the HW.  Currently
only 4K is supported.

v2: s/page_size_mask/page_sizes/

v3: introduce I915_GTT_MAX_PAGE_SIZE

Signed-off-by: Matthew Auld &lt;matthew.auld@intel.com&gt;
Cc: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Cc: Mika Kuoppala &lt;mika.kuoppala@linux.intel.com&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-5-matthew.auld@intel.com
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-4-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>drm/i915: introduce simple gemfs</title>
<updated>2017-10-07T09:11:41Z</updated>
<author>
<name>Matthew Auld</name>
<email>matthew.auld@intel.com</email>
</author>
<published>2017-10-06T22:18:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=465c403cb50868a86164bfe5b3bf6ddd70c395e1'/>
<id>urn:sha1:465c403cb50868a86164bfe5b3bf6ddd70c395e1</id>
<content type='text'>
Not a fully blown gemfs, just our very own tmpfs kernel mount. Doing so
moves us away from the shmemfs shm_mnt, and gives us the much needed
flexibility to do things like set our own mount options, namely huge=
which should allow us to enable the use of transparent-huge-pages for
our shmem backed objects.

v2: various improvements suggested by Joonas

v3: move gemfs instance to i915.mm and simplify now that we have
file_setup_with_mnt

v4: fallback to tmpfs shm_mnt upon failure to setup gemfs

v5: make tmpfs fallback kinder

v5: better gemfs failure message
    flags variable

Signed-off-by: Matthew Auld &lt;matthew.auld@intel.com&gt;
Cc: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Dave Hansen &lt;dave.hansen@intel.com&gt;
Cc: Kirill A. Shutemov &lt;kirill@shutemov.name&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: linux-mm@kvack.org
Reviewed-by: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-3-matthew.auld@intel.com
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-2-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>drm/i915/selftests: fix check for intel IOMMU</title>
<updated>2017-10-05T13:25:27Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2017-10-05T12:07:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=764d2997ec0edbb48f12e6477ccaceecd999091d'/>
<id>urn:sha1:764d2997ec0edbb48f12e6477ccaceecd999091d</id>
<content type='text'>
An earlier bugfix tried to work around this build failure:

drivers/gpu/drm/i915/selftests/mock_gem_device.c: In function 'mock_gem_device':
drivers/gpu/drm/i915/selftests/mock_gem_device.c:151:20: error: 'struct dev_archdata' has no member named 'iommu'

Checking for CONFIG_IOMMU_API is not sufficient as a compile-time
test since that may be enabled in configurations that have neither
INTEL_IOMMU not AMD_IOMMU enabled. This changes the check to
INTEL_IOMMU instead, as this is the only case we actually care about.

Fixes: f46f156ea770 ("drm/i915/selftests: Only touch archdata.iommu when it exists")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20171005120749.400818-1-arnd@arndb.de
</content>
</entry>
</feed>
