drm/amd/display: convert to use le16_add_cpu()

Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu().

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Qinglang Miao 2020-08-10 20:59:19 +08:00 committed by Alex Deucher
parent 200b86f989
commit d6e6dfb287
2 changed files with 2 additions and 7 deletions

View File

@ -1877,9 +1877,7 @@ static enum bp_result set_crtc_using_dtd_timing_v3(
* but it is 4 either from Edid data (spec CEA 861)
* or CEA timing table.
*/
params.usV_SyncOffset =
cpu_to_le16(le16_to_cpu(params.usV_SyncOffset) + 1);
le16_add_cpu(&params.usV_SyncOffset, 1);
}
}

View File

@ -569,10 +569,7 @@ static enum bp_result set_crtc_using_dtd_timing_v3(
* but it is 4 either from Edid data (spec CEA 861)
* or CEA timing table.
*/
params.v_syncoffset =
cpu_to_le16(le16_to_cpu(params.v_syncoffset) +
1);
le16_add_cpu(&params.v_syncoffset, 1);
}
}