From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Christian_K=c3=b6nig?= Subject: Re: [PATCH 1/3] radeon/cik: Fix GFX IB test on Big-Endian Date: Sat, 5 Dec 2015 11:23:41 +0100 Message-ID: <5662BB2D.3040007@vodafone.de> References: <1449263345-4938-1-git-send-email-oded.gabbay@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1449263345-4938-1-git-send-email-oded.gabbay@gmail.com> Sender: stable-owner@vger.kernel.org To: Oded Gabbay , dri-devel@lists.freedesktop.org, alexdeucher@gmail.com Cc: stable@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org Patch #1 & #2 are Reviewed-by: Christian K=C3=B6nig =46or patch #3: Couldn't we just in a loop go over all the dw in the IB and swap them=20 after writing them? That would simplify the patch massively. And line like the one below just look a bit odd to me: > for (i =3D ib.length_dw; i < ib_size_dw; ++i) > - ib.ptr[i] =3D 0x0; > + ib.ptr[i] =3D cpu_to_le32(0x0); Alternatively a helper function adding DW to an IB with swapping could=20 do it as well. Regards, Christian. On 04.12.2015 22:09, Oded Gabbay wrote: > This patch makes the IB test on the GFX ring pass for CI-based cards > installed in Big-Endian machines. > > Signed-off-by: Oded Gabbay > Cc: stable@vger.kernel.org > --- > drivers/gpu/drm/radeon/cik.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/ci= k.c > index 248953d..05d43a0 100644 > --- a/drivers/gpu/drm/radeon/cik.c > +++ b/drivers/gpu/drm/radeon/cik.c > @@ -4173,11 +4173,7 @@ void cik_ring_ib_execute(struct radeon_device = *rdev, struct radeon_ib *ib) > control |=3D ib->length_dw | (vm_id << 24); > =20 > radeon_ring_write(ring, header); > - radeon_ring_write(ring, > -#ifdef __BIG_ENDIAN > - (2 << 0) | > -#endif > - (ib->gpu_addr & 0xFFFFFFFC)); > + radeon_ring_write(ring, (ib->gpu_addr & 0xFFFFFFFC)); > radeon_ring_write(ring, upper_32_bits(ib->gpu_addr) & 0xFFFF); > radeon_ring_write(ring, control); > }