From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Christian_K=F6nig?= Subject: Re: [PATCH] drm/radeon: fix regression in dynpm due to multi-ring rework Date: Thu, 14 Jun 2012 22:17:18 +0200 Message-ID: <4FDA46CE.9080102@vodafone.de> References: <1339703697-16413-1-git-send-email-alexdeucher@gmail.com> 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 51D799ED68 for ; Thu, 14 Jun 2012 13:17:27 -0700 (PDT) In-Reply-To: <1339703697-16413-1-git-send-email-alexdeucher@gmail.com> 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: alexdeucher@gmail.com Cc: Alex Deucher , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On 14.06.2012 21:54, alexdeucher@gmail.com wrote: > From: Alex Deucher > > Not all asics have all rings, so make sure the ring is ready > before attempting to check it in the dynpm work handler. > > Fixes: > https://bugzilla.kernel.org/show_bug.cgi?id=3D43367 > > Signed-off-by: Alex Deucher Reviewed-by: Christian K=F6nig > --- > drivers/gpu/drm/radeon/radeon_pm.c | 10 +++++++--- > 1 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/= radeon_pm.c > index 79642cd..7ae6066 100644 > --- a/drivers/gpu/drm/radeon/radeon_pm.c > +++ b/drivers/gpu/drm/radeon/radeon_pm.c > @@ -793,9 +793,13 @@ static void radeon_dynpm_idle_work_handler(struct wo= rk_struct *work) > int i; > > for (i =3D 0; i< RADEON_NUM_RINGS; ++i) { > - not_processed +=3D radeon_fence_count_emitted(rdev, i); > - if (not_processed>=3D 3) > - break; > + struct radeon_ring *ring =3D&rdev->ring[i]; > + > + if (ring->ready) { > + not_processed +=3D radeon_fence_count_emitted(rdev, i); > + if (not_processed>=3D 3) > + break; > + } > } > > if (not_processed>=3D 3) { /* should upclock */