Re: [Intel-gfx] [PATCH] drm/i915/pch: Fix integer math bugs in panel fitting

2011-07-21 Thread Chris Wilson
On Wed, 13 Jul 2011 16:32:32 -0400, Adam Jackson wrote: > Consider a 1600x900 panel, upscaling a 1360x768 mode, full-aspect. The > old math would give you: > > scaled_width = 1600 * 768; /* 1228800 */ > scaled_height = 1360 * 900; /* 1224000 */ > if (scaled_width > s

Re: [Intel-gfx] [PATCH] drm/i915/pch: Fix integer math bugs in panel fitting

2011-07-20 Thread Christopher James Halse Rogers
On Wed, 2011-07-13 at 16:32 -0400, Adam Jackson wrote: > Consider a 1600x900 panel, upscaling a 1360x768 mode, full-aspect. The > old math would give you: > > scaled_width = 1600 * 768; /* 1228800 */ > scaled_height = 1360 * 900; /* 1224000 */ > if (scaled_width > sca

Re: [Intel-gfx] [PATCH] drm/i915/pch: Fix integer math bugs in panel fitting

2011-07-13 Thread Keith Packard
On Wed, 13 Jul 2011 16:32:32 -0400, Adam Jackson wrote: > + if (width & 1) > + width++; > + if (height & 1) > + height++; You'll want to stick a comment in here describin

[Intel-gfx] [PATCH] drm/i915/pch: Fix integer math bugs in panel fitting

2011-07-13 Thread Adam Jackson
Consider a 1600x900 panel, upscaling a 1360x768 mode, full-aspect. The old math would give you: scaled_width = 1600 * 768; /* 1228800 */ scaled_height = 1360 * 900; /* 1224000 */ if (scaled_width > scaled_height) { /* pillarbox, and true */ width = 1224000 /