Re: [Intel-gfx] [PATCH 2/3] drm/rect: Handle rounding errors in drm_rect_clip_scaled

2018-04-26 Thread Ville Syrjälä
On Thu, Apr 26, 2018 at 10:28:20AM +0200, Maarten Lankhorst wrote: > No matter how you perform the clip adjustments, a small > error may push the scaling factor to the other side of > 0x1. Solve this with a macro that will fixup the > scale to 0x1 if we accidentally wrap to the other side.

Re: [Intel-gfx] [PATCH 2/3] drm/rect: Handle rounding errors in drm_rect_clip_scaled

2018-04-26 Thread Daniel Vetter
On Thu, Apr 26, 2018 at 10:28:20AM +0200, Maarten Lankhorst wrote: > No matter how you perform the clip adjustments, a small > error may push the scaling factor to the other side of > 0x1. Solve this with a macro that will fixup the > scale to 0x1 if we accidentally wrap to the other side.

[Intel-gfx] [PATCH 2/3] drm/rect: Handle rounding errors in drm_rect_clip_scaled

2018-04-26 Thread Maarten Lankhorst
No matter how you perform the clip adjustments, a small error may push the scaling factor to the other side of 0x1. Solve this with a macro that will fixup the scale to 0x1 if we accidentally wrap to the other side. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/drm_rect.c | 65 +++