From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Christian_K=F6nig?= Subject: Re: [PATCH 13/16] drm/radeon: move radeon_ib_ring_tests out of chipset code Date: Mon, 09 Jul 2012 17:22:23 +0200 Message-ID: <4FFAF72F.9030307@vodafone.de> References: <1341830523-30320-1-git-send-email-deathsimple@vodafone.de> <1341830523-30320-14-git-send-email-deathsimple@vodafone.de> <1341845210.12576.282.camel@thor.local> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Content-Transfer-Encoding: quoted-printable Return-path: Received: from outgoing.email.vodafone.de (outgoing.email.vodafone.de [139.7.28.128]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E5E29E771 for ; Mon, 9 Jul 2012 08:22:26 -0700 (PDT) In-Reply-To: <1341845210.12576.282.camel@thor.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: =?ISO-8859-1?Q?Michel_D=E4nzer?= Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On 09.07.2012 17:06, Michel D=E4nzer wrote: > On Mon, 2012-07-09 at 12:42 +0200, Christian K=F6nig wrote: >> Making it easier to controlwhen it is executed. >> >> Signed-off-by: Christian K=F6nig > [...] >> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/ra= deon/radeon_device.c >> index 254fdb4..bbd0971 100644 >> --- a/drivers/gpu/drm/radeon/radeon_device.c >> +++ b/drivers/gpu/drm/radeon/radeon_device.c >> @@ -822,6 +822,10 @@ int radeon_device_init(struct radeon_device *rdev, >> if (r) >> return r; >> = >> + r =3D radeon_ib_ring_tests(rdev); >> + if (r) >> + DRM_ERROR("ib ring test failed (%d).\n", r); >> + >> if (rdev->flags & RADEON_IS_AGP && !rdev->accel_working) { >> /* Acceleration not working on AGP card try again >> * with fallback to PCI or PCIE GART > I think this needs to set rdev->accel_working =3D false on failure, so the > AGP -> PCI(e) fallback can kick in. See the implementation of radeon_ib_ring_tests, it is already handling = that internally. > Not sure about the other places where you're adding > radeon_ib_ring_tests() calls, might need more error handling as well. radeon_ib_ring_tests is already handling most errors internally, e. g. = it sets the accel_working and the ring->ready flags to false if anything = goes wrong. The return value is mostly for the case where we want to try = the reset a second time if restoring the ring commands leads to another = lockup. I just doesn't want to ignore the result completely, so the = additional error message. Christian.