drm/amd/display: adjust floating point format for gamut remap when needed[Why]The MPCCs different gamut remap matrices allow for S2D13 and S3D12 floatingpoint formats, but only S2D13 is used. The
drm/amd/display: adjust floating point format for gamut remap when needed[Why]The MPCCs different gamut remap matrices allow for S2D13 and S3D12 floatingpoint formats, but only S2D13 is used. There may be cases where moreinteger bits are required.[How]Switch to S3D12 if any entries in the remap matrix cannot fit in S2D13.Otherwise, prefer the extra precision of S2D13. Communicate the max valuethat hw can support to dm via dc color caps.Reviewed-by: Dillon Varone <dillon.varone@amd.com>Signed-off-by: Clay King <clayking@amd.com>Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com>Tested-by: Dan Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
show more ...
Revert "drm/amd/display: Remove unused cm3_helper_translate_curve_to_degamma_hw_format"This reverts commit 8b89acc0b2baecfe331f5336e7ff1fcc5a44b062.So that we can detach NL->L LUT programming fro
Revert "drm/amd/display: Remove unused cm3_helper_translate_curve_to_degamma_hw_format"This reverts commit 8b89acc0b2baecfe331f5336e7ff1fcc5a44b062.So that we can detach NL->L LUT programming from L->NL one, i.e., we canuse cm3_helper_translate_curve_to_degamma_hw_format for plane degamma andblend (post-3DLUT curve) and cm3_helper_translate_curve_to_hw_format forplane shaper (pre-3DLUT curve) and stream regamma.Tested-by: Matthew Schwartz <matthew.schwartz@linux.dev>Reviewed-by: Harry Wentland <harry.wentland@amd.com>Signed-off-by: Melissa Wen <mwen@igalia.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Fixed Silence complier warnings in dc[Why]Resolve compiler warnings by marking unused parameters explicitly.[How]In .c and .h function definitions, keep parameter namesin sign
drm/amd/display: Fixed Silence complier warnings in dc[Why]Resolve compiler warnings by marking unused parameters explicitly.[How]In .c and .h function definitions, keep parameter namesin signatures and add a line with `(void)param;` in function bodyPreserved function signatures and avoids breaking code paths thatmay reference the parameter under conditional compilation.Reviewed-by: Dillon Varone <dillon.varone@amd.com>Reviewed-by: Austin Zheng <austin.zheng@amd.com>Signed-off-by: Gaghik Khachatrian <gaghik.khachatrian@amd.com>Signed-off-by: Chuanyu Tseng <chuanyu.tseng@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Convert 'alloc_obj' family to use the new default GFP_KERNEL argumentThis was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs
Convert 'alloc_obj' family to use the new default GFP_KERNEL argumentThis was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'to convert the new alloc_obj() users that had a simple GFP_KERNELargument to just drop that argument.Note that due to the extreme simplicity of the scripting, any slightlymore complex cases spread over multiple lines would not be triggered:they definitely exist, but this covers the vast bulk of the cases, andthe resulting diff is also then easier to check automatically.For the same reason the 'flex' versions will be done as a separateconversion.Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
treewide: Replace kmalloc with kmalloc_obj for non-scalar typesThis is the result of running the Coccinelle script fromscripts/coccinelle/api/kmalloc_objs.cocci. The script is designed toavoid sc
treewide: Replace kmalloc with kmalloc_obj for non-scalar typesThis is the result of running the Coccinelle script fromscripts/coccinelle/api/kmalloc_objs.cocci. The script is designed toavoid scalar types (which need careful case-by-case checking), andinstead replace kmalloc-family calls that allocate struct or unionobject instances:Single allocations: kmalloc(sizeof(TYPE), ...)are replaced with: kmalloc_obj(TYPE, ...)Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)are replaced with: kmalloc_objs(TYPE, COUNT, ...)Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)(where TYPE may also be *VAR)The resulting allocations no longer return "void *", instead returning"TYPE *".Signed-off-by: Kees Cook <kees@kernel.org>
drm/amd/display: extend delta clamping logic to CM3 LUT helperCommit 27fc10d1095f ("drm/amd/display: Fix the delta clamping for shaperLUT") fixed banding when using plane shaper LUT in DCN10 CM he
drm/amd/display: extend delta clamping logic to CM3 LUT helperCommit 27fc10d1095f ("drm/amd/display: Fix the delta clamping for shaperLUT") fixed banding when using plane shaper LUT in DCN10 CM helper. Theproblem is also present in DCN30 CM helper, fix banding by extending thesame bug delta clamping fix to CM3.Signed-off-by: Melissa Wen <mwen@igalia.com>Reviewed-by: Harry Wentland <harry.wentland@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>(cherry picked from commit 0274a54897f356f9c78767c4a2a5863f7dde90c6)
drm/amd/display: Remove unused dwb3_set_host_read_rate_controldwb3_set_host_read_rate_control() has been unused since it was added bycommit 8993dee0de2a ("drm/amd/display: Add DCN3 DWB")Remove i
drm/amd/display: Remove unused dwb3_set_host_read_rate_controldwb3_set_host_read_rate_control() has been unused since it was added bycommit 8993dee0de2a ("drm/amd/display: Add DCN3 DWB")Remove it.Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Remove unused cm3_helper_translate_curve_to_degamma_hw_formatcm3_helper_translate_curve_to_degamma_hw_format() since it was added in2020's commit03f54d7d3448 ("drm/amd/display: A
drm/amd/display: Remove unused cm3_helper_translate_curve_to_degamma_hw_formatcm3_helper_translate_curve_to_degamma_hw_format() since it was added in2020's commit03f54d7d3448 ("drm/amd/display: Add DCN3 DPP")Remove it.Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Refactoring DWB related files from dcn30 Files[Why]To refactor DWB related files from dcn30 Files[How]Moved DWB related files from dcn30 to specific DWB folder andupdated Make
drm/amd/display: Refactoring DWB related files from dcn30 Files[Why]To refactor DWB related files from dcn30 Files[How]Moved DWB related files from dcn30 to specific DWB folder andupdated Makefiles to fix Compilation.Reviewed-by: Martin Leung <martin.leung@amd.com>Signed-off-by: Jerry Zuo <jerry.zuo@amd.com>Signed-off-by: Mudimela <lmudimel@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Refactor DCN3X into component folder[why]Move DCN3X files to unique component folder.[how]Create respective component folder in dc, move the DCN3X files intocorresponding new
drm/amd/display: Refactor DCN3X into component folder[why]Move DCN3X files to unique component folder.[how]Create respective component folder in dc, move the DCN3X files intocorresponding new folders and made appropriate changes for compilationin Makefiles.Reviewed-by: Martin Leung <martin.leung@amd.com>Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>Signed-off-by: Mounika Adhuri <moadhuri@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>