From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Cc: alexander.deucher@amd.com, christian.koenig@amd.com
Subject: Re: [PATCH 1/3] Revert "drm/amdgpu: move internal vram_mgr function into the C file"
Date: Fri, 22 Jul 2022 15:46:48 +0100 [thread overview]
Message-ID: <476c4e58-ba0c-0736-2618-e7899dd5b60f@linux.intel.com> (raw)
In-Reply-To: <a56afc27-3556-38ea-0d10-f7069091967e@suse.de>
On 14/07/2022 09:45, Thomas Zimmermann wrote:
> Hi
>
> Am 08.07.22 um 11:30 schrieb Arunpravin Paneer Selvam:
>> This reverts commit 708d19d9f362766147cab79eccae60912c6d3068.
>
> This commit is only present in drm-misc-next. Should the revert be
> cherry-picked into drm-misc-next-fixes?
Seemed like an appropriate thread to raise this, in case my pings about
it on #dri-devel and #radeon go un-noticed since it is Friday after all.
So for me dri-tip today fails to build the amdgpu driver.
I had to revert 925b6e59138cefa47275c67891c65d48d3266d57 to make it
build. This conflicts a bit but seems trivial. Without this revert code
seems confused with different versions of struct amdgpu_vram_mgr and
build fails violently (increase your scroll back buffers to see it all).
Regards,
Tvrtko
> Best regards
> Thomas
>
>>
>> This is part of a revert of the following commits:
>> commit 708d19d9f362 ("drm/amdgpu: move internal vram_mgr function into
>> the C file")
>> commit 5e3f1e7729ec ("drm/amdgpu: fix start calculation in
>> amdgpu_vram_mgr_new")
>> commit c9cad937c0c5 ("drm/amdgpu: add drm buddy support to amdgpu")
>>
>> [WHY]
>> Few users reported garbaged graphics as soon as x starts,
>> reverting until this can be resolved.
>>
>> Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 29 --------------------
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 27 ++++++++++++++++++
>> 2 files changed, 27 insertions(+), 29 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
>> index 7a5e8a7b4a1b..51d9d3a4456c 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
>> @@ -50,35 +50,6 @@ to_amdgpu_device(struct amdgpu_vram_mgr *mgr)
>> return container_of(mgr, struct amdgpu_device, mman.vram_mgr);
>> }
>> -static inline struct drm_buddy_block *
>> -amdgpu_vram_mgr_first_block(struct list_head *list)
>> -{
>> - return list_first_entry_or_null(list, struct drm_buddy_block, link);
>> -}
>> -
>> -static inline bool amdgpu_is_vram_mgr_blocks_contiguous(struct
>> list_head *head)
>> -{
>> - struct drm_buddy_block *block;
>> - u64 start, size;
>> -
>> - block = amdgpu_vram_mgr_first_block(head);
>> - if (!block)
>> - return false;
>> -
>> - while (head != block->link.next) {
>> - start = amdgpu_vram_mgr_block_start(block);
>> - size = amdgpu_vram_mgr_block_size(block);
>> -
>> - block = list_entry(block->link.next, struct drm_buddy_block,
>> link);
>> - if (start + size != amdgpu_vram_mgr_block_start(block))
>> - return false;
>> - }
>> -
>> - return true;
>> -}
>> -
>> -
>> -
>> /**
>> * DOC: mem_info_vram_total
>> *
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h
>> index 4b267bf1c5db..9a2db87186c7 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h
>> @@ -53,6 +53,33 @@ static inline u64 amdgpu_vram_mgr_block_size(struct
>> drm_buddy_block *block)
>> return PAGE_SIZE << drm_buddy_block_order(block);
>> }
>> +static inline struct drm_buddy_block *
>> +amdgpu_vram_mgr_first_block(struct list_head *list)
>> +{
>> + return list_first_entry_or_null(list, struct drm_buddy_block, link);
>> +}
>> +
>> +static inline bool amdgpu_is_vram_mgr_blocks_contiguous(struct
>> list_head *head)
>> +{
>> + struct drm_buddy_block *block;
>> + u64 start, size;
>> +
>> + block = amdgpu_vram_mgr_first_block(head);
>> + if (!block)
>> + return false;
>> +
>> + while (head != block->link.next) {
>> + start = amdgpu_vram_mgr_block_start(block);
>> + size = amdgpu_vram_mgr_block_size(block);
>> +
>> + block = list_entry(block->link.next, struct drm_buddy_block,
>> link);
>> + if (start + size != amdgpu_vram_mgr_block_start(block))
>> + return false;
>> + }
>> +
>> + return true;
>> +}
>> +
>> static inline struct amdgpu_vram_mgr_resource *
>> to_amdgpu_vram_mgr_resource(struct ttm_resource *res)
>> {
>
next prev parent reply other threads:[~2022-07-22 14:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-08 9:30 [PATCH 1/3] Revert "drm/amdgpu: move internal vram_mgr function into the C file" Arunpravin Paneer Selvam
2022-07-08 9:30 ` [PATCH 2/3] Revert "drm/amdgpu: fix start calculation in amdgpu_vram_mgr_new" Arunpravin Paneer Selvam
2022-07-08 9:30 ` [PATCH 3/3] Revert "drm/amdgpu: add drm buddy support to amdgpu" Arunpravin Paneer Selvam
2022-07-08 12:26 ` Christian König
2022-07-08 9:33 ` [PATCH 1/3] Revert "drm/amdgpu: move internal vram_mgr function into the C file" Christian König
2022-07-08 10:23 ` Arunpravin Paneer Selvam
2022-07-14 8:45 ` Thomas Zimmermann
2022-07-22 14:46 ` Tvrtko Ursulin [this message]
2022-07-22 15:47 ` Christian König
2022-07-24 18:28 ` Thomas Zimmermann
2022-07-25 15:27 ` Tvrtko Ursulin
2022-07-25 17:14 ` Christian König
2022-07-26 7:46 ` Thomas Zimmermann
2022-07-26 8:41 ` Tvrtko Ursulin
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=476c4e58-ba0c-0736-2618-e7899dd5b60f@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Arunpravin.PaneerSelvam@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=tzimmermann@suse.de \
/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