From: "Christian König" <deathsimple@vodafone.de>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/radeon: allways add the VM clear duplicate
Date: Wed, 08 Jul 2015 18:08:32 +0200 [thread overview]
Message-ID: <559D4B00.7070807@vodafone.de> (raw)
In-Reply-To: <CADnq5_NUt1bMeVZYC5rT6iWDnLrTUa_hqPxNJKScEhEw9-QyLg@mail.gmail.com>
On 08.07.2015 17:57, Alex Deucher wrote:
> On Wed, Jul 8, 2015 at 3:56 AM, Christian König <deathsimple@vodafone.de> wrote:
>> From: Christian König <christian.koenig@amd.com>
>>
>> We need to allways add the VM clear duplicate of the BO_VA,
>> no matter what the old status was.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> Test-by: hadack@gmx.de
> This patch does not apply cleanly. It also adds an undefined label
> error_unreserve. Is there an additional patch required?
That's possible, but I thought the depending patch would have already
been upstream.
Can you create a drm-fixes-4.2 branch I can rebase on?
Thanks,
Christian.
> Alex
>
>> ---
>> drivers/gpu/drm/radeon/radeon_vm.c | 34 ++++++++++++++++------------------
>> 1 file changed, 16 insertions(+), 18 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
>> index ec10533..0310965 100644
>> --- a/drivers/gpu/drm/radeon/radeon_vm.c
>> +++ b/drivers/gpu/drm/radeon/radeon_vm.c
>> @@ -493,29 +493,27 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
>> }
>>
>> if (bo_va->it.start || bo_va->it.last) {
>> - spin_lock(&vm->status_lock);
>> - if (list_empty(&bo_va->vm_status)) {
>> - /* add a clone of the bo_va to clear the old address */
>> - struct radeon_bo_va *tmp;
>> - spin_unlock(&vm->status_lock);
>> - tmp = kzalloc(sizeof(struct radeon_bo_va), GFP_KERNEL);
>> - if (!tmp) {
>> - mutex_unlock(&vm->mutex);
>> - r = -ENOMEM;
>> - goto error_unreserve;
>> - }
>> - tmp->it.start = bo_va->it.start;
>> - tmp->it.last = bo_va->it.last;
>> - tmp->vm = vm;
>> - tmp->bo = radeon_bo_ref(bo_va->bo);
>> - spin_lock(&vm->status_lock);
>> - list_add(&tmp->vm_status, &vm->freed);
>> + /* add a clone of the bo_va to clear the old address */
>> + struct radeon_bo_va *tmp;
>> + tmp = kzalloc(sizeof(struct radeon_bo_va), GFP_KERNEL);
>> + if (!tmp) {
>> + mutex_unlock(&vm->mutex);
>> + r = -ENOMEM;
>> + goto error_unreserve;
>> }
>> - spin_unlock(&vm->status_lock);
>> + tmp->it.start = bo_va->it.start;
>> + tmp->it.last = bo_va->it.last;
>> + tmp->vm = vm;
>> + tmp->bo = radeon_bo_ref(bo_va->bo);
>>
>> interval_tree_remove(&bo_va->it, &vm->va);
>> bo_va->it.start = 0;
>> bo_va->it.last = 0;
>> +
>> + spin_lock(&vm->status_lock);
>> + list_del_init(&bo_va->vm_status);
>> + list_add(&tmp->vm_status, &vm->freed);
>> + spin_unlock(&vm->status_lock);
>> }
>>
>> if (soffset || eoffset) {
>> --
>> 1.9.1
>>
_______________________________________________
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-08 16:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 7:56 [PATCH 1/2] drm/radeon: allways add the VM clear duplicate Christian König
2015-07-08 7:56 ` [PATCH 2/2] drm/radeon: check if BO_VA is set before adding it to the invalidation list Christian König
2015-07-08 8:08 ` Michel Dänzer
2015-07-08 15:57 ` [PATCH 1/2] drm/radeon: allways add the VM clear duplicate Alex Deucher
2015-07-08 16:08 ` Christian König [this message]
2015-07-08 16:14 ` Alex Deucher
2015-07-08 16:31 ` Christian König
2015-07-08 16:33 ` Alex Deucher
2015-07-08 18:28 ` Christian König
2015-07-08 19:03 ` 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=559D4B00.7070807@vodafone.de \
--to=deathsimple@vodafone.de \
--cc=alexdeucher@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
/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;
as well as URLs for NNTP newsgroup(s).