From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Nils_Wallm=C3=A9nius?= Subject: Re: [PATCH 2/2] drm/amd/powerplay: Delete unused functions in ppevvmath.h Date: Sat, 16 Jul 2016 05:51:15 +0200 Message-ID: References: <1461496951-11055-1-git-send-email-nils.wallmenius@gmail.com> <1461496951-11055-2-git-send-email-nils.wallmenius@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1088975144==" Return-path: Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 42DFE6E13C for ; Sat, 16 Jul 2016 03:51:17 +0000 (UTC) Received: by mail-io0-x241.google.com with SMTP id g86so7484598ioj.1 for ; Fri, 15 Jul 2016 20:51:17 -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: Alex Deucher Cc: Maling list - DRI developers List-Id: dri-devel@lists.freedesktop.org --===============1088975144== Content-Type: multipart/alternative; boundary=001a114289f2a1c85d0537b8a56e --001a114289f2a1c85d0537b8a56e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Ok, cool. I will probably be able to do that on monday. Nils Den 15 juli 2016 11:06 em skrev "Alex Deucher" : > On Fri, Jul 15, 2016 at 4:09 PM, Nils Wallm=C3=A9nius > wrote: > > Ping? > > We don't seem to be using them. Can you respin? It doesn't seem to > apply any longer. > > Alex > > > > > > > > Den 6 juni 2016 21:32 skrev "Nils Wallm=C3=A9nius" >: > >> > >> Hi Alex, > >> > >> Any response from the powerplay team? > >> > >> If they are unresponsive, would you prefer to #IF 0 the code instead o= f > >> deleting? > >> > >> Regards > >> Nils > >> > >> On Mon, Apr 25, 2016 at 10:08 PM, Alex Deucher > >> wrote: > >>> > >>> On Sun, Apr 24, 2016 at 7:22 AM, Nils Wallm=C3=A9nius > >>> wrote: > >>> > Signed-off-by: Nils Wallm=C3=A9nius > >>> > >>> Let me check with the powerplay team and make sure they are planning > >>> to use these in the near future. > >>> > >>> Alex > >>> > >>> > >>> > --- > >>> > drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h | 59 > >>> > +------------------------ > >>> > 1 file changed, 1 insertion(+), 58 deletions(-) > >>> > > >>> > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h > >>> > b/drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h > >>> > index a9b40eb..8f50a03 100644 > >>> > --- a/drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h > >>> > +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h > >>> > @@ -64,7 +64,6 @@ static fInt fGetSquare(fInt); > >>> > /* Returns the square > >>> > static fInt fSqrt(fInt); /* Retur= ns > >>> > the Square Root of a fInt number */ > >>> > > >>> > static int uAbs(int); /* Retur= ns > >>> > the Absolute value of the Int */ > >>> > -static fInt fAbs(fInt); /* Retur= ns > >>> > the Absolute value of the fInt */ > >>> > static int uPow(int base, int exponent); /* Retur= ns > >>> > base^exponent an INT */ > >>> > > >>> > static void SolveQuadracticEqn(fInt, fInt, fInt, fInt[]); /* Retur= ns > >>> > the 2 roots via the array */ > >>> > @@ -85,21 +84,12 @@ static fInt fDecodeLeakageID (uint32_t > >>> > leakageID_fuse, fInt ln_max_div_min, fInt > >>> > * > >>> > > -------------------------------------------------------------------------= ------------ > >>> > * Some of the following functions take two INTs as their input - > This > >>> > is unsafe for a variety of reasons. > >>> > */ > >>> > -static fInt Add (int, int); /* Add t= wo > >>> > INTs and return Sum as FINT */ > >>> > -static fInt Multiply (int, int); /* > Multiply > >>> > two INTs and return Product as FINT */ > >>> > -static fInt Divide (int, int); /* You g= et > >>> > the idea... */ > >>> > +static fInt Divide (int, int); /* Divid= e > >>> > two INTs and return result as FINT */ > >>> > static fInt fNegate(fInt); > >>> > > >>> > static int uGetScaledDecimal (fInt); /* > Internal > >>> > function */ > >>> > static int GetReal (fInt A); /* > Internal > >>> > function */ > >>> > > >>> > -/* Future Additions and Incomplete Functions > >>> > - * > >>> > > -------------------------------------------------------------------------= ------------ > >>> > - */ > >>> > -static int GetRoundedValue(fInt); /* > >>> > Incomplete function - Useful only when Precision is lacking */ > >>> > - /* Let u= s > >>> > say we have 2.126 but can only handle 2 decimal points. We could */ > >>> > - /* eithe= r > >>> > chop of 6 and keep 2.12 or use this function to get 2.13, which is > more > >>> > accurate */ > >>> > - > >>> > /* > >>> > > -------------------------------------------------------------------------= ------------ > >>> > * TROUBLESHOOTING INFORMATION > >>> > * > >>> > > -------------------------------------------------------------------------= ------------ > >>> > @@ -498,51 +488,12 @@ static void SolveQuadracticEqn(fInt A, fInt B= , > >>> > fInt C, fInt Roots[]) > >>> > * > >>> > > -------------------------------------------------------------------------= ---- > >>> > */ > >>> > > >>> > -/* Addition using two normal ints - Temporary - Use only for testi= ng > >>> > purposes?. */ > >>> > -static fInt Add (int X, int Y) > >>> > -{ > >>> > - fInt A, B, Sum; > >>> > - > >>> > - A.full =3D (X << SHIFT_AMOUNT); > >>> > - B.full =3D (Y << SHIFT_AMOUNT); > >>> > - > >>> > - Sum.full =3D A.full + B.full; > >>> > - > >>> > - return Sum; > >>> > -} > >>> > - > >>> > /* Conversion Functions */ > >>> > static int GetReal (fInt A) > >>> > { > >>> > return (A.full >> SHIFT_AMOUNT); > >>> > } > >>> > > >>> > -/* Temporarily Disabled */ > >>> > -static int GetRoundedValue(fInt A) /*For now, round the 3rd decima= l > >>> > place */ > >>> > -{ > >>> > - /* ROUNDING TEMPORARLY DISABLED > >>> > - int temp =3D A.full; > >>> > - int decimal_cutoff, decimal_mask =3D 0x000001FF; > >>> > - decimal_cutoff =3D temp & decimal_mask; > >>> > - if (decimal_cutoff > 0x147) { > >>> > - temp +=3D 673; > >>> > - }*/ > >>> > - > >>> > - return ConvertBackToInteger(A)/10000; /*Temporary - in case > >>> > this was used somewhere else */ > >>> > -} > >>> > - > >>> > -static fInt Multiply (int X, int Y) > >>> > -{ > >>> > - fInt A, B, Product; > >>> > - > >>> > - A.full =3D X << SHIFT_AMOUNT; > >>> > - B.full =3D Y << SHIFT_AMOUNT; > >>> > - > >>> > - Product =3D fMultiply(A, B); > >>> > - > >>> > - return Product; > >>> > -} > >>> > - > >>> > static fInt Divide (int X, int Y) > >>> > { > >>> > fInt A, B, Quotient; > >>> > @@ -578,14 +529,6 @@ static int uPow(int base, int power) > >>> > return (base)*uPow(base, power - 1); > >>> > } > >>> > > >>> > -static fInt fAbs(fInt A) > >>> > -{ > >>> > - if (A.partial.real < 0) > >>> > - return (fMultiply(A, ConvertToFraction(-1))); > >>> > - else > >>> > - return A; > >>> > -} > >>> > - > >>> > static int uAbs(int X) > >>> > { > >>> > if (X < 0) > >>> > -- > >>> > 2.8.0.rc3 > >>> > > >>> > _______________________________________________ > >>> > dri-devel mailing list > >>> > dri-devel@lists.freedesktop.org > >>> > https://lists.freedesktop.org/mailman/listinfo/dri-devel > >> > >> > > > --001a114289f2a1c85d0537b8a56e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Ok, cool. I will probably be able to do that on monday.

Nils


Den 15 juli 2016 = 11:06 em skrev "Alex Deucher" <alexdeucher@gmail.com>:
On Fri, Jul 15, 2016 at 4:09 PM, Nils Wallm=C3=A9nius<= br> <nils.wallmenius@gmail.com<= /a>> wrote:
> Ping?

We don't seem to be using them.=C2=A0 Can you respin?=C2=A0 It doesn= 9;t seem to
apply any longer.

Alex


>
>
> Den 6 juni 2016 21:32 skrev "Nils Wallm=C3=A9nius" <
nils.wallmenius@gmail.com>:<= br> >>
>> Hi Alex,
>>
>> Any response from the powerplay team?
>>
>> If they are unresponsive, would you prefer to #IF 0 the code inste= ad of
>> deleting?
>>
>> Regards
>> Nils
>>
>> On Mon, Apr 25, 2016 at 10:08 PM, Alex Deucher <alexdeucher@gmail.com>
>> wrote:
>>>
>>> On Sun, Apr 24, 2016 at 7:22 AM, Nils Wallm=C3=A9nius
>>> <nils.wallmeni= us@gmail.com> wrote:
>>> > Signed-off-by: Nils Wallm=C3=A9nius <nils.wallmenius@gmail.com>
>>>
>>> Let me check with the powerplay team and make sure they are pl= anning
>>> to use these in the near future.
>>>
>>> Alex
>>>
>>>
>>> > ---
>>> >=C2=A0 drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h | 5= 9
>>> > +------------------------
>>> >=C2=A0 1 file changed, 1 insertion(+), 58 deletions(-)
>>> >
>>> > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmat= h.h
>>> > b/drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h
>>> > index a9b40eb..8f50a03 100644
>>> > --- a/drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h
>>> > +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h
>>> > @@ -64,7 +64,6 @@ static fInt fGetSquare(fInt);
>>> > /* Returns the square
>>> >=C2=A0 static fInt fSqrt(fInt);=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 /* Returns
>>> > the Square Root of a fInt number */
>>> >
>>> >=C2=A0 static int uAbs(int);=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Returns
>>> > the Absolute value of the Int */
>>> > -static fInt fAbs(fInt);=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0/* Returns
>>> > the Absolute value of the fInt */
>>> >=C2=A0 static int uPow(int base, int exponent);=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Returns
>>> > base^exponent an INT */
>>> >
>>> >=C2=A0 static void SolveQuadracticEqn(fInt, fInt, fInt, fI= nt[]); /* Returns
>>> > the 2 roots via the array */
>>> > @@ -85,21 +84,12 @@ static fInt fDecodeLeakageID (uint32_= t
>>> > leakageID_fuse, fInt ln_max_div_min, fInt
>>> >=C2=A0 =C2=A0*
>>> > ---------------------------------------------------------= ----------------------------
>>> >=C2=A0 =C2=A0* Some of the following functions take two IN= Ts as their input - This
>>> > is unsafe for a variety of reasons.
>>> >=C2=A0 =C2=A0*/
>>> > -static fInt Add (int, int);=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0/* Add two
>>> > INTs and return Sum as FINT */
>>> > -static fInt Multiply (int, int);=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Multi= ply
>>> > two INTs and return Product as FINT */
>>> > -static fInt Divide (int, int);=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /= * You get
>>> > the idea... */
>>> > +static fInt Divide (int, int);=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /= * Divide
>>> > two INTs and return result as FINT */
>>> >=C2=A0 static fInt fNegate(fInt);
>>> >
>>> >=C2=A0 static int uGetScaledDecimal (fInt);=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Internal<= br> >>> > function */
>>> >=C2=A0 static int GetReal (fInt A);=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 /* Internal
>>> > function */
>>> >
>>> > -/* Future Additions and Incomplete Functions
>>> > - *
>>> > ---------------------------------------------------------= ----------------------------
>>> > - */
>>> > -static int GetRoundedValue(fInt);=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/*
>>> > Incomplete function - Useful only when Precision is lacki= ng */
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /= * Let us
>>> > say we have 2.126 but can only handle 2 decimal points. W= e could */
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /= * either
>>> > chop of 6 and keep 2.12 or use this function to get 2.13,= which is more
>>> > accurate */
>>> > -
>>> >=C2=A0 /*
>>> > ---------------------------------------------------------= ----------------------------
>>> >=C2=A0 =C2=A0* TROUBLESHOOTING INFORMATION
>>> >=C2=A0 =C2=A0*
>>> > ---------------------------------------------------------= ----------------------------
>>> > @@ -498,51 +488,12 @@ static void SolveQuadracticEqn(fInt= A, fInt B,
>>> > fInt C, fInt Roots[])
>>> >=C2=A0 =C2=A0*
>>> > ---------------------------------------------------------= --------------------
>>> >=C2=A0 =C2=A0*/
>>> >
>>> > -/* Addition using two normal ints - Temporary - Use only= for testing
>>> > purposes?. */
>>> > -static fInt Add (int X, int Y)
>>> > -{
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0fInt A, B, Sum;
>>> > -
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0A.full =3D (X << SHIFT_= AMOUNT);
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0B.full =3D (Y << SHIFT_= AMOUNT);
>>> > -
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0Sum.full =3D A.full + B.full;=
>>> > -
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0return Sum;
>>> > -}
>>> > -
>>> >=C2=A0 /* Conversion Functions */
>>> >=C2=A0 static int GetReal (fInt A)
>>> >=C2=A0 {
>>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (A.full >> = SHIFT_AMOUNT);
>>> >=C2=A0 }
>>> >
>>> > -/* Temporarily Disabled */
>>> > -static int GetRoundedValue(fInt A) /*For now, round the = 3rd decimal
>>> > place */
>>> > -{
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0/* ROUNDING TEMPORARLY DISABL= ED
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0int temp =3D A.full;
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0int decimal_cutoff, decimal_m= ask =3D 0x000001FF;
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0decimal_cutoff =3D temp &= decimal_mask;
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0if (decimal_cutoff > 0x147= ) {
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0t= emp +=3D 673;
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0}*/
>>> > -
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0return ConvertBackToInteger(A= )/10000; /*Temporary - in case
>>> > this was used somewhere else */
>>> > -}
>>> > -
>>> > -static fInt Multiply (int X, int Y)
>>> > -{
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0fInt A, B, Product;
>>> > -
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0A.full =3D X << SHIFT_A= MOUNT;
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0B.full =3D Y << SHIFT_A= MOUNT;
>>> > -
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0Product =3D fMultiply(A, B);<= br> >>> > -
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0return Product;
>>> > -}
>>> > -
>>> >=C2=A0 static fInt Divide (int X, int Y)
>>> >=C2=A0 {
>>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fInt A, B, Quotient;
>>> > @@ -578,14 +529,6 @@ static int uPow(int base, int power)=
>>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0return (base)*uPow(base, power - 1);
>>> >=C2=A0 }
>>> >
>>> > -static fInt fAbs(fInt A)
>>> > -{
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0if (A.partial.real < 0) >>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r= eturn (fMultiply(A, ConvertToFraction(-1)));
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0else
>>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r= eturn A;
>>> > -}
>>> > -
>>> >=C2=A0 static int uAbs(int X)
>>> >=C2=A0 {
>>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (X < 0)
>>> > --
>>> > 2.8.0.rc3
>>> >
>>> > _______________________________________________
>>> > dri-devel mailing list
>>> > dri-de= vel@lists.freedesktop.org
>>> > https://lists.freedesktop.= org/mailman/listinfo/dri-devel
>>
>>
>
--001a114289f2a1c85d0537b8a56e-- --===============1088975144== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1088975144==--