]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Return the number of bytes parsed than allocated
authorEryk Brol <eryk.brol@amd.com>
Thu, 27 Aug 2020 20:48:38 +0000 (16:48 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Sep 2020 21:52:42 +0000 (17:52 -0400)
commit2fe5891ba040f517d06b2362becc09b3cdb52e4c
tree0e04d852ec4b42f944169112c3bb657b4685de71
parente8f7cb8f247d6d68a117c89d9bdf0f00b32175f1
drm/amd/display: Return the number of bytes parsed than allocated

[why & how]
Previously we were returning the number of bytes allocated
for a write buffer from debugfs and when manually used it wouldn't
rise any errors, but it wouldn't match the size of the parameters
passed from userspace.

In successful case return the size passed by usermode otherwise
the error code is returned. That simplifies the parser helper
and removes a potential error of returning mismatched input size.

Signed-off-by: Eryk Brol <eryk.brol@amd.com>
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c