All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel@daenzer.net>
To: "Christian König" <deathsimple@vodafone.de>, raof@ubuntu.com
Cc: amd-gfx@lists.freedesktop.org,
	Christopher James Halse Rogers
	<christopher.halse.rogers@canonical.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 4/6] drm/amd/amdgpu: Pin bos from imported dma-bufs to GTT.
Date: Wed, 29 Mar 2017 18:07:59 +0900	[thread overview]
Message-ID: <195054e4-cd93-0866-083a-eddafa3400e5@daenzer.net> (raw)
In-Reply-To: <5e5813f0-2efb-cb00-5a87-8894068ec5fc@vodafone.de>

On 29/03/17 04:14 PM, Christian König wrote:
> Am 29.03.2017 um 02:27 schrieb raof@ubuntu.com:
>> From: Christopher James Halse Rogers
>> <christopher.halse.rogers@canonical.com>
>>
>> Attempting to migrate the bo will break the sharing of the buffer.
>>
>> Signed-off-by: Christopher James Halse Rogers
>> <christopher.halse.rogers@canonical.com>
>> CC: amd-gfx@lists.freedesktop.org
> 
> NAK on this one and the radeon version.
> 
> We can't migrate the buffers to VRAM, but we shouldn't pin it either
> cause that will lock down the GTT space used for it.

Ah, good point, didn't think of that.


> Instead you should modify amdgpu_bo_pin() and fail if anybody tries to
> migrate a BO which has prime_shared_count != 0 to VRAM (you migth need
> to add this for radeon).

This would also need to be checked in the AMDGPU_GEM_OP_SET_PLACEMENT
case of amdgpu_gem_op_ioctl, otherwise userspace can change
prefered_domains to AMDGPU_GEM_DOMAIN_VRAM, and using the BO for GPU
operations may move it to VRAM.

Or maybe there's a central place which can catch both of these cases
(and any others).


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-03-29  9:07 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29  0:27 [PATCH] Fixes for interaction of imported dma-bufs and scanout raof
2017-03-29  0:27 ` [PATCH 1/6] drm/nouveau: Fail fb creation from imported dma-bufs raof
2017-03-29  8:47   ` Maarten Lankhorst
2017-03-29  0:27 ` [PATCH 2/6] drm/nouveau: Pin bos from imported dma-bufs to GTT raof
2017-03-29  8:45   ` Maarten Lankhorst
2017-04-03  5:56   ` [PATCH 2/6 v2] drm/nouveau: Pin bos from imported dma-bufs to GTT. (v2) raof
     [not found] ` <20170329002720.11445-1-raof-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>
2017-03-29  0:27   ` [PATCH 3/6] drm/amdgpu: Fail fb creation from imported dma-bufs raof-GeWIH/nMZzLQT0dZR+AlfA
     [not found]     ` <20170329002720.11445-4-raof-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>
2017-03-29  2:03       ` Michel Dänzer
     [not found]         ` <4a950f45-3ad5-2d63-c434-0474e8cfda37-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-03-29  3:41           ` Christopher James Halse Rogers
2017-03-29  4:02       ` [PATCH v2] drm/amdgpu: Fail fb creation from imported dma-bufs. (v2) raof-GeWIH/nMZzLQT0dZR+AlfA
     [not found]         ` <20170329040211.18844-1-raof-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>
2017-03-29  6:07           ` Michel Dänzer
     [not found]             ` <2b175dd8-abeb-b3e7-d783-355607a48fda-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-03-29 21:51               ` Alex Deucher
2017-03-29  0:27   ` [PATCH 4/6] drm/amd/amdgpu: Pin bos from imported dma-bufs to GTT raof-GeWIH/nMZzLQT0dZR+AlfA
2017-03-29  1:57     ` Michel Dänzer
2017-03-29  7:14     ` Christian König
2017-03-29  9:07       ` Michel Dänzer [this message]
2017-03-29  9:11         ` Christian König
     [not found]     ` <20170329002720.11445-5-raof-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>
2017-04-03  3:31       ` [PATCH 4/6 (v2)] drm/amdgpu: Refuse to pin or change acceptable domains of prime BOs to VRAM. (v2) raof-GeWIH/nMZzLQT0dZR+AlfA
2017-03-29  0:27   ` [PATCH 5/6] drm/radeon: Fail fb creation from imported dma-bufs raof-GeWIH/nMZzLQT0dZR+AlfA
     [not found]     ` <20170329002720.11445-6-raof-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>
2017-03-29  4:00       ` [PATCH v2] " raof-GeWIH/nMZzLQT0dZR+AlfA
     [not found]         ` <20170329040054.18587-1-raof-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>
2017-03-29  7:18           ` Christian König
2017-03-29  0:27 ` [PATCH 6/6] drm/radeon: Pin bos from imported dma-bufs to GTT raof
     [not found]   ` <20170329002720.11445-7-raof-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>
2017-04-03  3:35     ` [PATCH 6/7] drm/radeon: Maintain prime import/export refcount for BOs raof-GeWIH/nMZzLQT0dZR+AlfA
     [not found]       ` <20170403033523.22639-1-raof-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>
2017-04-03  3:35         ` [PATCH 7/7 v2] drm/radeon: Refuse to migrate a prime BO to VRAM. (v2) raof-GeWIH/nMZzLQT0dZR+AlfA
     [not found]           ` <20170403033523.22639-2-raof-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>
2017-04-03  8:24             ` Christian König
2017-04-03 15:51               ` Alex Deucher
2017-04-03 16:00                 ` Christian König
     [not found]                   ` <c9417139-b930-040b-c186-e99b8ecc3474-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-04  8:03                     ` Christopher James Halse Rogers
     [not found]               ` <4fe38f82-c9d5-c212-fa05-08c2b4684c4e-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-04 15:08                 ` 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=195054e4-cd93-0866-083a-eddafa3400e5@daenzer.net \
    --to=michel@daenzer.net \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christopher.halse.rogers@canonical.com \
    --cc=deathsimple@vodafone.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=raof@ubuntu.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 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.