diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-10-21 14:32:55 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-10-21 14:42:30 +0200 |
commit | a8cbd4597799ade2b8a656dac7768c352b58e43a (patch) | |
tree | e40a5ccc9fc808735f3426f5387e54e291ad4351 /drivers/gpu/drm/i915/intel_panel.c | |
parent | b727735732d5b2fde0a88911210215e03e190d11 (diff) | |
parent | 07c338ce98263a5af631b991dd8f96cff6ca2548 (diff) | |
download | op-kernel-dev-a8cbd4597799ade2b8a656dac7768c352b58e43a.zip op-kernel-dev-a8cbd4597799ade2b8a656dac7768c352b58e43a.tar.gz |
Merge branch 'drm-intel-next-fixes' into drm-intel-next
So I've sent the first pull request to Dave and I expect his request
for a merge tree any second now ;-)
More seriously I have some pending patches for 3.19 that depend upon
both trees, hence backmerge. Conflicts are all trivial.
Conflicts:
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/intel_display.c
v2: Of course I've forgotten the fixup script for the silent conflict.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_panel.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_panel.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index 543e0f1..e3def5a 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c @@ -419,9 +419,8 @@ static uint32_t scale(uint32_t source_val, source_val = clamp(source_val, source_min, source_max); /* avoid overflows */ - target_val = (uint64_t)(source_val - source_min) * - (target_max - target_min); - do_div(target_val, source_max - source_min); + target_val = DIV_ROUND_CLOSEST_ULL((uint64_t)(source_val - source_min) * + (target_max - target_min), source_max - source_min); target_val += target_min; return target_val; |