dptx: MST: Removed dependency on math.h.

Added equivalent ceil functionality.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
Andrei-Liviu Simion 2014-08-10 14:01:58 -07:00 committed by Jagannadha Sutradharudu Teki
parent 6e222812f1
commit abd449945c

View file

@ -727,7 +727,12 @@ static void XDptx_CalculateTs(XDptx *InstancePtr, u8 Stream, u8 BitsPerPixel)
/* Calculate the payload bandiwdth number (PBN). */
InstancePtr->MstStreamConfig[Stream - 1].MstPbn =
ceil(1.006 * PeakPixelBw * ((double)64 / 54));
1.006 * PeakPixelBw * ((double)64 / 54);
/* Ceil - round up if required, avoiding overhead of math.h. */
if ((double)(1.006 * PeakPixelBw * ((double)64 / 54)) >
((double)InstancePtr->MstStreamConfig[Stream - 1].MstPbn)) {
InstancePtr->MstStreamConfig[Stream - 1].MstPbn++;
}
/* Calculate the average stream symbol time slots per MTP. */
Average_StreamSymbolTimeSlotsPerMTP = (64.0 * PeakPixelBw / LinkBw);