public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 00/18] Color Management for DRM
@ 2015-08-06 16:38 Shashank Sharma
  2015-08-06 16:38 ` [PATCH 01/18] drm: Create Color Management DRM properties Shashank Sharma
                   ` (18 more replies)
  0 siblings, 19 replies; 37+ messages in thread
From: Shashank Sharma @ 2015-08-06 16:38 UTC (permalink / raw)
  To: dri-devel, matthew.d.roper, robert.bradford, thierry.reding,
	gary.k.smith, hverkuil, jim.bish, intel-gfx
  Cc: annie.j.matheson, avinash.reddy.palleti, vijay.a.purushothaman,
	kausalmalladi, jesse.barnes, daniel.vetter, kiran.s.kumar,
	susanta.bhattacharjee

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.

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.

V2: Worked on review comments from Matt, Jim, Thierry, Rob.

Shashank Sharma (18):
  drm: Create Color Management DRM properties
  drm/i915: Add atomic set property interface for CRTC
  drm/i915: Add atomic get property interface for CRTC
  drm: Add structure for querying palette color capabilities
  drm/i915: Initialize color manager and add gamma correction
  drm: Add color correction blobs in CRTC state
  drm: Add drm structures for palette color property
  drm/i915: Add pipe gamma correction handlers
  drm/i915: Pipe level Gamma correction for CHV/BSW
  drm/i915: Add pipe deGamma correction handlers
  drm/i915: Add DeGamma correction for CHV/BSW
  drm: Add structure for set/get a CTM color property
  drm/i915: Add set/get property handlers for CSC correction
  drm/i915: Add CSC correction for CHV/BSW
  drm/i915: Initialize Gen8 pipe gamma correction
  drm/i915: Gen8 pipe level Gamma correction
  drm/i915: Add DeGamma correction for BDW/SKL/BXT
  drm/i915: Add CSC correction for BDW/SKL/BXT

 drivers/gpu/drm/drm_crtc.c                 |  26 +
 drivers/gpu/drm/i915/Makefile              |   3 +-
 drivers/gpu/drm/i915/i915_reg.h            |  44 +-
 drivers/gpu/drm/i915/intel_atomic.c        |  43 ++
 drivers/gpu/drm/i915/intel_color_manager.c | 970 +++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_color_manager.h | 117 ++++
 drivers/gpu/drm/i915/intel_display.c       |   7 +
 drivers/gpu/drm/i915/intel_drv.h           |  23 +
 include/drm/drm_crtc.h                     |  11 +
 include/uapi/drm/drm.h                     |  50 ++
 10 files changed, 1292 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

-- 
1.9.1

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

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

end of thread, other threads:[~2015-09-30 17:49 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-06 16:38 [PATCH 00/18] Color Management for DRM Shashank Sharma
2015-08-06 16:38 ` [PATCH 01/18] drm: Create Color Management DRM properties Shashank Sharma
2015-08-06 16:38 ` [PATCH 02/18] drm/i915: Add atomic set property interface for CRTC Shashank Sharma
2015-08-06 16:38 ` [PATCH 03/18] drm/i915: Add atomic get " Shashank Sharma
2015-08-21 22:40   ` Matt Roper
2015-08-22  6:00     ` Sharma, Shashank
2015-08-25  7:16       ` Daniel Vetter
2015-08-06 16:38 ` [PATCH 04/18] drm: Add structure for querying palette color capabilities Shashank Sharma
2015-08-06 16:38 ` [PATCH 05/18] drm/i915: Initialize color manager and add gamma correction Shashank Sharma
2015-08-21 22:40   ` Matt Roper
2015-08-22  6:08     ` Sharma, Shashank
2015-08-06 16:38 ` [PATCH 06/18] drm: Add color correction blobs in CRTC state Shashank Sharma
2015-08-21 22:40   ` Matt Roper
2015-08-22  6:09     ` Sharma, Shashank
2015-08-06 16:38 ` [PATCH 07/18] drm: Add drm structures for palette color property Shashank Sharma
2015-08-06 16:38 ` [PATCH 08/18] drm/i915: Add pipe gamma correction handlers Shashank Sharma
2015-08-21 22:40   ` Matt Roper
2015-08-22  6:11     ` Sharma, Shashank
2015-08-25  7:18       ` Daniel Vetter
2015-08-06 16:38 ` [PATCH 09/18] drm/i915: Pipe level Gamma correction for CHV/BSW Shashank Sharma
2015-08-21 22:41   ` Matt Roper
2015-08-22  6:18     ` Sharma, Shashank
2015-08-06 16:38 ` [PATCH 10/18] drm/i915: Add pipe deGamma correction handlers Shashank Sharma
2015-08-06 16:38 ` [PATCH 11/18] drm/i915: Add DeGamma correction for CHV/BSW Shashank Sharma
2015-08-06 16:38 ` [PATCH 12/18] drm: Add structure for set/get a CTM color property Shashank Sharma
2015-08-06 16:38 ` [PATCH 13/18] drm/i915: Add set/get property handlers for CSC correction Shashank Sharma
2015-08-06 16:38 ` [PATCH 14/18] drm/i915: Add CSC correction for CHV/BSW Shashank Sharma
2015-08-06 16:38 ` [PATCH 15/18] drm/i915: Initialize Gen8 pipe gamma correction Shashank Sharma
2015-08-21 22:41   ` Matt Roper
2015-08-22  6:31     ` Sharma, Shashank
2015-08-06 16:38 ` [PATCH 16/18] drm/i915: Gen8 pipe level Gamma correction Shashank Sharma
2015-08-06 16:38 ` [PATCH 17/18] drm/i915: Add DeGamma correction for BDW/SKL/BXT Shashank Sharma
2015-08-06 16:38 ` [PATCH 18/18] drm/i915: Add CSC " Shashank Sharma
2015-08-13  0:28   ` shuang.he
2015-09-30 17:49   ` Rob Bradford
2015-09-08 10:49 ` [PATCH 00/18] Color Management for DRM Rob Bradford
2015-09-08 11:10   ` Sharma, Shashank

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