* [PATCH] drm/vmwgfx: fix regression in thp code due to ttm init refactor.
@ 2020-10-01 4:20 Dave Airlie
2020-10-01 7:34 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Dave Airlie @ 2020-10-01 4:20 UTC (permalink / raw)
To: dri-devel, sroland
From: Dave Airlie <airlied@redhat.com>
When I refactored this code with the new init paths, I failed to
set the funcs back up properly, this caused a failure to bringup
gdm properly.
Fixes: 252f8d7b9174 ("drm/vmwgfx/ttm: convert vram mm init to new code paths")
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/vmwgfx/vmwgfx_thp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
index 63fe7da4cbf4..c158e672b762 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
@@ -26,6 +26,8 @@ static struct vmw_thp_manager *to_thp_manager(struct ttm_resource_manager *man)
return container_of(man, struct vmw_thp_manager, manager);
}
+static const struct ttm_resource_manager_func vmw_thp_func;
+
static int vmw_thp_insert_aligned(struct drm_mm *mm, struct drm_mm_node *node,
unsigned long align_pages,
const struct ttm_place *place,
@@ -132,6 +134,7 @@ int vmw_thp_init(struct vmw_private *dev_priv)
ttm_resource_manager_init(&rman->manager,
dev_priv->vram_size >> PAGE_SHIFT);
+ rman->manager.func = &vmw_thp_func;
drm_mm_init(&rman->mm, 0, rman->manager.size);
spin_lock_init(&rman->lock);
@@ -171,7 +174,7 @@ static void vmw_thp_debug(struct ttm_resource_manager *man,
spin_unlock(&rman->lock);
}
-const struct ttm_resource_manager_func vmw_thp_func = {
+static const struct ttm_resource_manager_func vmw_thp_func = {
.alloc = vmw_thp_get_node,
.free = vmw_thp_put_node,
.debug = vmw_thp_debug
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/vmwgfx: fix regression in thp code due to ttm init refactor.
2020-10-01 4:20 [PATCH] drm/vmwgfx: fix regression in thp code due to ttm init refactor Dave Airlie
@ 2020-10-01 7:34 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2020-10-01 7:34 UTC (permalink / raw)
To: Dave Airlie; +Cc: Roland Scheidegger, dri-devel
On Thu, Oct 1, 2020 at 6:20 AM Dave Airlie <airlied@gmail.com> wrote:
>
> From: Dave Airlie <airlied@redhat.com>
>
> When I refactored this code with the new init paths, I failed to
> set the funcs back up properly, this caused a failure to bringup
> gdm properly.
>
> Fixes: 252f8d7b9174 ("drm/vmwgfx/ttm: convert vram mm init to new code paths")
> Signed-off-by: Dave Airlie <airlied@redhat.com>
Indeed, I missed that that got lost.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/vmwgfx/vmwgfx_thp.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
> index 63fe7da4cbf4..c158e672b762 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
> @@ -26,6 +26,8 @@ static struct vmw_thp_manager *to_thp_manager(struct ttm_resource_manager *man)
> return container_of(man, struct vmw_thp_manager, manager);
> }
>
> +static const struct ttm_resource_manager_func vmw_thp_func;
> +
> static int vmw_thp_insert_aligned(struct drm_mm *mm, struct drm_mm_node *node,
> unsigned long align_pages,
> const struct ttm_place *place,
> @@ -132,6 +134,7 @@ int vmw_thp_init(struct vmw_private *dev_priv)
> ttm_resource_manager_init(&rman->manager,
> dev_priv->vram_size >> PAGE_SHIFT);
>
> + rman->manager.func = &vmw_thp_func;
> drm_mm_init(&rman->mm, 0, rman->manager.size);
> spin_lock_init(&rman->lock);
>
> @@ -171,7 +174,7 @@ static void vmw_thp_debug(struct ttm_resource_manager *man,
> spin_unlock(&rman->lock);
> }
>
> -const struct ttm_resource_manager_func vmw_thp_func = {
> +static const struct ttm_resource_manager_func vmw_thp_func = {
> .alloc = vmw_thp_get_node,
> .free = vmw_thp_put_node,
> .debug = vmw_thp_debug
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-01 7:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01 4:20 [PATCH] drm/vmwgfx: fix regression in thp code due to ttm init refactor Dave Airlie
2020-10-01 7:34 ` Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.