From: "Christian König" <deathsimple@vodafone.de>
To: "Michel Dänzer" <michel@daenzer.net>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/radeon: save/restore the PD addr on suspend/resume
Date: Thu, 28 Aug 2014 10:27:28 +0200 [thread overview]
Message-ID: <53FEE7F0.4030104@vodafone.de> (raw)
In-Reply-To: <53FEA559.2090405@daenzer.net>
Am 28.08.2014 um 05:43 schrieb Michel Dänzer:
> On 26.08.2014 21:45, Christian König wrote:
>> From: Christian König <christian.koenig@amd.com>
>>
>> This fixes a problem with GPU resets and TLB flushes on SI/CIK.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>
> [...]
>
>> diff --git a/drivers/gpu/drm/radeon/radeon.h
>> b/drivers/gpu/drm/radeon/radeon.h
>> index f2dba50..8810df3 100644
>> --- a/drivers/gpu/drm/radeon/radeon.h
>> +++ b/drivers/gpu/drm/radeon/radeon.h
>> @@ -918,6 +918,8 @@ struct radeon_vm_manager {
>> u64 vram_base_offset;
>> /* is vm enabled? */
>> bool enabled;
>> + /* for hw to save the PD addr on suspend/resume */
>> + uint32_t saved_table_addr[RADEON_NUM_VM];
>> };
>>
>> /*
>> diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
>> index 011779b..28b5f06 100644
>> --- a/drivers/gpu/drm/radeon/si.c
>> +++ b/drivers/gpu/drm/radeon/si.c
>> @@ -4291,10 +4291,10 @@ static int si_pcie_gart_enable(struct
>> radeon_device *rdev)
>> for (i = 1; i < 16; i++) {
>> if (i < 8)
>> WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (i << 2),
>> - rdev->gart.table_addr >> 12);
>> + rdev->vm_manager.saved_table_addr[i]);
>> else
>> WREG32(VM_CONTEXT8_PAGE_TABLE_BASE_ADDR + ((i - 8) << 2),
>> - rdev->gart.table_addr >> 12);
>> + rdev->vm_manager.saved_table_addr[i]);
>> }
>>
>> /* enable context1-15 */
>
> rdev->vm_manager.saved_table_addr[] doesn't get initialized before
> *_gart_enable() is first called from *_startup(), does it? I guess
> that's fine, but the comments in *_gart_enable() should be adapted to
> this change.
It gets zero initialized on allocation. But your right I only updated
the code comment on CIK, not on SI and NI.
Going to fix this in a follow up patch,
Christian.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2014-08-28 8:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 12:45 [PATCH] drm/radeon: save/restore the PD addr on suspend/resume Christian König
2014-08-26 13:15 ` Alex Deucher
2014-08-28 3:43 ` Michel Dänzer
2014-08-28 8:27 ` 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=53FEE7F0.4030104@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.