mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Koenig, Christian" <Christian.Koenig@amd.com>
To: Gerd Hoffmann <kraxel@redhat.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Cc: "Huang, Ray" <Ray.Huang@amd.com>, David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel@ffwll.ch>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 8/8] drm/ttm: remove embedded vma_offset_manager
Date: Mon, 9 Sep 2019 07:02:33 +0000	[thread overview]
Message-ID: <d276f21e-fa03-aa68-4bf7-b154a7dc3e2e@amd.com> (raw)
In-Reply-To: <20190905070509.22407-9-kraxel@redhat.com>

Am 05.09.19 um 09:05 schrieb Gerd Hoffmann:
> No users left.  Drivers either setup vma_offset_manager themself
> (vmwgfx) or pass the gem vma_offset_manager to ttm_bo_device_init
> (all other drivers).
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Patches #4, #5 and #8 in this series are Reviewed-by: Christian König 
<christian.koenig@amd.com>

I can't see the rest in my inbox anywhere. Have you send all of them to 
dri-devel?

Christian.

> ---
>   include/drm/ttm/ttm_bo_driver.h | 4 +---
>   drivers/gpu/drm/ttm/ttm_bo.c    | 9 ++-------
>   2 files changed, 3 insertions(+), 10 deletions(-)
>
> diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
> index e365434f92b3..4e307f65f497 100644
> --- a/include/drm/ttm/ttm_bo_driver.h
> +++ b/include/drm/ttm/ttm_bo_driver.h
> @@ -442,7 +442,6 @@ extern struct ttm_bo_global {
>    * @driver: Pointer to a struct ttm_bo_driver struct setup by the driver.
>    * @man: An array of mem_type_managers.
>    * @vma_manager: Address space manager (pointer)
> - * @_vma_manager: Address space manager (enbedded)
>    * lru_lock: Spinlock that protects the buffer+device lru lists and
>    * ddestroy lists.
>    * @dev_mapping: A pointer to the struct address_space representing the
> @@ -466,7 +465,6 @@ struct ttm_bo_device {
>   	 * Protected by internal locks.
>   	 */
>   	struct drm_vma_offset_manager *vma_manager;
> -	struct drm_vma_offset_manager _vma_manager;
>   
>   	/*
>   	 * Protected by the global:lru lock.
> @@ -587,7 +585,7 @@ int ttm_bo_device_release(struct ttm_bo_device *bdev);
>    * @glob: A pointer to an initialized struct ttm_bo_global.
>    * @driver: A pointer to a struct ttm_bo_driver set up by the caller.
>    * @mapping: The address space to use for this bo.
> - * @vma_manager: A pointer to a vma manager or NULL.
> + * @vma_manager: A pointer to a vma manager.
>    * @file_page_offset: Offset into the device address space that is available
>    * for buffer data. This ensures compatibility with other users of the
>    * address space.
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index 8dc26babc5cb..881cf26d698e 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -1704,8 +1704,6 @@ int ttm_bo_device_release(struct ttm_bo_device *bdev)
>   			pr_debug("Swap list %d was clean\n", i);
>   	spin_unlock(&glob->lru_lock);
>   
> -	drm_vma_offset_manager_destroy(&bdev->_vma_manager);
> -
>   	if (!ret)
>   		ttm_bo_global_release();
>   
> @@ -1722,8 +1720,8 @@ int ttm_bo_device_init(struct ttm_bo_device *bdev,
>   	struct ttm_bo_global *glob = &ttm_bo_glob;
>   	int ret;
>   
> -	if (!vma_manager)
> -		vma_manager = &bdev->_vma_manager;
> +	if (WARN_ON(vma_manager == NULL))
> +		return -EINVAL;
>   
>   	ret = ttm_bo_global_init();
>   	if (ret)
> @@ -1742,9 +1740,6 @@ int ttm_bo_device_init(struct ttm_bo_device *bdev,
>   		goto out_no_sys;
>   
>   	bdev->vma_manager = vma_manager;
> -	drm_vma_offset_manager_init(&bdev->_vma_manager,
> -				    DRM_FILE_PAGE_OFFSET_START,
> -				    DRM_FILE_PAGE_OFFSET_SIZE);
>   	INIT_DELAYED_WORK(&bdev->wq, ttm_bo_delayed_workqueue);
>   	INIT_LIST_HEAD(&bdev->ddestroy);
>   	bdev->dev_mapping = mapping;


  reply	other threads:[~2019-09-09  7:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190905070509.22407-1-kraxel@redhat.com>
2019-09-05  7:05 ` [PATCH 1/8] drm/ttm: turn ttm_bo_device.vma_manager into a pointer Gerd Hoffmann
2019-09-09  6:59   ` Christian König
2019-09-05  7:05 ` [PATCH 2/8] drm/nouveau: switch to gem vma offset manager Gerd Hoffmann
2019-09-05  7:05 ` [PATCH 3/8] drm/vram: " Gerd Hoffmann
2019-09-09  7:11   ` Thomas Zimmermann
2019-09-05  7:05 ` [PATCH 4/8] drm/radeon: " Gerd Hoffmann
2019-09-05  7:05 ` [PATCH 5/8] drm/amdgpu: " Gerd Hoffmann
2019-09-05  7:05 ` [PATCH 6/8] drm/qxl: " Gerd Hoffmann
2019-09-05  7:05 ` [PATCH 7/8] drm/vmwgfx: switch to own vma manager Gerd Hoffmann
2019-09-05  8:31   ` Thomas Hellstrom
2019-09-05  9:31     ` kraxel
2019-09-05  7:05 ` [PATCH 8/8] drm/ttm: remove embedded vma_offset_manager Gerd Hoffmann
2019-09-09  7:02   ` Koenig, Christian [this message]
2019-09-09  9:43     ` Gerd Hoffmann

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=d276f21e-fa03-aa68-4bf7-b154a7dc3e2e@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Ray.Huang@amd.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®