From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Alex Deucher <alexdeucher@gmail.com>, amd-gfx@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: Re: [PATCH 1/3] drm/amdgpu: free the pre-OS console framebuffer after the first modeset
Date: Tue, 8 Dec 2020 18:41:31 +0100 [thread overview]
Message-ID: <c60e4b0d-5b1c-1b4f-49a6-7756176a4217@gmail.com> (raw)
In-Reply-To: <20201208160556.39899-1-alexander.deucher@amd.com>
Am 08.12.20 um 17:05 schrieb Alex Deucher:
> Rather than in late_init to avoid race conditions between freeing the
> buffers and the initial modeset.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com> for patches #1
and #2, acked-by for #3.
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++------
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++
> 2 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index e49b519aab80..6be131df21f5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -2026,10 +2026,6 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
> */
> void amdgpu_ttm_late_init(struct amdgpu_device *adev)
> {
> - /* return the VGA stolen memory (if any) back to VRAM */
> - if (!adev->mman.keep_stolen_vga_memory)
> - amdgpu_bo_free_kernel(&adev->mman.stolen_vga_memory, NULL, NULL);
> - amdgpu_bo_free_kernel(&adev->mman.stolen_extended_memory, NULL, NULL);
> }
>
> /*
> @@ -2042,8 +2038,8 @@ void amdgpu_ttm_fini(struct amdgpu_device *adev)
>
> amdgpu_ttm_training_reserve_vram_fini(adev);
> /* return the stolen vga memory back to VRAM */
> - if (adev->mman.keep_stolen_vga_memory)
> - amdgpu_bo_free_kernel(&adev->mman.stolen_vga_memory, NULL, NULL);
> + amdgpu_bo_free_kernel(&adev->mman.stolen_vga_memory, NULL, NULL);
> + amdgpu_bo_free_kernel(&adev->mman.stolen_extended_memory, NULL, NULL);
> /* return the IP Discovery TMR memory back to VRAM */
> amdgpu_bo_free_kernel(&adev->mman.discovery_memory, NULL, NULL);
> amdgpu_ttm_fw_reserve_vram_fini(adev);
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 255171b8c434..e64b365d07af 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -8440,6 +8440,11 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
>
> drm_atomic_helper_cleanup_planes(dev, state);
>
> + /* return the stolen vga memory back to VRAM */
> + if (!adev->mman.keep_stolen_vga_memory)
> + amdgpu_bo_free_kernel(&adev->mman.stolen_vga_memory, NULL, NULL);
> + amdgpu_bo_free_kernel(&adev->mman.stolen_extended_memory, NULL, NULL);
> +
> /*
> * Finally, drop a runtime PM reference for each newly disabled CRTC,
> * so we can put the GPU into runtime suspend if we're not driving any
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
prev parent reply other threads:[~2020-12-08 17:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-08 16:05 [PATCH 1/3] drm/amdgpu: free the pre-OS console framebuffer after the first modeset Alex Deucher
2020-12-08 16:05 ` [PATCH 2/3] drm/amdgpu: remove amdgpu_ttm_late_init and amdgpu_bo_late_init Alex Deucher
2020-12-08 16:05 ` [PATCH 3/3] drm/amdgpu: fix size calculation with stolen vga memory Alex Deucher
2020-12-08 17:41 ` Christian König [this message]
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=c60e4b0d-5b1c-1b4f-49a6-7756176a4217@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=alexdeucher@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.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