OSDN Git Service

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)
commit918698d5c2b50433714d2042f55b55b090faa167
tree0e04d852ec4b42f944169112c3bb657b4685de71
parent4b675aad9695070c728c386b8f15ff8f27cd3e34
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