ttm: ttm_bo_swapout_all doesn't use it's argument.
Subsystems (4)
Dave Airlie
maintainerPATCH 1/1 ttm: ttm_bo_swapout_all doesn't use it's argument.
From: Dave Airlie <[email protected]>
Just drop the argument from this.
This does ask the question if this is the function vmwgfx should be using or should it be doing an evict all like the other drivers.
--- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- include/drm/ttm/ttm_bo_api.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/ttm/ttm_bo.c +1 -1
@@ -1838,7 +1838,7 @@ int ttm_bo_swapout(struct ttm_bo_global *glob, struct ttm_operation_ctx *ctx) }EXPORT_SYMBOL (ttm_bo_swapout); -void ttm_bo_swapout_all (struct ttm_bo_device *bdev) +void ttm_bo_swapout_all (void ) {struct ttm_operation_ctx ctx = { .interruptible = false,
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +1 -1
@@ -1352,7 +1352,7 @@ static int vmw_pm_freeze(struct device *kdev)vmw_execbuf_release_pinned_bo (dev_priv);vmw_resource_evict_all (dev_priv);vmw_release_device_early (dev_priv); -ttm_bo_swapout_all (&dev_priv->bdev); +ttm_bo_swapout_all ();if (dev_priv->enable_fb)vmw_fifo_resource_dec (dev_priv);if (atomic_read (&dev_priv->num_fifo_resources) !=0 ) {
include/drm/ttm/ttm_bo_api.h +1 -1
@@ -692,7 +692,7 @@ ssize_t ttm_bo_io(struct ttm_bo_device *bdev, struct file *filp,int ttm_bo_swapout (struct ttm_bo_global *glob,struct ttm_operation_ctx *ctx); -void ttm_bo_swapout_all (struct ttm_bo_device *bdev); +void ttm_bo_swapout_all (void );/** * ttm_bo_uses_embedded_gem_object - check if the given bo uses the
Signature · 6 lines
2.26.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Am 28.07.20 um 05:42 schrieb Dave Airlie:
Quoted 9 lines
From: Dave Airlie <[email protected]>
Just drop the argument from this.
This does ask the question if this is the function vmwgfx should be using or should it be doing an evict all like the other drivers.
Signed-off-by Dave Airlie <[email protected]>
Quoted 37 lines
--- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- include/drm/ttm/ttm_bo_api.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/ttm/ttm_bo.c +1
-1@@ -1838,7 +1838,7 @@ int ttm_bo_swapout(struct ttm_bo_global *glob, struct ttm_operation_ctx *ctx) }EXPORT_SYMBOL (ttm_bo_swapout); -void ttm_bo_swapout_all (struct ttm_bo_device *bdev) +void ttm_bo_swapout_all (void ) {struct ttm_operation_ctx ctx = { .interruptible = false,drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +1
-1@@ -1352,7 +1352,7 @@ static int vmw_pm_freeze(struct device *kdev)vmw_execbuf_release_pinned_bo (dev_priv);vmw_resource_evict_all (dev_priv);vmw_release_device_early (dev_priv); -ttm_bo_swapout_all (&dev_priv->bdev); +ttm_bo_swapout_all ();if (dev_priv->enable_fb)vmw_fifo_resource_dec (dev_priv);if (atomic_read (&dev_priv->num_fifo_resources) !=0 ) {include/drm/ttm/ttm_bo_api.h +0
-0
include/drm/ttm/ttm_bo_api.h ssize_t ttm_bo_io(struct ttm_bo_device *bdev, struct file *filp, · line 698
Quoted 8 lines
include/drm/ttm/ttm_bo_api.h +1
-1@@ -692,7 +692,7 @@ ssize_t ttm_bo_io(struct ttm_bo_device *bdev, struct file *filp,int ttm_bo_swapout (struct ttm_bo_global *glob,struct ttm_operation_ctx *ctx); -void ttm_bo_swapout_all (struct ttm_bo_device *bdev); +void ttm_bo_swapout_all (void );/** * ttm_bo_uses_embedded_gem_object - check if the given bo uses the
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Roland Scheidegger
Reviewed-byPatch looks good to me too.
Seems indeed like we should do some cleanup.
Roland
Am 28.07.20 um 09:37 schrieb Christian König:
Quoted 50 lines
Am 28.07.20 um 05:42 schrieb Dave Airlie:
Quoted 9 lines
From: Dave Airlie <[email protected]>
Just drop the argument from this.
This does ask the question if this is the function vmwgfx should be using or should it be doing an evict all like the other drivers.
Signed-off-by Dave Airlie <[email protected]>Reviewed-by Christian König <[email protected]>Quoted 37 lines
---
drivers/gpu/drm/ttm/ttm_bo.c | 2 +-
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c| 2 +-
include/drm/ttm/ttm_bo_api.h | 2 +-3 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/ttm/ttm_bo.c +1
-0@@ -1838,7 +1838,7 @@ int ttm_bo_swapout(struct ttm_bo_global *glob, struct ttm_operation_ctx *ctx) } EXPORT_SYMBOL(ttm_bo_swapout); -void ttm_bo_swapout_all(struct ttm_bo_device *bdev) +void ttm_bo_swapout_all(void) { struct ttm_operation_ctx ctx = {.interruptible = false,
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +1
-1@@ -1352,7 +1352,7 @@ static int vmw_pm_freeze(struct device *kdev) vmw_execbuf_release_pinned_bo(dev_priv); vmw_resource_evict_all(dev_priv); vmw_release_device_early(dev_priv); - ttm_bo_swapout_all(&dev_priv->bdev); + ttm_bo_swapout_all(); if (dev_priv->enable_fb) vmw_fifo_resource_dec(dev_priv); if (atomic_read(&dev_priv->num_fifo_resources) != 0) {include/drm/ttm/ttm_bo_api.h +0
-0
Quoted 9 lines
include/drm/ttm/ttm_bo_api.h ssize_t ttm_bo_io(struct ttm_bo_device *bdev, · line 697
Quoted 8 lines
include/drm/ttm/ttm_bo_api.h +1
-1@@ -692,7 +692,7 @@ ssize_t ttm_bo_io(struct ttm_bo_device *bdev,struct file *filp, int ttm_bo_swapout(struct ttm_bo_global *glob, struct ttm_operation_ctx *ctx); -void ttm_bo_swapout_all (struct ttm_bo_device *bdev); +void ttm_bo_swapout_all (void ); /*** ttm_bo_uses_embedded_gem_object - check if the given bo uses the
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Dave Airlie
From: Dave Airlie <[email protected]>
Just drop the argument from this.
This does ask the question if this is the function vmwgfx should be using or should it be doing an evict all like the other drivers.
Yeah this looks a bit like ttm_bo_swapout_all shouldn't even be exported really, it's part of the internal shrinker stuff.
-Daniel
Quoted 54 lines
Signed-off-by Dave Airlie <[email protected]>--- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- include/drm/ttm/ttm_bo_api.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/ttm/ttm_bo.c +1
-1@@ -1838,7 +1838,7 @@ int ttm_bo_swapout(struct ttm_bo_global *glob, struct ttm_operation_ctx *ctx) }EXPORT_SYMBOL (ttm_bo_swapout); -void ttm_bo_swapout_all (struct ttm_bo_device *bdev) +void ttm_bo_swapout_all (void ) {struct ttm_operation_ctx ctx = { .interruptible = false,drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +1
-1@@ -1352,7 +1352,7 @@ static int vmw_pm_freeze(struct device *kdev)vmw_execbuf_release_pinned_bo (dev_priv);vmw_resource_evict_all (dev_priv);vmw_release_device_early (dev_priv); -ttm_bo_swapout_all (&dev_priv->bdev); +ttm_bo_swapout_all ();if (dev_priv->enable_fb)vmw_fifo_resource_dec (dev_priv);if (atomic_read (&dev_priv->num_fifo_resources) !=0 ) {include/drm/ttm/ttm_bo_api.h +1
-1@@ -692,7 +692,7 @@ ssize_t ttm_bo_io(struct ttm_bo_device *bdev, struct file *filp,int ttm_bo_swapout (struct ttm_bo_global *glob,struct ttm_operation_ctx *ctx); -void ttm_bo_swapout_all (struct ttm_bo_device *bdev); +void ttm_bo_swapout_all (void );/** * ttm_bo_uses_embedded_gem_object - check if the given bo uses the Signature · 6 lines
2.26.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 10 lines · Dave Airlie
From: Dave Airlie <[email protected]>
Just drop the argument from this.
This does ask the question if this is the function vmwgfx should be using or should it be doing an evict all like the other drivers.
Yea, it really should. This code is really old. Over the next year we’ll spend some time making our driver a little less special so that we can make those symbols private again (we’ll have to reevaulate whether we still need the private ttm_lock code, because ideally we’d bring all of that inline with the other drivers).
For the patch:
z
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel