* [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* Re: [PATCH 1/1] i915: fix up a raw 64bit divide
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
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jesse Barnes @ 2009-07-01 16:12 UTC (permalink / raw)
To: Andy Whitcroft; +Cc: Dave Airlie, Eric Anholt, dri-devel, linux-kernel
On Wed, 1 Jul 2009 15:20:59 +0100
Andy Whitcroft <apw@canonical.com> wrote:
> 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>
I think building with newer GCCs will prevent this error, but the fix
looks fine.
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 1/1] i915: fix up a raw 64bit divide
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
2 siblings, 0 replies; 5+ messages in thread
From: Andy Whitcroft @ 2009-07-01 16:32 UTC (permalink / raw)
To: Jesse Barnes; +Cc: Dave Airlie, Eric Anholt, dri-devel, linux-kernel
On Wed, Jul 01, 2009 at 09:12:55AM -0700, Jesse Barnes wrote:
> On Wed, 1 Jul 2009 15:20:59 +0100
> Andy Whitcroft <apw@canonical.com> wrote:
>
> > 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>
>
> I think building with newer GCCs will prevent this error, but the fix
> looks fine.
Yeah I suspect gcc interactions here, as builds on older userspace were
failing in this way but not so in the very latest karmic userspace. I
suspect its still correct to avoid these currently.
> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Thanks.
-apw
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] i915: fix up a raw 64bit divide
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
2 siblings, 0 replies; 5+ messages in thread
From: Zhenyu Wang @ 2009-07-02 0:59 UTC (permalink / raw)
To: Jesse Barnes; +Cc: Andy Whitcroft, Dave Airlie, dri-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 842 bytes --]
On 2009.07.01 09:12:55 -0700, Jesse Barnes wrote:
> On Wed, 1 Jul 2009 15:20:59 +0100
> Andy Whitcroft <apw@canonical.com> wrote:
>
> > 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>
>
> I think building with newer GCCs will prevent this error, but the fix
> looks fine.
>
> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
>
yeah, sorry I didn't catch that.
Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] i915: fix up a raw 64bit divide
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
2 siblings, 0 replies; 5+ messages in thread
From: Sergio Luis @ 2009-07-05 10:18 UTC (permalink / raw)
To: Jesse Barnes
Cc: Andy Whitcroft, Dave Airlie, Eric Anholt, dri-devel, linux-kernel
On Wed, Jul 1, 2009 at 1:12 PM, Jesse Barnes<jbarnes@virtuousgeek.org> wrote:
> On Wed, 1 Jul 2009 15:20:59 +0100
> Andy Whitcroft <apw@canonical.com> wrote:
>
>> 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>
>
> I think building with newer GCCs will prevent this error, but the fix
> looks fine.
I get it in here (31-rc2), with gcc 4.2.4, but only if I have
CONFIG_DEBUG_SECTION_MISMATCH=y. With this patch it works regardless
of that option.
>
> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
>
> --
> Jesse Barnes, Intel Open Source Technology Center
> --
^ permalink raw reply [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.