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: Fri, 15 Jul 2016 22:09:50 +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="===============0779105355==" Return-path: Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 98CEE6EADA for ; Fri, 15 Jul 2016 20:09:52 +0000 (UTC) Received: by mail-it0-x243.google.com with SMTP id h190so1910992ith.3 for ; Fri, 15 Jul 2016 13:09:52 -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 --===============0779105355== Content-Type: multipart/alternative; boundary=001a114ab0008220860537b233ee --001a114ab0008220860537b233ee Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Ping? 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 of > 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); /* Returns >> the Square Root of a fInt number */ >> > >> > static int uAbs(int); /* Returns >> the Absolute value of the Int */ >> > -static fInt fAbs(fInt); /* Returns >> the Absolute value of the fInt */ >> > static int uPow(int base, int exponent); /* Returns >> base^exponent an INT */ >> > >> > static void SolveQuadracticEqn(fInt, fInt, fInt, fInt[]); /* Returns >> 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 - Thi= s >> is unsafe for a variety of reasons. >> > */ >> > -static fInt Add (int, int); /* Add two >> 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 get >> the idea... */ >> > +static fInt Divide (int, int); /* Divide >> 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 us >> say we have 2.126 but can only handle 2 decimal points. We could */ >> > - /* either >> 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 testing >> 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 decimal >> 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 >> > > --001a114ab0008220860537b233ee Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Ping?


Den 6 juni 2016 2= 1:32 skrev "Nils Wallm=C3=A9nius" <nils.wallmenius@gmail.com>:
Hi Alex,

Any response from the powerplay team?

If they a= re unresponsive, would you prefer to #IF 0 the code instead of deleting?

Regards
Nils

On Mon, Apr 25, 2016 at 10:08 PM, A= lex Deucher <alexdeucher@gmail.com> wrote:
On Sun, Apr 24, 2016 at 7:22 AM, Nils Wallm=C3=A9nius<= br> <nils.wal= lmenius@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 planning
to use these in the near future.

Alex


> ---
>=C2=A0 drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h | 59 +----------= --------------
>=C2=A0 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);=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
>=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, fInt[]); /* Ret= urns the 2 roots via the array */
> @@ -85,21 +84,12 @@ static fInt fDecodeLeakageID (uint32_t leakageID_f= use, fInt ln_max_div_min, fInt
>=C2=A0 =C2=A0* --------------------------------------------------------= -----------------------------
>=C2=A0 =C2=A0* Some of the following functions take two INTs as their i= nput - 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 /* Multiply two INT= s 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 I= NTs 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 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 /* In= ternal 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 functi= on - Useful only when Precision is lacking */
> -=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 w= e have 2.126 but can only handle 2 decimal points. We 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, f= Int 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 p= lace */
> -{
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0/* ROUNDING TEMPORARLY DISABLED
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0int temp =3D A.full;
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0int decimal_cutoff, decimal_mask =3D 0x000= 001FF;
> -=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=A0temp +=3D 673;=
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0}*/
> -
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0return ConvertBackToInteger(A)/10000; /*Te= mporary - 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_AMOUNT;
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0B.full =3D Y << SHIFT_AMOUNT;
> -
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0Product =3D fMultiply(A, B);
> -
> -=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 (b= ase)*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=A0return (fMulti= ply(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=A0return 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
> d= ri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/l= istinfo/dri-devel

--001a114ab0008220860537b233ee-- --===============0779105355== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0779105355==--