From: Alex Deucher Subject: Re: [PATCH V3] drm/radeon/kms: implement reading active PCIE lanes on R600+ Date: Thu, 18 Feb 2010 17:36:43 -0500 Message-ID: References: <1266524668-8021-1-git-send-email-zajec5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net To: =?ISO-8859-2?Q?Rafa=B3_Mi=B3ecki?= Cc: dri-devel@lists.sourceforge.net List-Id: dri-devel@lists.freedesktop.org 2010/2/18 Rafa=B3 Mi=B3ecki : > W dniu 18 lutego 2010 22:04 u=BFytkownik Alex Deucher > napisa=B3: >> 2010/2/18 Rafa=B3 Mi=B3ecki : >>> Signed-off-by: Rafa=B3 Mi=B3ecki >>> --- >>> V2: use already implemented functions for reading/writing PCIE PORT >>> V3: fix rreg/wreg typo in macro >>> >>> Thanks Alex for reviewing! >>> --- >>> =A0drivers/gpu/drm/radeon/r300.c =A0 =A0 =A0 =A0| =A0 =A05 ++++- >>> =A0drivers/gpu/drm/radeon/radeon.h =A0 =A0 =A0| =A0 =A02 ++ >>> =A0drivers/gpu/drm/radeon/radeon_asic.h | =A0 =A04 ++-- >>> =A0drivers/gpu/drm/radeon/radeon_pm.c =A0 | =A0 =A02 ++ >>> =A04 files changed, 10 insertions(+), 3 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r30= 0.c >>> index 7e9f956..29ef9d8 100644 >>> --- a/drivers/gpu/drm/radeon/r300.c >>> +++ b/drivers/gpu/drm/radeon/r300.c >>> @@ -549,7 +549,10 @@ int rv370_get_pcie_lanes(struct radeon_device *rde= v) >>> >>> =A0 =A0 =A0 =A0/* FIXME wait for idle */ >>> >>> - =A0 =A0 =A0 link_width_cntl =3D RREG32_PCIE(RADEON_PCIE_LC_LINK_WIDTH= _CNTL); >>> + =A0 =A0 =A0 if (rdev->family < CHIP_R600) >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 link_width_cntl =3D RREG32_PCIE(RADEON_PC= IE_LC_LINK_WIDTH_CNTL); >>> + =A0 =A0 =A0 else >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 link_width_cntl =3D RREG32_PCIE_P(RADEON_= PCIE_LC_LINK_WIDTH_CNTL); >> >> Since you also have a patch to implement setting the number of lanes, >> it would be better to create a new r600 version of get_pcie_lanes() >> since we may need other r6xx+ specific stuff in it. > > If we get to point where r6xx+ code will differ more, I'm ready to > implement that. But if that's matter of just one condition, is that > worth splitting it into two functions? I guess it's ok for now. I just don't want to get make it too confusing later on. BTW, does it actually work? I found that generally it always reads back 0 regardless of how many lanes are enabled. Alex ---------------------------------------------------------------------------= --- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev --