dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Zack Rusin" <zackr@vmware.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v4] drm/ttm: Clarify that the TTM_PL_SYSTEM is under TTMs control
Date: Tue, 16 Nov 2021 10:09:44 +0100	[thread overview]
Message-ID: <3cd2f3e4-5e56-dcf5-0bf6-462f19269c88@amd.com> (raw)
In-Reply-To: <7196ce91-5897-3088-e7f4-f9c5b04152d9@linux.intel.com>

Am 16.11.21 um 10:00 schrieb Thomas Hellström:
> On 11/16/21 09:54, Christian König wrote:
>> Am 16.11.21 um 09:33 schrieb Thomas Hellström:
>>> On 11/16/21 09:20, Christian König wrote:
>>>> Am 16.11.21 um 08:43 schrieb Thomas Hellström:
>>>>> On 11/16/21 08:19, Christian König wrote:
>>>>>> [SNIP]
>>>>
>>>> Well my long term plan is to audit the code base once more and 
>>>> remove the limbo state from the SYSTEM domain.
>>>>
>>>> E.g. instead of a SYSTEM BO without pages you allocate a BO without 
>>>> a resource in general which is now possible since bo->resource is a 
>>>> pointer.
>>>>
>>>> This would still allow us to allocate "empty shell" BOs. But a 
>>>> validation of those BOs doesn't cause a move, but rather just 
>>>> allocates the resource for the first time.
>>>>
>>>> The problem so far was just that we access bo->resource way to 
>>>> often without checking it.
>>>
>>> So the driver would then at least need to be aware of these empty 
>>> shell bos without resource for their move callbacks? (Again thinking 
>>> of the move from empty shell -> VRAM).
>>
>> My thinking goes more into the direction that this looks like a BO 
>> directly allocated in VRAM to the driver.
>>
>> We could of course also make it a move, but of hand I don't see a 
>> reason for it.
>
> As long as there is a way to provide accelerated VRAM clearing if 
> necessary the directly allocated view sounds fine with me. (Looking at 
> amdgpu it looks like you clear on resource destroy? I'm not fully sure 
> that would work with all i915 use cases)

In amdgpu we have both. The AMDGPU_GEM_CREATE_VRAM_CLEARED flag clears 
the memory on allocation and AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE flag 
makes sure it is wiped on release.

Wiping on release is sometimes faster because you don't need to wait for 
the clear to finish before you can first use it.

But thinking about it once more it might be a good idea to have move 
callbacks for empty shells and freshly allocated BOs as well, so that 
the driver is informed about the state change of the BO.

Regards,
Christian.

>
> /Thomas
>
>
>>
>> Christian.
>>
>>>
>>> Thanks,
>>>
>>> /Thomas
>>>
>>>
>>


  reply	other threads:[~2021-11-16  9:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 19:38 [PATCH v2 0/6] Support module unload and hotunplug Zack Rusin
2021-11-05 19:38 ` [PATCH v2 1/6] drm/vmwgfx: Remove the deprecated lower mem limit Zack Rusin
2021-11-05 19:38 ` [PATCH v2 2/6] drm/vmwgfx: Release ttm memory if probe fails Zack Rusin
2021-11-05 19:38 ` [PATCH v2 3/6] drm/vmwgfx: Fail to initialize on broken configs Zack Rusin
2021-11-05 19:38 ` [PATCH v2 4/6] drm/vmwgfx: Introduce a new placement for MOB page tables Zack Rusin
2021-11-05 19:38 ` [PATCH v2 5/6] drm/vmwgfx: Switch the internal BO's to ttm_bo_type_kernel Zack Rusin
2021-11-05 19:38 ` [PATCH v2 6/6] drm/ttm: Clarify that the TTM_PL_SYSTEM buffers need to stay idle Zack Rusin
2021-11-08 11:07   ` Christian König
2021-11-08 15:42     ` [PATCH v3] " Zack Rusin
2021-11-10 14:50     ` [PATCH v4] drm/ttm: Clarify that the TTM_PL_SYSTEM is under TTMs control Zack Rusin
2021-11-11 16:44       ` Zack Rusin
2021-11-13 11:26         ` Thomas Hellström
2021-11-16  7:19           ` Christian König
2021-11-16  7:43             ` Thomas Hellström
2021-11-16  8:20               ` Christian König
2021-11-16  8:33                 ` Thomas Hellström
2021-11-16  8:54                   ` Christian König
2021-11-16  9:00                     ` Thomas Hellström
2021-11-16  9:09                       ` Christian König [this message]
2021-11-16 15:49                         ` Daniel Vetter
2021-11-16 15:53                 ` Zack Rusin
2021-11-22 14:15                   ` Christian König
2021-11-22 15:05                     ` Zack Rusin
2021-11-24  8:22       ` 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=3cd2f3e4-5e56-dcf5-0bf6-462f19269c88@amd.com \
    --to=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=zackr@vmware.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