All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] [PATCH 0/5] drm: Fix rounding errors and use scaling in i915, v2.
@ 2018-05-03 11:22 Maarten Lankhorst
  2018-05-03 11:22 ` [PATCH 1/5] drm/rect: Round above 1 << 16 upwards to correct scale calculation functions Maarten Lankhorst
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Maarten Lankhorst @ 2018-05-03 11:22 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Vidya Srinivas

There were some small rounding errors in when clamping with
1.0001 and 0.9999 scaling, solve these and add a testcase for drm
helpers, which can be used to prevent more of these errors in the
future.

The new handling in drm_rect_clip_scaled rounds scaling towards 1.0x but
because the rounding error is only 1 pixel with the new math, we won't
ever get in a situation where we go from 1.001 to .999

Maarten Lankhorst (5):
  drm/rect: Round above 1 << 16 upwards to correct scale calculation
    functions.
  drm/rect: Handle rounding errors in drm_rect_clip_scaled, v3.
  drm/i915: Do not adjust scale when out of bounds, v2.
  drm/selftests: Rename the Kconfig option to CONFIG_DRM_DEBUG_SELFTEST
  drm/selftests: Add drm helper selftest

 drivers/gpu/drm/Kconfig                       |   9 +-
 drivers/gpu/drm/Makefile                      |   2 +-
 drivers/gpu/drm/drm_atomic_helper.c           |   2 +-
 drivers/gpu/drm/drm_rect.c                    |  62 ++++-
 drivers/gpu/drm/i915/intel_sprite.c           | 144 +++-------
 drivers/gpu/drm/selftests/Makefile            |   2 +-
 .../gpu/drm/selftests/drm_helper_selftests.h  |   9 +
 drivers/gpu/drm/selftests/test-drm-helper.c   | 247 ++++++++++++++++++
 include/drm/drm_rect.h                        |   3 +-
 9 files changed, 348 insertions(+), 132 deletions(-)
 create mode 100644 drivers/gpu/drm/selftests/drm_helper_selftests.h
 create mode 100644 drivers/gpu/drm/selftests/test-drm-helper.c

-- 
2.17.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-05-04 11:32 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03 11:22 [PATCH 0/5] [PATCH 0/5] drm: Fix rounding errors and use scaling in i915, v2 Maarten Lankhorst
2018-05-03 11:22 ` [PATCH 1/5] drm/rect: Round above 1 << 16 upwards to correct scale calculation functions Maarten Lankhorst
2018-05-03 13:28   ` Ville Syrjälä
2018-05-03 11:22 ` [PATCH 2/5] drm/rect: Handle rounding errors in drm_rect_clip_scaled, v3 Maarten Lankhorst
2018-05-03 13:29   ` Ville Syrjälä
2018-05-03 11:22 ` [PATCH 3/5] drm/i915: Do not adjust scale when out of bounds, v2 Maarten Lankhorst
2018-05-03 13:35   ` Ville Syrjälä
2018-05-03 11:22 ` [PATCH 4/5] drm/selftests: Rename the Kconfig option to CONFIG_DRM_DEBUG_SELFTEST Maarten Lankhorst
2018-05-03 13:38   ` Ville Syrjälä
2018-05-03 11:22 ` [PATCH 5/5] drm/selftests: Add drm helper selftest Maarten Lankhorst
2018-05-03 13:36   ` Ville Syrjälä
2018-05-04 11:32     ` Maarten Lankhorst
2018-05-03 12:31 ` ✗ Fi.CI.CHECKPATCH: warning for drm: Fix rounding errors and use scaling in i915, v2 Patchwork
2018-05-03 12:32 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-05-03 12:47 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-03 16:58 ` ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.