From: Maaz Mombasawala
Update vmwgfx_drm.h with SPDX-License-Identifier:
(GPL-2.0 WITH Linux-syscall-note) OR MIT
Signed-off-by: Maaz Mombasawala
Reviewed-by: Martin Krastev
Signed-off-by: Maaz Mombasawala (VMware)
---
include/uapi/drm/vmwgfx_drm.h | 1 +
1 file changed, 1 insertion
: Maaz Mombasawala (VMware)
---
drivers/gpu/drm/vmwgfx/ttm_object.c | 6 +++---
drivers/gpu/drm/vmwgfx/ttm_object.h | 3 +--
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 17 ++---
include/uapi/drm/vmwgfx_drm.h | 5 +++--
4 files changed, 13 insertions(+), 18 deletions
ac97_codec ac97_bus snd_pcm
gameport>
CPU: 2 PID: 2632 Comm: vmw_ref_count Not tainted 6.5.0-rc2-vmwgfx #1
Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference
Platform, BIOS 6.00 11/12/2020
RIP: 0010:refcount_warn_saturate+0xfb/0x150
Code: eb 9e 0f b6 1d 8b 5b a6 01 80 fb 01 0
LGTM!
Reviewed-by: Maaz Mombasawala
Maaz Mombasawala (VMware)
On 8/17/2023 9:13 PM, Zack Rusin wrote:
From: Zack Rusin
vmw_bo_unreference sets the input buffer to null on exit, resulting in
null ptr deref's on the subsequent drm gem put calls.
This went unnoticed because only ver
From: Martin Krastev
LGTM!
Reviewed-by: Martin Krastev
Regards,
Martin
On 18 Aug 2023 04:13:14, Zack Rusin wrote:
>From: Zack Rusin
>
>vmw_bo_unreference sets the input buffer to null on exit, resulting in
>null ptr deref's on the subsequent drm gem put calls.
>
>This went unnoticed be
From: Martin Krastev
Looks good.
Reviewed-by: Martin Krastev
Regards,
Martin
On 27.06.23 г. 6:58 ч., Zack Rusin wrote:
From: Zack Rusin
Atomic modesetting got support for mouse hotspots via the hotspot
properties. Port the legacy kms hotspot handling to the new properties
on cursor pl
.
if ever, checking the upper bound on the shader stages but never a lower
bound (valid shader stages start at 1 not 0).
Fixes kernel oopses ending up in vmw_binding_add, e.g.:
Oops: [#1] PREEMPT SMP PTI
CPU: 1 PID: 2443 Comm: testcase Not tainted 6.3.0-rc4-vmwgfx #1
Hardware name: VMware, Inc
LGTM.
Reviewed-by: Maaz Mombasawala
Maaz Mombasawala (VMware)
On 6/16/2023 12:09 PM, Zack Rusin wrote:
From: Zack Rusin
For multiple commands the driver was not correctly validating the shader
stages resulting in possible kernel oopses. The validation code was only.
if ever, checking the
crashes by making sure the device supports vblank before using
it.
Fixes crashes on boot, as in:
Oops: [#1] PREEMPT SMP PTI
CPU: 0 PID: 377 Comm: systemd-modules Not tainted 6.3.0-rc4-vmwgfx #1
Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference
Platform, BIOS 6.00 11
> __printf(1, 2) int vmw_host_printf(const char *fmt, ...);
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
> b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
> index ca1a3fe44fa5..2651fe0ef518 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
> @@ -1179,3 +1179,12 @@ int vmw_mksstat_remove_ioctl(struct drm_device *dev,
> void *data,
>
> return -EAGAIN;
> }
> +
> +/**
> + * vmw_disable_backdoor: Disables all backdoor communication
> + * with the hypervisor.
> + */
> +void vmw_disable_backdoor(void)
> +{
> + vmw_msg_enabled = 0;
> +}
LGTM
Reviewed-by: Maaz Mombasawala
--
Maaz Mombasawala (VMware)
From: Martin Krastev
LGTM!
Reviewed-by: Martin Krastev
Regards,
Martin
On 21.03.23 г. 4:09 ч., Zack Rusin wrote:
From: Zack Rusin
virtualbox implemented an incomplete version of the svga device which
they decided to drop soon after the initial release. The device was
always broken in
From: Martin Krastev
We reviewers botched that one.
Reviewed-by: Martin Krastev
Regards,
Martin
On 14.03.23 г. 23:14 ч., Zack Rusin wrote:
From: Zack Rusin
The src/dst_pitch got mixed up during the rework of the function, make
sure the offset's refer to the correct one.
Spotted by cla
From: Martin Krastev
Much nicer now.
Reviewed-by: Martin Krastev
Regards,
Martin
On 8.02.23 г. 20:00 ч., Zack Rusin wrote:
From: Zack Rusin
ttm_bo_init_reserved on failure puts the buffer object back which
causes it to be deleted, but kfree was still being called on the same
buffer in vmw
From: Martin Krastev
LGTM
Reviewed-by: Martin Krastev
Regards,
Martin
On 9.02.23 г. 14:37 ч., Zack Rusin wrote:
From: Zack Rusin
v2: Update the commit message to include note describing why the second
usag of vmw_gem_object_create_with_handle in vmwgfx_surface.c wasn't
changed
It is pos
From: Martin Krastev
Looks good to me.
Reviewed-by: Martin Krastev
Regards,
Martin
On 8.02.23 г. 23:53 ч., Zack Rusin wrote:
From: Zack Rusin
It is possible for userspace to predict the next buffer handle and
to destroy the buffer while it's still used by the kernel. Delay
dropping the
vmw_bo_create(dev_priv, ¶ms, p_vbo);
> -
> - (*p_vbo)->tbo.base.funcs = &vmw_gem_object_funcs;
> if (ret != 0)
> goto out_no_bo;
>
> + (*p_vbo)->tbo.base.funcs = &vmw_gem_object_funcs;
> +
> ret = drm_gem_handle_create(filp, &(*p_vbo)->tbo.base, handle);
> /* drop reference from allocate - handle holds it now */
> drm_gem_object_put(&(*p_vbo)->tbo.base);
LGTM!
Reviewed-by: Maaz Mombasawala
--
Maaz Mombasawala (VMware)
x/vmwgfx_surface.c
> @@ -867,7 +867,6 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void
> *data,
> goto out_unlock;
> }
> vmw_bo_reference(res->guest_memory_bo);
> - drm_gem_object_get(&res->guest_memory_bo->tbo.base);
> }
>
> tmp = vmw_resource_reference(&srf->res);
LGTM!
Reviewed-by: Maaz Mombasawala
--
Maaz Mombasawala (VMware)
On 1/30/23 19:35, Zack Rusin wrote:
> From: Zack Rusin
>
> Various bits of the driver used raw ttm_buffer_object instead of the
> driver specific vmw_bo object. All those places used to duplicate
> the mapped bo caching policy of vmw_bo.
>
> Instead of duplicating all of that code and special ca
dst_pitch = ddirty->pitch;
> + dst_bo = &ddirty->buf->base;
> + dst_offset = ddirty->fb_top * src_pitch + ddirty->fb_left * stdu->cpp;
>
> (void) vmw_bo_cpu_blit(dst_bo, dst_offset, dst_pitch,
> src_bo, src_of
_mapped) {
> vmw_bo_unmap(vps->surf->res.backup);
> vps->surf_mapped = false;
> }
>
> - if (vps->bo && ttm_kmap_obj_virtual(&vps->bo->map, &dummy)) {
> + if (vps->bo && ttm_kmap_obj_virtual(&vps->bo->map, &is_iomem)) {
> const int ret = ttm_bo_reserve(&vps->bo->base, true, false,
> NULL);
>
> if (likely(ret == 0)) {
LGTM!
Reviewed-by: Maaz Mombasawala
--
Maaz Mombasawala (VMware)
gt; *plane,
> hotspot_x, hotspot_y);
> }
>
> - if (vps->bo) {
> - if (ttm_kmap_obj_virtual(&vps->bo->map, &dummy))
> - atomic_dec(&vps->bo->base_mapped_count);
> - }
> -
> du->cursor_x = new_state->crtc_x + du->set_gui_x;
> du->cursor_y = new_state->crtc_y + du->set_gui_y;
>
LGTM!
Reviewed-by: Maaz Mombasawala
--
Maaz Mombasawala (VMware)
vmw_private *dev_priv,
> if (ret)
> return ERR_PTR(ret);
>
> - vfb->pin = vmw_framebuffer_pin;
> - vfb->unpin = vmw_framebuffer_unpin;
> -
> return vfb;
> }
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
> b/dr
s/gpu/drm/vmwgfx/vmwgfx_bo.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
> @@ -1,7 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0 OR MIT
> /**
> *
> - * Copyright © 2011-2018 VMware, Inc., Palo Alto, CA., USA
> + * Copyright © 2011-2023 VMware,
scrn.c
> @@ -445,7 +445,7 @@ vmw_sou_primary_plane_prepare_fb(struct drm_plane *plane,
> vmw_overlay_pause_all(dev_priv);
> ret = vmw_bo_create(dev_priv, size,
> &vmw_vram_placement,
> - false, true, &vmw_bo_bo_free, &vps->bo);
> + false, true, &vps->bo);
> vmw_overlay_resume_all(dev_priv);
> if (ret) {
> vps->bo = NULL; /* vmw_bo_init frees on error */
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
> b/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
> index 108a496b5d18..93b1400aed4a 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
> @@ -893,7 +893,7 @@ int vmw_compat_shader_add(struct vmw_private *dev_priv,
> return -EINVAL;
>
> ret = vmw_bo_create(dev_priv, size, &vmw_sys_placement,
> - true, true, vmw_bo_bo_free, &buf);
> + true, true, &buf);
> if (unlikely(ret != 0))
> goto out;
>
LGTM!
Reviewed-by: Maaz Mombasawala
--
Maaz Mombasawala (VMware)
drm/vmwgfx/vmwgfx_ttm_glue.c
> deleted file mode 100644
> index 265f7c48d856..
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
> +++ /dev/null
> @@ -1,110 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0 OR MIT
> -/
From: Martin Krastev
LGTM!
Reviewed-by: Martin Krastev
Regards,
Martin
On 31.01.23 г. 5:35 ч., Zack Rusin wrote:
From: Zack Rusin
Various bits of the driver used raw ttm_buffer_object instead of the
driver specific vmw_bo object. All those places used to duplicate
the mapped bo caching
From: Martin Krastev
LGTM
Reviewed-by: Martin Krastev
Regards,
Martin
On 31.01.23 г. 5:35 ч., Zack Rusin wrote:
From: Zack Rusin
Rename dummy to is_iomem because that's what it is even if we're not
activelly using it. Makes the code easier to read.
Signed-off-by: Zack Rusin
---
driv
*/
-int vmw_kms_stdu_dma(struct vmw_private *dev_priv,
-struct drm_file *file_priv,
-struct vmw_framebuffer *vfb,
-struct drm_vmw_fence_rep __user *user_fence_rep,
-struct drm_clip_rect *clips,
-struct
file mode 100644
index 265f7c48d856..
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
+++ /dev/null
@@ -1,110 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0 OR MIT
-/**
- *
- * Copyright 2009-2011 VMware, Inc
From: Martin Krastev
Ah, good!
Reviewed-by: Martin Krastev
Regards,
Martin
On 26.01.23 г. 19:38 ч., Zack Rusin wrote:
From: Zack Rusin
Base mapped count is useless because the ttm unmap functions handle
null maps just fine so completely remove all the code related to it.
Rename dummy to
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 OR MIT */
/******
*
- * Copyright 2009-2022 VMware, Inc., Palo Alto, CA., USA
+ * Copyright 2009-2023 VMware, Inc., Palo Alto, CA., USA
*
* Permission is hereby granted, free of charge, to any person obtaining
/**
*
- * Copyright © 2011-2018 VMware, Inc., Palo Alto, CA., USA
+ * Copyright © 2011-2023 VMware, Inc., Palo Alto, CA., USA
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -26,55 +26,54
From: Martin Krastev
LGTM!
Reviewed-by: Martin Krastev
Regards,
Martin
On 26.01.23 г. 19:38 ч., Zack Rusin wrote:
From: Zack Rusin
Remove the explicit bo_free parameter which was switching between
vmw_bo_bo_free and vmw_gem_destroy which had exactly the same
implementation.
It makes no
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
+++ /dev/null
@@ -1,110 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0 OR MIT
-/**
- *
- * Copyright 2009-2011 VMware, Inc., Palo Alto, CA., USA
- *
- * Permission is hereby granted, free of
From: Martin Krastev
LGTM!
Reviewed-by: Martin Krastev
Regards,
Martin
On 11.01.23 г. 19:50 ч., Zack Rusin wrote:
From: Zack Rusin
The branch is explicitly taken if ttm == NULL which means that to avoid
a null pointer reference the ttm object can not be used inside. Switch
back to dst_m
+ vmw_val_add_flag_none);
> + if (unlikely(ret != 0)){
> + vmw_resource_unreference(&res);
> return ret;
> + }
>
> sw_context->dx_ctx_node = vmw_execbuf_info_from_res(sw_context, res);
> sw_context->man = vmw_context_res_man(res);
>
> + vmw_resource_unreference(&res);
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
> b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
> index f66caa540e14..c7d645e5ec7b 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
> @@ -281,39 +281,6 @@ int vmw_user_resource_lookup_handle(struct vmw_private
> *dev_priv,
> return ret;
> }
>
> -/**
> - * vmw_user_resource_noref_lookup_handle - lookup a struct resource from a
> - * TTM user-space handle and perform basic type checks
> - *
> - * @dev_priv: Pointer to a device private struct
> - * @tfile:Pointer to a struct ttm_object_file identifying the caller
> - * @handle: The TTM user-space handle
> - * @converter:Pointer to an object describing the resource type
> - *
> - * If the handle can't be found or is associated with an incorrect resource
> - * type, -EINVAL will be returned.
> - */
> -struct vmw_resource *
> -vmw_user_resource_noref_lookup_handle(struct vmw_private *dev_priv,
> - struct ttm_object_file *tfile,
> - uint32_t handle,
> - const struct vmw_user_resource_conv
> - *converter)
> -{
> - struct ttm_base_object *base;
> -
> - base = ttm_base_object_noref_lookup(tfile, handle);
> - if (!base)
> - return ERR_PTR(-ESRCH);
> -
> - if (unlikely(ttm_base_object_type(base) != converter->object_type)) {
> - ttm_base_object_noref_release();
> - return ERR_PTR(-EINVAL);
> - }
> -
> - return converter->base_obj_to_res(base);
> -}
> -
> /*
> * Helper function that looks either a surface or bo.
> *
--
Maaz Mombasawala (VMware)
From: Martin Krastev
Looks good!
Reviewed-by: Martin Krastev
Regards,
Martin
On 7.12.22 г. 19:29 ч., Zack Rusin wrote:
From: Zack Rusin
User resource lookups used rcu to avoid two extra atomics. Unfortunately
the rcu paths were buggy and it was easy to make the driver crash by
submitt
gt; struct drm_device *dev = &dev_priv->drm;
> int i;
>
> + /* Screen objects won't work if GMR's aren't available */
> + if (!dev_priv->has_gmr)
> + return -ENOSYS;
> +
> if (!(dev_priv->capabilities & SVGA_CAP_SCREEN_OBJECT_2)) {
> return -ENOSYS;
> }
LGTM
--
Maaz Mombasawala (VMware)
From: Martin Krastev
LGTM!
Reviewed-by: Martin Krastev
Regards,
Martin
On 1.12.22 г. 19:53 ч., Zack Rusin wrote:
From: Zack Rusin
When SEV is enabled gmr's and mob's are explicitly disabled because
the encrypted system memory can not be used by the hypervisor.
The driver was disabli
From: Martin Krastev
Looks great!
Reviewed-by: Martin Krastev
Regards,
Martin
On 9.11.22 г. 17:37 ч., Dawei Li wrote:
pin_user_pages() is unsafe without protection of mmap_lock,
fix it by calling pin_user_pages_fast().
Fixes: 7a7a933edd6c ("drm/vmwgfx: Introduce VMware mks-guest-
is unsafe without protection of mmap_lock,
fix it by calling mmap_read_lock() & mmap_read_unlock().
2) fix & refactor the incorrect exception handling procedure in
vmw_mksstat_add_ioctl().
Fixes: 7a7a933edd6c ("drm/vmwgfx: Introduce VMware mks-guest-stats")
Signed-off
> * This function copies fence information to user-space. If copying fails,
> the
> * user-space struct drm_vmw_fence_rep::error member is hopefully left
--
Looks good.
Reviewed-by: Maaz Mombasawala
Maaz Mombasawala (VMware)
From: Martin Krastev
On 21.10.22 г. 6:44 ч., Zack Rusin wrote:
From: Zack Rusin
Fixes a warning about extra docs about a function argument that has been
removed a while back:
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:3888: warning: Excess function
parameter 'sync_file' description in 'vmw_exec
mleak.
Fixes: 7a7a933edd6c ("drm/vmwgfx: Introduce VMware mks-guest-stats")
Signed-off-by: Rafael Mendonca
---
drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
ind
From: Martin Krastev
On 12.07.22 г. 6:32 ч., Zack Rusin wrote:
From: Zack Rusin
Atomic modesetting got support for mouse hotspots via the hotspot
properties. Port the legacy kms hotspot handling to the new properties
on cursor planes.
Signed-off-by: Zack Rusin
Cc: Martin Krastev
Cc: Maaz
From: Martin Krastev
On 2.06.22 г. 18:42 ч., Zack Rusin wrote:
From: Zack Rusin
Atomic modesetting got support for mouse hotspots via the hotspot
properties. Drivers need to create those properties on cursor planes
which require the mouse hotspot coordinates.
Add the code creating hotspot pr
h XA state tracker which is used for xrender
acceleration on xf86-video-vmware, apps/tests which use a lot of
memory (a good test being the piglit's streaming-texture-leak) and
desktops.
Signed-off-by: Zack Rusin
Fixes: 8afa13a0583f ("drm/vmwgfx: Implement DRIVER_GEM")
Reporte
Dave, Daniel
One important fix for recent breakage.
The following changes since commit a1b8638ba1320e6684aa98233c15255eb803fac7:
Linux 5.9-rc7 (2020-09-27 14:38:10 -0700)
are available in the Git repository at:
git://people.freedesktop.org/~sroland/linux vmwgfx-fixes-5.9
for you to fetch
From: Zack Rusin
ttm_mem_type_manager_func.get_node was changed to return -ENOSPC
instead of setting the node pointer to NULL. Unfortunately
vmwgfx still had two places where it was explicitly converting
-ENOSPC to 0 causing regressions. This fixes those spots by
allowing -ENOSPC to be returned.
Dave, Daniel,
vmwgfx fixes pull for 5.9.
The drm_mode_config_reset patches are very important fixing a recently
introduced kernel crash, the others fix various older issues which are
a bit less serious in practice.
(Although still pending a solution for the other crash introduced by
2ddef17678bc2e
From: Roland Scheidegger
Same problem as in stdu, same fix.
Fixes: 51f644b40b4b ("drm/atomic-helper: reset vblank on crtc reset")
Acked-by: Charmaine Lee
Reviewed-by: Zack Rusin
Signed-off-by: Roland Scheidegger
---
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 8 ++--
1 file changed, 2 insertio
From: Roland Scheidegger
Same problem as in stdu, same fix.
Fixes: 51f644b40b4b ("drm/atomic-helper: reset vblank on crtc reset")
Acked-by: Charmaine Lee
Reviewed-by: Zack Rusin
Signed-off-by: Roland Scheidegger
---
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 9 ++---
1 file changed, 2 insert
Dave, Daniel,
vmwgfx-fixes pull for 5.8.
Just one fix for now, but it's a really important one, causing black
screens in VMs (sometimes on boot), hence marking it for stable.
The following changes since commit 1f054fd26e29784d373c3d29c348ee48f1c41fb2:
drm/vmwgfx: fix update of display surface
From: Roland Scheidegger
The assignment of metadata overwrote the new display resolution values,
hence we'd miss the size actually changed and wouldn't redefine the
surface. This would then lead to command buffer error when trying to
update the screen target (due to the size mismatch), and result
Dave, Daniel
Some minor fixes and a maintainer change.
The following changes since commit 24085f70a6e1b0cb647ec92623284641d8270637:
Merge tag 'trace-v5.7-rc4' of
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace (2020-05-12
11:06:26 -0700)
are available in the Git repository
Dave, Christian,
Could any of you pick this up (I'm currently on vacation) to have a
chance of getting it in before -rc1?
Thanks,
Thomas
On 4/9/20 6:49 PM, Thomas Hellström (VMware) wrote:
From: "Thomas Hellstrom (VMware)"
With amdgpu and CONFIG_TRANSPARENT_HUGEPAGE_ALWA
From: "Thomas Hellstrom (VMware)"
With amdgpu and CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y, there are
errors like:
BUG: non-zero pgtables_bytes on freeing mm
and:
BUG: Bad rss-counter state
with TTM transparent huge-pages.
Until we've figured out what other TTM drivers do differen
On 4/8/20 2:19 PM, Christian König wrote:
Am 08.04.20 um 14:01 schrieb Thomas Hellström (VMware):
Hi, Christian,
On 4/8/20 1:53 PM, Thomas Hellström (VMware) wrote:
From: "Thomas Hellstrom (VMware)"
With amdgpu and CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y, there are
errors like:
BUG
Hi, Christian,
On 4/8/20 1:53 PM, Thomas Hellström (VMware) wrote:
From: "Thomas Hellstrom (VMware)"
With amdgpu and CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y, there are
errors like:
BUG: non-zero pgtables_bytes on freeing mm
and:
BUG: Bad rss-counter state
with TTM transparent huge-pa
From: "Thomas Hellstrom (VMware)"
With amdgpu and CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y, there are
errors like:
BUG: non-zero pgtables_bytes on freeing mm
and:
BUG: Bad rss-counter state
with TTM transparent huge-pages.
Until we've figured out what other TTM drivers do differen
On 4/7/20 5:36 PM, Alex Xu (Hello71) wrote:
Excerpts from Thomas Hellström (VMware)'s message of April 7, 2020 7:26 am:
On 4/7/20 2:38 AM, Alex Xu (Hello71) wrote:
Excerpts from Thomas Hellström (VMware)'s message of April 6, 2020 5:04 pm:
Hi,
On 4/6/20 9:51 PM, Alex Xu (Hell
On 4/7/20 2:38 AM, Alex Xu (Hello71) wrote:
Excerpts from Thomas Hellström (VMware)'s message of April 6, 2020 5:04 pm:
Hi,
On 4/6/20 9:51 PM, Alex Xu (Hello71) wrote:
Using 314b658 with amdgpu, starting sway and firefox causes "BUG: Bad
rss-counter state" and "BUG: non-ze
the attached patch, that'd be great!
Thanks,
Thomas
>From b630b9b4dcc1d01514d97a84cbb7f0cb85333154 Mon Sep 17 00:00:00 2001
From: "Thomas Hellstrom (VMware)"
Date: Mon, 6 Apr 2020 22:55:13 +0200
Subject: [PATCH] drm/ttm: Temporarily disable the huge_fault() callback
Signed-off-by
On 4/6/20 9:51 PM, Alex Xu (Hello71) wrote:
Using 314b658 with amdgpu, starting sway and firefox causes "BUG: Bad
rss-counter state" and "BUG: non-zero pgtables_bytes on freeing mm" to
start filling dmesg, and then closing programs causes more BUGs and
hangs, and then everything grinds to a halt
s to align buffer objects (2020-03-24 18:50:35
+0100)
----
Thomas Hellstrom (VMware) (9):
fs: Constify vma argument to vma_is_dax
mm: Introduce vma_is_special_huge
mm: Split huge pages on write-notify or COW
mm: Add vmf_insert_pfn_xxx_prot() for huge page-tabl
From: Thomas Hellstrom (VMware)
In order to reduce CPU usage [1] and in theory TLB misses this patchset enables
huge- and giant page-table entries for TTM and TTM-enabled graphics drivers.
Patch 1 and 2 introduce a vma_is_special_huge() function to make the mm code
take the same path as DAX
From: "Thomas Hellstrom (VMware)"
Support huge (PMD-size and PUD-size) page-table entries by providing a
huge_fault() callback.
We still support private mappings and write-notify by splitting the huge
page-table entries on write-access.
Note that for huge page-faults to occur, either
From: "Thomas Hellstrom (VMware)"
For VM_PFNMAP and VM_MIXEDMAP vmas that want to support transhuge pages
and -page table entries, introduce vma_is_special_huge() that takes the
same codepaths as vma_is_dax().
The use of "special" follows the definition in memory.c, vm_nor
From: "Thomas Hellstrom (VMware)"
The functions wp_huge_pmd() and wp_huge_pud() currently relies on the
huge_fault() callback to split huge page table entries if needed.
However for module users that requires export of the split_huge_xxx()
functionality which may be undesired. Instead
From: "Thomas Hellstrom (VMware)"
For graphics drivers needing to modify the page-protection, add
huge page-table entries counterparts to vmf_insert_pfn_prot().
Cc: Andrew Morton
Cc: Michal Hocko
Cc: "Matthew Wilcox (Oracle)"
Cc: "Kirill A. Shutemov"
Cc: Ralp
From: "Thomas Hellstrom (VMware)"
Using huge page-table entries requires that the physical address of the
start of a buffer object is huge page size aligned.
Make a special version of the TTM range manager that accomplishes this,
but falls back to a smaller page size alignment (PUD
From: "Thomas Hellstrom (VMware)"
Start using the helpers that align buffer object user-space addresses and
buffer object vram addresses to huge page boundaries.
This is to improve the chances of allowing huge page-table entries.
Cc: Andrew Morton
Cc: Michal Hocko
Cc: "Matthew
From: "Thomas Hellstrom (VMware)"
With vmwgfx dirty-tracking we need a specialized huge_fault
callback. Implement and hook it up.
Cc: Andrew Morton
Cc: Michal Hocko
Cc: "Matthew Wilcox (Oracle)"
Cc: "Kirill A. Shutemov"
Cc: Ralph Campbell
Cc: "Jérôme Glis
From: "Thomas Hellstrom (VMware)"
Unaligned virtual addresses makes it unlikely that huge page-table entries
can be used.
So align virtual buffer object address huge page boundaries to the
underlying physical address huge page boundaries taking buffer object
sizes into account to dete
From: "Thomas Hellstrom (VMware)"
The function is used by upcoming vma_is_special_huge() with which we want
to use a const vma argument. Since for vma_is_dax() the vma argument is
only dereferenced for reading, constify it.
Cc: Andrew Morton
Cc: Michal Hocko
Cc: "Matthew Wilco
On 3/4/20 11:28 AM, Thomas Hellström (VMware) wrote:
In order to reduce CPU usage [1] and in theory TLB misses this patchset enables
huge- and giant page-table entries for TTM and TTM-enabled graphics drivers.
Patch 1 and 2 introduce a vma_is_special_huge() function to make the mm code
take
ine to use vmw_surface_metadata
drm/vmwgfx: Add surface define v4 command
drm/vmwgfx: Add SM5 param for userspace
Thomas Hellström (VMware) (1):
drm/vmwgfx: Use vmwgfx version 2.18 to signal SM5 compatibility
drivers/gpu/drm/vmwgfx/Makefile| 2 +-
drivers/gpu/
From: Thomas Hellström (VMware)
Signed-off-by: Thomas Hellström (VMware)
Reviewed-by: Charmaine Lee
Reviewed-by: Brian Paul
Reviewed-by: Roland Scheidegger
Signed-off-by: Roland Scheidegger
___
v2: Use 2.18 instead of 2.17
---
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 2 +-
1 file changed, 1
as only one can be set to context.
v4: Fix comment typos
Signed-off-by: Deepak Rawat
Signed-off-by: Neha Bhende
Reviewed-by: Thomas Hellström (VMware)
Reviewed-by: Roland Scheidegger
Signed-off-by: Roland Scheidegger
---
drivers/gpu/drm/vmwgfx/Makefile | 2 +-
drivers/gpu/drm
From: Deepak Rawat
Instead of having different bool in device private to represent
incremental graphics context capabilities, add a new sm type enum.
v2: Use enum instead of bit flag.
v3: Incorporated review comments.
Signed-off-by: Deepak Rawat
Reviewed-by: Thomas Hellström (VMware
From: Deepak Rawat
Virtual device now supports new shader types, allow them as valid shader
type in command buffer. Also add per shader bind info in binding manager
state for new shader type.
Signed-off-by: Deepak Rawat
Reviewed-by: Thomas Hellström (VMware)
Reviewed-by: Roland Scheidegger
From: Deepak Rawat
A new enum to represent new SM5 graphics context capability in vmwgfx.
v2: use new correct cap bits (merged several later commits into it).
Signed-off-by: Deepak Rawat
Signed-off-by: Thomas Hellström (VMware)
Reviewed-by: Roland Scheidegger
Signed-off-by: Roland
From: Deepak Rawat
Virtual device consider SVGA_CAP_DX and SVGA3D_DEVCAP_DXCONTEXT
independent of each other. Some of the commands in cmd_buf depends on
SVGA_CAP_DX, so better to check for that as well.
Signed-off-by: Deepak Rawat
Reviewed-by: Thomas Hellström (VMware)
Reviewed-by: Roland
From: Deepak Rawat
Add a new param for user-space to determine if kernel module is SM5
capable.
Signed-off-by: Deepak Rawat
Reviewed-by: Thomas Hellström (VMware)
Reviewed-by: Roland Scheidegger
Signed-off-by: Roland Scheidegger
---
drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 3 +++
include
.
Signed-off-by: Deepak Rawat
Reviewed-by: Thomas Hellström (VMware)
Reviewed-by: Roland Scheidegger
Signed-off-by: Roland Scheidegger
---
.../gpu/drm/vmwgfx/device_include/svga3d_devcaps.h | 13 +
drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 11 +++
2 files changed
-by: Deepak Rawat
Reviewed-by: Thomas Hellström (VMware)
Reviewed-by: Roland Scheidegger
Signed-off-by: Roland Scheidegger
---
drivers/gpu/drm/vmwgfx/vmwgfx_binding.c | 36 -
drivers/gpu/drm/vmwgfx/vmwgfx_binding.h | 6 ++---
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 4
From: Deepak Rawat
Create a new structure vmw_surface_metadata representing the metadata
used for creating surface. With this can make the surface_define_priv
a bit cleaner.
Signed-off-by: Deepak Rawat
Reviewed-by: Brian Paul
Reviewed-by: Thomas Hellström (VMware)
Reviewed-by: Roland
From: Deepak Rawat
Makes surface_define cleaner by sending vmw_surface_metadata instead of
all the arguments individually.
v2: fix uninitialized return value, error message
Signed-off-by: Deepak Rawat
Reviewed-by: Brian Paul
Reviewed-by: Thomas Hellström (VMware)
Reviewed-by: Roland
t use deprecated PTR_RET)
Signed-off-by: Deepak Rawat
Signed-off-by: Neha Bhende
Reviewed-by: Thomas Hellström (VMware)
Reviewed-by: Roland Scheidegger
Signed-off-by: Roland Scheidegger
---
drivers/gpu/drm/vmwgfx/vmwgfx_binding.c | 129 -
drivers/gpu/drm/vmwgfx/vmwgfx_bind
From: Deepak Rawat
Logic ops commands are marked as deprecated by virtual device and were
never used by vmwgfx.
Signed-off-by: Deepak Rawat
Reviewed-by: Thomas Hellström (VMware)
Reviewed-by: Roland Scheidegger
Signed-off-by: Roland Scheidegger
---
.../gpu/drm/vmwgfx/device_include
This series updates vmwgfx to support newer vmware svga device protocol
and expose new commands to userspace..
This is required for supporting newer GL4 features in the guest.
This syncs up the device headers, adds support for the new commands,
and also refactors some code (in particular around
Rawat
Reviewed-by: Thomas Hellström (VMware)
Reviewed-by: Roland Scheidegger
Signed-off-by: Roland Scheidegger
---
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 2 ++
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 36 +++--
include/uapi/drm/vmwgfx_drm.h | 12 +
3
From: Deepak Rawat
Validate indirect and dispatch commands in command buffer.
Signed-off-by: Deepak Rawat
Reviewed-by: Thomas Hellström (VMware)
Reviewed-by: Roland Scheidegger
Signed-off-by: Roland Scheidegger
---
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 70 +
1
From: Deepak Rawat
Virtual device added new register for suggested GB memory, read the new
register when available.
Signed-off-by: Deepak Rawat
Reviewed-by: Thomas Hellström (VMware)
Reviewed-by: Roland Scheidegger
Signed-off-by: Roland Scheidegger
---
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
On 3/20/20 12:47 PM, Thomas Hellström (VMware) wrote:
On 3/20/20 12:27 PM, Simon Ser wrote:
On Friday, March 20, 2020 11:59 AM, Thomas Hellström
wrote:
On 3/20/20 10:13 AM, Pekka Paalanen wrote:
It seems people are also forgetting the problem of associating the
cursor plane with an input
/vmwgfx: Add SM5 param for userspace
Thomas Hellström (VMware) (1):
drm/vmwgfx: Use vmwgfx version 2.18 to signal SM5 compatibility
drivers/gpu/drm/vmwgfx/Makefile| 2 +-
drivers/gpu/drm/vmwgfx/device_include/svga3d_cmd.h | 161 -
.../gpu/drm/vmwgfx/device_include
On 3/20/20 12:27 PM, Simon Ser wrote:
On Friday, March 20, 2020 11:59 AM, Thomas Hellström
wrote:
On 3/20/20 10:13 AM, Pekka Paalanen wrote:
On Thu, 19 Mar 2020 23:57:09 +0100
Thomas Hellström (VMware) thomas...@shipmail.org wrote:
Hi,
On 3/19/20 10:07 PM, Simon Ser wrote:
Is that
On 3/20/20 10:13 AM, Pekka Paalanen wrote:
On Thu, 19 Mar 2020 23:57:09 +0100
Thomas Hellström (VMware) wrote:
Hi,
On 3/19/20 10:07 PM, Simon Ser wrote:
Is that something that should be done?
If the hotspot property also had a "disabled" value, then Weston could
set the hotspot t
Hi,
On 3/19/20 10:07 PM, Simon Ser wrote:
Is that something that should be done?
If the hotspot property also had a "disabled" value, then Weston could
set the hotspot to disabled when it is using the cursor plane for
non-cursor content and not lose the feature. And of course set hotspot
correct
On 3/19/20 12:27 AM, Andrew Morton wrote:
On Mon, 16 Mar 2020 13:32:08 +0100 Thomas Hellström (VMware)
wrote:
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Andrew, would it be
1 - 100 of 441 matches
Mail list logo