[Intel-gfx] [PATCH] drm/i915: rc6 residency (fix the fix)
ben at bwidawsk.net
Sun Apr 22 20:27:20 CEST 2012
Google fail. I'd like to go back to my 32b machine and try to reproduce this. your patch seems fine to me though.
-------- Original message --------
Subject: Re: [PATCH] drm/i915: rc6 residency (fix the fix)
From: Chris Wilson <chris at chris-wilson.co.uk>
To: Ben Widawsky <ben at bwidawsk.net>
CC: intel-gfx at lists.freedesktop.org,Ben Widawsky <benjamin.widawsky at intel.com>
On Sun, 22 Apr 2012 11:02:32 -0700, Ben Widawsky <ben at bwidawsk.net> wrote:
> Does div_round64 work for you? I think that is the best solution.
Only exists in drivers/cpuidle/governors/menu.c, and still would need a
do_div to avoid the subsequent 64-bit division.
The choice appears to be either perform the divide by 1000 using do_div,
or note that a u32 * 128 / 1000 is also a u32 and so cast the result of
DIV_ROUND_UP_ULL back to u32.
Chris Wilson, Intel Open Source Technology Centre
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Intel-gfx