]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: convert to use le16_add_cpu()
authorQinglang Miao <miaoqinglang@huawei.com>
Mon, 10 Aug 2020 12:59:19 +0000 (20:59 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 Aug 2020 21:26:53 +0000 (17:26 -0400)
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>
drivers/gpu/drm/amd/display/dc/bios/command_table.c
drivers/gpu/drm/amd/display/dc/bios/command_table2.c

index 5815983caaf80b01e3cbd595969f41e5dda077ee..070459e3e4070dcb31fa5b678673f1e07e386231 100644 (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);
                }
        }
 
index bed91572f82a6a3bd44ab338c8ad76c2d294147e..e8f52eb8ef0d8022e23fd8d4b1ac5b1beb11cfc0 100644 (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);
                }
        }