From: Torsten Hilbrich <torsten.hilbrich@secunet.com>
To: linux-kernel@vger.kernel.org
Cc: Dave Airlie <airlied@linux.ie>, Zhenyu Wang <zhenyuw@linux.intel.com>
Subject: [PATCH] drm: Fixes error with gcc 3.3.5 in i915 driver.
Date: Tue, 23 Jun 2009 14:45:27 +0200 [thread overview]
Message-ID: <4A40CE67.4060504@secunet.com> (raw)
When compiling with gcc 3.3.5 I got the following error message in the
module i915.ko:
ERROR: "__udivdi3" [drivers/gpu/drm/i915/i915.ko] undefined!
This error did not occur when compiling the same code in gcc 4.3.2.
This patch replaces the 64 bit division by a call of div_u64 to avoid
triggering the problem on the older compiler.
The code to be fixed was introduced in
commit 2c07245fb8f7f0a282282e5a9747e46defdb2cc7
---
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 3e1c781..306d198 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1502,7 +1502,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 * byte_per_pixel, nlanes);
m_n->gmch_n = DATA_N;
fdi_reduce_ratio(&m_n->gmch_m, &m_n->gmch_n);
--
1.5.4.2
reply other threads:[~2009-06-23 13:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A40CE67.4060504@secunet.com \
--to=torsten.hilbrich@secunet.com \
--cc=airlied@linux.ie \
--cc=linux-kernel@vger.kernel.org \
--cc=zhenyuw@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox