From: "Das, Nirmoy" <nirmoy.das@linux.intel.com>
To: Matthew Auld <matthew.auld@intel.com>, intel-gfx@lists.freedesktop.org
Cc: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 3/6] drm/ttm: clear the ttm_tt when bo->resource is NULL
Date: Mon, 30 Jan 2023 13:12:56 +0100 [thread overview]
Message-ID: <16bec5c9-ae61-7d0f-72d5-9831aa75e148@linux.intel.com> (raw)
In-Reply-To: <20230130120636.63765-3-matthew.auld@intel.com>
On 1/30/2023 1:06 PM, Matthew Auld wrote:
> In the next few patches, when initially creating a ttm BO, the
> bo->resource is NULL, and the driver is then expected to handle the
> initial dummy move. However, if this is created as a system resource
> the first ttm_tt we create will always have the clear value set to
> false. Previously the initial ttm_tt would be created in
> ttm_bo_validate() with the clear parameter always set to true.
>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Christian König <ckoenig.leichtzumerken@gmail.com>
> Reviewed-by: Christian König <ckoenig.leichtzumerken@gmail.com>
Acked-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
> drivers/gpu/drm/ttm/ttm_bo.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index 326a3d13a829..773080f48864 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -120,8 +120,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
> bool old_use_tt, new_use_tt;
> int ret;
>
> - old_use_tt = bo->resource &&
> - ttm_manager_type(bdev, bo->resource->mem_type)->use_tt;
> + old_use_tt = !bo->resource || ttm_manager_type(bdev, bo->resource->mem_type)->use_tt;
> new_use_tt = ttm_manager_type(bdev, mem->mem_type)->use_tt;
>
> ttm_bo_unmap_virtual(bo);
next prev parent reply other threads:[~2023-01-30 12:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 12:06 [Intel-gfx] [PATCH v2 1/6] drm/i915/ttm: fix sparse warning Matthew Auld
2023-01-30 12:06 ` [Intel-gfx] [PATCH v2 2/6] drm/i915/ttm: audit remaining bo->resource Matthew Auld
2023-01-30 12:12 ` Das, Nirmoy
2023-01-30 12:06 ` [Intel-gfx] [PATCH v2 3/6] drm/ttm: clear the ttm_tt when bo->resource is NULL Matthew Auld
2023-01-30 12:12 ` Das, Nirmoy [this message]
2023-01-30 12:06 ` [Intel-gfx] [PATCH v2 4/6] drm/ttm: stop allocating dummy resources during BO creation Matthew Auld
2023-01-30 12:13 ` Das, Nirmoy
2023-01-30 12:06 ` [Intel-gfx] [PATCH v2 5/6] drm/ttm: stop allocating a dummy resource for pipelined gutting Matthew Auld
2023-01-30 12:13 ` Das, Nirmoy
2023-01-30 12:06 ` [Intel-gfx] [PATCH v2 6/6] drm/ttm: prevent moving of pinned BOs Matthew Auld
2023-01-30 12:09 ` [Intel-gfx] [PATCH v2 1/6] drm/i915/ttm: fix sparse warning Das, Nirmoy
2023-01-30 16:35 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/6] " Patchwork
2023-01-30 16:46 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-01-30 22:17 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
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=16bec5c9-ae61-7d0f-72d5-9831aa75e148@linux.intel.com \
--to=nirmoy.das@linux.intel.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
/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