From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?windows-1252?Q?Christian_K=F6nig?= Subject: Re: [PATCH 7/8] radeon: Out of line radeon_get_ib_value Date: Tue, 20 May 2014 20:14:17 +0200 Message-ID: <537B9B79.8030104@vodafone.de> References: <1400276595-6965-1-git-send-email-andi@firstfloor.org> <1400276595-6965-8-git-send-email-andi@firstfloor.org> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; Format="flowed" Content-Transfer-Encoding: quoted-printable Return-path: Received: from pegasos-out.vodafone.de (pegasos-out.vodafone.de [80.84.1.38]) by gabe.freedesktop.org (Postfix) with ESMTP id B10DA6E937 for ; Tue, 20 May 2014 11:14:33 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: =?windows-1252?Q?Marek_Ol=9A=E1k?= , Andi Kleen Cc: "Deucher, Alexander" , akpm@linux-foundation.org, Andi Kleen , linux-kernel@vger.kernel.org, dri-devel List-Id: dri-devel@lists.freedesktop.org Yeah, agree. That function is quite critical for command stream parsing = and patching. Christian. Am 20.05.2014 18:16, schrieb Marek Ol=9A=E1k: > I think the function should stay in the header file. It's used in > performance-critical code, so we want it to be inlined. > > Marek > > On Fri, May 16, 2014 at 11:43 PM, Andi Kleen wrote: >> From: Andi Kleen >> >> Saves about 5k of text >> >> text data bss dec hex filename >> 14080360 2008168 1507328 17595856 10c7dd0 vmlinux-before-r= adeon >> 14074978 2008168 1507328 17590474 10c68ca vmlinux-radeon >> >> Cc: alexander.deucher@amd.com >> Cc: dri-devel@lists.freedesktop.org >> Signed-off-by: Andi Kleen >> --- >> drivers/gpu/drm/radeon/radeon.h | 10 +--------- >> drivers/gpu/drm/radeon/radeon_device.c | 9 +++++++++ >> 2 files changed, 10 insertions(+), 9 deletions(-) >> >> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/ra= deon.h >> index 6852861..8cae409 100644 >> --- a/drivers/gpu/drm/radeon/radeon.h >> +++ b/drivers/gpu/drm/radeon/radeon.h >> @@ -1032,15 +1032,7 @@ struct radeon_cs_parser { >> struct ww_acquire_ctx ticket; >> }; >> >> -static inline u32 radeon_get_ib_value(struct radeon_cs_parser *p, int i= dx) >> -{ >> - struct radeon_cs_chunk *ibc =3D &p->chunks[p->chunk_ib_idx]; >> - >> - if (ibc->kdata) >> - return ibc->kdata[idx]; >> - return p->ib.ptr[idx]; >> -} >> - >> +u32 radeon_get_ib_value(struct radeon_cs_parser *p, int idx); >> >> struct radeon_cs_packet { >> unsigned idx; >> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/ra= deon/radeon_device.c >> index 0e770bb..1cbd171 100644 >> --- a/drivers/gpu/drm/radeon/radeon_device.c >> +++ b/drivers/gpu/drm/radeon/radeon_device.c >> @@ -112,6 +112,15 @@ bool radeon_is_px(struct drm_device *dev) >> return false; >> } >> >> +u32 radeon_get_ib_value(struct radeon_cs_parser *p, int idx) >> +{ >> + struct radeon_cs_chunk *ibc =3D &p->chunks[p->chunk_ib_idx]; >> + >> + if (ibc->kdata) >> + return ibc->kdata[idx]; >> + return p->ib.ptr[idx]; >> +} >> + >> /** >> * radeon_program_register_sequence - program an array of registers. >> * >> -- >> 1.9.0 >> >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/dri-devel > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel