All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: fix 64-bit integer division
@ 2021-02-25 14:33 ` Arnd Bergmann
  0 siblings, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2021-02-25 14:33 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, Bindu Ramamurthy, Vladimir Stempen
  Cc: Arnd Bergmann, Rodrigo Siqueira, Dmytro Laktyushkin,
	Aurabindo Pillai, amd-gfx, dri-devel, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The new display synchronization code caused a regression
on all 32-bit architectures:

ld.lld: error: undefined symbol: __aeabi_uldivmod
>>> referenced by dce_clock_source.c
>>>               gpu/drm/amd/display/dc/dce/dce_clock_source.o:(get_pixel_clk_frequency_100hz) in archive drivers/built-in.a

ld.lld: error: undefined symbol: __aeabi_ldivmod
>>> referenced by dc_resource.c
>>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
>>> referenced by dc_resource.c
>>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
>>> referenced by dc_resource.c
>>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a

This is not a fast path, so the use of an explicit div_u64/div_s64
seems appropriate.

Fixes: 77a2b7265f20 ("drm/amd/display: Synchronize displays with different timings")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c    | 12 ++++++------
 .../gpu/drm/amd/display/dc/dce/dce_clock_source.c    |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index 0241c9d96d7a..49214c59c836 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -441,15 +441,15 @@ bool resource_are_vblanks_synchronizable(
 		if (stream2->timing.pix_clk_100hz*100/stream2->timing.h_total/
 				stream2->timing.v_total > 60)
 			return false;
-		frame_time_diff = (int64_t)10000 *
+		frame_time_diff = div_s64(10000ll *
 			stream1->timing.h_total *
 			stream1->timing.v_total *
-			stream2->timing.pix_clk_100hz /
-			stream1->timing.pix_clk_100hz /
-			stream2->timing.h_total /
-			stream2->timing.v_total;
+			stream2->timing.pix_clk_100hz,
+			stream1->timing.pix_clk_100hz *
+			stream2->timing.h_total *
+			stream2->timing.v_total);
 		for (i = 0; i < rr_count; i++) {
-			int64_t diff = (frame_time_diff * base60_refresh_rates[i]) / 10 - 10000;
+			int64_t diff = div_s64(frame_time_diff * base60_refresh_rates[i], 10) - 10000;
 
 			if (diff < 0)
 				diff = -diff;
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
index 6f47f9bab5ee..85ed6f2c9647 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
@@ -1013,9 +1013,9 @@ static bool get_pixel_clk_frequency_100hz(
 			 * not be programmed equal to DPREFCLK
 			 */
 			modulo_hz = REG_READ(MODULO[inst]);
-			*pixel_clk_khz = ((uint64_t)clock_hz*
-				clock_source->ctx->dc->clk_mgr->dprefclk_khz*10)/
-				modulo_hz;
+			*pixel_clk_khz = div_u64((uint64_t)clock_hz * 10 *
+				clock_source->ctx->dc->clk_mgr->dprefclk_khz,
+				modulo_hz);
 		} else {
 			/* NOTE: There is agreement with VBIOS here that MODULO is
 			 * programmed equal to DPREFCLK, in which case PHASE will be
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] drm/amd/display: fix 64-bit integer division
@ 2021-02-25 14:33 ` Arnd Bergmann
  0 siblings, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2021-02-25 14:33 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, Bindu Ramamurthy, Vladimir Stempen
  Cc: Arnd Bergmann, Rodrigo Siqueira, linux-kernel, amd-gfx,
	Aurabindo Pillai, Dmytro Laktyushkin, dri-devel

From: Arnd Bergmann <arnd@arndb.de>

The new display synchronization code caused a regression
on all 32-bit architectures:

ld.lld: error: undefined symbol: __aeabi_uldivmod
>>> referenced by dce_clock_source.c
>>>               gpu/drm/amd/display/dc/dce/dce_clock_source.o:(get_pixel_clk_frequency_100hz) in archive drivers/built-in.a

ld.lld: error: undefined symbol: __aeabi_ldivmod
>>> referenced by dc_resource.c
>>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
>>> referenced by dc_resource.c
>>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
>>> referenced by dc_resource.c
>>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a

This is not a fast path, so the use of an explicit div_u64/div_s64
seems appropriate.

Fixes: 77a2b7265f20 ("drm/amd/display: Synchronize displays with different timings")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c    | 12 ++++++------
 .../gpu/drm/amd/display/dc/dce/dce_clock_source.c    |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index 0241c9d96d7a..49214c59c836 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -441,15 +441,15 @@ bool resource_are_vblanks_synchronizable(
 		if (stream2->timing.pix_clk_100hz*100/stream2->timing.h_total/
 				stream2->timing.v_total > 60)
 			return false;
-		frame_time_diff = (int64_t)10000 *
+		frame_time_diff = div_s64(10000ll *
 			stream1->timing.h_total *
 			stream1->timing.v_total *
-			stream2->timing.pix_clk_100hz /
-			stream1->timing.pix_clk_100hz /
-			stream2->timing.h_total /
-			stream2->timing.v_total;
+			stream2->timing.pix_clk_100hz,
+			stream1->timing.pix_clk_100hz *
+			stream2->timing.h_total *
+			stream2->timing.v_total);
 		for (i = 0; i < rr_count; i++) {
-			int64_t diff = (frame_time_diff * base60_refresh_rates[i]) / 10 - 10000;
+			int64_t diff = div_s64(frame_time_diff * base60_refresh_rates[i], 10) - 10000;
 
 			if (diff < 0)
 				diff = -diff;
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
index 6f47f9bab5ee..85ed6f2c9647 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
@@ -1013,9 +1013,9 @@ static bool get_pixel_clk_frequency_100hz(
 			 * not be programmed equal to DPREFCLK
 			 */
 			modulo_hz = REG_READ(MODULO[inst]);
-			*pixel_clk_khz = ((uint64_t)clock_hz*
-				clock_source->ctx->dc->clk_mgr->dprefclk_khz*10)/
-				modulo_hz;
+			*pixel_clk_khz = div_u64((uint64_t)clock_hz * 10 *
+				clock_source->ctx->dc->clk_mgr->dprefclk_khz,
+				modulo_hz);
 		} else {
 			/* NOTE: There is agreement with VBIOS here that MODULO is
 			 * programmed equal to DPREFCLK, in which case PHASE will be
-- 
2.29.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] drm/amd/display: fix 64-bit integer division
@ 2021-02-25 14:33 ` Arnd Bergmann
  0 siblings, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2021-02-25 14:33 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, Bindu Ramamurthy, Vladimir Stempen
  Cc: Arnd Bergmann, Rodrigo Siqueira, linux-kernel, amd-gfx,
	Aurabindo Pillai, Dmytro Laktyushkin, dri-devel

From: Arnd Bergmann <arnd@arndb.de>

The new display synchronization code caused a regression
on all 32-bit architectures:

ld.lld: error: undefined symbol: __aeabi_uldivmod
>>> referenced by dce_clock_source.c
>>>               gpu/drm/amd/display/dc/dce/dce_clock_source.o:(get_pixel_clk_frequency_100hz) in archive drivers/built-in.a

ld.lld: error: undefined symbol: __aeabi_ldivmod
>>> referenced by dc_resource.c
>>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
>>> referenced by dc_resource.c
>>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
>>> referenced by dc_resource.c
>>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a

This is not a fast path, so the use of an explicit div_u64/div_s64
seems appropriate.

Fixes: 77a2b7265f20 ("drm/amd/display: Synchronize displays with different timings")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c    | 12 ++++++------
 .../gpu/drm/amd/display/dc/dce/dce_clock_source.c    |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index 0241c9d96d7a..49214c59c836 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -441,15 +441,15 @@ bool resource_are_vblanks_synchronizable(
 		if (stream2->timing.pix_clk_100hz*100/stream2->timing.h_total/
 				stream2->timing.v_total > 60)
 			return false;
-		frame_time_diff = (int64_t)10000 *
+		frame_time_diff = div_s64(10000ll *
 			stream1->timing.h_total *
 			stream1->timing.v_total *
-			stream2->timing.pix_clk_100hz /
-			stream1->timing.pix_clk_100hz /
-			stream2->timing.h_total /
-			stream2->timing.v_total;
+			stream2->timing.pix_clk_100hz,
+			stream1->timing.pix_clk_100hz *
+			stream2->timing.h_total *
+			stream2->timing.v_total);
 		for (i = 0; i < rr_count; i++) {
-			int64_t diff = (frame_time_diff * base60_refresh_rates[i]) / 10 - 10000;
+			int64_t diff = div_s64(frame_time_diff * base60_refresh_rates[i], 10) - 10000;
 
 			if (diff < 0)
 				diff = -diff;
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
index 6f47f9bab5ee..85ed6f2c9647 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
@@ -1013,9 +1013,9 @@ static bool get_pixel_clk_frequency_100hz(
 			 * not be programmed equal to DPREFCLK
 			 */
 			modulo_hz = REG_READ(MODULO[inst]);
-			*pixel_clk_khz = ((uint64_t)clock_hz*
-				clock_source->ctx->dc->clk_mgr->dprefclk_khz*10)/
-				modulo_hz;
+			*pixel_clk_khz = div_u64((uint64_t)clock_hz * 10 *
+				clock_source->ctx->dc->clk_mgr->dprefclk_khz,
+				modulo_hz);
 		} else {
 			/* NOTE: There is agreement with VBIOS here that MODULO is
 			 * programmed equal to DPREFCLK, in which case PHASE will be
-- 
2.29.2

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/amd/display: fix 64-bit integer division
  2021-02-25 14:33 ` Arnd Bergmann
  (?)
@ 2021-02-25 21:36   ` Arnd Bergmann
  -1 siblings, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2021-02-25 21:36 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, Bindu Ramamurthy, Vladimir Stempen
  Cc: Arnd Bergmann, Rodrigo Siqueira, Dmytro Laktyushkin,
	Aurabindo Pillai, amd-gfx list, dri-devel, linux-kernel

On Thu, Feb 25, 2021 at 3:33 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> The new display synchronization code caused a regression
> on all 32-bit architectures:
>
> ld.lld: error: undefined symbol: __aeabi_uldivmod
> >>> referenced by dce_clock_source.c
> >>>               gpu/drm/amd/display/dc/dce/dce_clock_source.o:(get_pixel_clk_frequency_100hz) in archive drivers/built-in.a
>
> ld.lld: error: undefined symbol: __aeabi_ldivmod
> >>> referenced by dc_resource.c
> >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
> >>> referenced by dc_resource.c
> >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
> >>> referenced by dc_resource.c
> >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
>
> This is not a fast path, so the use of an explicit div_u64/div_s64
> seems appropriate.

I found two more instances:

>>> referenced by dcn20_optc.c
>>>               gpu/drm/amd/display/dc/dcn20/dcn20_optc.o:(optc2_align_vblanks) in archive drivers/built-in.a

>>> referenced by dcn10_hw_sequencer.c
>>>               gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.o:(reduceSizeAndFraction) in archive drivers/built-in.a

I have patches for both, but will let the randconfig build box keep working
on it over night to see if there are any others. Let me know if you want a
combined patch or one per file once there are no more regressions.

        Arnd

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/amd/display: fix 64-bit integer division
@ 2021-02-25 21:36   ` Arnd Bergmann
  0 siblings, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2021-02-25 21:36 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, Bindu Ramamurthy, Vladimir Stempen
  Cc: Arnd Bergmann, Rodrigo Siqueira, linux-kernel, amd-gfx list,
	Aurabindo Pillai, Dmytro Laktyushkin, dri-devel

On Thu, Feb 25, 2021 at 3:33 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> The new display synchronization code caused a regression
> on all 32-bit architectures:
>
> ld.lld: error: undefined symbol: __aeabi_uldivmod
> >>> referenced by dce_clock_source.c
> >>>               gpu/drm/amd/display/dc/dce/dce_clock_source.o:(get_pixel_clk_frequency_100hz) in archive drivers/built-in.a
>
> ld.lld: error: undefined symbol: __aeabi_ldivmod
> >>> referenced by dc_resource.c
> >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
> >>> referenced by dc_resource.c
> >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
> >>> referenced by dc_resource.c
> >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
>
> This is not a fast path, so the use of an explicit div_u64/div_s64
> seems appropriate.

I found two more instances:

>>> referenced by dcn20_optc.c
>>>               gpu/drm/amd/display/dc/dcn20/dcn20_optc.o:(optc2_align_vblanks) in archive drivers/built-in.a

>>> referenced by dcn10_hw_sequencer.c
>>>               gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.o:(reduceSizeAndFraction) in archive drivers/built-in.a

I have patches for both, but will let the randconfig build box keep working
on it over night to see if there are any others. Let me know if you want a
combined patch or one per file once there are no more regressions.

        Arnd
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/amd/display: fix 64-bit integer division
@ 2021-02-25 21:36   ` Arnd Bergmann
  0 siblings, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2021-02-25 21:36 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, Bindu Ramamurthy, Vladimir Stempen
  Cc: Arnd Bergmann, Rodrigo Siqueira, linux-kernel, amd-gfx list,
	Aurabindo Pillai, Dmytro Laktyushkin, dri-devel

On Thu, Feb 25, 2021 at 3:33 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> The new display synchronization code caused a regression
> on all 32-bit architectures:
>
> ld.lld: error: undefined symbol: __aeabi_uldivmod
> >>> referenced by dce_clock_source.c
> >>>               gpu/drm/amd/display/dc/dce/dce_clock_source.o:(get_pixel_clk_frequency_100hz) in archive drivers/built-in.a
>
> ld.lld: error: undefined symbol: __aeabi_ldivmod
> >>> referenced by dc_resource.c
> >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
> >>> referenced by dc_resource.c
> >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
> >>> referenced by dc_resource.c
> >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
>
> This is not a fast path, so the use of an explicit div_u64/div_s64
> seems appropriate.

I found two more instances:

>>> referenced by dcn20_optc.c
>>>               gpu/drm/amd/display/dc/dcn20/dcn20_optc.o:(optc2_align_vblanks) in archive drivers/built-in.a

>>> referenced by dcn10_hw_sequencer.c
>>>               gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.o:(reduceSizeAndFraction) in archive drivers/built-in.a

I have patches for both, but will let the randconfig build box keep working
on it over night to see if there are any others. Let me know if you want a
combined patch or one per file once there are no more regressions.

        Arnd
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/amd/display: fix 64-bit integer division
  2021-02-25 21:36   ` Arnd Bergmann
  (?)
@ 2021-02-25 21:39     ` Stempen, Vladimir
  -1 siblings, 0 replies; 9+ messages in thread
From: Stempen, Vladimir @ 2021-02-25 21:39 UTC (permalink / raw)
  To: Arnd Bergmann, Wentland, Harry, Li, Sun peng (Leo),
	Deucher, Alexander, Koenig, Christian, David Airlie,
	Daniel Vetter, R, Bindu
  Cc: Arnd Bergmann, Siqueira, Rodrigo, Laktyushkin, Dmytro, Pillai,
	Aurabindo, amd-gfx list, dri-devel, linux-kernel

[AMD Official Use Only - Internal Distribution Only]

Hi Arnd,
I have all the patches ready and I have tested them with the feature/platform I'm working on and Bindu helped to test the 32bit build.
I'm in process of submitting the latest change.
Thanks,
Vladimir.

On 2021-02-25, 4:36 PM, "Arnd Bergmann" <arnd@kernel.org> wrote:

    On Thu, Feb 25, 2021 at 3:33 PM Arnd Bergmann <arnd@kernel.org> wrote:
    >
    > From: Arnd Bergmann <arnd@arndb.de>
    >
    > The new display synchronization code caused a regression
    > on all 32-bit architectures:
    >
    > ld.lld: error: undefined symbol: __aeabi_uldivmod
    > >>> referenced by dce_clock_source.c
    > >>>               gpu/drm/amd/display/dc/dce/dce_clock_source.o:(get_pixel_clk_frequency_100hz) in archive drivers/built-in.a
    >
    > ld.lld: error: undefined symbol: __aeabi_ldivmod
    > >>> referenced by dc_resource.c
    > >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
    > >>> referenced by dc_resource.c
    > >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
    > >>> referenced by dc_resource.c
    > >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
    >
    > This is not a fast path, so the use of an explicit div_u64/div_s64
    > seems appropriate.

    I found two more instances:

    >>> referenced by dcn20_optc.c
    >>>               gpu/drm/amd/display/dc/dcn20/dcn20_optc.o:(optc2_align_vblanks) in archive drivers/built-in.a

    >>> referenced by dcn10_hw_sequencer.c
    >>>               gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.o:(reduceSizeAndFraction) in archive drivers/built-in.a

    I have patches for both, but will let the randconfig build box keep working
    on it over night to see if there are any others. Let me know if you want a
    combined patch or one per file once there are no more regressions.

            Arnd


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/amd/display: fix 64-bit integer division
@ 2021-02-25 21:39     ` Stempen, Vladimir
  0 siblings, 0 replies; 9+ messages in thread
From: Stempen, Vladimir @ 2021-02-25 21:39 UTC (permalink / raw)
  To: Arnd Bergmann, Wentland, Harry, Li, Sun peng (Leo),
	Deucher, Alexander, Koenig, Christian, David Airlie,
	Daniel Vetter, R, Bindu
  Cc: Arnd Bergmann, Siqueira, Rodrigo, linux-kernel, amd-gfx list,
	Pillai, Aurabindo, Laktyushkin, Dmytro, dri-devel

[AMD Official Use Only - Internal Distribution Only]

Hi Arnd,
I have all the patches ready and I have tested them with the feature/platform I'm working on and Bindu helped to test the 32bit build.
I'm in process of submitting the latest change.
Thanks,
Vladimir.

On 2021-02-25, 4:36 PM, "Arnd Bergmann" <arnd@kernel.org> wrote:

    On Thu, Feb 25, 2021 at 3:33 PM Arnd Bergmann <arnd@kernel.org> wrote:
    >
    > From: Arnd Bergmann <arnd@arndb.de>
    >
    > The new display synchronization code caused a regression
    > on all 32-bit architectures:
    >
    > ld.lld: error: undefined symbol: __aeabi_uldivmod
    > >>> referenced by dce_clock_source.c
    > >>>               gpu/drm/amd/display/dc/dce/dce_clock_source.o:(get_pixel_clk_frequency_100hz) in archive drivers/built-in.a
    >
    > ld.lld: error: undefined symbol: __aeabi_ldivmod
    > >>> referenced by dc_resource.c
    > >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
    > >>> referenced by dc_resource.c
    > >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
    > >>> referenced by dc_resource.c
    > >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
    >
    > This is not a fast path, so the use of an explicit div_u64/div_s64
    > seems appropriate.

    I found two more instances:

    >>> referenced by dcn20_optc.c
    >>>               gpu/drm/amd/display/dc/dcn20/dcn20_optc.o:(optc2_align_vblanks) in archive drivers/built-in.a

    >>> referenced by dcn10_hw_sequencer.c
    >>>               gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.o:(reduceSizeAndFraction) in archive drivers/built-in.a

    I have patches for both, but will let the randconfig build box keep working
    on it over night to see if there are any others. Let me know if you want a
    combined patch or one per file once there are no more regressions.

            Arnd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/amd/display: fix 64-bit integer division
@ 2021-02-25 21:39     ` Stempen, Vladimir
  0 siblings, 0 replies; 9+ messages in thread
From: Stempen, Vladimir @ 2021-02-25 21:39 UTC (permalink / raw)
  To: Arnd Bergmann, Wentland, Harry, Li, Sun peng (Leo),
	Deucher, Alexander, Koenig, Christian, David Airlie,
	Daniel Vetter, R, Bindu
  Cc: Arnd Bergmann, Siqueira, Rodrigo, linux-kernel, amd-gfx list,
	Pillai, Aurabindo, Laktyushkin, Dmytro, dri-devel

[AMD Official Use Only - Internal Distribution Only]

Hi Arnd,
I have all the patches ready and I have tested them with the feature/platform I'm working on and Bindu helped to test the 32bit build.
I'm in process of submitting the latest change.
Thanks,
Vladimir.

On 2021-02-25, 4:36 PM, "Arnd Bergmann" <arnd@kernel.org> wrote:

    On Thu, Feb 25, 2021 at 3:33 PM Arnd Bergmann <arnd@kernel.org> wrote:
    >
    > From: Arnd Bergmann <arnd@arndb.de>
    >
    > The new display synchronization code caused a regression
    > on all 32-bit architectures:
    >
    > ld.lld: error: undefined symbol: __aeabi_uldivmod
    > >>> referenced by dce_clock_source.c
    > >>>               gpu/drm/amd/display/dc/dce/dce_clock_source.o:(get_pixel_clk_frequency_100hz) in archive drivers/built-in.a
    >
    > ld.lld: error: undefined symbol: __aeabi_ldivmod
    > >>> referenced by dc_resource.c
    > >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
    > >>> referenced by dc_resource.c
    > >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
    > >>> referenced by dc_resource.c
    > >>>               gpu/drm/amd/display/dc/core/dc_resource.o:(resource_are_vblanks_synchronizable) in archive drivers/built-in.a
    >
    > This is not a fast path, so the use of an explicit div_u64/div_s64
    > seems appropriate.

    I found two more instances:

    >>> referenced by dcn20_optc.c
    >>>               gpu/drm/amd/display/dc/dcn20/dcn20_optc.o:(optc2_align_vblanks) in archive drivers/built-in.a

    >>> referenced by dcn10_hw_sequencer.c
    >>>               gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.o:(reduceSizeAndFraction) in archive drivers/built-in.a

    I have patches for both, but will let the randconfig build box keep working
    on it over night to see if there are any others. Let me know if you want a
    combined patch or one per file once there are no more regressions.

            Arnd

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-02-25 21:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-25 14:33 [PATCH] drm/amd/display: fix 64-bit integer division Arnd Bergmann
2021-02-25 14:33 ` Arnd Bergmann
2021-02-25 14:33 ` Arnd Bergmann
2021-02-25 21:36 ` Arnd Bergmann
2021-02-25 21:36   ` Arnd Bergmann
2021-02-25 21:36   ` Arnd Bergmann
2021-02-25 21:39   ` Stempen, Vladimir
2021-02-25 21:39     ` Stempen, Vladimir
2021-02-25 21:39     ` Stempen, Vladimir

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.