summaryrefslogtreecommitdiff
path: root/include/linux/stackprotector.h
diff options
context:
space:
mode:
authorKrishna Chaitanya Parimi <cparimi@codeaurora.org>2015-03-17 12:11:45 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:14:32 -0700
commitbc7eb1a073530473045c9b9f412bb2ccd6b39125 (patch)
tree6f34791d68281aa83f7b4d4aefcf27cb96e2f93a /include/linux/stackprotector.h
parent3d3dd8c52944381c89d7625467743b075af2d5ab (diff)
msm: mdss: alter linear_map to incorporate rounding for AD
The helper function linear_map would take the integral part of the calculated map, thereby causing issues with getting the same value after consecutive map and inverse map calls. For ex: linear_map(21, out, 255, 4095) would translate to *out = 21 * 4095 / 255 = 337, whereas inverse case linear_map(337, out, 4095, 255) would translate to *out = 337 * 255 / 4095 = 20 Changing linear_map from ((in * out_max) / in_max) to a more precise ((2 * (in * out_max) + in_max) / (2 * in_max)) for incorporating rounding in the integral mapping. Change-Id: I15cd8aa1326813ce3cb3a426cbb4e78374623c72 Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions