Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156519
b: refs/heads/master
c: 390c4dd
h: refs/heads/master
i:
  156517: 1c5a186
  156515: 648f86a
  156511: 4c0d748
v: v3
  • Loading branch information
Jesse Barnes authored and Eric Anholt committed Jul 16, 2009
1 parent 3abc0ec commit cd40b08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: dff33cfcefa31c30b72c57f44586754ea9e8f3e2
refs/heads/master: 390c4dd448b1a5f04ea497c20f5ff664f8eeed01
7 changes: 4 additions & 3 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,7 @@ static unsigned long intel_calculate_wm(unsigned long clock_in_khz,
int pixel_size,
unsigned long latency_ns)
{
unsigned long entries_required, wm_size;
long entries_required, wm_size;

entries_required = (clock_in_khz * pixel_size * latency_ns) / 1000000;
entries_required /= wm->cacheline_size;
Expand All @@ -1685,9 +1685,10 @@ static unsigned long intel_calculate_wm(unsigned long clock_in_khz,

DRM_DEBUG("FIFO watermark level: %d\n", wm_size);

if (wm_size > wm->max_wm)
/* Don't promote wm_size to unsigned... */
if (wm_size > (long)wm->max_wm)
wm_size = wm->max_wm;
if (wm_size == 0)
if (wm_size <= 0)
wm_size = wm->default_wm;
return wm_size;
}
Expand Down

0 comments on commit cd40b08

Please sign in to comment.