From: "Christian König" <deathsimple@vodafone.de>
To: "Michel Dänzer" <michel@daenzer.net>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/radeon: Don't flush the GART TLB if rdev->gart.ptr == NULL
Date: Fri, 03 Jul 2015 11:46:18 +0200 [thread overview]
Message-ID: <559659EA.5000200@vodafone.de> (raw)
In-Reply-To: <1435885347-5448-1-git-send-email-michel@daenzer.net>
On 03.07.2015 03:02, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> This can be the case when the GPU is powered off, e.g. via vgaswitcheroo
> or runpm. When the GPU is powered up again, radeon_gart_table_vram_pin
> flushes the TLB after setting rdev->gart.ptr to non-NULL.
>
> Fixes panic on powering off R7xx GPUs.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61529
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/radeon/radeon_gart.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c
> index 5450fa9..c4777c8 100644
> --- a/drivers/gpu/drm/radeon/radeon_gart.c
> +++ b/drivers/gpu/drm/radeon/radeon_gart.c
> @@ -260,8 +260,10 @@ void radeon_gart_unbind(struct radeon_device *rdev, unsigned offset,
> }
> }
> }
> - mb();
> - radeon_gart_tlb_flush(rdev);
> + if (rdev->gart.ptr) {
> + mb();
> + radeon_gart_tlb_flush(rdev);
> + }
> }
>
> /**
> @@ -306,8 +308,10 @@ int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
> page_base += RADEON_GPU_PAGE_SIZE;
> }
> }
> - mb();
> - radeon_gart_tlb_flush(rdev);
> + if (rdev->gart.ptr) {
> + mb();
> + radeon_gart_tlb_flush(rdev);
> + }
> return 0;
> }
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-07-03 9:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-03 1:02 [PATCH] drm/radeon: Don't flush the GART TLB if rdev->gart.ptr == NULL Michel Dänzer
2015-07-03 9:46 ` Christian König [this message]
2015-07-03 19:27 ` 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=559659EA.5000200@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.