From: Kausal Malladi <Kausal.Malladi@intel.com>
To: matthew.d.roper@intel.com, jesse.barnes@intel.com,
damien.lespiau@intel.com, sonika.jindal@intel.com,
durgadoss.r@intel.com, vijay.a.purushothaman@intel.com,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
hverkuil@xs4all.nl, daniel@fooishbar.org
Cc: annie.j.matheson@intel.com, dhanya.p.r@intel.com,
daniel.vetter@intel.com, susanta.bhattacharjee@intel.com
Subject: [PATCH 00/16] Color Manager Implementation
Date: Wed, 15 Jul 2015 18:39:24 +0530 [thread overview]
Message-ID: <1436965780-6061-1-git-send-email-Kausal.Malladi@intel.com> (raw)
This patch set adds Color Manager implementation in DRM layer. Color Manager is
an extension in DRM framework to support color correction/enhancement. Various
Hardware platforms can support several color correction capabilities.
Color Manager provides abstraction of these capabilities and allows a
user space UI agent to correct/enhance the display using the DRM property interface.
How is this going to work?
==========================
1. This patch series adds a few new properties in DRM framework. These properties are:
a. color_capabilities property (type blob)
b. Color Transformation Matrix property for corrections like CSC (called CTM, type blob)
c. Palette correction properties for corrections like gamma fixup (called palette_correction, type blob)
2. Also, this patch series adds few structures to indicate specifications of a property like size, no_of_samples for correction etc.
3. These properties are present in mode_config.
4. When the platform's display driver loads, it fills up the values of color_capabilities property using the standard structures (added in step 2).
For example, Intel's I915 driver adds following color correction capabilities:
a. gamma correction capability as palette correction property, with 257 correction coefficients and a max/min value
b. csc correction capability as CTM correction property, with 3x3 transformation matrix values and max/min values
5. Now when userspace comes up, it queries the platform's color capabilities by doing a get_property() on color_capabilities DRM property
6. Reading the blob, the userspace understands the color capabilities of the platform.
For example, userspace will understand it can support:
a. palette_correction with 257 coefficients
b. CSC correction with 3x3 = 9 values
7. To set color correction values, userspace:
a. creates a blob using the create_blob_ioctl in standard palette_correction structure format, with the correction values
b. calls the set_property_ioctl with the blob_id as value for the property
8. Driver refers to the blob, gets the correction values and applies the correction in HW.
9. To get currently applied color correction values, userspace:
a. calls a get_property_ioctl on that color property
b. gets the blob_id for the currently applied correction from DRM infrastructure
c. gets the blob using get_blob_ioctl and hence the currently applied values
That's all! :)
About the patch series:
=======================
The first patch adds fix for ensuring atomic commit for CRTC properties.
The subsequent patches add code for the framework, which will be common across all the Hardware platforms.
1. Create Color Management DRM properties
2. Attach color properties to CRTC
3. Add structures at DRM level for color management
The generic properties supported in this patch set are
1. Color Transformation Matrix (CTM) for generic usecases like color space conversion and Gamut Mapping
2. Palette correction before CTM for specific usecases like DeGamma color correction
3. Palette correction after CTM for specific usecases like Gamma color correction
In the subsequent patches, we are adding support for Gamma, DeGamma and CSC color properties for one of the Intel platforms, CHV, as an example.
Our thanks to all the reviewers who have given valuable comments in terms of design and implementation to our previous sets of patches.
Special mention of thanks should go to Matt Roper for all his inputs/suggestions in implementation of this module, using DRM atomic CRTC commit path.
Kausal Malladi (15):
drm: Create Color Management DRM properties
drm/i915: Attach color properties to CRTC
drm: Add structure for querying palette color capabilities
drm: Export drm_property_replace_global_blob function
drm/i915: Load gamma color capabilities for CHV CRTC
drm/i915: Add atomic set property interface for CRTC
drm: Add blob properties to CRTC state for color properties
drm: Add structures to set/get a palette color property
drm/i915: Add set_property handler for pipe Gamma correction on
CHV/BSW
drm/i915: Add pipe level Gamma correction for CHV/BSW
drm/i915: Add set_property handler for pipe deGamma correction on
CHV/BSW
drm/i915: Add DeGamma correction for CHV/BSW
drm: Add structure for set/get a CTM color property
drm/i915: Add set_property handler for CSC correction on CHV/BSW
drm/i915: Add CSC correction for CHV/BSW
Matt Roper (1):
drm/i915: Atomic commit path fix for CRTC properties
drivers/gpu/drm/drm_crtc.c | 29 +-
drivers/gpu/drm/i915/Makefile | 3 +-
drivers/gpu/drm/i915/i915_reg.h | 22 ++
drivers/gpu/drm/i915/intel_atomic.c | 33 ++
drivers/gpu/drm/i915/intel_color_manager.c | 535 +++++++++++++++++++++++++++++
drivers/gpu/drm/i915/intel_color_manager.h | 79 +++++
drivers/gpu/drm/i915/intel_display.c | 7 +
drivers/gpu/drm/i915/intel_drv.h | 19 +
include/drm/drm_crtc.h | 17 +
include/uapi/drm/drm.h | 50 +++
10 files changed, 792 insertions(+), 2 deletions(-)
create mode 100644 drivers/gpu/drm/i915/intel_color_manager.c
create mode 100644 drivers/gpu/drm/i915/intel_color_manager.h
--
2.4.5
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2015-07-15 13:09 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-15 13:09 Kausal Malladi [this message]
2015-07-15 13:09 ` [PATCH 01/16] drm/i915: Atomic commit path fix for CRTC properties Kausal Malladi
2015-07-15 13:09 ` [PATCH 02/16] drm: Create Color Management DRM properties Kausal Malladi
2015-07-15 13:25 ` Thierry Reding
2015-07-15 15:14 ` Sharma, Shashank
2015-07-15 13:09 ` [PATCH 03/16] drm/i915: Attach color properties to CRTC Kausal Malladi
2015-07-21 0:02 ` Matt Roper
2015-07-15 13:09 ` [PATCH 04/16] drm: Add structure for querying palette color capabilities Kausal Malladi
2015-07-15 13:09 ` [PATCH 05/16] drm: Export drm_property_replace_global_blob function Kausal Malladi
2015-07-15 13:09 ` [PATCH 06/16] drm/i915: Load gamma color capabilities for CHV CRTC Kausal Malladi
2015-07-21 0:02 ` Matt Roper
2015-07-15 13:09 ` [PATCH 07/16] drm/i915: Add atomic set property interface for CRTC Kausal Malladi
2015-07-21 0:02 ` Matt Roper
2015-07-15 13:09 ` [PATCH 08/16] drm: Add blob properties to CRTC state for color properties Kausal Malladi
2015-07-15 13:09 ` [PATCH 09/16] drm: Add structures to set/get a palette color property Kausal Malladi
2015-07-15 13:09 ` [PATCH 10/16] drm/i915: Add set_property handler for pipe Gamma correction on CHV/BSW Kausal Malladi
2015-07-21 0:03 ` Matt Roper
2015-07-21 11:04 ` Malladi, Kausal
2015-07-15 13:09 ` [PATCH 11/16] drm/i915: Add pipe level Gamma correction for CHV/BSW Kausal Malladi
2015-07-21 0:03 ` Matt Roper
2015-07-21 11:10 ` Malladi, Kausal
2015-07-21 23:34 ` Matt Roper
2015-07-15 13:09 ` [PATCH 12/16] drm/i915: Add set_property handler for pipe deGamma correction on CHV/BSW Kausal Malladi
2015-07-15 13:09 ` [PATCH 13/16] drm/i915: Add DeGamma correction for CHV/BSW Kausal Malladi
2015-07-15 13:09 ` [PATCH 14/16] drm: Add structure for set/get a CTM color property Kausal Malladi
2015-07-15 13:09 ` [PATCH 15/16] drm/i915: Add set_property handler for CSC correction on CHV/BSW Kausal Malladi
2015-07-15 13:09 ` [PATCH 16/16] drm/i915: Add CSC correction for CHV/BSW Kausal Malladi
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=1436965780-6061-1-git-send-email-Kausal.Malladi@intel.com \
--to=kausal.malladi@intel.com \
--cc=annie.j.matheson@intel.com \
--cc=damien.lespiau@intel.com \
--cc=daniel.vetter@intel.com \
--cc=daniel@fooishbar.org \
--cc=dhanya.p.r@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=durgadoss.r@intel.com \
--cc=hverkuil@xs4all.nl \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jesse.barnes@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=sonika.jindal@intel.com \
--cc=susanta.bhattacharjee@intel.com \
--cc=vijay.a.purushothaman@intel.com \
/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