[PULL] drm-xe-fixes

2024-06-04 Thread Thomas Hellstrom
Dave and Sima, A single fix for a missing Local Memory Translation Table update for -rc3. Thanks, Thomas drm-xe-fixes-2024-06-04: Driver Changes: - drm/xe/pf: Update the LMTT when freeing VF GT config The following changes since commit 6c5cd0807c79eb4c0cda70b48f6be668a241d584: drm/xe:

[PULL] drm-xe-fixes

2024-05-30 Thread Thomas Hellstrom
Hi Dave, Sima The drm-xe-fixes for -rc2 Only three fixes so far. I'm holding back one additional fix to be able to sort out whether it's correct or need more work. drm-xe-fixes-2024-05-30: Driver Changes: - One pcode polling timeout change - One fix for deadlocks for faulting VMs - One

[PULL] drm-xe-next-fixes

2024-05-09 Thread Thomas Hellstrom
Hi, Dave & Sima This weeks -next-fixes. Two fixes breifly described below. Driver Changes: - Use ordered WQ for G2H handler. (Matthew Brost) - Use flexible-array rather than zero-sized (Lucas De Marchi) Thanks, Thomas The following changes since commit 3bc8848bb7f7478e6806e4522b06b63f40a53e1e:

[PULL] drm-xe-next-fixes

2024-05-02 Thread Thomas Hellstrom
Dave, Sima This week's small set of fixes for drm-next. drm-xe-next-fixes-2024-05-02: Driver Changes: - Fix for a backmerge going slightly wrong. - An UAF fix - Avoid a WA error on LNL. Thanks, Thomas The following changes since commit 4a56c0ed5aa0bcbe1f5f7d755fb1fe1ebf48ae9c: Merge tag

[PULL] drm-xe-next

2024-04-23 Thread Thomas Hellstrom
Hi, Dave, Sima The main -next 6.10 pull request for the xe driver. I scanned through the patches and tried to provide a somewhat condensed log below. Nothing spectacular in the uAPI changes. Among other things there are some flags that are reinstated now that we have published UMD for them.

[PULL] drm-xe-fixes

2024-03-07 Thread Thomas Hellstrom
Hi Dave, Sima A single error path fix for 6.8 final (-rc8). Thanks, Thomas drm-xe-fixes-2024-03-07: Driver Changes: - An error path fix. The following changes since commit 90d35da658da8cff0d4ecbb5113f5fac9d00eb72: Linux 6.8-rc7 (2024-03-03 13:02:52 -0800) are available in the Git

[PULL] drm-xe-fixes

2024-02-29 Thread Thomas Hellstrom
Dave, Sima The xe fixes for -rc7. It's mostly uapi sanitizing and future-proofing, and a couple of driver fixes. drm-xe-fixes-2024-02-29: UAPI Changes: - A couple of tracepoint updates from Priyanka and Lucas. - Make sure BINDs are completed before accepting UNBINDs on LR vms. - Don't

[PULL] drm-xe-fixes

2024-02-22 Thread Thomas Hellstrom
Hi, Dave Sima The Xe pull request for 6.8-rc6 The uAPI fixes / adjustments we've been discussing are starting to appear, and I will hopefully have the rest for next week's PR. In addition two driver fixes. drm-xe-fixes-2024-02-22: UAPI Changes: - Remove support for persistent exec_queues - Drop

[PULL] drm-xe-fixes

2024-02-15 Thread Thomas Hellstrom
Hi Dave, Sima! The xe fixes pull request for -rc5. drm-xe-fixes-2024-02-15: Driver Changes: - Fix an out-of-bounds shift. - Fix the display code thinking xe uses shmem - Fix a warning about index out-of-bound - Fix a clang-16 compilation warning Thanks, Thomas The following changes since commit

[PULL] drm-xe-fixes

2024-02-08 Thread Thomas Hellstrom
Dave, Sima The drm-xe-fixes pull for -rc4. Thanks, Thomas drm-xe-fixes-2024-02-08: Driver Changes: - Fix a loop in an error path - Fix a missing dma-fence reference - Fix a retry path on userptr REMAP - Workaround for a false gcc warning - Fix missing map of the usm batch buffer in the

[PULL] drm-xe-fixes

2024-02-01 Thread Thomas Hellstrom
Hi Dave and Sima, The xe fixes for 6.8-rc2. drm-xe-fixes-2024-02-01: UAPI Changes: - Only allow a single user-fence per exec / bind. The reason for this clarification fix is a limitation in the implementation which can be lifted moving forward, if needed. Driver Changes: - A crash fix - A

[PULL] drm-xe-fixes

2024-01-25 Thread Thomas Hellstrom
Hi, Dave, Sima The Xe fixes PR for 6.8-rc2. Thanks, Thomas. The following changes since commit 6613476e225e090cc9aad49be7fa504e290dd33d: Linux 6.8-rc1 (2024-01-21 14:11:32 -0800) are available in the Git repository at: https://gitlab.freedesktop.org/drm/xe/kernel.git

[git-pull] vmwgfx-next

2020-03-16 Thread Thomas Hellstrom (VMware)
() in vmw_fifo_ping_host() drm/vmwgfx: Remove a few unused functions Thomas Hellstrom (2): drm/vmwgfx: Fix the refuse_dma mode when using guest-backed objects drm/vmwgfx: Refuse DMA operation when SEV encryption is active drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 3 +- drivers/gpu/drm/vmwgfx

Re: [PATCH v4 5/9] drm/ttm, drm/vmwgfx: Support huge TTM pagefaults

2020-03-01 Thread Thomas Hellstrom
On Sun, 2020-03-01 at 21:49 +0800, Hillf Danton wrote: > On Thu, 20 Feb 2020 13:27:15 +0100 Thomas Hellstrom wrote: > > + > > +static vm_fault_t ttm_bo_vm_huge_fault(struct vm_fault *vmf, > > + enum page_entry_size pe_size) > > +{ > &g

Re: [PATCH 1/2] drm/vmwgfx: Drop preempt_disable() in vmw_fifo_ping_host()

2020-02-26 Thread Thomas Hellstrom
RT. This has been reported in the bugzilla. > > It has been explained by Thomas Hellstrom that this > preempt_disable()ed > section is not required for correctness. > > Remove the preempt_disable() section. > Hi, Sebastian, I suppose there isn't something like a

Re: [PATCH v3 20/22] drm/vmwgfx: Convert to CRTC VBLANK callbacks

2020-01-20 Thread Thomas Hellstrom
wgfx_stdu.c | 3 +++ > 6 files changed, 15 insertions(+), 9 deletions(-) > Acked-by: Thomas Hellstrom ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v4 1/2] mm: Add a vmf_insert_mixed_prot() function

2019-12-12 Thread Thomas Hellstrom
On 12/12/19 9:48 AM, Thomas Hellström (VMware) wrote: > From: Thomas Hellstrom > > The TTM module today uses a hack to be able to set a different page > protection than struct vm_area_struct::vm_page_prot. To be able to do > this properly, add the needed vm functionality as vmf_in

Re: [PATCH] drm/vmwgfx: prevent memory leak in vmw_context_define

2019-12-11 Thread Thomas Hellstrom
On 9/25/19 6:46 AM, Navid Emamdoost wrote: > In vmw_context_define if vmw_context_init fails the allocated resource > should be unreferenced. The goto label was fixed. > > Signed-off-by: Navid Emamdoost > --- > drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH] drm/vmwgfx: prevent memory leak in vmw_cmdbuf_res_add

2019-12-11 Thread Thomas Hellstrom
!= 0)) { > + kfree(cres); > goto out_invalid_key; > + } > > cres->state = VMW_CMDBUF_RES_ADD; > cres->res = vmw_resource_reference(res); Reviewed-by: Thomas Hellstrom Will be part of next vmwgfx-next pull. Thanks, Thomas _

Re: [PATCH v2] drm/vmwgfx: Call vmw_driver_{load,unload}() before registering device

2019-12-10 Thread Thomas Hellstrom
On 12/10/19 1:43 PM, Thomas Zimmermann wrote: > The load/unload callbacks in struct drm_driver are deprecated. Remove > them and call functions explicitly. > > v2: > * remove accidental whitespace fix > > Signed-off-by: Thomas Zimmermann > --- Reviewed-by: Thom

Re: [PATCH] drm/vmwgfx: Call vmw_driver_{load,unload}() before registering device

2019-12-10 Thread Thomas Hellstrom
On 12/9/19 12:06 PM, Thomas Zimmermann wrote: > The load/unload callbacks in struct drm_driver are deprecated. Remove > them and call functions explicitly. > > Signed-off-by: Thomas Zimmermann > --- > drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 44 + > 1 file changed, 38

Re: [PATCH] drm/vmwgfx: Call vmw_driver_{load,unload}() before registering device

2019-12-10 Thread Thomas Hellstrom
Hi, On 12/9/19 12:06 PM, Thomas Zimmermann wrote: > The load/unload callbacks in struct drm_driver are deprecated. Remove > them and call functions explicitly. > > Signed-off-by: Thomas Zimmermann > --- > drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 44 +++ Hmm, which tree is this diff against? I

Re: [PATCH] drm/vmwgfx: Replace deprecated PTR_RET

2019-12-09 Thread Thomas Hellstrom
(sw_context, vmw_view_sr, > + cmd->body.shaderResourceViewId); > > - return PTR_RET(vmw_view_id_val_add(sw_context, vmw_view_sr, > -cmd- > >body.shaderResourceViewId)); > + return PTR_ERR_OR_ZERO(ret); > } >

Re: [PATCH v3 2/2] mm, drm/ttm: Fix vm page protection handling

2019-12-06 Thread Thomas Hellstrom
Hi Michal, On Fri, 2019-12-06 at 11:30 +0100, Michal Hocko wrote: > On Fri 06-12-19 09:24:26, Thomas Hellström (VMware) wrote: > [...] > > @@ -283,11 +282,26 @@ vm_fault_t ttm_bo_vm_fault_reserved(struct > > vm_fault *vmf, > > pfn = page_to_pfn(page); > > } > > >

Re: locking refcounting for ttm_bo_kmap/dma_buf_vmap

2019-11-20 Thread Thomas Hellstrom
On 11/20/19 1:24 PM, Christian König wrote: > Am 20.11.19 um 13:19 schrieb Daniel Vetter: >> On Wed, Nov 20, 2019 at 1:09 PM Daniel Vetter wrote: >>> On Wed, Nov 20, 2019 at 1:02 PM Christian König >>> wrote: > What am I missing? The assumption is that when you want to create a vmap of

Re: [PATCH 10/15] drm/vmwgfx: Delete mmaping functions

2019-11-18 Thread Thomas Hellstrom
revisit this. > > One more aside: The (un)map_dma_buf can't ever be called because > ->attach rejects everything. Might want to drop a BUG_ON(1) in there. > Same for ->detach. And this. > > Signed-off-by: Daniel Vetter > Cc: VMware Graphics > Cc: Thomas Hellstro

Re: [PATCH 3/5] drm/vmwgfx: drop DRM_AUTH for render ioctls

2019-11-12 Thread Thomas Hellstrom
er realms. > > As of last commit, we're explicitly checking for authentication in the > only render ioctls which care about one. > > With those in place, the DRM_AUTH token serves no real purpose. Let's > drop it. > > Cc: VMware Graphics > Cc: Thomas Hellstrom > Signe

Re: [PATCH 2/5] drm/vmwgfx: check master authentication in surface_ref ioctls

2019-11-12 Thread Thomas Hellstrom
and b) unauthenticated - bailing out as result. > > Otherwise the usual isolation path kicks in and we're all good. > > v2: Reword commit message, since the isolation work has landed. > > Cc: VMware Graphics > Cc: Thomas Hellstrom > Signed-off-by: Emil Velikov > --- > dri

Re: [PATCH 1/5] drm/vmwgfx: move the require_exist handling together

2019-11-12 Thread Thomas Hellstrom
On 11/1/19 2:05 PM, Emil Velikov wrote: > From: Emil Velikov > > Move the render_client hunk for require_exist alongside the rest. > Keeping all the reasons why an existing object is needed, in a single > place makes it easier to follow. > > Cc: VMware Graphics > Cc: Th

Re: [PATCH 1/5] drm/vmwgfx: move the require_exist handling together

2019-11-08 Thread Thomas Hellstrom
le >> place makes it easier to follow. >> >> Cc: VMware Graphics >> Cc: Thomas Hellstrom >> Signed-off-by: Emil Velikov >> --- >> drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 9 + >> 1 file changed, 5 insertions(+), 4 deletions(-) >> >

Re: [PATCH 1/3] dma_resv: prime lockdep annotations

2019-10-21 Thread Thomas Hellstrom
hack out, clean > initcall solution in. > > v4: Annotate with __init (Rob Herring) > > Cc: Rob Herring > Cc: Alex Deucher > Cc: Christian König > Cc: Chris Wilson > Cc: Thomas Zimmermann > Cc: Rob Herring > Cc: Tomeu Vizoso > Cc: Eric Anholt > Cc:

Re: [PATCH] drm/ttm: move cpu_writers handling into vmwgfx v2

2019-10-01 Thread Thomas Hellstrom
Hi, Christian, On 9/30/19 6:34 PM, Christian König wrote: > From: Christian König > > This feature is only used by vmwgfx and superflous for everybody else. > > v2: use vmw_buffer_object instead of vmw_user_bo. > > Signed-off-by: Christian König > --- I just sent out a patch based on this that

Re: Re-review? WAS [PATCH 2/7] drm/ttm: Remove explicit typecasts of vm_private_data

2019-09-25 Thread Thomas Hellstrom
p on this. > > Thanks, > Christian. Sure, please do. We can sort out any merge problems later. Let me quickly fix the commit message of patch #3 since it doesn't reflect that we export more helpers, and I'll send out these two as a separate patchset. Thanks, Thomas > > Am 18.09.19 um 1

Re-review? WAS [PATCH 2/7] drm/ttm: Remove explicit typecasts of vm_private_data

2019-09-18 Thread Thomas Hellstrom
) wrote: > From: Thomas Hellstrom > > The explicit typcasts are meaningless, so remove them. > > Suggested-by: Matthew Wilcox > Signed-off-by: Thomas Hellstrom > --- > drivers/gpu/drm/ttm/ttm_bo_vm.c | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) &g

Re: [PATCH] drm/vmwgfx: Fix double free in vmw_recv_msg()

2019-09-05 Thread Thomas Hellstrom
On Thu, 2019-08-15 at 09:38 +0100, Colin Ian King wrote: > On 15/08/2019 09:30, Dan Carpenter wrote: > > We recently added a kfree() after the end of the loop: > > > > if (retries == RETRIES) { > > kfree(reply); > > return -EINVAL; > > } > > > > There are two

Re: [PATCH 7/8] drm/vmwgfx: switch to own vma manager

2019-09-05 Thread Thomas Hellstrom
On Thu, 2019-09-05 at 09:05 +0200, Gerd Hoffmann wrote: > Add struct drm_vma_offset_manager to vma_private, initialize it and > pass it to ttm_bo_device_init(). > > With this in place the last user of ttm's embedded vma offset manager > is gone and we can remove it (in a separate patch). > >

[tip: x86/vmware] drm/vmwgfx: Update the backdoor call with support for new instructions

2019-08-29 Thread tip-bot2 for Thomas Hellstrom
The following commit has been merged into the x86/vmware branch of tip: Commit-ID: 6abe3778cf5abd59b23b9037796f3eab8b7f1d98 Gitweb: https://git.kernel.org/tip/6abe3778cf5abd59b23b9037796f3eab8b7f1d98 Author:Thomas Hellstrom AuthorDate:Wed, 28 Aug 2019 10:03:52 +02:00

Re: [PATCH v4 12/17] drm/vmwgfx: switch driver from bo->resv to bo->base.resv

2019-08-03 Thread Thomas Hellstrom
Still doesn't like this very much, but anyway Acked-by: Thomas Hellstrom On 8/2/19 7:22 AM, Gerd Hoffmann wrote: Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/vmwgfx/vmwgfx_blit.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 8 drivers/gpu/drm/vmwgfx

Re: [PATCH v2 00/18] drm/ttm: make ttm bo a gem bo subclass

2019-06-22 Thread Thomas Hellstrom
Hi, Daniel, On 6/22/19 11:18 AM, Daniel Vetter wrote: Hi Thomas, On Sat, Jun 22, 2019 at 12:52 AM Thomas Hellstrom wrote: On 6/21/19 5:57 PM, Daniel Vetter wrote: On Fri, Jun 21, 2019 at 05:12:19PM +0200, Thomas Hellström (VMware) wrote: On 6/21/19 1:57 PM, Gerd Hoffmann wrote: Aargh

Re: [PATCH v2 00/18] drm/ttm: make ttm bo a gem bo subclass

2019-06-21 Thread Thomas Hellstrom
Hi, Daniel, On 6/21/19 5:57 PM, Daniel Vetter wrote: On Fri, Jun 21, 2019 at 05:12:19PM +0200, Thomas Hellström (VMware) wrote: On 6/21/19 1:57 PM, Gerd Hoffmann wrote: Aargh. Please don't do this. Multiple reasons: 1) I think It's bad to dump all buffer object functionality we can possibly

Re: [PATCH 1/4] drm/vmwgfx: Assign eviction priorities to resources

2019-06-18 Thread Thomas Hellstrom
On 6/18/19 3:27 PM, Daniel Vetter wrote: On Tue, Jun 18, 2019 at 03:08:01PM +0200, Thomas Hellstrom wrote: On 6/18/19 2:19 PM, Daniel Vetter wrote: On Tue, Jun 18, 2019 at 11:54:08AM +0100, Emil Velikov wrote: Hi Thomas, On 2019/06/18, Thomas Hellström (VMware) wrote: From: Thomas Hellstrom

Re: [PATCH 1/4] drm/vmwgfx: Assign eviction priorities to resources

2019-06-18 Thread Thomas Hellstrom
On 6/18/19 12:54 PM, Emil Velikov wrote: Hi Thomas, On 2019/06/18, Thomas Hellström (VMware) wrote: From: Thomas Hellstrom TTM provides a means to assign eviction priorities to buffer object. This means that all buffer objects with a lower priority will be evicted first on memory pressure

Re: [PATCH 1/4] drm/vmwgfx: Assign eviction priorities to resources

2019-06-18 Thread Thomas Hellstrom
On 6/18/19 2:19 PM, Daniel Vetter wrote: On Tue, Jun 18, 2019 at 11:54:08AM +0100, Emil Velikov wrote: Hi Thomas, On 2019/06/18, Thomas Hellström (VMware) wrote: From: Thomas Hellstrom TTM provides a means to assign eviction priorities to buffer object. This means that all buffer objects

Re: [PATCH] drm/ttm: move cpu_writers handling into vmwgfx

2019-06-14 Thread Thomas Hellstrom
Hi, Christian, On Fri, 2019-06-14 at 14:58 +0200, Christian König wrote: > Thomas just a gentle ping on this. > > It's not that my live depends on this, but it would still be a nice > to > have cleanup. > > Thanks, > Christian. > I thought I had answered this, but I can't find it in my

Re: [PATCH v5 5/9] drm/ttm: TTM fault handler helpers

2019-06-13 Thread Thomas Hellstrom
Hi! On Thu, 2019-06-13 at 12:25 +0800, Hillf Danton wrote: > Hello Thomas > > On Wed, 12 Jun 2019 08:42:39 +0200 Thomas Hellstrom wrote: > > From: Thomas Hellstrom > > > > With the vmwgfx dirty tracking, the default TTM fault handler is > > not > > compl

Re: [PATCH] drm/ttm: move cpu_writers handling into vmwgfx

2019-06-12 Thread Thomas Hellstrom
Hi, Christian, This looks OK, although there are a couple of minor alterations needed in the vmwgfx driver: - We should operate on vmw_buffer_objects rather than on user_buffer_objects. - vmw_user_bo_verify_synccpu should move to the validate code. I can take care of that if it's ok with you.

[PATCH v3] drm/vmwgfx: fix a warning due to missing dma_parms

2019-06-10 Thread Thomas Hellstrom
d DRM driver for VMware Virtual GPU") Co-developed-by: Thomas Hellstrom Signed-off-by: Qian Cai Signed-off-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_d

Re: [RESEND PATCH v2] drm/vmwgfx: fix a warning due to missing dma_parms

2019-06-04 Thread Thomas Hellstrom
Reviewed-by: Thomas Hellstrom I'll just need to give this some more testing before queueing it on vmwgfx-fixes. Thanks, Thomas On Mon, 2019-06-03 at 16:44 -0400, Qian Cai wrote: > Booting up with DMA_API_DEBUG_SG=y generates a warning due to the > driver > forgot to set

Re: [RFC PATCH] drm/ttm, drm/vmwgfx: Have TTM support AMD SEV encryption

2019-05-29 Thread Thomas Hellstrom
On Wed, 2019-05-29 at 09:50 +0200, Christian König wrote: > Am 28.05.19 um 19:23 schrieb Lendacky, Thomas: > > On 5/28/19 12:05 PM, Thomas Hellstrom wrote: > > > On 5/28/19 7:00 PM, Lendacky, Thomas wrote: > > > > On 5/28/19 11:32 AM, Koenig, Christian wrote: > >

Re: [RFC PATCH] drm/ttm, drm/vmwgfx: Have TTM support AMD SEV encryption

2019-05-28 Thread Thomas Hellstrom
On 5/28/19 7:00 PM, Lendacky, Thomas wrote: On 5/28/19 11:32 AM, Koenig, Christian wrote: Am 28.05.19 um 18:27 schrieb Thomas Hellstrom: On Tue, 2019-05-28 at 15:50 +, Lendacky, Thomas wrote: On 5/28/19 10:17 AM, Koenig, Christian wrote: Hi Thomas, Am 28.05.19 um 17:11 schrieb Thomas

Re: [RFC PATCH] drm/ttm, drm/vmwgfx: Have TTM support AMD SEV encryption

2019-05-28 Thread Thomas Hellstrom
On Tue, 2019-05-28 at 15:50 +, Lendacky, Thomas wrote: > On 5/28/19 10:17 AM, Koenig, Christian wrote: > > Hi Thomas, > > > > Am 28.05.19 um 17:11 schrieb Thomas Hellstrom: > > > Hi, Tom, > > > > > > Thanks for the reply. The question is not

Re: [RFC PATCH] drm/ttm, drm/vmwgfx: Have TTM support AMD SEV encryption

2019-05-28 Thread Thomas Hellstrom
Hi, Tom, Thanks for the reply. The question is not graphics specific, but lies in your answer further below: On 5/28/19 4:48 PM, Lendacky, Thomas wrote: On 5/28/19 2:31 AM, Thomas Hellstrom wrote: Hi, Tom, Could you shed some light on this? I don't have a lot of GPU knowledge, so let me

Re: [RFC PATCH] drm/ttm, drm/vmwgfx: Have TTM support AMD SEV encryption

2019-05-28 Thread Thomas Hellstrom
Hi, Tom, Could you shed some light on this? Thanks, Thomas On 5/24/19 5:08 PM, Alex Deucher wrote: + Tom He's been looking into SEV as well. On Fri, May 24, 2019 at 8:30 AM Thomas Hellstrom wrote: On 5/24/19 2:03 PM, Koenig, Christian wrote: Am 24.05.19 um 12:37 schrieb Thomas Hellstrom

Re: [PATCH 4/5] drm/vmwgfx: remove custom ioctl io encoding check

2019-05-27 Thread Thomas Hellstrom
On 5/27/19 5:27 PM, Emil Velikov wrote: On 2019/05/27, Thomas Hellstrom wrote: On 5/27/19 2:35 PM, Emil Velikov wrote: Hi Thomas, On 2019/05/27, Thomas Hellstrom wrote: I think we might be talking past each other, let's take a step back: - as of previous patch, all of vmwgfx ioctls size

Re: [PATCH 13/13] drm: allow render capable master with DRM_AUTH ioctls

2019-05-27 Thread Thomas Hellstrom
On 5/27/19 3:16 PM, Daniel Vetter wrote: On Mon, May 27, 2019 at 02:39:18PM +0200, Thomas Hellstrom wrote: On 5/27/19 10:17 AM, Emil Velikov wrote: From: Emil Velikov There are cases (in mesa and applications) where one would open the primary node without properly authenticating the client

Re: [PATCH 4/5] drm/vmwgfx: remove custom ioctl io encoding check

2019-05-27 Thread Thomas Hellstrom
On 5/27/19 2:35 PM, Emil Velikov wrote: Hi Thomas, On 2019/05/27, Thomas Hellstrom wrote: I think we might be talking past each other, let's take a step back: - as of previous patch, all of vmwgfx ioctls size is consistently handled by the core I don't think I follow you here, AFAICT

Re: [PATCH 13/13] drm: allow render capable master with DRM_AUTH ioctls

2019-05-27 Thread Thomas Hellstrom
On 5/27/19 10:17 AM, Emil Velikov wrote: From: Emil Velikov There are cases (in mesa and applications) where one would open the primary node without properly authenticating the client. Sometimes we don't check if the authentication succeeds, but there's also cases we simply forget to do it.

Re: [PATCH 4/5] drm/vmwgfx: remove custom ioctl io encoding check

2019-05-27 Thread Thomas Hellstrom
Hi, Emil, On Mon, 2019-05-27 at 10:08 +0100, Emil Velikov wrote: > On 2019/05/25, Thomas Hellstrom wrote: > > On Sat, 2019-05-25 at 00:39 +0200, Thomas Hellström wrote: > > > Hi, Emil > > > > > > On Fri, 2019-05-24 at 16:26 +0100, Emil Velikov wrote: > >

Re: [PATCH 4/5] drm/vmwgfx: remove custom ioctl io encoding check

2019-05-25 Thread Thomas Hellstrom
On Sat, 2019-05-25 at 00:39 +0200, Thomas Hellström wrote: > Hi, Emil > > On Fri, 2019-05-24 at 16:26 +0100, Emil Velikov wrote: > > On 2019/05/24, Thomas Hellstrom wrote: > > > On Fri, 2019-05-24 at 13:14 +0100, Emil Velikov wrote: > > > > On 2019/05/23,

Re: [PATCH 4/5] drm/vmwgfx: remove custom ioctl io encoding check

2019-05-24 Thread Thomas Hellstrom
Hi, Emil On Fri, 2019-05-24 at 16:26 +0100, Emil Velikov wrote: > On 2019/05/24, Thomas Hellstrom wrote: > > On Fri, 2019-05-24 at 13:14 +0100, Emil Velikov wrote: > > > On 2019/05/23, Thomas Hellstrom wrote: > > > > Hi, Emil, > > > > > > > >

Re: [PATCH 4/5] drm/vmwgfx: remove custom ioctl io encoding check

2019-05-24 Thread Thomas Hellstrom
On Fri, 2019-05-24 at 13:14 +0100, Emil Velikov wrote: > On 2019/05/23, Thomas Hellstrom wrote: > > Hi, Emil, > > > > On Wed, 2019-05-22 at 17:41 +0100, Emil Velikov wrote: > > > From: Emil Velikov > > > > > > Drop the custom ioctl io encoding c

Re: [RFC PATCH] drm/ttm, drm/vmwgfx: Have TTM support AMD SEV encryption

2019-05-24 Thread Thomas Hellstrom
On 5/24/19 2:03 PM, Koenig, Christian wrote: Am 24.05.19 um 12:37 schrieb Thomas Hellstrom: [CAUTION: External Email] On 5/24/19 12:18 PM, Koenig, Christian wrote: Am 24.05.19 um 11:55 schrieb Thomas Hellstrom: [CAUTION: External Email] On 5/24/19 11:11 AM, Thomas Hellstrom wrote: Hi

Re: [PATCH] drm/vmwgfx: fix a warning due to missing dma_parms

2019-05-24 Thread Thomas Hellstrom
On Fri, 2019-05-24 at 08:19 +0200, Christoph Hellwig wrote: > On Thu, May 23, 2019 at 10:37:19PM -0400, Qian Cai wrote: > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c > > b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c > > index bf6c3500d363..5c567b81174f 100644 > > ---

Re: [PATCH 3/5] drm/vmwgfx: use core drm to extend/check vmw_execbuf_ioctl

2019-05-24 Thread Thomas Hellstrom
On 5/24/19 12:53 PM, Emil Velikov wrote: On 2019/05/24, Daniel Vetter wrote: On Fri, May 24, 2019 at 8:05 AM Thomas Hellstrom wrote: On Wed, 2019-05-22 at 21:09 +0200, Daniel Vetter wrote: On Wed, May 22, 2019 at 9:01 PM Thomas Hellstrom < thellst...@vmware.com> wrote: Hi, Emil,

Re: [RFC PATCH] drm/ttm, drm/vmwgfx: Have TTM support AMD SEV encryption

2019-05-24 Thread Thomas Hellstrom
On 5/24/19 12:18 PM, Koenig, Christian wrote: Am 24.05.19 um 11:55 schrieb Thomas Hellstrom: [CAUTION: External Email] On 5/24/19 11:11 AM, Thomas Hellstrom wrote: Hi, Christian, On 5/24/19 10:37 AM, Koenig, Christian wrote: Am 24.05.19 um 10:11 schrieb Thomas Hellström (VMware): [CAUTION

Re: [RFC PATCH] drm/ttm, drm/vmwgfx: Have TTM support AMD SEV encryption

2019-05-24 Thread Thomas Hellstrom
On 5/24/19 11:11 AM, Thomas Hellstrom wrote: Hi, Christian, On 5/24/19 10:37 AM, Koenig, Christian wrote: Am 24.05.19 um 10:11 schrieb Thomas Hellström (VMware): [CAUTION: External Email] From: Thomas Hellstrom With SEV encryption, all DMA memory must be marked decrypted (AKA "s

Re: [RFC PATCH] drm/ttm, drm/vmwgfx: Have TTM support AMD SEV encryption

2019-05-24 Thread Thomas Hellstrom
Hi, Christian, On 5/24/19 10:37 AM, Koenig, Christian wrote: Am 24.05.19 um 10:11 schrieb Thomas Hellström (VMware): [CAUTION: External Email] From: Thomas Hellstrom With SEV encryption, all DMA memory must be marked decrypted (AKA "shared") for devices to be able to read it. In

Re: [PATCH 3/5] drm/vmwgfx: use core drm to extend/check vmw_execbuf_ioctl

2019-05-24 Thread Thomas Hellstrom
On Wed, 2019-05-22 at 21:09 +0200, Daniel Vetter wrote: > On Wed, May 22, 2019 at 9:01 PM Thomas Hellstrom < > thellst...@vmware.com> wrote: > > Hi, Emil, > > > > On Wed, 2019-05-22 at 17:41 +0100, Emil Velikov wrote: > > > From: Emil Velikov > > >

Re: [PATCH 3/5] drm/vmwgfx: use core drm to extend/check vmw_execbuf_ioctl

2019-05-23 Thread Thomas Hellstrom
ity. > > Cc: "VMware Graphics" > Cc: Thomas Hellstrom > Cc: Daniel Vetter > Signed-off-by: Emil Velikov Tested using piglit quick using execbuf versions 1 and 2. Tested-by: Thomas Hellstrom Reviewed-by: Thomas Hellstrom > --- > Thomas, VMware team, > > P

Re: [PATCH 2/5] drm/vmgfx: kill off unused init_mutex

2019-05-23 Thread Thomas Hellstrom
On Wed, 2019-05-22 at 17:41 +0100, Emil Velikov wrote: > From: Emil Velikov > > According to the docs - prevents firstopen/lastclose races. Yet never > used in practise. > > Cc: "VMware Graphics" > Cc: Thomas Hellstrom > Cc: Daniel Vetter > Signed-off-b

Re: [PATCH 1/5] vmwgfx: drop empty lastclose stub

2019-05-23 Thread Thomas Hellstrom
On Wed, 2019-05-22 at 17:41 +0100, Emil Velikov wrote: > From: Emil Velikov > > Core DRM is safe when the callback is NULL. > > Cc: "VMware Graphics" > Cc: Thomas Hellstrom > Cc: Daniel Vetter > Signed-off-by: Emil Velikov Reviewed-by: Thomas Hellstrom

Re: [PATCH 4/5] drm/vmwgfx: remove custom ioctl io encoding check

2019-05-23 Thread Thomas Hellstrom
Hi, Emil, On Wed, 2019-05-22 at 17:41 +0100, Emil Velikov wrote: > From: Emil Velikov > > Drop the custom ioctl io encoding check - core drm does it for us. I fail to see where the core does this, or do I miss something? Thanks, Thomas > > Cc: "VMware Graphics" >

Re: [PATCH 3/5] drm/vmwgfx: use core drm to extend/check vmw_execbuf_ioctl

2019-05-22 Thread Thomas Hellstrom
bably be fixed before pushing this. > > Cc: "VMware Graphics" > Cc: Thomas Hellstrom > Cc: Daniel Vetter > Signed-off-by: Emil Velikov > --- > Thomas, VMware team, > > Please give this some testing on your end. I've only tested it > against > mesa-mas

[git pull] vmwgfx-fixes-5.2

2019-05-22 Thread Thomas Hellstrom (VMware)
:10 +0200) Murray McAllister (2): drm/vmwgfx: NULL pointer dereference from vmw_cmd_dx_view_define() drm/vmwgfx: integer underflow in vmw_cmd_dx_set_shader() leading to an invalid read Thomas Hellstrom (4): drm

[PATCH 4/6] drm/vmwgfx: Use the dma scatter-gather iterator to get dma addresses

2019-05-21 Thread Thomas Hellstrom
Signed-off-by: Thomas Hellstrom Reviewed-by: Jason Gunthorpe --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h| 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 27 ++ 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drive

[PATCH 5/6] drm/vmwgfx: NULL pointer dereference from vmw_cmd_dx_view_define()

2019-05-21 Thread Thomas Hellstrom
pport") Signed-off-by: Murray McAllister Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c index 31

[PATCH 3/6] drm/vmwgfx: Fix compat mode shader operation

2019-05-21 Thread Thomas Hellstrom
Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c index 2ff7ba04d8c8..315f9efce765 100644 --- a/drive

[PATCH 6/6] drm/vmwgfx: integer underflow in vmw_cmd_dx_set_shader() leading to an invalid read

2019-05-21 Thread Thomas Hellstrom
: Fixes: d80efd5cb3de ("drm/vmwgfx: Initial DX support") Signed-off-by: Murray McAllister Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/

[PATCH 2/6] drm/vmwgfx: Fix user space handle equal to zero

2019-05-21 Thread Thomas Hellstrom
s idr-generated") Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat --- drivers/gpu/drm/vmwgfx/ttm_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vmwgfx/ttm_object.c b/drivers/gpu/drm/vmwgfx/ttm_object.c index 36990b80e790..16077785a

[PATCH 1/6] drm/vmwgfx: Don't send drm sysfs hotplug events on initial master set

2019-05-21 Thread Thomas Hellstrom
This may confuse user-space clients like plymouth that opens a drm file descriptor as a result of a hotplug event and then generates a new event... Cc: Fixes: 5ea1734827bb ("drm/vmwgfx: Send a hotplug event at master_set") Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat --

Re: [PATCH] drm/vmwgfx: integer underflow in vmw_cmd_dx_set_shader() leading to an invalid read

2019-05-20 Thread Thomas Hellstrom
Thanks, Murray, I'll include in the next vmwgfx-fixes pull request. On Mon, 2019-05-20 at 21:57 +1200, Murray McAllister wrote: > If SVGA_3D_CMD_DX_SET_SHADER is called with a shader ID > of SVGA3D_INVALID_ID, and a shader type of > SVGA3D_SHADERTYPE_INVALID, the calculated binding.shader_slot >

[PATCH v2] drm/ttm, drm/vmwgfx: Use a configuration option for the TTM dma page pool

2019-05-16 Thread Thomas Hellstrom
Drivers like vmwgfx may want to test whether the dma page pool is present or not. Since it's activated by default by TTM if compiled-in, define a hidden configuration option that the driver can test for. Cc: Christian König Signed-off-by: Thomas Hellstrom Reviewed-by: Christian König

Re: [PATCH] drm/ttm, drm/vmwgfx: Use a configuration option for the TTM dma page pool

2019-05-16 Thread Thomas Hellstrom
On Thu, 2019-05-16 at 12:05 +0200, Christian König wrote: > Am 16.05.19 um 11:23 schrieb Thomas Hellstrom: > > Drivers like vmwgfx may want to test whether the dma page pool is > > present > > or not. Since it's activated by default by TTM if compiled-in, > > define

[PATCH] drm/ttm, drm/vmwgfx: Use a configuration option for the TTM dma page pool

2019-05-16 Thread Thomas Hellstrom
Drivers like vmwgfx may want to test whether the dma page pool is present or not. Since it's activated by default by TTM if compiled-in, define a hidden configuration option that the driver can test for. Cc: Christian König Signed-off-by: Thomas Hellstrom --- drivers/gpu/drm/Kconfig

Re: [PATCH] drm/vmwgfx: NULL pointer dereference from vmw_cmd_dx_view_define()

2019-05-13 Thread Thomas Hellstrom
On Sat, 2019-05-11 at 18:01 +1200, Murray McAllister wrote: > If SVGA_3D_CMD_DX_DEFINE_RENDERTARGET_VIEW is called with a surface > ID of SVGA3D_INVALID_ID, the srf struct will remain NULL after > vmw_cmd_res_check(), leading to a null pointer dereference in > vmw_view_add(). > > Signed-off-by:

Re: [PATCH 1/2] drm/ttm: fix busy memory to fail other user v6

2019-05-08 Thread Thomas Hellstrom
On 5/7/19 1:42 PM, Koenig, Christian wrote: Am 07.05.19 um 13:37 schrieb Thomas Hellstrom: [CAUTION: External Email] On 5/7/19 1:24 PM, Christian König wrote: Am 07.05.19 um 13:22 schrieb zhoucm1: On 2019年05月07日 19:13, Koenig, Christian wrote: Am 07.05.19 um 13:08 schrieb zhoucm1: On 2019

Re: [PATCH 1/2] drm/ttm: fix busy memory to fail other user v6

2019-05-07 Thread Thomas Hellstrom
On 5/7/19 1:24 PM, Christian König wrote: Am 07.05.19 um 13:22 schrieb zhoucm1: On 2019年05月07日 19:13, Koenig, Christian wrote: Am 07.05.19 um 13:08 schrieb zhoucm1: On 2019年05月07日 18:53, Koenig, Christian wrote: Am 07.05.19 um 11:36 schrieb Chunming Zhou: heavy gpu job could occupy

[PATCH 3/9] mm: Add write-protect and clean utilities for address space ranges v3

2019-04-27 Thread Thomas Hellstrom
ut pending tlb flushes. Cc: Andrew Morton Cc: Matthew Wilcox Cc: Will Deacon Cc: Peter Zijlstra Cc: Rik van Riel Cc: Minchan Kim Cc: Michal Hocko Cc: Huang Ying Cc: Souptick Joarder Cc: "Jérôme Glisse" Cc: linux...@kvack.org Cc: linux-ker...@vger.kernel.org Signed-off-

Re: [PATCH] Revert "drm/qxl: drop prime import/export callbacks"

2019-04-26 Thread Thomas Hellstrom
On 4/26/19 4:21 PM, Daniel Vetter wrote: On Fri, Apr 26, 2019 at 7:33 AM Gerd Hoffmann wrote: This reverts commit f4c34b1e2a37d5676180901fa6ff188bcb6371f8. Simliar to commit a0cecc23cfcb Revert "drm/virtio: drop prime import/export callbacks". We have to do the same with qxl, for the same

[git pull] vmwgfx-fixes-5.1

2019-04-25 Thread Thomas Hellstrom
git://people.freedesktop.org/~thomash/linux vmwgfx-fixes-5.1 for you to fetch changes up to 81103355b1e23345dbcdeccad59962a424da4a34: drm/vmwgfx: Fix dma API layer violation (2019-04-25 09:05:03 +0200) ---- Thomas Hellstrom (1):

Re: [PATCH 4/9] drm/ttm: Allow the driver to provide the ttm struct vm_operations_struct

2019-04-25 Thread Thomas Hellstrom
Hi, Christian, On Wed, 2019-04-24 at 16:20 +0200, Thomas Hellström wrote: > On Wed, 2019-04-24 at 14:10 +, Koenig, Christian wrote: > > Am 24.04.19 um 14:00 schrieb Thomas Hellstrom: > > > Add a pointer to the struct vm_operations_struct in the > > > bo_dev

[git pull] vmwgfx-fixes-5.1

2019-04-25 Thread Thomas Hellstrom
git://people.freedesktop.org/~thomash/linux vmwgfx-fixes-5.1 for you to fetch changes up to 81103355b1e23345dbcdeccad59962a424da4a34: drm/vmwgfx: Fix dma API layer violation (2019-04-25 09:05:03 +0200) ---- Thomas Hellstrom (1):

Re: [PATCH 4/9] drm/ttm: Allow the driver to provide the ttm struct vm_operations_struct

2019-04-24 Thread Thomas Hellstrom
On Wed, 2019-04-24 at 14:10 +, Koenig, Christian wrote: > Am 24.04.19 um 14:00 schrieb Thomas Hellstrom: > > Add a pointer to the struct vm_operations_struct in the bo_device, > > and > > assign that pointer to the default value currently used. > > > > The

[PATCH 9/9] drm/vmwgfx: Add surface dirty-tracking callbacks v2

2019-04-24 Thread Thomas Hellstrom
Add the callbacks necessary to implement emulated coherent memory for surfaces. Add a flag to the gb_surface_create ioctl to indicate that surface memory should be coherent. Also bump the drm minor version to signal the availability of coherent surfaces. Signed-off-by: Thomas Hellstrom Reviewed

[PATCH 6/9] drm/vmwgfx: Implement an infrastructure for write-coherent resources v2

2019-04-24 Thread Thomas Hellstrom
This infrastructure will, for coherent resources, make sure that from the user-space point of view, data written by the CPU is immediately automatically available to the GPU at resource validation time. Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat --- v2: Minor documentation

[PATCH 4/9] drm/ttm: Allow the driver to provide the ttm struct vm_operations_struct

2019-04-24 Thread Thomas Hellstrom
Add a pointer to the struct vm_operations_struct in the bo_device, and assign that pointer to the default value currently used. The driver can then optionally modify that pointer and the new value can be used for each new vma created. Cc: "Christian König" Signed-off-by: Thomas

[PATCH 0/9] Emulated coherent graphics memory v2

2019-04-24 Thread Thomas Hellstrom
Graphics APIs like OpenGL 4.4 and Vulkan require the graphics driver to provide coherent graphics memory, meaning that the GPU sees any content written to the coherent memory on the next GPU operation that touches that memory, and the CPU sees any content written by the GPU to that memory

[PATCH 7/9] drm/vmwgfx: Use an RBtree instead of linked list for MOB resources

2019-04-24 Thread Thomas Hellstrom
With emulated coherent memory we need to be able to quickly look up a resource from the MOB offset. Instead of traversing a linked list with O(n) worst case, use an RBtree with O(log n) worst case complexity. Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat --- drivers/gpu/drm/vmwgfx

[PATCH 5/9] drm/ttm: TTM fault handler helpers v2

2019-04-24 Thread Thomas Hellstrom
ode into helpers: ttm_bo_vm_fault_reserved() and ttm_bo_vm_reserve(), and provide a default TTM fault handler for other drivers to use. Cc: "Christian König" Signed-off-by: Thomas Hellstrom Reviewed-by: "Christian König" #v1 --- v2: Remove some unnecessary code pointed out in r

[PATCH 8/9] drm/vmwgfx: Implement an infrastructure for read-coherent resources v2

2019-04-24 Thread Thomas Hellstrom
Similar to write-coherent resources, make sure that from the user-space point of view, GPU rendered contents is automatically available for reading by the CPU. Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat --- v2: Comment- and formatting fixes. --- drivers/gpu/drm/vmwgfx

  1   2   3   4   5   6   7   8   9   10   >