drm/amd/powerplay: Mark functions of ppevvmath.h static
Subsystems (2)
PATCH 1/2 drm/amd/powerplay: Mark functions of ppevvmath.h static
This introduces some warnings due to unused functions, that are deleted in the following commit.
--- drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h | 128 ++++++++++++------------ 1 file changed, 64 insertions(+), 64 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +64 -64
@@ -50,55 +50,55 @@ typedef union _fInt {* Function Declarations * ------------------------------------------------------------------------------- */ -fInt ConvertToFraction (int );/* Use this to convert an INT to a FINT */ -fInt Convert_ULONG_ToFraction (uint32_t );/* Use this to convert an uint32_t to a FINT */ -fInt GetScaledFraction (int ,int );/* Use this to convert an INT to a FINT after scaling it by a factor */ -int ConvertBackToInteger (fInt );/* Convert a FINT back to an INT that is scaled by 1000 (i.e. last 3 digits are the decimal digits) */ - -fInt fNegate (fInt );/* Returns -1 * input fInt value */ -fInt fAdd (fInt ,fInt );/* Returns the sum of two fInt numbers */ -fInt fSubtract (fInt A ,fInt B );/* Returns A-B - Sometimes easier than Adding negative numbers */ -fInt fMultiply (fInt ,fInt );/* Returns the product of two fInt numbers */ -fInt fDivide (fInt A ,fInt B );/* Returns A/B */ -fInt fGetSquare (fInt );/* Returns the square of a fInt number */ -fInt fSqrt (fInt );/* Returns the Square Root of a fInt number */ - -int uAbs (int );/* Returns the Absolute value of the Int */ -fInt fAbs (fInt );/* Returns the Absolute value of the fInt */ -int uPow (int base,int exponent);/* Returns base^exponent an INT */ - -void SolveQuadracticEqn (fInt ,fInt ,fInt ,fInt []);/* Returns the 2 roots via the array */ -bool Equal (fInt ,fInt );/* Returns true if two fInts are equal to each other */ -bool GreaterThan (fInt A ,fInt B );/* Returns true if A > B */ - -fInt fExponential (fInt exponent);/* Can be used to calculate e^exponent */ -fInt fNaturalLog (fInt value);/* Can be used to calculate ln(value) */ +static fInt ConvertToFraction (int );/* Use this to convert an INT to a FINT */ +static fInt Convert_ULONG_ToFraction (uint32_t );/* Use this to convert an uint32_t to a FINT */ +static fInt GetScaledFraction (int ,int );/* Use this to convert an INT to a FINT after scaling it by a factor */ +static int ConvertBackToInteger (fInt );/* Convert a FINT back to an INT that is scaled by 1000 (i.e. last 3 digits are the decimal digits) */ + +static fInt fNegate (fInt );/* Returns -1 * input fInt value */ +static fInt fAdd (fInt ,fInt );/* Returns the sum of two fInt numbers */ +static fInt fSubtract (fInt A ,fInt B );/* Returns A-B - Sometimes easier than Adding negative numbers */ +static fInt fMultiply (fInt ,fInt );/* Returns the product of two fInt numbers */ +static fInt fDivide (fInt A ,fInt B );/* Returns A/B */ +static fInt fGetSquare (fInt );/* Returns the square of a fInt number */ +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 */ +static bool Equal (fInt ,fInt );/* Returns true if two fInts are equal to each other */ +static bool GreaterThan (fInt A ,fInt B );/* Returns true if A > B */ + +static fInt fExponential (fInt exponent);/* Can be used to calculate e^exponent */ +static fInt fNaturalLog (fInt value);/* Can be used to calculate ln(value) */ /* Fuse decoding functions * ------------------------------------------------------------------------------------- */ -fInt fDecodeLinearFuse (uint32_t fuse_value,fInt f_min,fInt f_range,uint32_t bitlength); -fInt fDecodeLogisticFuse (uint32_t fuse_value,fInt f_average,fInt f_range,uint32_t bitlength); -fInt fDecodeLeakageID (uint32_t leakageID_fuse,fInt ln_max_div_min,fInt f_min,uint32_t bitlength); +static fInt fDecodeLinearFuse (uint32_t fuse_value,fInt f_min,fInt f_range,uint32_t bitlength); +static fInt fDecodeLogisticFuse (uint32_t fuse_value,fInt f_average,fInt f_range,uint32_t bitlength); +static fInt fDecodeLeakageID (uint32_t leakageID_fuse,fInt ln_max_div_min,fInt f_min,uint32_t bitlength);/* Internal Support Functions - Use these ONLY for testing or adding to internal functions * ------------------------------------------------------------------------------------- * Some of the following functions take two INTs as their input - This is unsafe for a variety of reasons. */ -fInt Add (int ,int );/* Add two INTs and return Sum as FINT */ -fInt Multiply (int ,int );/* Multiply two INTs and return Product as FINT */ -fInt Divide (int ,int );/* You get the idea... */ -fInt fNegate (fInt ); +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 fNegate (fInt ); -int uGetScaledDecimal (fInt );/* Internal function */ -int GetReal (fInt A );/* Internal function */ +static int uGetScaledDecimal (fInt );/* Internal function */ +static int GetReal (fInt A );/* Internal function */ /* Future Additions and Incomplete Functions * ------------------------------------------------------------------------------------- */ -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 */ +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
@@ -115,7 +115,7 @@ int GetRoundedValue(fInt); /* Incomplete function - Usef* START OF CODE * ------------------------------------------------------------------------------------- */ -fInt fExponential (fInt exponent)/*Can be used to calculate e^exponent*/ +static fInt fExponential (fInt exponent)/*Can be used to calculate e^exponent*/ {uint32_t i;bool bNegated = false;
@@ -154,7 +154,7 @@ fInt fExponential(fInt exponent) /*Can be used to calculate e^exponent*/return solution; } -fInt fNaturalLog (fInt value) +static fInt fNaturalLog (fInt value) {uint32_t i;fInt upper_bound =Divide (8 ,1000 );
@@ -179,7 +179,7 @@ fInt fNaturalLog(fInt value)return (fAdd (solution, error_term)); } -fInt fDecodeLinearFuse (uint32_t fuse_value,fInt f_min,fInt f_range,uint32_t bitlength) +static fInt fDecodeLinearFuse (uint32_t fuse_value,fInt f_min,fInt f_range,uint32_t bitlength) {fInt f_fuse_value =Convert_ULONG_ToFraction (fuse_value);fInt f_bit_max_value =Convert_ULONG_ToFraction ((uPow (2 , bitlength)) -1 );
@@ -194,7 +194,7 @@ fInt fDecodeLinearFuse(uint32_t fuse_value, fInt f_min, fInt f_range, uint32_t b } -fInt fDecodeLogisticFuse (uint32_t fuse_value,fInt f_average,fInt f_range,uint32_t bitlength) +static fInt fDecodeLogisticFuse (uint32_t fuse_value,fInt f_average,fInt f_range,uint32_t bitlength) {fInt f_fuse_value =Convert_ULONG_ToFraction (fuse_value);fInt f_bit_max_value =Convert_ULONG_ToFraction ((uPow (2 , bitlength)) -1 );
@@ -212,7 +212,7 @@ fInt fDecodeLogisticFuse(uint32_t fuse_value, fInt f_average, fInt f_range, uintreturn f_decoded_value; } -fInt fDecodeLeakageID (uint32_t leakageID_fuse,fInt ln_max_div_min,fInt f_min,uint32_t bitlength) +static fInt fDecodeLeakageID (uint32_t leakageID_fuse,fInt ln_max_div_min,fInt f_min,uint32_t bitlength) {fInt fLeakage;fInt f_bit_max_value =Convert_ULONG_ToFraction ((uPow (2 , bitlength)) -1 );
@@ -225,7 +225,7 @@ fInt fDecodeLeakageID (uint32_t leakageID_fuse, fInt ln_max_div_min, fInt f_min,return fLeakage; } -fInt ConvertToFraction (int X )/*Add all range checking here. Is it possible to make fInt a private declaration? */ +static fInt ConvertToFraction (int X )/*Add all range checking here. Is it possible to make fInt a private declaration? */ {fInt temp;
@@ -237,13 +237,13 @@ fInt ConvertToFraction(int X) /*Add all range checking here. Is it possible to mreturn temp; } -fInt fNegate (fInt X ) +static fInt fNegate (fInt X ) {fInt CONSTANT_NEGONE =ConvertToFraction (-1 );return (fMultiply (X ,CONSTANT_NEGONE )); } -fInt Convert_ULONG_ToFraction (uint32_t X ) +static fInt Convert_ULONG_ToFraction (uint32_t X ) {fInt temp;
@@ -255,7 +255,7 @@ fInt Convert_ULONG_ToFraction(uint32_t X)return temp; } -fInt GetScaledFraction (int X ,int factor) +static fInt GetScaledFraction (int X ,int factor) {int times_shifted, factor_shifted;bool bNEGATED;
@@ -304,7 +304,7 @@ fInt GetScaledFraction(int X, int factor) }/* Addition using two fInts */ -fInt fAdd (fInt X ,fInt Y ) +static fInt fAdd (fInt X ,fInt Y ) {fInt Sum;
@@ -314,7 +314,7 @@ fInt fAdd (fInt X, fInt Y) }/* Addition using two fInts */ -fInt fSubtract (fInt X ,fInt Y ) +static fInt fSubtract (fInt X ,fInt Y ) {fInt Difference;
@@ -323,7 +323,7 @@ fInt fSubtract (fInt X, fInt Y)return Difference; } -bool Equal (fInt A ,fInt B ) +static bool Equal (fInt A ,fInt B ) {if (A .full ==B .full)return true;
@@ -331,7 +331,7 @@ bool Equal(fInt A, fInt B)return false; } -bool GreaterThan (fInt A ,fInt B ) +static bool GreaterThan (fInt A ,fInt B ) {if (A .full >B .full)return true;
@@ -339,7 +339,7 @@ bool GreaterThan(fInt A, fInt B)return false; } -fInt fMultiply (fInt X ,fInt Y )/* Uses 64-bit integers (int64_t) */ +static fInt fMultiply (fInt X ,fInt Y )/* Uses 64-bit integers (int64_t) */ {fInt Product;int64_t tempProduct;
@@ -363,7 +363,7 @@ fInt fMultiply (fInt X, fInt Y) /* Uses 64-bit integers (int64_t) */return Product; } -fInt fDivide (fInt X ,fInt Y ) +static fInt fDivide (fInt X ,fInt Y ) {fInt fZERO, fQuotient;int64_t longlongX, longlongY;
@@ -384,7 +384,7 @@ fInt fDivide (fInt X, fInt Y)return fQuotient; } -int ConvertBackToInteger (fInt A )/*THIS is the function that will be used to check with the Golden settings table*/ +static int ConvertBackToInteger (fInt A )/*THIS is the function that will be used to check with the Golden settings table*/ {fInt fullNumber, scaledDecimal, scaledReal;
@@ -397,13 +397,13 @@ int ConvertBackToInteger (fInt A) /*THIS is the function that will be used to chreturn fullNumber.full; } -fInt fGetSquare (fInt A ) +static fInt fGetSquare (fInt A ) {return fMultiply (A ,A ); }/* x_new = x_old - (x_old^2 - C) / (2 * x_old) */ -fInt fSqrt (fInt num) +static fInt fSqrt (fInt num) {fInt F_divide_Fprime, Fprime;fInt test;
@@ -460,7 +460,7 @@ fInt fSqrt(fInt num)return (x_new); } -void SolveQuadracticEqn (fInt A ,fInt B ,fInt C ,fInt Roots[]) +static void SolveQuadracticEqn (fInt A ,fInt B ,fInt C ,fInt Roots[]) {fInt *pRoots = &Roots[0 ];fInt temp, root_first, root_second;
@@ -499,7 +499,7 @@ void SolveQuadracticEqn(fInt A, fInt B, fInt C, fInt Roots[])*/ /* Addition using two normal ints - Temporary - Use only for testing purposes?. */ -fInt Add (int X ,int Y ) +static fInt Add (int X ,int Y ) {fInt A ,B , Sum;
@@ -512,13 +512,13 @@ fInt Add (int X, int Y) }/* Conversion Functions */ -int GetReal (fInt A ) +static int GetReal (fInt A ) {return (A .full >>SHIFT_AMOUNT ); }/* Temporarily Disabled */ -int GetRoundedValue (fInt A )/*For now, round the 3rd decimal place */ +static int GetRoundedValue (fInt A )/*For now, round the 3rd decimal place */ {/* ROUNDING TEMPORARLY DISABLED int temp = A.full;
@@ -531,7 +531,7 @@ int GetRoundedValue(fInt A) /*For now, round the 3rd decimal place */return ConvertBackToInteger (A )/10000 ;/*Temporary - in case this was used somewhere else */ } -fInt Multiply (int X ,int Y ) +static fInt Multiply (int X ,int Y ) {fInt A ,B , Product;
@@ -543,7 +543,7 @@ fInt Multiply (int X, int Y)return Product; } -fInt Divide (int X ,int Y ) +static fInt Divide (int X ,int Y ) {fInt A ,B , Quotient;
@@ -555,7 +555,7 @@ fInt Divide (int X, int Y)return Quotient; } -int uGetScaledDecimal (fInt A )/*Converts the fractional portion to whole integers - Costly function */ +static int uGetScaledDecimal (fInt A )/*Converts the fractional portion to whole integers - Costly function */ {int dec[PRECISION ];int i, scaledDecimal =0 , tmp =A .partial.decimal;
@@ -570,7 +570,7 @@ int uGetScaledDecimal (fInt A) /*Converts the fractional portion to whole integereturn scaledDecimal; } -int uPow (int base,int power) +static int uPow (int base,int power) {if (power ==0 )return 1 ;
@@ -578,7 +578,7 @@ int uPow(int base, int power)return (base)*uPow (base, power -1 ); } -fInt fAbs (fInt A ) +static fInt fAbs (fInt A ) {if (A .partial.real <0 )return (fMultiply (A ,ConvertToFraction (-1 )));
@@ -586,7 +586,7 @@ fInt fAbs(fInt A)return A ; } -int uAbs (int X ) +static int uAbs (int X ) {if (X <0 )return (X *-1 );
@@ -594,7 +594,7 @@ int uAbs(int X)return X ; } -fInt fRoundUpByStepSize (fInt A ,fInt fStepSize,bool error_term) +static fInt fRoundUpByStepSize (fInt A ,fInt fStepSize,bool error_term) {fInt solution;
Signature · 6 lines
2.8.0.rc3 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/2 drm/amd/powerplay: Delete unused functions in ppevvmath.h
--- drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h | 59 +------------------------ 1 file changed, 1 insertion(+), 58 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +1 -58
@@ -64,7 +64,6 @@ static fInt fGetSquare(fInt); /* Returns the squarestatic 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 - This 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 = (X <<SHIFT_AMOUNT ); -B .full = (Y <<SHIFT_AMOUNT ); - - Sum.full =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 = A.full; -int decimal_cutoff, decimal_mask = 0x000001FF; -decimal_cutoff = temp & decimal_mask; -if (decimal_cutoff > 0x147) { -temp += 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 =X <<SHIFT_AMOUNT ; -B .full =Y <<SHIFT_AMOUNT ; - - Product =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 )
Signature · 6 lines
2.8.0.rc3 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/2] drm/amd/powerplay: Delete unused functions in ppevvmath.h
Quoted 1 line · Nils Wallménius
Signed-off-by Nils Wallménius <[email protected]>
Let me check with the powerplay team and make sure they are planning to use these in the near future.
Alex
Quoted 109 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h | 59 +------------------------ 1 file changed, 1 insertion(+), 58 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +1
-59@@ -64,7 +64,6 @@ static fInt fGetSquare(fInt); /* Returns the squarestatic 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 - This 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 = (X <<SHIFT_AMOUNT ); -B .full = (Y <<SHIFT_AMOUNT ); - - Sum.full =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 = A.full; -int decimal_cutoff, decimal_mask = 0x000001FF; -decimal_cutoff = temp & decimal_mask; -if (decimal_cutoff > 0x147) { -temp += 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 =X <<SHIFT_AMOUNT ; -B .full =Y <<SHIFT_AMOUNT ; - - Product =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
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/2] drm/amd/powerplay: Delete unused functions in ppevvmath.h
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
Quoted 148 lines · Alex Deucher
Quoted 1 line · Nils Wallménius
Signed-off-by Nils Wallménius <[email protected]>Let me check with the powerplay team and make sure they are planning to use these in the near future.
Alex
Quoted 2 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h | 59+------------------------ > 1 file changed, 1 insertion(+), 58 deletions(-)Review
Quoted 2 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.hdrivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fGetSquare(fInt);
Quoted 4 lines
index a9b40eb..8f50a03 100644
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -64,7 +64,6 @@ static fInt fGetSquare(fInt);/* Returns the square
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fGetSquare(fInt); · line 64
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0static fInt fSqrt (fInt );/* Returns the Square Root of a fInt number */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fGetSquare(fInt); · line 65
Quoted 2 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0static int uAbs (int );/* Returns the Absolute value of the Int */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fGetSquare(fInt); · line 66
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1-static fInt fAbs (fInt );/* Returns the Absolute value of the fInt */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fGetSquare(fInt); · line 66
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0static int uPow (int base,int exponent);/* Returns base^exponent an INT */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fGetSquare(fInt); · line 67
Quoted 2 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0static void SolveQuadracticEqn (fInt ,fInt ,fInt ,fInt []);/* Returns the 2 roots via the array */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -85,21 +84,12 @@ static fInt fDecodeLeakageID (uint32_t
leakageID_fuse, fIntln_max_div_min, fIntdrivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 84
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0* -------------------------------------------------------------------------------------
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 85
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0* Some of the following functions take two INTs as their input - This is unsafe for a variety of reasons.
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 88
Quoted 2 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1*/ -static fInt Add (int ,int );/* Add two INTs and return Sum as FINT */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 89
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1-static fInt Multiply (int ,int );/* Multiply two INTs and return Product as FINT */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 90
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1-static fInt Divide (int ,int );/* You get the idea... */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 87
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +1
-0+static fInt Divide (int ,int );/* Divide two INTs and return result as FINT */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t leakageID_fuse, fInt ln_max_div_min, fInt
Quoted 3 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0static fInt fNegate (fInt );static int uGetScaledDecimal (fInt );/* Internal function */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 91
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0static int GetReal (fInt A );/* Internal function */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 96
Quoted 3 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-2-/* Future Additions and Incomplete Functions -* -------------------------------------------------------------------------------------
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 98
Quoted 2 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-2-*/ -static int GetRoundedValue (fInt );/* Incomplete function - Useful only when Precision is lacking */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 99
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1-/* Let us say we have 2.126 but can only handle 2 decimal points. We could */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 100
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1-/* either chop of 6 and keep 2.12 or use this function to get 2.13, which is more accurate */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 92
Quoted 2 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1-/* -------------------------------------------------------------------------------------
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 94
Quoted 2 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0* TROUBLESHOOTING INFORMATION * -------------------------------------------------------------------------------------
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static void SolveQuadracticEqn(fInt A, fInt B,
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -498,51 +488,12 @@ static void SolveQuadracticEqn(fInt A, fInt B,fInt C, fInt Roots[])
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static void SolveQuadracticEqn(fInt A, fInt B, · line 488
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0* -----------------------------------------------------------------------------
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static void SolveQuadracticEqn(fInt A, fInt B, · line 501
Quoted 3 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1*/ -/* Addition using two normal ints - Temporary - Use only for testing purposes?. */
Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-10-static fInt Add (int X ,int Y ) -{ -fInt A ,B , Sum; - -A .full = (X <<SHIFT_AMOUNT ); -B .full = (Y <<SHIFT_AMOUNT ); - - Sum.full =A .full +B .full; - -return Sum;drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static void SolveQuadracticEqn(fInt A, fInt B, fInt C, fInt Roots[])
Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-4-} -/* 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 */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static void SolveQuadracticEqn(fInt A, fInt B, fInt C, fInt Roots[])
Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-10-{ -/* ROUNDING TEMPORARLY DISABLED -int temp = A.full; -int decimal_cutoff, decimal_mask = 0x000001FF; -decimal_cutoff = temp & decimal_mask; -if (decimal_cutoff > 0x147) { -temp += 673; -}*/ - -return ConvertBackToInteger (A )/10000 ;/*Temporary - in case this was used somewhere else */
Quoted 35 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-23-} - -static fInt Multiply (int X ,int Y ) -{ -fInt A ,B , Product; - -A .full =X <<SHIFT_AMOUNT ; -B .full =Y <<SHIFT_AMOUNT ; - - Product =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
Quoted 5 lines
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/2] drm/amd/powerplay: Delete unused functions in ppevvmath.h
Ping?
Den 6 juni 2016 21:32 skrev "Nils Wallménius" <[email protected]>:
Quoted 4 lines
Hi Alex,
Any response from the powerplay team?
Quoted 164 lines
If they are unresponsive, would you prefer to #IF 0 the code instead of deleting?
Regards
NilsQuoted 153 lines · Alex Deucher
Quoted 1 line · Nils Wallménius
Signed-off-by Nils Wallménius <[email protected]>Let me check with the powerplay team and make sure they are planning to use these in the near future.
Alex
Quoted 2 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h | 59+------------------------ > 1 file changed, 1 insertion(+), 58 deletions(-)Review
Quoted 2 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.hdrivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fGetSquare(fInt);
Quoted 4 lines
index a9b40eb..8f50a03 100644
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -64,7 +64,6 @@ static fInt fGetSquare(fInt);/* Returns the squaredrivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fGetSquare(fInt); · line 64
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0static fInt fSqrt (fInt );/* Returns the Square Root of a fInt number */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fGetSquare(fInt); · line 65
Quoted 2 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0static int uAbs (int );/* Returns the Absolute value of the Int */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fGetSquare(fInt); · line 66
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1-static fInt fAbs (fInt );/* Returns the Absolute value of the fInt */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fGetSquare(fInt); · line 66
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0static int uPow (int base,int exponent);/* Returns base^exponent an INT */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fGetSquare(fInt); · line 67
Quoted 2 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0static void SolveQuadracticEqn (fInt ,fInt ,fInt ,fInt []);/* Returns the 2 roots via the array */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -85,21 +84,12 @@ static fInt fDecodeLeakageID (uint32_t
leakageID_fuse, fIntln_max_div_min, fIntdrivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 84
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0* -------------------------------------------------------------------------------------
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 85
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0* Some of the following functions take two INTs as their input - This is unsafe for a variety of reasons.
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 88
Quoted 2 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1*/ -static fInt Add (int ,int );/* Add two INTs and return Sum as FINT */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 89
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1-static fInt Multiply (int ,int );/* Multiply two INTs and return Product as FINT */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 90
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1-static fInt Divide (int ,int );/* You get the idea... */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 87
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +1
-0+static fInt Divide (int ,int );/* Divide two INTs and return result as FINT */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t leakageID_fuse, fInt ln_max_div_min, fInt
Quoted 3 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0static fInt fNegate (fInt );static int uGetScaledDecimal (fInt );/* Internal function */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 91
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0static int GetReal (fInt A );/* Internal function */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 96
Quoted 3 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-2-/* Future Additions and Incomplete Functions -* -------------------------------------------------------------------------------------
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 98
Quoted 2 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-2-*/ -static int GetRoundedValue (fInt );/* Incomplete function - Useful only when Precision is lacking */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 99
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1-/* Let us say we have 2.126 but can only handle 2 decimal points. We could */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 100
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1-/* either chop of 6 and keep 2.12 or use this function to get 2.13, which is more accurate */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 92
Quoted 2 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1-/* -------------------------------------------------------------------------------------
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fDecodeLeakageID (uint32_t · line 94
Quoted 2 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0* TROUBLESHOOTING INFORMATION * -------------------------------------------------------------------------------------
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static void SolveQuadracticEqn(fInt A, fInt B,
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -498,51 +488,12 @@ static void SolveQuadracticEqn(fInt A, fInt B,fInt C, fInt Roots[])
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static void SolveQuadracticEqn(fInt A, fInt B, · line 488
Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0* -----------------------------------------------------------------------------
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static void SolveQuadracticEqn(fInt A, fInt B, · line 501
Quoted 3 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1*/ -/* Addition using two normal ints - Temporary - Use only for testing purposes?. */
Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-10-static fInt Add (int X ,int Y ) -{ -fInt A ,B , Sum; - -A .full = (X <<SHIFT_AMOUNT ); -B .full = (Y <<SHIFT_AMOUNT ); - - Sum.full =A .full +B .full; - -return Sum;drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static void SolveQuadracticEqn(fInt A, fInt B, fInt C, fInt Roots[])
Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-4-} -/* 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 */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static void SolveQuadracticEqn(fInt A, fInt B, fInt C, fInt Roots[])
Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-10-{ -/* ROUNDING TEMPORARLY DISABLED -int temp = A.full; -int decimal_cutoff, decimal_mask = 0x000001FF; -decimal_cutoff = temp & decimal_mask; -if (decimal_cutoff > 0x147) { -temp += 673; -}*/ - -return ConvertBackToInteger (A )/10000 ;/*Temporary - in case this was used somewhere else */
Quoted 39 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-23-} - -static fInt Multiply (int X ,int Y ) -{ -fInt A ,B , Product; - -A .full =X <<SHIFT_AMOUNT ; -B .full =Y <<SHIFT_AMOUNT ; - - Product =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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/2] drm/amd/powerplay: Delete unused functions in ppevvmath.h
Quoted 1 line · Nils Wallménius
Ping?
We don't seem to be using them. Can you respin? It doesn't seem to apply any longer.
Alex
Quoted 172 lines
Den 6 juni 2016 21:32 skrev "Nils Wallménius" <[email protected]>:
Quoted 168 lines
Hi Alex,
Any response from the powerplay team?
If they are unresponsive, would you prefer to #IF 0 the code instead of deleting?
Regards
NilsQuoted 153 lines · Alex Deucher
Quoted 1 line · Nils Wallménius
Signed-off-by Nils Wallménius <[email protected]>Let me check with the powerplay team and make sure they are planning to use these in the near future.
Alex
Quoted 142 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h | 59 +------------------------ 1 file changed, 1 insertion(+), 58 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -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 intuPow(int base, int exponent); /* Returns
base^exponent an INT */static void
SolveQuadracticEqn(fInt, fInt, fInt, fInt[]); /* Returns
the 2 roots via the array */drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -85,21 +84,12 @@ static fInt fDecodeLeakageID (uint32_t
leakageID_fuse, fIntln_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 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 */drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-5-/* 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 */drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-5-/* ------------------------------------------------------------------------------------- * 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?. */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-14-static fInt Add (int X ,int Y ) -{ -fInt A ,B , Sum; - -A .full = (X <<SHIFT_AMOUNT ); -B .full = (Y <<SHIFT_AMOUNT ); - - Sum.full =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 */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-10-{ -/* ROUNDING TEMPORARLY DISABLED -int temp = A.full; -int decimal_cutoff, decimal_mask = 0x000001FF; -decimal_cutoff = temp & decimal_mask; -if (decimal_cutoff > 0x147) { -temp += 673; -}*/ - -return ConvertBackToInteger (A )/10000 ;/*Temporary - in case this was used somewhere else */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-23-} - -static fInt Multiply (int X ,int Y ) -{ -fInt A ,B , Product; - -A .full =X <<SHIFT_AMOUNT ; -B .full =Y <<SHIFT_AMOUNT ; - - Product =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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/2] drm/amd/powerplay: Delete unused functions in ppevvmath.h
Ok, cool. I will probably be able to do that on monday.
Nils
Den 15 juli 2016 11:06 em skrev "Alex Deucher" <[email protected]>:
Quoted 109 lines
Quoted 1 line · Nils Wallménius
Ping?
We don't seem to be using them. Can you respin? It doesn't seem to apply any longer.
Alex
Quoted 50 lines
Den 6 juni 2016 21:32 skrev "Nils Wallménius" <[email protected] :
Quoted 46 lines
Hi Alex,
Any response from the powerplay team?
If they are unresponsive, would you prefer to #IF 0 the code instead of deleting?
Regards
NilsQuoted 33 lines · Alex Deucher
Quoted 1 line · Nils Wallménius
Signed-off-by Nils Wallménius <[email protected]>Let me check with the powerplay team and make sure they are planning to use these in the near future.
Alex
Quoted 22 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h | 59 +------------------------ 1 file changed, 1 insertion(+), 58 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -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 intuPow(int base, int exponent); /* Returns
base^exponent an INT */Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
static void
SolveQuadracticEqn(fInt, fInt, fInt, fInt[]); /* Returns
the 2 roots via the array */drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -85,21 +84,12 @@ static fInt fDecodeLeakageID (uint32_t
leakageID_fuse, fIntln_max_div_min, fInt
*-------------------------------------------------------------------------------------
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
* Some of the following functions take two INTs as their input -
This
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
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
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
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
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
function */
static int GetReal (fInt A); /*Internal
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
function */
-/* Future Additions and Incomplete Functions
- *-------------------------------------------------------------------------------------
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
- */
-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 ismore
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
accurate */
-
/*-------------------------------------------------------------------------------------
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
* TROUBLESHOOTING INFORMATION
*
Quoted 85 lines
-------------------------------------------------------------------------------------
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static void SolveQuadracticEqn(fInt A, fInt B, · line 490
Quoted 4 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -498,51 +488,12 @@ static void SolveQuadracticEqn(fInt A, fInt B, fInt C, fInt Roots[]) *-----------------------------------------------------------------------------
Quoted 78 lines
Quoted 77 lines
Quoted 75 lines
Quoted 75 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1*/ -/* Addition using two normal ints - Temporary - Use only for testing purposes?. */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-14-static fInt Add (int X ,int Y ) -{ -fInt A ,B , Sum; - -A .full = (X <<SHIFT_AMOUNT ); -B .full = (Y <<SHIFT_AMOUNT ); - - Sum.full =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 */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-10-{ -/* ROUNDING TEMPORARLY DISABLED -int temp = A.full; -int decimal_cutoff, decimal_mask = 0x000001FF; -decimal_cutoff = temp & decimal_mask; -if (decimal_cutoff > 0x147) { -temp += 673; -}*/ - -return ConvertBackToInteger (A )/10000 ;/*Temporary - in case this was used somewhere else */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-23-} - -static fInt Multiply (int X ,int Y ) -{ -fInt A ,B , Product; - -A .full =X <<SHIFT_AMOUNT ; -B .full =Y <<SHIFT_AMOUNT ; - - Product =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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/2] drm/amd/powerplay: Delete unused functions in ppevvmath.h
Hi,
This patch applies cleanly for me on top of the first patch in this series
[1] on top of your drm-next-4.8 tree.
The series was held up to figure out what to do about the unused functions as patch 1 introduced warnings. I can still respin if you'd like as now that i know the functions should be removed, doing that first makes a bit more sense I guess.
Nils
[1]: https://lists.freedesktop.org/archives/dri-devel/2016-April/105648.html
Quoted 209 lines · Nils Wallménius
Ok, cool. I will probably be able to do that on monday.
Nils
Den 15 juli 2016 11:06 em skrev "Alex Deucher" <[email protected]>:
Quoted 202 lines
Quoted 1 line · Nils Wallménius
Ping?
We don't seem to be using them. Can you respin? It doesn't seem to apply any longer.
Alex
Quoted 3 lines
Den 6 juni 2016 21:32 skrev "Nils Wallménius" <
Quoted 29 lines
Quoted 29 lines
Hi Alex,
Any response from the powerplay team?
If they are unresponsive, would you prefer to #IF 0 the code instead of deleting?
Regards
NilsQuoted 16 lines · Alex Deucher
Quoted 1 line · Nils Wallménius
Signed-off-by Nils Wallménius <[email protected]>Let me check with the powerplay team and make sure they are planning to use these in the near future.
Alex
Quoted 5 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h | 59 +------------------------ 1 file changed, 1 insertion(+), 58 deletions(-)Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static fInt fGetSquare(fInt); · line 65
Quoted 8 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -64,7 +64,6 @@ static fInt fGetSquare(fInt);/* Returns the square static fInt fSqrt(fInt); /* Returns
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
the Square Root of a fInt number */
static int uAbs(int); /*
Returns
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
the Absolute value of the Int */
-static fInt fAbs(fInt); /*Returns
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
the Absolute value of the fInt */
static intuPow(int base, int exponent); /*Returns
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
base^exponent an INT */
static void
SolveQuadracticEqn(fInt, fInt, fInt, fInt[]); /*Returns
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
the 2 roots via the array */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -85,21 +84,12 @@ static fInt fDecodeLeakageID (uint32_t
leakageID_fuse, fIntln_max_div_min, fInt
*-------------------------------------------------------------------------------------
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
* Some of the following functions take two INTs as their input -
This
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
is unsafe for a variety of reasons.
*/
-static fInt Add (int, int); /* Addtwo
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
INTs and return Sum as FINT */
-static fInt Multiply (int, int); /*Multiply
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
two INTs and return Product as FINT */
-static fInt Divide (int, int); /* Youget
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
the idea... */
+static fInt Divide (int, int); /* Divide
two INTs and return result as FINT */
static fInt fNegate(fInt);static int uGetScaledDecimal (fInt); /*
Internal
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
function */
static int GetReal (fInt A); /*Internal
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
function */
-/* Future Additions and Incomplete Functions
- *-------------------------------------------------------------------------------------
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
- */
-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 ismore
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
accurate */
-
/*-------------------------------------------------------------------------------------
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
* TROUBLESHOOTING INFORMATION
*-------------------------------------------------------------------------------------
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static void SolveQuadracticEqn(fInt A, fInt B, · line 490
Quoted 4 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -498,51 +488,12 @@ static void SolveQuadracticEqn(fInt A, fInt B, fInt C, fInt Roots[]) *-----------------------------------------------------------------------------
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h static void SolveQuadracticEqn(fInt A, fInt B, · line 503
Quoted 3 lines
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-1*/ -/* Addition using two normal ints - Temporary - Use only for testing
Quoted 75 lines
Quoted 74 lines
Quoted 72 lines
Quoted 72 lines
purposes?. */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-14-static fInt Add (int X ,int Y ) -{ -fInt A ,B , Sum; - -A .full = (X <<SHIFT_AMOUNT ); -B .full = (Y <<SHIFT_AMOUNT ); - - Sum.full =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 */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-10-{ -/* ROUNDING TEMPORARLY DISABLED -int temp = A.full; -int decimal_cutoff, decimal_mask = 0x000001FF; -decimal_cutoff = temp & decimal_mask; -if (decimal_cutoff > 0x147) { -temp += 673; -}*/ - -return ConvertBackToInteger (A )/10000 ;/*Temporary - in case this was used somewhere else */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-23-} - -static fInt Multiply (int X ,int Y ) -{ -fInt A ,B , Product; - -A .full =X <<SHIFT_AMOUNT ; -B .full =Y <<SHIFT_AMOUNT ; - - Product =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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/2] drm/amd/powerplay: Delete unused functions in ppevvmath.h
Quoted 9 lines · Nils Wallménius
Hi,
This patch applies cleanly for me on top of the first patch in this series
[1] on top of your drm-next-4.8 tree.The series was held up to figure out what to do about the unused functions as patch 1 introduced warnings. I can still respin if you'd like as now that i know the functions should be removed, doing that first makes a bit more sense I guess.
Sorry, I missed the first patch. Applied the series. Sorry for the delay.
Alex
Quoted 224 lines
Nils
[1]: https://lists.freedesktop.org/archives/dri-devel/2016-April/105648.html
Quoted 215 lines · Nils Wallménius
Ok, cool. I will probably be able to do that on monday.
Nils
Den 15 juli 2016 11:06 em skrev "Alex Deucher" <[email protected]>:
Quoted 208 lines
Quoted 1 line · Nils Wallménius
Ping?
We don't seem to be using them. Can you respin? It doesn't seem to apply any longer.
Alex
Quoted 197 lines
Den 6 juni 2016 21:32 skrev "Nils Wallménius"
<[email protected]>:Quoted 192 lines
Hi Alex,
Any response from the powerplay team?
If they are unresponsive, would you prefer to #IF 0 the code instead of
deleting?Regards
NilsQuoted 176 lines · Alex Deucher
Quoted 1 line · Nils Wallménius
Signed-off-by Nils Wallménius <[email protected]>Let me check with the powerplay team and make sure they are planning to use these in the near future.
Alex
Quoted 165 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h | 59 +------------------------ 1 file changed, 1 insertion(+), 58 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -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 intuPow(int base, int exponent); /*
Returns
base^exponent an INT */static void
SolveQuadracticEqn(fInt, fInt, fInt, fInt[]); /*
Returns
the 2 roots via the array */drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-0@@ -85,21 +84,12 @@ static fInt fDecodeLeakageID (uint32_t
leakageID_fuse, fIntln_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
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 */drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-5-/* 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 */drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-5-/* ------------------------------------------------------------------------------------- * TROUBLESHOOTING INFORMATION * ------------------------------------------------------------------------------------- @@ -498,51 +488,12 @@ static void SolveQuadracticEqn(fInt A, fIntB, fInt C, fInt Roots[]) * ----------------------------------------------------------------------------- */ -/* Addition using two normal ints - Temporary - Use only for testing
purposes?. */drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-14-static fInt Add (int X ,int Y ) -{ -fInt A ,B , Sum; - -A .full = (X <<SHIFT_AMOUNT ); -B .full = (Y <<SHIFT_AMOUNT ); - - Sum.full =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 */drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-10-{ -/* ROUNDING TEMPORARLY DISABLED -int temp = A.full; -int decimal_cutoff, decimal_mask = 0x000001FF; -decimal_cutoff = temp & decimal_mask; -if (decimal_cutoff > 0x147) { -temp += 673; -}*/ - -return ConvertBackToInteger (A )/10000 ;/*Temporary - in case this was used somewhere else */
drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h +0
-23-} - -static fInt Multiply (int X ,int Y ) -{ -fInt A ,B , Product; - -A .full =X <<SHIFT_AMOUNT ; -B .full =Y <<SHIFT_AMOUNT ; - - Product =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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel