Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166019
b: refs/heads/master
c: d660467
h: refs/heads/master
i:
  166017: e6c7c38
  166015: e86f36c
v: v3
  • Loading branch information
Jesse Barnes committed Sep 17, 2009
1 parent 665c9b6 commit 5da0249
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: decbbcda2965fadb9fbaaf4f9e057ae554aa3cfe
refs/heads/master: d660467c3ff2a0b7413e1b7a51452b34ffb49e5f
9 changes: 8 additions & 1 deletion trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -2119,7 +2119,14 @@ static unsigned long intel_calculate_wm(unsigned long clock_in_khz,
{
long entries_required, wm_size;

entries_required = (clock_in_khz * pixel_size * latency_ns) / 1000000;
/*
* Note: we need to make sure we don't overflow for various clock &
* latency values.
* clocks go from a few thousand to several hundred thousand.
* latency is usually a few thousand
*/
entries_required = ((clock_in_khz / 1000) * pixel_size * latency_ns) /
1000;
entries_required /= wm->cacheline_size;

DRM_DEBUG("FIFO entries required for mode: %d\n", entries_required);
Expand Down

0 comments on commit 5da0249

Please sign in to comment.