diff options
| author | Tatenda Chipeperekwa <tatendac@codeaurora.org> | 2016-11-18 13:26:10 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-11-29 11:43:24 -0800 |
| commit | 15a1ac889807eb645108258dc96c0a69370442ee (patch) | |
| tree | cf8c4e6fa51ae34c854ef69228339a788e7234b2 /drivers/video/fbdev | |
| parent | bc41dd07f85ea527a791e41e1534a162336630bc (diff) | |
msm: mdss: dp: fix parity byte calculation
Fix the parity byte calculation for Audio SDP's that are
sent to the sink during audio playback. If the input data
for the parity byte calculation is only a byte in length,
then the shift operation must only take the first two
nibbles of the byte.
CRs-Fixed: 1076516
Change-Id: Ib686a9aa5198c8e1b30cf37bb3d9c8b259d5fd84
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dp_util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dp_util.c b/drivers/video/fbdev/msm/mdss_dp_util.c index 710bc35f2154..5ab59460bc5c 100644 --- a/drivers/video/fbdev/msm/mdss_dp_util.c +++ b/drivers/video/fbdev/msm/mdss_dp_util.c @@ -605,8 +605,9 @@ static u8 mdss_dp_calculate_parity_byte(u32 data) u8 iData = 0; u8 i = 0; u8 parityByte; + u8 num_byte = (data & 0xFF00) > 0 ? 8 : 2; - for (i = 0; i < 8; i++) { + for (i = 0; i < num_byte; i++) { iData = (data >> i*4) & 0xF; ci = iData ^ x1; |
