Re: [PATCH 4/9] drm/amdgpu: Don't force BOs into visible VRAM if they can go to GTT instead

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 24, 2017 at 08:09:56PM +0200, Christian König wrote:
> Am 23.06.2017 um 19:39 schrieb John Brooks:
> >amdgpu_ttm_placement_init() callers that are using both VRAM and GTT as
> >domains usually don't want visible VRAM as a busy placement.
> >
> >Signed-off-by: John Brooks <john@xxxxxxxxxxxxx>
> 
> NAK to this as well. Some callers of amdgpu_ttm_placement_init() have hard
> placement limitations that BOs *MUST* be in VRAM (VM page tables and old UVD
> hardware).
> 
> So changing that here will just break those under memory pressure.
> 
> Regards,
> Christian.

Right, that was just some silly attempt at deduplication. I can rework it.

Thanks,
John

> 
> >---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 10 +++++++++-
> >  1 file changed, 9 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> >index 751bc05..0ff555a 100644
> >--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> >+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> >@@ -138,7 +138,15 @@ static void amdgpu_ttm_placement_init(struct amdgpu_device *adev,
> >  		if (flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)
> >  			places[c].flags |= TTM_PL_FLAG_CONTIGUOUS;
> >-		busy_places[bc++] = places[c++];
> >+		/* Don't set limited visible VRAM as a busy placement if we can
> >+		 * use GTT instead
> >+		 */
> >+		if (!((flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) &&
> >+		      adev->mc.visible_vram_size < adev->mc.real_vram_size &&
> >+		      (domain & AMDGPU_GEM_DOMAIN_GTT)))
> >+			busy_places[bc++] = places[c];
> >+
> >+		c++;
> >  	}
> >  	if (domain & AMDGPU_GEM_DOMAIN_GTT) {
> 
> 
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux