All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] i915: fix up a raw 64bit divide
@ 2009-07-01 14:20 Andy Whitcroft
  2009-07-01 16:12 ` Jesse Barnes
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Whitcroft @ 2009-07-01 14:20 UTC (permalink / raw)
  To: Andy Whitcroft, Dave Airlie, Jesse Barnes, Eric Anholt, dri-devel,
	linux-kernel
  Cc: Andy Whitcroft

We are seeing compilation failures on i386 in some environments due
to an undefined reference as below:

    ERROR: "__udivdi3" [drivers/gpu/drm/i915/i915.ko] undefined!

This is generated due to a raw 64 bit divide in the i915 driver.  Fix up
this raw divide.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 73e7b9c..9f79de3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1574,7 +1574,7 @@ igdng_compute_m_n(int bytes_per_pixel, int nlanes,
 
 	temp = (u64) DATA_N * pixel_clock;
 	temp = div_u64(temp, link_clock);
-	m_n->gmch_m = (temp * bytes_per_pixel) / nlanes;
+	m_n->gmch_m = div_u64(temp * bytes_per_pixel, nlanes);
 	m_n->gmch_n = DATA_N;
 	fdi_reduce_ratio(&m_n->gmch_m, &m_n->gmch_n);
 
-- 
1.6.3.rc3.199.g24398


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

end of thread, other threads:[~2009-07-05 10:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-01 14:20 [PATCH 1/1] i915: fix up a raw 64bit divide Andy Whitcroft
2009-07-01 16:12 ` Jesse Barnes
2009-07-01 16:32   ` Andy Whitcroft
2009-07-02  0:59   ` Zhenyu Wang
2009-07-05 10:18   ` Sergio Luis

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.