initial displaylink kms driver + drm hotplug

2014-02-15 Thread jason
p to solve this issue. Can you refer someone to us as cousulant base? This is urgent so appreciate your reply ASAP. Jason Hsia ??? iPad ?? -- next part -- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20140215/8

Re: [PATCH 4/4] drm/i915/uapi: reject set_domain for discrete

2021-07-19 Thread Jason Ekstrand
On Mon, Jul 19, 2021 at 4:10 AM Matthew Auld wrote: > > On Fri, 16 Jul 2021 at 16:23, Jason Ekstrand wrote: > > > > On Fri, Jul 16, 2021 at 9:52 AM Tvrtko Ursulin > > wrote: > > > > > > > > > On 15/07/2021 11:15, Matthew Auld wrote: > >

Re: [Intel-gfx] [PATCH 3/6] drm/i915: Always call i915_globals_exit() from i915_exit()

2021-07-20 Thread Jason Ekstrand
On Tue, Jul 20, 2021 at 3:25 AM Tvrtko Ursulin wrote: > > > On 19/07/2021 19:30, Jason Ekstrand wrote: > > If the driver was not fully loaded, we may still have globals lying > > around. If we don't tear those down in i915_exit(), we'll leak a bunch > > of me

Re: [PATCH 3/6] drm/i915: Always call i915_globals_exit() from i915_exit()

2021-07-20 Thread Jason Ekstrand
On Tue, Jul 20, 2021 at 9:18 AM Daniel Vetter wrote: > > On Mon, Jul 19, 2021 at 01:30:44PM -0500, Jason Ekstrand wrote: > > If the driver was not fully loaded, we may still have globals lying > > around. If we don't tear those down in i915_exit(), we'll leak a bunc

Re: [Intel-gfx] [PATCH 3/6] drm/i915: Always call i915_globals_exit() from i915_exit()

2021-07-20 Thread Jason Ekstrand
Sorry... didn't reply to everything the first time On Tue, Jul 20, 2021 at 3:25 AM Tvrtko Ursulin wrote: > > > On 19/07/2021 19:30, Jason Ekstrand wrote: > > If the driver was not fully loaded, we may still have globals lying > > around. If we don't tear those do

Re: [PATCH] drm/i915: Check for nomodeset in i915_init() first

2021-07-20 Thread Jason Ekstrand
On Mon, Jul 19, 2021 at 3:35 AM Daniel Vetter wrote: > > Jason is trying to sort out the unwinding in i915_init and i915_exit, > while reviewing those patches I noticed that we also have the > nomodeset handling now in the middle of things. > > Pull that out for simplisity in

Re: [PATCH 05/13] vfio/fsl: Move to the device set infrastructure

2021-07-20 Thread Jason Gunthorpe
On Tue, Jul 20, 2021 at 07:12:26PM +0300, Diana Craciun OSS wrote: > On 7/15/2021 3:20 AM, Jason Gunthorpe wrote: > > FSL uses the internal reflck to implement the open_device() functionality, > > conversion to the core code is straightforward. > > > > The decision on

Re: [PATCH 05/13] vfio/fsl: Move to the device set infrastructure

2021-07-20 Thread Jason Gunthorpe
On Tue, Jul 20, 2021 at 07:23:35PM +0300, Diana Craciun OSS wrote: > I have tested the changes and everything works as expected. Great, thanks, I added a Tested-by for you Jason

[PATCH v2 01/14] vfio/samples: Remove module get/put

2021-07-20 Thread Jason Gunthorpe
ot;) Fixes: 681c1615f891 ("vfio/mbochs: Convert to use vfio_register_group_dev()") Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe --- samples/vfio-mdev/mbochs.c | 4 samples/vfio-mdev/mdpy.c | 4 2 files changed, 8 deletions(-) diff --git a/samples/vfio-mdev/mbochs.c

[PATCH v2 02/14] vfio/mbochs: Fix missing error unwind in mbochs_probe()

2021-07-20 Thread Jason Gunthorpe
Compared to mbochs_remove() two cases are missing from the vfio_register_group_dev() unwind. Add them in. Fixes: 681c1615f891 ("vfio/mbochs: Convert to use vfio_register_group_dev()") Reported-by: Cornelia Huck Signed-off-by: Jason Gunthorpe --- samples/vfio-mdev/mbochs.c | 7 +

[PATCH v2 04/14] vfio: Provide better generic support for open/release vfio_device_ops

2021-07-20 Thread Jason Gunthorpe
o group vfio_devices into sets. This implementation uses xarray instead of searching through the driver core structures, which simplifies the somewhat tricky locking in this area. Following patches convert all the drivers. Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe --- drive

[PATCH v2 14/14] vfio: Remove struct vfio_device_ops open/release

2021-07-20 Thread Jason Gunthorpe
Nothing uses this anymore, delete it. Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe --- drivers/vfio/mdev/vfio_mdev.c | 22 -- drivers/vfio/vfio.c | 14 +- include/linux/mdev.h | 7 --- include/linux/vfio.h | 4

[PATCH v2 06/14] vfio/fsl: Move to the device set infrastructure

2021-07-20 Thread Jason Gunthorpe
ned-off-by: Jason Gunthorpe --- drivers/vfio/fsl-mc/vfio_fsl_mc.c | 153 -- drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c| 6 +- drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 7 - 3 files changed, 27 insertions(+), 139 deletions(-) diff --git a/drivers/vfio/fsl-mc/vfio_f

[PATCH v2 03/14] vfio: Introduce a vfio_uninit_group_dev() API call

2021-07-20 Thread Jason Gunthorpe
-by: Max Gurtovoy Signed-off-by: Jason Gunthorpe --- Documentation/driver-api/vfio.rst| 4 ++- drivers/vfio/fsl-mc/vfio_fsl_mc.c| 7 ++--- drivers/vfio/mdev/vfio_mdev.c| 13 +++--- drivers/vfio/pci/vfio_pci.c | 6 +++-- drivers/vfio

[PATCH v2 00/14] Provide core infrastructure for managing open/release

2021-07-20 Thread Jason Gunthorpe
ev open_device if there is no op - Fix style for else {} - Spelling fix for singleton - Acquire cur_mem under lock - Always use error unwind flow for vfio_pci_check_all_devices_bound() v1: https://lore.kernel.org/r/0-v1-eaf3ccbba33c+1add0-vfio_reflck_...@nvidia.com Jason Gunthorpe (12): vfi

[PATCH v2 08/14] vfio/pci: Move to the device set infrastructure

2021-07-20 Thread Jason Gunthorpe
ed by what devices pci_reset_bus() touches, which is either the entire bus or only the slot. Rely on the core code to do everything reflck was doing and delete reflck entirely. Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe --- drivers/vfio/pci/vfio_pci.c

[PATCH v2 07/14] vfio/platform: Use open_device() instead of open coding a refcnt scheme

2021-07-20 Thread Jason Gunthorpe
Platform simply wants to run some code when the device is first opened/last closed. Use the core framework and locking for this. Aside from removing a bit of code this narrows the locking scope from a global lock. Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe --- drivers/vfio

[PATCH v2 05/14] vfio/samples: Delete useless open/close

2021-07-20 Thread Jason Gunthorpe
The core code no longer requires these ops to be defined, so delete these empty functions and leave the op as NULL. mtty's functions only log a pointless message, delete that entirely. Signed-off-by: Yishai Hadas Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe --- samples/vfio

[PATCH v2 09/14] vfio/pci: Change vfio_pci_try_bus_reset() to use the dev_set

2021-07-20 Thread Jason Gunthorpe
ucturing corrects a call to pci_dev_driver() without holding the device_lock() and removes a hard wiring to &vfio_pci_driver. Signed-off-by: Jason Gunthorpe --- drivers/vfio/pci/vfio_pci.c | 110 ++-- drivers/vfio/vfio.c | 10 include/linux/vfio.h

[PATCH v2 13/14] vfio/gvt: Fix open/close when multiple device FDs are open

2021-07-20 Thread Jason Gunthorpe
these really want the new open/close_device() semantics just change the function over. Reviewed-by: Zhenyu Wang Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe --- drivers/gpu/drm/i915/gvt/kvmgt.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v2 11/14] vfio/mbochs: Fix close when multiple device FDs are open

2021-07-20 Thread Jason Gunthorpe
Signed-off-by: Jason Gunthorpe --- samples/vfio-mdev/mbochs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c index fb81d11029e8a5..39002b07e692ac 100644 --- a/samples/vfio-mdev/mbochs.c +++ b/samples/vfio-mdev

[PATCH v2 10/14] vfio/pci: Reorganize VFIO_DEVICE_PCI_HOT_RESET to use the device set

2021-07-20 Thread Jason Gunthorpe
_driver(). Signed-off-by: Jason Gunthorpe --- drivers/vfio/pci/vfio_pci.c | 201 +++- 1 file changed, 84 insertions(+), 117 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index fbc20f6d2dd412..d751d38f2175b6 100644 --- a/drivers/

[PATCH 0/6] Fix the debugfs splat from mock selftests

2021-07-20 Thread Jason Ekstrand
s but can show up in other random IGTs depending on test execution order. Jason Ekstrand (6): drm/i915: Call i915_globals_exit() after i915_pmu_exit() drm/i915: Call i915_globals_exit() if pci_register_device() fails drm/i915: Use a table for i915_init/exit drm/ttm: Force re-init if ttm_globa

[PATCH 1/6] drm/i915: Call i915_globals_exit() after i915_pmu_exit()

2021-07-20 Thread Jason Ekstrand
We should tear down in the opposite order we set up. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm

[PATCH 2/6] drm/i915: Call i915_globals_exit() if pci_register_device() fails

2021-07-20 Thread Jason Ekstrand
In the unlikely event that pci_register_device() fails, we were tearing down our PMU setup but not globals. This leaves a bunch of memory slabs lying around. Signed-off-by: Jason Ekstrand Fixes: 32eb6bcfdda9 ("drm/i915: Make request allocation caches global") Reviewed-by: Dan

[PATCH 3/6] drm/i915: Use a table for i915_init/exit

2021-07-20 Thread Jason Ekstrand
river always succeeding to load the driver and then properly tearing down the partially loaded driver. Signed-off-by: Jason Ekstrand Cc: Daniel Vetter Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_pci.c | 104 -- drivers/gpu/drm/i915/i915_perf.c

[PATCH 4/6] drm/ttm: Force re-init if ttm_global_init() fails

2021-07-20 Thread Jason Ekstrand
If we have a failure, decrement the reference count so that the next call to ttm_global_init() will actually do something instead of assume everything is all set up. Signed-off-by: Jason Ekstrand Fixes: 62b53b37e4b1 ("drm/ttm: use a static ttm_bo_global instance") Reviewed-by: Chris

[PATCH 5/6] drm/ttm: Initialize debugfs from ttm_global_init()

2021-07-20 Thread Jason Ekstrand
again, we'll re-create those debugfs entries and debugfs will complain in dmesg that we're creating entries that already exist. This patch fixes this problem by changing the lifetime of the whole TTM debugfs directory to match that of the TTM global state. Signed-off-by: Jason Ekstra

[PATCH 6/6] drm/i915: Make the kmem slab for i915_buddy_block a global

2021-07-20 Thread Jason Ekstrand
emory situations. Signed-off-by: Jason Ekstrand Fixes: 88be9a0a06b7 ("drm/i915/ttm: add ttm_buddy_man") Cc: Matthew Auld --- drivers/gpu/drm/i915/i915_buddy.c | 44 ++--- drivers/gpu/drm/i915/i915_buddy.h | 3 +- drivers/gpu/drm/i915/i915_globals.c | 2 ++ 3 fi

Re: [Intel-gfx] [PATCH 7/7] drm/i915/gem: Migrate to system at dma-buf attach time (v6)

2021-07-20 Thread Jason Ekstrand
Fixed all the nits below locally. It'll be in the next send. On Tue, Jul 20, 2021 at 5:53 AM Matthew Auld wrote: > > On Fri, 16 Jul 2021 at 15:14, Jason Ekstrand wrote: > > > > From: Thomas Hellström > > > > Until we support p2p dma or as a complement

[PATCH v2 12/14] vfio/ap, ccw: Fix open/close when multiple device FDs are open

2021-07-20 Thread Jason Gunthorpe
. Since these really want the new open/close_device() semantics just change the functions over. Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe --- drivers/s390/cio/vfio_ccw_ops.c | 8 drivers/s390/crypto/vfio_ap_ops.c | 8 2 files changed, 8 insertions(+), 8

Re: [PATCH 6/7] drm/i915/gem: Correct the locking and pin pattern for dma-buf (v6)

2021-07-20 Thread Jason Ekstrand
On Tue, Jul 20, 2021 at 4:07 AM Matthew Auld wrote: > > On Fri, 16 Jul 2021 at 15:14, Jason Ekstrand wrote: > > > > From: Thomas Hellström > > > > If our exported dma-bufs are imported by another instance of our driver, > > that instance will typically have

Re: [PATCH 3/7] drm/i915/gem: Unify user object creation

2021-07-20 Thread Jason Ekstrand
On Tue, Jul 20, 2021 at 4:35 AM Matthew Auld wrote: > > On Thu, 15 Jul 2021 at 23:39, Jason Ekstrand wrote: > > > > Instead of hand-rolling the same three calls in each function, pull them > > into an i915_gem_object_create_user helper. Apart from re-ordering of > &g

Re: [PATCH 2/7] drm/i915/gem: Refactor placement setup for i915_gem_object_create* (v2)

2021-07-20 Thread Jason Ekstrand
On Mon, Jul 19, 2021 at 3:18 AM Matthew Auld wrote: > > On Fri, 16 Jul 2021 at 15:14, Jason Ekstrand wrote: > > > > Since we don't allow changing the set of regions after creation, we can > > make ext_set_placements() build up the region set directly in the > &

Re: [PATCH v2 02/14] vfio/mbochs: Fix missing error unwind in mbochs_probe()

2021-07-20 Thread Jason Gunthorpe
On Tue, Jul 20, 2021 at 04:01:27PM -0600, Alex Williamson wrote: > On Tue, 20 Jul 2021 14:42:48 -0300 > Jason Gunthorpe wrote: > > > Compared to mbochs_remove() two cases are missing from the > > vfio_register_group_dev() unwind. Add them in. > > > > Fixes: 68

Re: [Intel-gfx] [PATCH 3/6] drm/i915: Use a table for i915_init/exit

2021-07-21 Thread Jason Ekstrand
On Wed, Jul 21, 2021 at 4:06 AM Tvrtko Ursulin wrote: > > > On 20/07/2021 19:13, Jason Ekstrand wrote: > > If the driver was not fully loaded, we may still have globals lying > > around. If we don't tear those down in i915_exit(), we'll leak a bunch > > of me

Re: [PATCH 3/6] drm/i915: Always call i915_globals_exit() from i915_exit()

2021-07-21 Thread Jason Ekstrand
On Wed, Jul 21, 2021 at 6:26 AM Daniel Vetter wrote: > > On Tue, Jul 20, 2021 at 09:55:22AM -0500, Jason Ekstrand wrote: > > On Tue, Jul 20, 2021 at 9:18 AM Daniel Vetter wrote: > > > > > > On Mon, Jul 19, 2021 at 01:30:44PM -0500, Jason Ekstrand wrote: > > &g

[PATCH 0/6] Fix the debugfs splat from mock selftests (v3)

2021-07-21 Thread Jason Ekstrand
s but can show up in other random IGTs depending on test execution order. Jason Ekstrand (6): drm/i915: Call i915_globals_exit() after i915_pmu_exit() drm/i915: Call i915_globals_exit() if pci_register_device() fails drm/i915: Use a table for i915_init/exit (v2) drm/ttm: Force re-init if ttm

[PATCH 2/6] drm/i915: Call i915_globals_exit() if pci_register_device() fails

2021-07-21 Thread Jason Ekstrand
In the unlikely event that pci_register_device() fails, we were tearing down our PMU setup but not globals. This leaves a bunch of memory slabs lying around. Signed-off-by: Jason Ekstrand Fixes: 32eb6bcfdda9 ("drm/i915: Make request allocation caches global") Reviewed-by: Dan

[PATCH 1/6] drm/i915: Call i915_globals_exit() after i915_pmu_exit()

2021-07-21 Thread Jason Ekstrand
We should tear down in the opposite order we set up. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm

[PATCH 3/6] drm/i915: Use a table for i915_init/exit (v2)

2021-07-21 Thread Jason Ekstrand
river always succeeding to load the driver and then properly tearing down the partially loaded driver. v2 (Tvrtko Ursulin): - Guard init_funcs[i].exit with GEM_BUG_ON(i >= ARRAY_SIZE(init_funcs)) v2 (Daniel Vetter): - Update the docstring for i915.mock_selftests Signed-off-by: Jason Ekstran

[PATCH 6/6] drm/i915: Make the kmem slab for i915_buddy_block a global

2021-07-21 Thread Jason Ekstrand
emory situations. Signed-off-by: Jason Ekstrand Fixes: 88be9a0a06b7 ("drm/i915/ttm: add ttm_buddy_man") Cc: Matthew Auld Cc: Christian König --- drivers/gpu/drm/i915/i915_buddy.c | 44 ++--- drivers/gpu/drm/i915/i915_buddy.h | 3 +- drivers/gpu/drm/i915/i915_globa

[PATCH 5/6] drm/ttm: Initialize debugfs from ttm_global_init()

2021-07-21 Thread Jason Ekstrand
again, we'll re-create those debugfs entries and debugfs will complain in dmesg that we're creating entries that already exist. This patch fixes this problem by changing the lifetime of the whole TTM debugfs directory to match that of the TTM global state. Signed-off-by: Jason Ekstra

[PATCH 4/6] drm/ttm: Force re-init if ttm_global_init() fails

2021-07-21 Thread Jason Ekstrand
If we have a failure, decrement the reference count so that the next call to ttm_global_init() will actually do something instead of assume everything is all set up. Signed-off-by: Jason Ekstrand Fixes: 62b53b37e4b1 ("drm/ttm: use a static ttm_bo_global instance") Reviewed-by: Chris

Re: [PATCH 3/7] drm/i915/gem: Unify user object creation

2021-07-21 Thread Jason Ekstrand
On Wed, Jul 21, 2021 at 3:25 AM Matthew Auld wrote: > > On Tue, 20 Jul 2021 at 23:04, Jason Ekstrand wrote: > > > > On Tue, Jul 20, 2021 at 4:35 AM Matthew Auld > > wrote: > > > > > > On Thu, 15 Jul 2021 at 23:39, Jason Ekstrand wrote: > > &g

Re: [PATCH 2/7] drm/i915/gem: Refactor placement setup for i915_gem_object_create* (v2)

2021-07-21 Thread Jason Ekstrand
On Wed, Jul 21, 2021 at 3:32 AM Matthew Auld wrote: > > On Tue, 20 Jul 2021 at 23:07, Jason Ekstrand wrote: > > > > On Mon, Jul 19, 2021 at 3:18 AM Matthew Auld > > wrote: > > > > > > On Fri, 16 Jul 2021 at 15:14, Jason Ekstrand wrote: > > >

Re: [PATCH 5/7] drm/i915/gem/ttm: Respect the objection region in placement_from_obj

2021-07-21 Thread Jason Ekstrand
On Mon, Jul 19, 2021 at 8:35 AM Matthew Auld wrote: > > On Fri, 16 Jul 2021 at 20:49, Jason Ekstrand wrote: > > > > On Fri, Jul 16, 2021 at 1:45 PM Matthew Auld > > wrote: > > > > > > On Fri, 16 Jul 2021 at 18:39, Jason Ekstrand wrote: > > >

[PATCH 0/7] drm/i915: Migrate memory to SMEM when imported cross-device (v8)

2021-07-21 Thread Jason Ekstrand
egion" - Add a new "drm/i915/gem: Call i915_gem_flush_free_objects() in i915_gem_dumb_create()" - Misc. review feedback from Matthew Auld v8: - Misc. review feedback from Matthew Auld Jason Ekstrand (5): drm/i915/gem: Check object_can_migrate from object_migrate drm/i915/gem

[PATCH 1/7] drm/i915/gem: Check object_can_migrate from object_migrate

2021-07-21 Thread Jason Ekstrand
ff-by: Jason Ekstrand Cc: Daniel Vetter Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_object.c| 13 ++--- .../gpu/drm/i915/gem/selftests/i915_gem_migrate.c | 15 --- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/i91

[PATCH 2/7] drm/i915/gem: Refactor placement setup for i915_gem_object_create* (v2)

2021-07-21 Thread Jason Ekstrand
tthew Auld): - Get rid of MAX_N_PLACEMENTS - Drop kfree(placements) from set_placements() v3 (Matthew Auld): - Properly set ext_data->n_placements Signed-off-by: Jason Ekstrand Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_create.c | 82 -- 1 fil

[PATCH 3/7] drm/i915/gem: Call i915_gem_flush_free_objects() in i915_gem_dumb_create()

2021-07-21 Thread Jason Ekstrand
This doesn't really fix anything serious since the chances of a client creating and destroying a mass of dumb BOs is pretty low. However, it is called by the other two create IOCTLs to garbage collect old objects. Call it here too for consistency. Signed-off-by: Jason Ekstrand Review

[PATCH 4/7] drm/i915/gem: Unify user object creation (v3)

2021-07-21 Thread Jason Ekstrand
i915_gem_dumb_create() in a separate patch - Move i915_gem_object_alloc() below the simple error checks v3 (Matthew Auld): - Add __ to i915_gem_object_create_user and kerneldoc which warns the caller that it's not validating anything. Signed-off-by: Jason Ekstrand Reviewed-by: Matthew

[PATCH 5/7] drm/i915/gem/ttm: Respect the objection region in placement_from_obj

2021-07-21 Thread Jason Ekstrand
d by, say, i915_gem_object_migrate(). Signed-off-by: Jason Ekstrand Cc: Thomas Hellström Cc: Matthew Auld Cc: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm

[PATCH 6/7] drm/i915/gem: Correct the locking and pin pattern for dma-buf (v8)

2021-07-21 Thread Jason Ekstrand
support and move the pinning into the attach/detach path. v4: (ruhl) - Put pages does not need to assert on the dma-resv v5: (jason) - Lock around dma_buf_unmap_attachment() when emulating a dynamic importer in the subtests. - Use pin_pages_unlocked v6: (jason) - Use dma_buf_attach instead of

[PATCH 7/7] drm/i915/gem: Migrate to system at dma-buf attach time (v7)

2021-07-21 Thread Jason Ekstrand
() callback. v4: - Migrate in attach v5: (jason) - Lock around the migration v6: (jason) - Move the can_migrate check outside the lock - Rework the selftests to test more migration conditions. In particular, SMEM, LMEM, and LMEM+SMEM are all checked. v7: (mauld) - Misc style nits Signed-off-by

Re: [Intel-gfx] [PATCH 6/6] drm/i915: Make the kmem slab for i915_buddy_block a global

2021-07-21 Thread Jason Ekstrand
On Wed, Jul 21, 2021 at 1:56 PM Daniel Vetter wrote: > > On Wed, Jul 21, 2021 at 05:25:41PM +0100, Matthew Auld wrote: > > On 21/07/2021 16:23, Jason Ekstrand wrote: > > > There's no reason that I can tell why this should be per-i915_buddy_mm > > > and doing

Re: [PATCH] drm/i915: Ditch i915 globals shrink infrastructure

2021-07-21 Thread Jason Ekstrand
vmscan.c:do_shrink_slab() is a thing, if there's an issue with it > then we need to fix that there, not hand-roll our own slab shrinking > code in i915. > > Noticed while reviewing a patch set from Jason to fix up some issues > in our i915_init() and i915_exit() module load/cleanup c

Re: [PATCH 3/4] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-07-21 Thread Jason Ekstrand
On Thu, Jul 15, 2021 at 5:16 AM Matthew Auld wrote: > > From: Chris Wilson > > Jason Ekstrand requested a more efficient method than userptr+set-domain > to determine if the userptr object was backed by a complete set of pages > upon creation. To be more efficient than sim

Re: [PATCH v4 10/13] lib: test_hmm add module param for zone device type

2021-07-22 Thread Jason Gunthorpe
, private device > type is configured. I don't think tests should need configuration like this, is it really necessary? How can people with normal HW run this test? Jason

Re: [PATCH rdma-next v2 1/2] lib/scatterlist: Fix wrong update of orig_nents

2021-07-22 Thread Jason Gunthorpe
ages, offset, size, UINT_MAX) if (ret) { sg_append_abort(&state); return ret; } sg_append_complete(&state); return 0; And then the API can manage all of this in some sane and understandable way. Jason

Re: [Intel-gfx] [PATCH 3/4] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-07-22 Thread Jason Ekstrand
On Thu, Jul 22, 2021 at 3:44 AM Matthew Auld wrote: > > On Wed, 21 Jul 2021 at 21:28, Jason Ekstrand wrote: > > > > On Thu, Jul 15, 2021 at 5:16 AM Matthew Auld wrote: > > > > > > From: Chris Wilson > > > > > > Jason Ekstrand requested a

Re: [Intel-gfx] [PATCH] drm/i915: Ditch i915 globals shrink infrastructure

2021-07-22 Thread Jason Ekstrand
s and no recorded way to reproduce any supposed benefits, even if it requires a microbenchmark. But we added over 100 lines of code for it anyway, including a bunch of hand-rolled RCU juggling. Ripping out unjustified complexity is almost always justified, IMO. The burden of proof here isn'

Re: [PATCH rdma-next v2 1/2] lib/scatterlist: Fix wrong update of orig_nents

2021-07-22 Thread Jason Gunthorpe
On Thu, Jul 22, 2021 at 02:07:51PM +0100, Christoph Hellwig wrote: > On Thu, Jul 22, 2021 at 10:00:40AM -0300, Jason Gunthorpe wrote: > > this is better: > > > >struct sg_append_table state; > > > >sg_append_init(&state, sgt, gfp_mask)

Re: [PATCH v4 10/13] lib: test_hmm add module param for zone device type

2021-07-22 Thread Jason Gunthorpe
On Thu, Jul 22, 2021 at 11:59:17AM -0500, Sierra Guiza, Alejandro (Alex) wrote: > > On 7/22/2021 7:23 AM, Jason Gunthorpe wrote: > > On Sat, Jul 17, 2021 at 02:21:32PM -0500, Alex Sierra wrote: > > > In order to configure device generic in test_hmm, two > > > modu

Re: [PATCH v2 06/14] vfio/fsl: Move to the device set infrastructure

2021-07-23 Thread Jason Gunthorpe
On Fri, Jul 23, 2021 at 09:44:35AM +0200, Christoph Hellwig wrote: > On Tue, Jul 20, 2021 at 02:42:52PM -0300, Jason Gunthorpe wrote: > > .write = vfio_fsl_mc_write, > > @@ -625,13 +526,15 @@ static int vfio_fsl_mc_probe(struct fsl_mc_device > > *mc_dev) > >

Re: [PATCH v2 07/14] vfio/platform: Use open_device() instead of open coding a refcnt scheme

2021-07-23 Thread Jason Gunthorpe
On Fri, Jul 23, 2021 at 09:45:21AM +0200, Christoph Hellwig wrote: > Looks good, > > Reviewed-by: Christoph Hellwig > > On Tue, Jul 20, 2021 at 02:42:53PM -0300, Jason Gunthorpe wrote: > > Platform simply wants to run some code when the device is first > > opene

Re: [PATCH v2 08/14] vfio/pci: Move to the device set infrastructure

2021-07-23 Thread Jason Gunthorpe
/vfio_pci.c:if (!pci_probe_reset_slot(vdev->pdev->slot)) drivers/vfio/pci/vfio_pci.c:if (!pci_probe_reset_slot(vdev->pdev->slot)) drivers/vfio/pci/vfio_pci.c:bool slot = !pci_probe_reset_slot(vdev->pdev->slot); drivers/vfio/pci/vfio_pci.c:if (!pci_probe_reset_slot(vdev->pdev->slot)) It reads quite poorly either way, IMHO, I'd rather switch it to a readable bool, but not for this series Thanks, Jason

Re: [PATCH v2 06/14] vfio/fsl: Move to the device set infrastructure

2021-07-23 Thread Jason Gunthorpe
On Fri, Jul 23, 2021 at 02:29:03PM +0200, Christoph Hellwig wrote: > On Fri, Jul 23, 2021 at 09:22:27AM -0300, Jason Gunthorpe wrote: > > > But do we even need the else part? Assingning &mc_dev->dev is > > > equivalent to the default per-device set anyway, isn&#

Re: [PATCH v2 09/14] vfio/pci: Change vfio_pci_try_bus_reset() to use the dev_set

2021-07-23 Thread Jason Gunthorpe
On Fri, Jul 23, 2021 at 10:05:43AM +0200, Christoph Hellwig wrote: > On Tue, Jul 20, 2021 at 02:42:55PM -0300, Jason Gunthorpe wrote: > > Keep track of all the vfio_devices that have been added to the device set > > and use this list in vfio_pci_try_bus_reset() instead of

Re: [PATCH v2 10/14] vfio/pci: Reorganize VFIO_DEVICE_PCI_HOT_RESET to use the device set

2021-07-23 Thread Jason Gunthorpe
On Fri, Jul 23, 2021 at 10:12:08AM +0200, Christoph Hellwig wrote: > On Tue, Jul 20, 2021 at 02:42:56PM -0300, Jason Gunthorpe wrote: > > Like vfio_pci_try_bus_reset() this code wants to reset all of the devices > > in the "reset group" which is the same mem

Re: [PATCH v2 04/14] vfio: Provide better generic support for open/release vfio_device_ops

2021-07-23 Thread Jason Gunthorpe
kmem_cache_alloc() kmem_cache_alloc() xa_lock() [idx] = new1 xa_unlock() xa_lock() [idx] = new2// Woops, lost new1! xa_unlock() The hidden xa unlock is really tricky. The __xa_cmpxchg is safe against this. Jason

[PATCH 0/8] drm/i915: Migrate memory to SMEM when imported cross-device (v8)

2021-07-23 Thread Jason Ekstrand
egion" - Add a new "drm/i915/gem: Call i915_gem_flush_free_objects() in i915_gem_dumb_create()" - Misc. review feedback from Matthew Auld v8: - Misc. review feedback from Matthew Auld v9: - Replace the i915/ttm patch with two that are hopefully more correct Jason Ekstrand (6):

[PATCH 2/8] drm/i915/gem: Refactor placement setup for i915_gem_object_create* (v2)

2021-07-23 Thread Jason Ekstrand
tthew Auld): - Get rid of MAX_N_PLACEMENTS - Drop kfree(placements) from set_placements() v3 (Matthew Auld): - Properly set ext_data->n_placements Signed-off-by: Jason Ekstrand Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_create.c | 82 -- 1 fil

[PATCH 1/8] drm/i915/gem: Check object_can_migrate from object_migrate

2021-07-23 Thread Jason Ekstrand
ff-by: Jason Ekstrand Cc: Daniel Vetter Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_object.c| 13 ++--- .../gpu/drm/i915/gem/selftests/i915_gem_migrate.c | 15 --- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/i91

[PATCH 3/8] drm/i915/gem: Call i915_gem_flush_free_objects() in i915_gem_dumb_create()

2021-07-23 Thread Jason Ekstrand
This doesn't really fix anything serious since the chances of a client creating and destroying a mass of dumb BOs is pretty low. However, it is called by the other two create IOCTLs to garbage collect old objects. Call it here too for consistency. Signed-off-by: Jason Ekstrand Review

[PATCH 4/8] drm/i915/gem: Unify user object creation (v3)

2021-07-23 Thread Jason Ekstrand
i915_gem_dumb_create() in a separate patch - Move i915_gem_object_alloc() below the simple error checks v3 (Matthew Auld): - Add __ to i915_gem_object_create_user and kerneldoc which warns the caller that it's not validating anything. Signed-off-by: Jason Ekstrand Reviewed-by: Matthew

[PATCH 5/8] drm/i915/gem/ttm: Only call __i915_gem_object_set_pages if needed

2021-07-23 Thread Jason Ekstrand
grate also uses __i915_ttm_get_pages to do the migration so this meant it was unsafe to call on an already populated object. This patch checks i915_gem_object_has_pages() before trying to __i915_gem_object_set_pages so i915_ttm_migrate is safe to call, even on populated objects. Signed-off-by: Jason Ekstran

[PATCH 8/8] drm/i915/gem: Migrate to system at dma-buf attach time (v7)

2021-07-23 Thread Jason Ekstrand
() callback. v4: - Migrate in attach v5: (jason) - Lock around the migration v6: (jason) - Move the can_migrate check outside the lock - Rework the selftests to test more migration conditions. In particular, SMEM, LMEM, and LMEM+SMEM are all checked. v7: (mauld) - Misc style nits Signed-off-by

[PATCH 7/8] drm/i915/gem: Correct the locking and pin pattern for dma-buf (v8)

2021-07-23 Thread Jason Ekstrand
support and move the pinning into the attach/detach path. v4: (ruhl) - Put pages does not need to assert on the dma-resv v5: (jason) - Lock around dma_buf_unmap_attachment() when emulating a dynamic importer in the subtests. - Use pin_pages_unlocked v6: (jason) - Use dma_buf_attach instead of

[PATCH 6/8] drm/i915/gem: Always call obj->ops->migrate unless can_migrate fails

2021-07-23 Thread Jason Ekstrand
contained. Once the migration is complete, the object will have pages, obj->mm.region will be correct, and we're done lying. Signed-off-by: Jason Ekstrand --- drivers/gpu/drm/i915/gem/i915_gem_object.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gp

Re: [PATCH] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-07-23 Thread Jason Ekstrand
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12044 On Fri, Jul 23, 2021 at 6:35 AM Matthew Auld wrote: > > From: Chris Wilson > > Jason Ekstrand requested a more efficient method than userptr+set-domain > to determine if the userptr object was backed by a comple

Re: [PATCH] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-07-23 Thread Jason Ekstrand
Are there IGTs for this anywhere? On Fri, Jul 23, 2021 at 12:47 PM Jason Ekstrand wrote: > > https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12044 > > On Fri, Jul 23, 2021 at 6:35 AM Matthew Auld wrote: > > > > From: Chris Wilson > > > > Jason

Re: [PATCH 00/30] Remove CNL support

2021-07-23 Thread Jason Ekstrand
Generally a big fan. 👍 --Jason On July 23, 2021 19:11:34 Lucas De Marchi wrote: Patches 1 and 2 are already being reviewed elsewhere. Discussion on 2nd patch made me revive something I started after comment from Ville at https://patchwork.freedesktop.org/patch/428168/?series=88988&r

Re: [Intel-gfx] [PATCH 0/8] drm/i915: Migrate memory to SMEM when imported cross-device (v8)

2021-07-26 Thread Jason Ekstrand
On Mon, Jul 26, 2021 at 3:12 AM Matthew Auld wrote: > > On Fri, 23 Jul 2021 at 18:21, Jason Ekstrand wrote: > > > > This patch series fixes an issue with discrete graphics on Intel where we > > allowed dma-buf import while leaving the object in local memory. This > &g

Re: [Intel-gfx] [PATCH] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-07-26 Thread Jason Ekstrand
On Mon, Jul 26, 2021 at 3:06 AM Matthew Auld wrote: > > On Fri, 23 Jul 2021 at 18:48, Jason Ekstrand wrote: > > > > https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12044 > > Cool, is that ready to go? i.e can we start merging the kernel + IGT side. Yes, it

Re: [PATCH] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-07-26 Thread Jason Ekstrand
On Mon, Jul 26, 2021 at 3:31 AM Maarten Lankhorst wrote: > > Op 23-07-2021 om 13:34 schreef Matthew Auld: > > From: Chris Wilson > > > > Jason Ekstrand requested a more efficient method than userptr+set-domain > > to determine if the userptr object was backed by a

Re: [PATCH 01/10] drm/i915: Check for nomodeset in i915_init() first

2021-07-26 Thread Jason Ekstrand
t; So move that check first, for a bit of orderliness. With Jason's > module init/exit table this now becomes trivial. > > Cc: Jason Ekstrand > Signed-off-by: Daniel Vetter Reviewed-by: Jason Ekstrand > --- > drivers/gpu/drm/i915/i915_pci.c | 2 +- > 1 file changed,

Re: [PATCH 02/10] drm/i915: move i915_active slab to direct module init/exit

2021-07-26 Thread Jason Ekstrand
g the static global.slab_cache to just a slab_cache. > > Cc: Jason Ekstrand > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/i915/i915_active.c | 31 ++--- > drivers/gpu/drm/i915/i915_active.h | 3 +++ > drivers/gpu/drm/i915/i915_globals

Re: [PATCH 03/10] drm/i915: move i915_buddy slab to direct module init/exit

2021-07-26 Thread Jason Ekstrand
the static global.slab_blocks to just a > slab_blocks. > > Cc: Jason Ekstrand > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/i915/i915_buddy.c | 25 - > drivers/gpu/drm/i915/i915_buddy.h | 3 ++- > drivers/gpu/drm/i915/i915_globals.c |

Re: [Intel-gfx] [PATCH 04/10] drm/i915: move intel_context slab to direct module init/exit

2021-07-26 Thread Jason Ekstrand
o each patch because there's quite a bit of > > noise with removing the static global.slab_ce to just a > > slab_ce. > > > > Cc: Jason Ekstrand > > Signed-off-by: Daniel Vetter > > --- > > drivers/gpu/drm/i915/gt/intel_context.c | 25

Re: [Intel-gfx] [PATCH 0/8] drm/i915: Migrate memory to SMEM when imported cross-device (v8)

2021-07-26 Thread Jason Ekstrand
On Mon, Jul 26, 2021 at 10:29 AM Matthew Auld wrote: > > On Mon, 26 Jul 2021 at 16:11, Jason Ekstrand wrote: > > > > On Mon, Jul 26, 2021 at 3:12 AM Matthew Auld > > wrote: > > > > > > On Fri, 23 Jul 2021 at 18:21, Jason Ekstrand wrote: > > &

Re: [PATCH 05/10] drm/i915: move gem_context slab to direct module init/exit

2021-07-26 Thread Jason Ekstrand
ng the static global.slab_luts to just a > slab_luts. > > Cc: Jason Ekstrand > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/i915/gem/i915_gem_context.c | 25 +++-- > drivers/gpu/drm/i915/gem/i915_gem_context.h | 3 +++ > drivers/gpu/drm/i9

Re: [PATCH 06/10] drm/i915: move gem_objects slab to direct module init/exit

2021-07-26 Thread Jason Ekstrand
the static global.slab_objects to just a > slab_objects. > > Cc: Jason Ekstrand > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/i915/gem/i915_gem_object.c | 26 +++--- > drivers/gpu/drm/i915/gem/i915_gem_object.h | 3 +++ > drivers/gpu/drm/

Re: [Intel-gfx] [PATCH 04/10] drm/i915: move intel_context slab to direct module init/exit

2021-07-26 Thread Jason Ekstrand
On Mon, Jul 26, 2021 at 10:30 AM Jason Ekstrand wrote: > > On Mon, Jul 26, 2021 at 3:35 AM Tvrtko Ursulin > wrote: > > > > > > On 23/07/2021 20:29, Daniel Vetter wrote: > > > With the global kmem_cache shrink infrastructure gone there's nothing &

Re: [PATCH 07/10] drm/i915: move request slabs to direct module init/exit

2021-07-26 Thread Jason Ekstrand
g the static global.slab_requests|execute_cbs to just a > slab_requests|execute_cbs. > > Cc: Jason Ekstrand > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/i915/i915_globals.c | 2 -- > drivers/gpu/drm/i915/i915_pci.c | 2 ++ > drivers/gpu/drm/i915/i915_reques

Re: [PATCH 08/10] drm/i915: move scheduler slabs to direct module init/exit

2021-07-26 Thread Jason Ekstrand
t; noise with removing the static global.slab_dependencies|priorities to just a > slab_dependencies|priorities. > > Cc: Jason Ekstrand > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/i915/i915_globals.c | 2 -- > drivers/gpu/drm/i915/i915_globals.h | 2 -- > drivers/gpu/

Re: [PATCH 09/10] drm/i915: move vma slab to direct module init/exit

2021-07-26 Thread Jason Ekstrand
ng the static global.slab_vmas to just a > slab_vmas. > > We have to keep i915_drv.h include in i915_globals otherwise there's > nothing anymore that pulls in GEM_BUG_ON. > > Cc: Jason Ekstrand > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/i915/i9

Re: [PATCH 10/10] drm/i915: Remove i915_globals

2021-07-26 Thread Jason Ekstrand
On Fri, Jul 23, 2021 at 2:29 PM Daniel Vetter wrote: > > No longer used. > > Cc: Jason Ekstrand > Signed-off-by: Daniel Vetter Reviewed-by: Jason Ekstrand But, also, tvrtko is right that dumping all that stuff in i915_pci.c isn't great. Mind typing a quick follow-on

Re: [Intel-gfx] [PATCH 04/10] drm/i915: move intel_context slab to direct module init/exit

2021-07-26 Thread Jason Ekstrand
On Mon, Jul 26, 2021 at 11:08 AM Tvrtko Ursulin wrote: > On 26/07/2021 16:42, Jason Ekstrand wrote: > > On Mon, Jul 26, 2021 at 10:30 AM Jason Ekstrand > > wrote: > >> > >> On Mon, Jul 26, 2021 at 3:35 AM Tvrtko Ursulin > >> wrote: > >>>

Re: [Intel-gfx] [PATCH 04/10] drm/i915: move intel_context slab to direct module init/exit

2021-07-26 Thread Jason Ekstrand
On Mon, Jul 26, 2021 at 11:31 AM Tvrtko Ursulin wrote: > > > On 26/07/2021 17:20, Jason Ekstrand wrote: > > On Mon, Jul 26, 2021 at 11:08 AM Tvrtko Ursulin > > wrote: > >> On 26/07/2021 16:42, Jason Ekstrand wrote: > >>> On Mon, Jul 26, 202

  1   2   3   4   5   6   7   8   9   10   >