]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fill plane attrs only for valid pxl format
authorRoman Li <Roman.Li@amd.com>
Thu, 25 Apr 2019 15:02:30 +0000 (11:02 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 24 May 2019 17:20:50 +0000 (12:20 -0500)
commit4a22a6d8a4e3352f93cf3af990bd69a62f7d1a8e
treea3fb560a3e872bb510c54562077022ffc6224223
parent2acd07a253ce23041b02d1966a14c46fbf6aca1f
drm/amd/display: Fill plane attrs only for valid pxl format

[Why]
In fill_plane_buffer_attributes() we calculate chroma/luma
assuming that the surface_pixel_format is always valid.
If it's not the case, there's a risk of divide by zero error.

[How]
Check if format valid before calculating pixel format attributes

Signed-off-by: Roman Li <Roman.Li@amd.com>
Reviewed-by: David Francis <David.Francis@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c