diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-08-10 15:59:19 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-08-11 00:26:53 +0300 |
commit | d6e6dfb287443b4197afde4632784ba640944648 (patch) | |
tree | be8ae7f72410cf4b3e006cc4c787ef95f1fc9683 /drivers/gpu/drm/amd/display/dc/bios | |
parent | 200b86f9891b87ff1709e1dca4efe9d2ee06154d (diff) | |
download | linux-d6e6dfb287443b4197afde4632784ba640944648.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/bios')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/bios/command_table.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/bios/command_table2.c | 5 |
2 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table.c b/drivers/gpu/drm/amd/display/dc/bios/command_table.c index 5815983caaf8..070459e3e407 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/command_table.c +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table.c @@ -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(¶ms.usV_SyncOffset, 1); } } diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table2.c b/drivers/gpu/drm/amd/display/dc/bios/command_table2.c index bed91572f82a..e8f52eb8ef0d 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/command_table2.c +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table2.c @@ -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(¶ms.v_syncoffset, 1); } } |