On Mon, Sep 08, 2025 at 07:35:08PM +0200, Christian König wrote:
> On 08.09.25 19:05, Alex Hung wrote:
> > 
> > 
> > On 8/24/25 12:23, Kuan-Wei Chiu wrote:
> >> Replace the custom bubble sort used for sorting reserved time
> >> candidates in with the kernel's standard sort() helper. The previous
> >> code had O(N^2) time complexity, while the generic kernel sort runs in
> >> O(N log N). This improves efficiency and removes the need for a local
> >> sorting implementation, while keeping functionality unchanged.
> >>
> >> Signed-off-by: Kuan-Wei Chiu <visitor...@gmail.com>
> >> ---
> >> Compile test only.
> >>
> >>   .../dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.c   | 23 +++++++++++--------
> >>   1 file changed, 13 insertions(+), 10 deletions(-)
> >>
> >> diff --git 
> >> a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.c 
> >> b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.c
> >> index e763c8e45da8..2b13a5e88917 100644
> >> --- 
> >> a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.c
> >> +++ 
> >> b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.c
> >> @@ -2,19 +2,21 @@
> >>   //
> >>   // Copyright 2024 Advanced Micro Devices, Inc.
> >>   +#include <linux/sort.h>
> >> +
> > 
> > Thanks for working on this, but this file is shared with another OS and it 
> > is not possible to replace sort function with Linux-only sort.
> 
> That's not a valid argument. Linux code must be solely written for Linux, you 
> can't reject a valid patch because it breaks sharing code with other 
> operating systems.
> 
Hi Alex and Christian,

Thanks for your feedback.
Based on the discussion, I plan to keep this patch in my v2.

Regards,
Kuan-Wei

Reply via email to