]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Move bw_fixed from DML folder
authorRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tue, 3 Oct 2023 14:14:49 +0000 (08:14 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 9 Oct 2023 20:48:37 +0000 (16:48 -0400)
bw_fixed does not need any FPU operation, and it is used on DCE and DCN.
For this reason, this commit moves bw_fixed to the basic folder outside
DML.

Reviewed-by: Qingqing Zhuo <Qingqing.Zhuo@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/basics/Makefile
drivers/gpu/drm/amd/display/dc/basics/bw_fixed.c [moved from drivers/gpu/drm/amd/display/dc/dml/calcs/bw_fixed.c with 94% similarity]
drivers/gpu/drm/amd/display/dc/dml/Makefile

index 65d713aff40711f8ef256cc418383b3e02b2b0bd..aabcebf69049beb33448f3ea04505c3fd5aad590 100644 (file)
@@ -30,7 +30,8 @@ BASICS := \
        vector.o \
        dc_common.o \
        dce_calcs.o \
-       custom_float.o
+       custom_float.o \
+       bw_fixed.o
 
 AMD_DAL_BASICS = $(addprefix $(AMDDALPATH)/dc/basics/,$(BASICS))
 
similarity index 94%
rename from drivers/gpu/drm/amd/display/dc/dml/calcs/bw_fixed.c
rename to drivers/gpu/drm/amd/display/dc/basics/bw_fixed.c
index 3aa8dd0acd5e8c1e180e6239fd0bd69a359e3629..c8cb89e0d4d0515a2a7e2001faff3f4d9710d657 100644 (file)
@@ -1,5 +1,6 @@
+// SPDX-License-Identifier: MIT
 /*
- * Copyright 2015 Advanced Micro Devices, Inc.
+ * Copyright 2023 Advanced Micro Devices, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -106,9 +107,8 @@ struct bw_fixed bw_frc_to_fixed(int64_t numerator, int64_t denominator)
        return res;
 }
 
-struct bw_fixed bw_floor2(
-       const struct bw_fixed arg,
-       const struct bw_fixed significance)
+struct bw_fixed bw_floor2(const struct bw_fixed arg,
+                         const struct bw_fixed significance)
 {
        struct bw_fixed result;
        int64_t multiplicand;
@@ -119,9 +119,8 @@ struct bw_fixed bw_floor2(
        return result;
 }
 
-struct bw_fixed bw_ceil2(
-       const struct bw_fixed arg,
-       const struct bw_fixed significance)
+struct bw_fixed bw_ceil2(const struct bw_fixed arg,
+                        const struct bw_fixed significance)
 {
        struct bw_fixed result;
        int64_t multiplicand;
index 2fe8588a070a69a2a0c5c9b4b635f4fdbecd61c6..ea7d60f9a9b45afb9500cda966ca8faf6dfbf985 100644 (file)
@@ -134,8 +134,6 @@ CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml/calcs/dcn_calcs.o := $(dml_rcflags)
 CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml/calcs/dcn_calc_auto.o := $(dml_rcflags)
 CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml/calcs/dcn_calc_math.o := $(dml_rcflags)
 
-DML = calcs/bw_fixed.o
-
 ifdef CONFIG_DRM_AMD_DC_FP
 DML += display_mode_lib.o display_rq_dlg_helpers.o dml1_display_rq_dlg_calc.o
 DML += dcn10/dcn10_fpu.o