public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add gamma/degamma LUT validation helper
@ 2018-12-13 21:55 Matt Roper
  2018-12-13 21:55 ` [PATCH v2 1/2] drm: Add color management LUT validation helper (v2) Matt Roper
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Matt Roper @ 2018-12-13 21:55 UTC (permalink / raw)
  To: dri-devel, intel-gfx

Previous version of this series was here:
  https://lists.freedesktop.org/archives/dri-devel/2018-December/200178.html

Gamma and degamma LUT's uploaded by userspace need to be checked to
ensure they're valid tables and that they meet any additional
constraints of a given platform's hardware.  Let's add a DRM helper that
drivers can call to perform some common LUT sanity tests that are likely
to be useful on multiple platforms:

 - LUT entries are always increasing or flat, never decreasing
 - LUT entries have equal red, green, and blue values for each entry
 - LUT size is valid (i.e., it's a multiple of sizeof(struct
   drm_color_lut))

The size test will always be performed (since it's verifying that the
proper ABI was followed), but the other two tests are optional and will
only be applied as requested by the driver.

This revision incorporates Brian Starkey's suggestion to combine the
separate helpers into a single function that takes a bitmask of tests to
apply.  It also adds an additional LUT size test inspired by the ARM
malidp driver.


Matt Roper (2):
  drm: Add color management LUT validation helper (v2)
  drm/i915: Validate userspace-provided color management LUT's (v2)

 drivers/gpu/drm/drm_color_mgmt.c   | 64 ++++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_color.c | 19 +++++++++++
 include/drm/drm_color_mgmt.h       |  5 +++
 3 files changed, 88 insertions(+)

-- 
2.14.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-12-21 12:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-13 21:55 [PATCH v2 0/2] Add gamma/degamma LUT validation helper Matt Roper
2018-12-13 21:55 ` [PATCH v2 1/2] drm: Add color management LUT validation helper (v2) Matt Roper
2018-12-14  9:43   ` Alexandru-Cosmin Gheorghe
2018-12-14 18:24     ` Matt Roper
2018-12-14 14:26   ` Shankar, Uma
2018-12-17  9:49   ` Daniel Vetter
2018-12-17 13:55   ` Ville Syrjälä
2018-12-21 12:50   ` Brian Starkey
2018-12-13 21:55 ` [PATCH v2 2/2] drm/i915: Validate userspace-provided color management LUT's (v2) Matt Roper
2018-12-14 14:28   ` Shankar, Uma
2018-12-13 22:32 ` ✗ Fi.CI.CHECKPATCH: warning for Add gamma/degamma LUT validation helper Patchwork
2018-12-13 22:50 ` ✓ Fi.CI.BAT: success " Patchwork
2018-12-14  3:28 ` ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox