From: Matt Roper <matthew.d.roper@intel.com>
To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: [PATCH v2 0/2] Add gamma/degamma LUT validation helper
Date: Thu, 13 Dec 2018 13:55:24 -0800 [thread overview]
Message-ID: <20181213215526.31991-1-matthew.d.roper@intel.com> (raw)
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
next reply other threads:[~2018-12-13 21:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-13 21:55 Matt Roper [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181213215526.31991-1-matthew.d.roper@intel.com \
--to=matthew.d.roper@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox