]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/display: Remove ddc write and read size checking
authorLeo Ma <hanghong.ma@amd.com>
Wed, 23 Mar 2022 16:00:53 +0000 (12:00 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 25 Apr 2022 21:11:13 +0000 (17:11 -0400)
[Why]
Customer found I2C over AUX using ADL_Display_DDCBlockAccess_Get
will fail when sending more than 256 bytes of data;

[How]
Remove the write and read size checking to allow sending data more
than 256 bytes;

Reviewed-by: Martin Leung <Martin.Leung@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Leo Ma <hanghong.ma@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c

index 1d4863763df9ccd8128887304f4a2182a91eb438..2b09310965bc787a3853f8003c239a5273ac4315 100644 (file)
@@ -543,15 +543,9 @@ bool dal_ddc_service_query_ddc_data(
 
        uint32_t payloads_num = write_payloads + read_payloads;
 
-
-       if (write_size > EDID_SEGMENT_SIZE || read_size > EDID_SEGMENT_SIZE)
-               return false;
-
        if (!payloads_num)
                return false;
 
-       /*TODO: len of payload data for i2c and aux is uint8!!!!,
-        *  but we want to read 256 over i2c!!!!*/
        if (dal_ddc_service_is_in_aux_transaction_mode(ddc)) {
                struct aux_payload payload;