From: Sinclair Yeh <syeh@vmware.com>
To: "Christian König" <deathsimple@vodafone.de>
Cc: Hongbo.He@amd.com, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 6/6] drm/ttm: revert "add optional LRU removal callback v2"
Date: Tue, 24 Jan 2017 10:30:14 -0800 [thread overview]
Message-ID: <20170124183014.GB22118@vmware.com> (raw)
In-Reply-To: <1484301071-21703-7-git-send-email-deathsimple@vodafone.de>
Pathces 1, 2, 5, 6:
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
On Fri, Jan 13, 2017 at 10:51:11AM +0100, Christian König wrote:
> From: Christian König <christian.koenig@amd.com>
>
> Without the custom LRU management the callback is not used any more.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/ttm/ttm_bo.c | 12 +++++-------
> include/drm/ttm/ttm_bo_driver.h | 6 ------
> 2 files changed, 5 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index 59fac2f..dfaeac4 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -186,12 +186,8 @@ EXPORT_SYMBOL(ttm_bo_add_to_lru);
>
> int ttm_bo_del_from_lru(struct ttm_buffer_object *bo)
> {
> - struct ttm_bo_device *bdev = bo->bdev;
> int put_count = 0;
>
> - if (bdev->driver->lru_removal)
> - bdev->driver->lru_removal(bo);
> -
> if (!list_empty(&bo->swap)) {
> list_del_init(&bo->swap);
> ++put_count;
> @@ -201,6 +197,11 @@ int ttm_bo_del_from_lru(struct ttm_buffer_object *bo)
> ++put_count;
> }
>
> + /*
> + * TODO: Add a driver hook to delete from
> + * driver-specific LRU's here.
> + */
> +
> return put_count;
> }
>
> @@ -234,9 +235,6 @@ void ttm_bo_move_to_lru_tail(struct ttm_buffer_object *bo)
>
> lockdep_assert_held(&bo->resv->lock.base);
>
> - if (bdev->driver->lru_removal)
> - bdev->driver->lru_removal(bo);
> -
> put_count = ttm_bo_del_from_lru(bo);
> ttm_bo_list_ref_sub(bo, put_count, true);
> ttm_bo_add_to_lru(bo);
> diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
> index a1235fa..4395db1 100644
> --- a/include/drm/ttm/ttm_bo_driver.h
> +++ b/include/drm/ttm/ttm_bo_driver.h
> @@ -462,12 +462,6 @@ struct ttm_bo_driver {
> struct ttm_mem_reg *mem);
> void (*io_mem_free)(struct ttm_bo_device *bdev,
> struct ttm_mem_reg *mem);
> -
> - /**
> - * Optional driver callback for when BO is removed from the LRU.
> - * Called with LRU lock held immediately before the removal.
> - */
> - void (*lru_removal)(struct ttm_buffer_object *bo);
> };
>
> /**
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-01-24 20:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-13 9:51 amdgpu: fix performance drop Christian König
2017-01-13 9:51 ` [PATCH 3/6] drm/amdgpu: user BO priority instead of self coding it Christian König
2017-01-16 3:30 ` He, Hongbo
2017-01-13 9:51 ` [PATCH 4/6] drm/amdgpu: double the priority of kernel allocations Christian König
[not found] ` <1484301071-21703-5-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-01-16 3:30 ` He, Hongbo
[not found] ` <1484301071-21703-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-01-13 9:51 ` [PATCH 1/6] drm/ttm: remove allow_errors parameter from ttm_bo_force_list_clean Christian König
[not found] ` <1484301071-21703-2-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-01-16 3:22 ` He, Hongbo
2017-01-13 9:51 ` [PATCH 2/6] drm/ttm: add BO priorities for the LRUs Christian König
[not found] ` <1484301071-21703-3-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-01-16 3:29 ` He, Hongbo
2017-01-13 9:51 ` [PATCH 5/6] drm/ttm: revert "implement LRU add callbacks v2" Christian König
2017-01-16 3:35 ` He, Hongbo
[not found] ` <1484301071-21703-6-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-01-24 18:28 ` Sinclair Yeh
2017-01-13 9:51 ` [PATCH 6/6] drm/ttm: revert "add optional LRU removal callback v2" Christian König
2017-01-16 3:27 ` He, Hongbo
2017-01-24 18:30 ` Sinclair Yeh [this message]
2017-01-24 9:51 ` amdgpu: fix performance drop Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170124183014.GB22118@vmware.com \
--to=syeh@vmware.com \
--cc=Hongbo.He@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=deathsimple@vodafone.de \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox