uot;
> +#define VMWGFX_DRIVER_DATE "20211206"
> #define VMWGFX_DRIVER_MAJOR 2
> -#define VMWGFX_DRIVER_MINOR 19
> +#define VMWGFX_DRIVER_MINOR 20
> #define VMWGFX_DRIVER_PATCHLEVEL 0
> #define VMWGFX_FIFO_STATIC_SIZE (1024*1024)
> #define VMWGFX_MAX_RELOCATIONS 2048
Reviewed-by: Martin Krastev
a_overlay.h | 6 +++---
> drivers/gpu/drm/vmwgfx/device_include/svga_reg.h | 14 --
> 9 files changed, 41 insertions(+), 34 deletions(-)
Reviewed-by: Martin Krastev
9,6 @@ static int vmw_ttm_map_dma(struct vmw_ttm_tt *vmw_tt)
> break;
> }
>
> - old = ~((dma_addr_t) 0);
> - vmw_tt->vsgt.num_regions = 0;
> - for (vmw_piter_start(, vsgt, 0); vmw_piter_next();) {
> - dma_addr_t cur = vmw_piter_dma_addr();
> -
> - if (cur != old + PAGE_SIZE)
> - vmw_tt->vsgt.num_regions++;
> - old = cur;
> - }
> -
> vmw_tt->mapped = true;
> return 0;
>
Reviewed-by: Martin Krastev
vmw_cmd_set_uav(struct vmw_private *dev_priv,
> if (!has_sm5_context(dev_priv))
> return -EINVAL;
>
> - if (num_uav > SVGA3D_MAX_UAVIEWS) {
> + if (num_uav > vmw_max_num_uavs(dev_priv)) {
> VMW_DEBUG_USER("Invalid UAV binding.\n");
> return -EINVAL;
> }
> @@ -2948,7 +2948,7 @@ static int vmw_cmd_set_cs_uav(struct vmw_private
> *dev_priv,
> if (!has_sm5_context(dev_priv))
> return -EINVAL;
>
> - if (num_uav > SVGA3D_MAX_UAVIEWS) {
> + if (num_uav > vmw_max_num_uavs(dev_priv)) {
> VMW_DEBUG_USER("Invalid UAV binding.\n");
> return -EINVAL;
> }
Reviewed-by: Martin Krastev
& drm_vmw_synccpu_allow_cs)) {
> - atomic_dec(_bo->cpu_writers);
> + if (!ret) {
> + if (!(flags & drm_vmw_synccpu_allow_cs)) {
> + atomic_dec(_bo->cpu_writers);
> + }
> + ttm_bo_put(_bo->base);
> }
> - ttm_bo_put(_bo->base);
>
> return ret;
> }
Reviewed-by: Martin Krastev
--
Regards,
Martin
Great catch! That was a nasty one.
Reviewed-by: Martin Krastev
Regards,
Martin
On Sun, Dec 24, 2023 at 7:29 AM Zack Rusin wrote:
> Switch to a new plane state requires unreferencing of all held surfaces.
> In the work required for mob cursors the mapped surfaces started being
&g
on to discover it.
> Niels De Graef who reported it and helped to track down the poc.
>
> Fixes: 9c079b8ce8bf ("drm/vmwgfx: Adapt execbuf to the new validation api")
> Cc: # v4.20+
> Reported-by: Niels De Graef
> Signed-off-by: Zack Rusin
> Cc: Martin Krastev
&g
- const int ret = ttm_bo_reserve(>bo->tbo, true, false,
> NULL);
> -
> - if (likely(ret == 0)) {
> - ttm_bo_kunmap(>bo->map);
> - ttm_bo_unreserve(>bo->tbo);
> - }
> - }
> -
> vmw_du_cursor_plane_unmap_cm(vps);
> vmw_du_put_cursor_mob(vcp, vps);
>
> --
> 2.40.1
>
LGTM!
Reviewed-by: Martin Krastev
Regards,
Martin
as(CC_ATTR_MEM_ENCRYPT))
> dev_priv->map_mode = vmw_dma_alloc_coherent;
> else if (vmw_restrict_iommu)
> dev_priv->map_mode = vmw_dma_map_bind;
> --
> 2.40.1
LGTM!
Reviewed-by: Martin Krastev
Regards,
Martin
On Wed, Apr 3, 2024 at 2:28 AM Zack Rusin wrote:
>
> crc checksums are used to validate the output. Normally they're part
> of the actual display hardware but on virtual stack there's nothing
> to automatically generate them.
>
> Implement crc generation for the vmwgfx stack. This works only on
>
but broken userspace might expect
> +* some actual rendering so give a clue as why it's blank.
> +*/
> + if (new_state->enable && !has_primary)
> + drm_dbg_driver(>drm,
> + "CRTC without a primary plane will be
> blank.\n");
>
>
> if (new_state->connector_mask != connector_mask &&
> --
> 2.40.1
>
LGTM!
Reviewed-by: Martin Krastev
Regards,
Martin
Great to have this!
Reviewed-by: Martin Krastev
Regards,
Martin
On Wed, Apr 3, 2024 at 2:28 AM Zack Rusin wrote:
>
> vmwgfx never supported prime import of external buffers. Furthermore the
> driver exposes two different objects to userspace: vmw_surface's and
> gem buffers but
| 632 +
> drivers/gpu/drm/vmwgfx/vmwgfx_vkms.h | 75 +++
> 17 files changed, 965 insertions(+), 109 deletions(-)
> create mode 100644 drivers/gpu/drm/vmwgfx/vmwgfx_vkms.c
> create mode 100644 drivers/gpu/drm/vmwgfx/vmwgfx_vkms.h
>
> --
> 2.40.1
>
LGTM to the series.
Signed-off-by: Martin Krastev
Regards,
Martin
Good catch!
Reviewed-by: Martin Krastev
Regards,
Martin
On Thu, Apr 25, 2024 at 11:07 PM Ian Forbes wrote:
>
> Legacy DU was broken by the referenced fixes commit because the placement
> and the busy_placement no longer pointed to the same object. This was later
> fixed indirect
LGTM!
Reviewed-by: Martin Krastev
Regards,
Martin
On Thu, Apr 25, 2024 at 10:27 PM Zack Rusin wrote:
>
> Correctly set the length of the drm_event to the size of the structure
> that's actually used.
>
> The length of the drm_event was set to the parent st
On Fri, Apr 12, 2024 at 5:36 PM Martin Krastev
wrote:
>
> On Fri, Apr 12, 2024 at 5:55 AM Zack Rusin wrote:
> >
> > vmwgfx didn't have support for vblank or crc generation which made it
> > impossible to use a large number of IGT tests to properly test DRM
> &g
From: Martin Krastev
LGTM
Reviewed-by: Martin Krastev
Regards,
Martin
On 28.09.23 г. 7:13 ч., Zack Rusin wrote:
From: Zack Rusin
Surfaces can be backed (i.e. stored in) memory objects (mob's) which
are created and managed by the userspace as GEM buffers. Surfaces
grab only a ttm
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.
>
>T
From: Martin Krastev
From: Zack Rusin
Date: Wed, 20 Apr 2022 at 07:03
Subject: [PATCH v2] drm/vmwgfx: Fix gem refcounting and memory evictions
To:
Cc: ,
From: Zack Rusin
v2: Add the last part of the ref count fix which was spotted by
Philipp Sieweck where the ref count of cpu writers
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
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 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
Thank you for the catch!
Reviewed-by: Martin Krastev
Regards,
Martin
On 16.09.22 г. 23:47 ч., Rafael Mendonca wrote:
If the copy of the description string from userspace fails, then the page
for the instance descriptor doesn't get freed before returning -EFAULT,
which leads to a memleak
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
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
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
From: Martin Krastev
LGTM!
Reviewed-by: Martin Krastev
Regards,
Martin
On 26.01.23 г. 19:38 ч., Zack Rusin wrote:
From: Zack Rusin
Before vmwgfx supported gem it needed to implement the entire mmap logic
explicitly. With GEM support that's not needed and the generic code
can be used
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
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
From: Martin Krastev
LGTM!
Reviewed-by: Martin Krastev
Regards,
Martin
On 26.01.23 г. 19:38 ч., Zack Rusin wrote:
From: Zack Rusin
Only the legacy display unit requires pinning of the fb memory in vram.
Both the screen objects and screen targets can present from any buffer.
That makes
From: Martin Krastev
LGTM!
Reviewed-by: Martin Krastev
Regards,
Martin
On 26.01.23 г. 19:38 ч., Zack Rusin wrote:
From: Zack Rusin
The rest of the drivers which are using ttm have mostly standardized on
driver_prefix_bo as the name for subclasses of the TTM buffer object.
Make vmwgfx
From: Martin Krastev
Thanks for the catch. LGTM, with the following remarks:
1) Original design used erroneously pin_user_pages() in place of
pin_user_pages_fast(); you could just substitute pin_user_pages for
pin_user_pages_fast and call it a day, Please, consider that option
after
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-
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
From: Martin Krastev
LGTM
Reviewed-by: Martin Krastev
Regards,
Martin
On 31.01.23 г. 5:35 ч., Zack Rusin wrote:
From: Zack Rusin
Problem with explicit placement selection in vmwgfx is that by the time
the buffer object needs to be validated the information about which
placement
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
Before vmwgfx supported gem it needed to implement the entire mmap logic
explicitly. With GEM support that's not needed and the generic code
can be used
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
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
From: Martin Krastev
LGTM!
Reviewed-by: Martin Krastev
Regards,
Martin
On 5.04.23 г. 7:56 ч., Zack Rusin wrote:
From: Zack Rusin
Many drivers (in particular all of the virtualized drivers) do not
implement vblank handling. Assuming vblank is always present
leads to crashes.
Fix
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
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
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
From: Martin Krastev
Looks good!
Reviewed-by: Martin Krastev
Regards,
Martin
On 16.06.23 г. 22:09 ч., 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
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
45 matches
Mail list logo