Skip to contentSkip to conversation

drm/vmwgfx: Fix Legacy Display Unit

PATCH In review Ian Forbes 3 participants 3 messages Apr 25, 2024 – Apr 26, 2024

Subsystems (4)
lore
Share & tools
lore

Ian Forbes

author
#0 lore raw

PATCH 1/1 drm/vmwgfx: Fix Legacy Display Unit

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 indirectly by commit a78a8da51b36c7a0c0c16233f91d60aac03a5a49 ("drm/ttm: replace busy placement with flags v6") in v6.9.

Fixes 39985eea5a6d ("drm/vmwgfx: Abstract placement selection")
Cc <[email protected]> # v6.4+
---
 drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c +1 -0
index 2bfac3aad7b7..98e73eb0ccf1 100644
@@ -204,6 +204,7 @@ int vmw_bo_pin_in_start_of_vram(struct vmw_private *dev_priv,
 			     VMW_BO_DOMAIN_VRAM,
 			     VMW_BO_DOMAIN_VRAM);
 	buf->places[0].lpfn = PFN_UP(bo->resource->size);
+	buf->busy_places[0].lpfn = PFN_UP(bo->resource->size);
 	ret = ttm_bo_validate(bo, &buf->placement, &ctx);
 
 	/* For some reason we didn't end up at the start of vram */
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 18 lines · Ian Forbes

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 indirectly by commit a78a8da51b36c7a0c0c16233f91d60aac03a5a49 ("drm/ttm: replace busy placement with flags v6") in v6.9.

Fixes 39985eea5a6d ("drm/vmwgfx: Abstract placement selection")
Cc <[email protected]> # v6.4+
---
 drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c +0 -0
index 2bfac3aad7b7..98e73eb0ccf1 100644

drivers/gpu/drm/vmwgfx/vmwgfx_bo.c int vmw_bo_pin_in_start_of_vram(struct vmw_private *dev_priv, · line 210

Quoted 7 lines
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c +1 -0
@@ -204,6 +204,7 @@ int vmw_bo_pin_in_start_of_vram(struct vmw_private *dev_priv,
                             VMW_BO_DOMAIN_VRAM,
                             VMW_BO_DOMAIN_VRAM);
        buf->places[0].lpfn = PFN_UP(bo->resource->size);
+       buf->busy_places[0].lpfn = PFN_UP(bo->resource->size);
        ret = ttm_bo_validate(bo, &buf->placement, &ctx);
 
        /* For some reason we didn't end up at the start of vram */

Looks great. I'll push it through drm-misc-fixes.

z

Reviewed-by on v1 1/1
#2 lore raw
In reply to Ian Forbes

Good catch!

Regards,
Martin

Quoted 28 lines · Ian Forbes

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 indirectly by commit a78a8da51b36c7a0c0c16233f91d60aac03a5a49 ("drm/ttm: replace busy placement with flags v6") in v6.9.

Fixes 39985eea5a6d ("drm/vmwgfx: Abstract placement selection")
Cc <[email protected]> # v6.4+
---
 drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c +1 -1
index 2bfac3aad7b7..98e73eb0ccf1 100644
@@ -204,6 +204,7 @@ int vmw_bo_pin_in_start_of_vram(struct vmw_private *dev_priv,
                             VMW_BO_DOMAIN_VRAM,
                             VMW_BO_DOMAIN_VRAM);
        buf->places[0].lpfn = PFN_UP(bo->resource->size);
+       buf->busy_places[0].lpfn = PFN_UP(bo->resource->size);
        ret = ttm_bo_validate(bo, &buf->placement, &ctx);
 
        /* For some reason we didn't end up at the start of vram */
--

2.34.1