From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?Q2hyaXN0aWFuIEvDtm5pZw==?= Subject: Re: [PATCH] drm/radeon: drop ttm two ended allocation Date: Tue, 17 Mar 2015 17:13:21 +0100 Message-ID: <550852A1.3090402@vodafone.de> References: <1426607955-2397-1-git-send-email-alexander.deucher@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1426607955-2397-1-git-send-email-alexander.deucher@amd.com> Sender: stable-owner@vger.kernel.org To: Alex Deucher , dri-devel@lists.freedesktop.org Cc: Alex Deucher , stable@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org On 17.03.2015 16:59, Alex Deucher wrote: > radeon_bo_create() calls radeon_ttm_placement_from_domain() > before ttm_bo_init() is called. radeon_ttm_placement_from_domain() > uses the ttm bo size to determine when to select top down > allocation but since the ttm bo is not initialized yet the > check is always false. It only took affect when buffers > were validated later. It also seemed to regress suspend > and resume on some systems possibly due to it not > taking affect in radeon_bo_create(). > > radeon_bo_create() and radeon_ttm_placement_from_domain() > need to be reworked substantially for this to be optimally > effective. Re-enable it at that point. > > Noticed-by: Oded Gabbay > Signed-off-by: Alex Deucher > Cc: stable@vger.kernel.org Reviewed-by: Christian K=C3=B6nig > --- > drivers/gpu/drm/radeon/radeon_object.c | 11 ----------- > 1 file changed, 11 deletions(-) > > diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm= /radeon/radeon_object.c > index 43e0994..318165d 100644 > --- a/drivers/gpu/drm/radeon/radeon_object.c > +++ b/drivers/gpu/drm/radeon/radeon_object.c > @@ -173,17 +173,6 @@ void radeon_ttm_placement_from_domain(struct rad= eon_bo *rbo, u32 domain) > else > rbo->placements[i].lpfn =3D 0; > } > - > - /* > - * Use two-ended allocation depending on the buffer size to > - * improve fragmentation quality. > - * 512kb was measured as the most optimal number. > - */ > - if (rbo->tbo.mem.size > 512 * 1024) { > - for (i =3D 0; i < c; i++) { > - rbo->placements[i].flags |=3D TTM_PL_FLAG_TOPDOWN; > - } > - } > } > =20 > int radeon_bo_create(struct radeon_device *rdev,