From: "Christian König" <deathsimple@vodafone.de>
To: "Michel Dänzer" <michel@daenzer.net>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/radeon: Restore GART table contents after pinning it in VRAM v3
Date: Thu, 22 Jan 2015 11:40:37 +0100 [thread overview]
Message-ID: <54C0D3A5.7060305@vodafone.de> (raw)
In-Reply-To: <1421920726-11991-1-git-send-email-michel@daenzer.net>
Am 22.01.2015 um 10:58 schrieb Michel Dänzer:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> The GART table BO has to be moved out of VRAM for suspend/resume. Any
> updates to the GART table during that time were silently dropped without
> this change. This caused GPU lockups on resume in some cases, see the bug
> reports referenced below.
>
> This might also make GPU reset more robust in some cases, as we no longer
> rely on the GART table in VRAM being preserved across the GPU
> lockup/reset.
>
> v2: Add logic to radeon_gart_table_vram_pin directly instead of
> reinstating radeon_gart_restore
> v3: Move code after assignment of rdev->gart.table_addr so that the GART
> TLB flush can work as intended, add code comment explaining why we're
> doing this
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85204
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86267
> Cc: stable@vger.kernel.org
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
This one and the two others in the series are Reviewed-by: Christian
König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/radeon/radeon_gart.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c
> index a530932..c7be612 100644
> --- a/drivers/gpu/drm/radeon/radeon_gart.c
> +++ b/drivers/gpu/drm/radeon/radeon_gart.c
> @@ -165,6 +165,19 @@ int radeon_gart_table_vram_pin(struct radeon_device *rdev)
> radeon_bo_unpin(rdev->gart.robj);
> radeon_bo_unreserve(rdev->gart.robj);
> rdev->gart.table_addr = gpu_addr;
> +
> + if (!r) {
> + int i;
> +
> + /* We might have dropped some GART table updates while it wasn't
> + * mapped, restore all entries
> + */
> + for (i = 0; i < rdev->gart.num_gpu_pages; i++)
> + radeon_gart_set_page(rdev, i, rdev->gart.pages_entry[i]);
> + mb();
> + radeon_gart_tlb_flush(rdev);
> + }
> +
> return r;
> }
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-01-22 10:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-21 8:36 [PATCH 1/3] drm/radeon: Split off gart_get_page_entry ASIC hook from set_page_entry Michel Dänzer
2015-01-21 8:36 ` [PATCH 2/3] drm/radeon: Reinstate radeon_gart_restore for GART table in VRAM Michel Dänzer
2015-01-21 9:22 ` Christian König
2015-01-22 7:30 ` [PATCH v2 2/3] drm/radeon: Restore GART table contents after pinning it " Michel Dänzer
2015-01-22 9:06 ` Christian König
2015-01-22 9:58 ` [PATCH 2/3] drm/radeon: Restore GART table contents after pinning it in VRAM v3 Michel Dänzer
2015-01-22 10:40 ` Christian König [this message]
2015-01-22 9:59 ` [PATCH v2 2/3] drm/radeon: Restore GART table contents after pinning it in VRAM Michel Dänzer
2015-01-22 7:31 ` [PATCH 2/3] drm/radeon: Reinstate radeon_gart_restore for GART table " Michel Dänzer
2015-01-22 9:08 ` Christian König
2015-01-22 9:28 ` Michel Dänzer
2015-01-22 9:52 ` Michel Dänzer
2015-01-21 8:36 ` [PATCH 3/3] drm/radeon: Remove rdev->gart.pages_addr array Michel Dänzer
2015-01-22 16:49 ` [PATCH 1/3] drm/radeon: Split off gart_get_page_entry ASIC hook from set_page_entry Alex Deucher
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=54C0D3A5.7060305@vodafone.de \
--to=deathsimple@vodafone.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=michel@daenzer.net \
/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