All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Intel Color Manager Framework
@ 2014-02-20 12:37 Shashank Sharma
  2014-02-20 12:37 ` [PATCH 1/6] drm/i915: Add Color manager framework Shashank Sharma
                   ` (6 more replies)
  0 siblings, 7 replies; 21+ messages in thread
From: Shashank Sharma @ 2014-02-20 12:37 UTC (permalink / raw)
  To: intel-gfx; +Cc: uma.shankar

Color manager is a new framework in i915 driver, which provides
a unified interface for various color correction methods supported
by intel hardwares. The high level overview of this change is: 

1. Intel hardwares support various color correction methods like
	a. csc(wide gamut) correction
	b. gamma correction
	c. hue/saturation correction
	d. contrast/brightness correction

2. Color manager provides a sysfs based interface and a common
   protocol (named as color EDID) for all the color correction
   properties. There is a command and data parser in the framework
   to extract command and data. 

3. The interested dispalys can call for a color-manager register
   from their corresponding init functions, like we have added for
   DSI and EDP interfaces. The corresponding entry will be
   /sys/class/drm/<card-name-connector-name>/color-manager

4. Color EDID: is a simple protocol for the communication from user about
   what to do, how to do, and where to do. The first value passed from
   userspace, will be color manager command value, which will be
   interpreted as: (sample command value: 0x 01 01 00 FF)
   <property[1Byte]> <enable/disable[1Byte]> <identifier[1Byte]>
   <no of data blocks[1Byte]>
	a. property: This byte represents color manager property, listed
	===========  as CSC correction, gamma correction, hue and
	saturation correction and brightness and contrast correction.
	For example 01 in above sample tells color manager to change
	Gamma correction.
	
	b. enable: This byte represents if we want to enable or disable
	=========  the mentioned property.
	For example 01 in above sample tells color-manager to enable the property.

	c. identifier: This byte tells the targeted pipe/plane for the property
	=============  change. There are few correction values which
		       can be selectively applied on a particular plane.
	For example 00 in above sample tells change in PIPE A.

	d. size: This byte tells how many data blocks will be followed by
	======== this command block.
	For example FF in above sample tells there are 255 correction values coming up.

5. For example (read/write):
   To enable csc on pipeA with 6 correction values:
   echo 0x00010006,0x111111,0x222222,0x333333,0x444444,0x555555,0x66666
		> /sys/class/drm/<connector>/color-manager
   
   To disable gamma on pipeA:
   echo 0x01000000 > /sys/class/drm/<connector>/color-manager

   To check the current status of color-manager:
   cat /sys/class/drm/<connector>/color-manager

6. The current implementation: 
   The current implementation is just limited to valleyview, that too on primary
   displays. But the design is modular and hence can be extended for all other
   devices. Once we agree upon the basic framework, I am going to extend it for
   all possible platforms. You can see current check for is_valleyview.

7. About the patches: 
   First patch adds the basic framework, parsers and header. 
   Second to fifth patch add support for one property each
   	CSC, Gamma, Contrast and Brightness, Hue and Sat.
   Sixth patch adds save and restore functions to maintain color corrections
   	across suspend resume cycles.

Shashank Sharma (6):
  drm/i915: Add Color manager framework
  drm/i915: Color Manager: Add CSC color correction
  drm/i915: Color manager: Add Gamma correction
  drm/i915: Color manager: brightness/contrast
  drm/i915: Color manager: hue/saturation correction
  drm/i915: Save color manager status

 drivers/gpu/drm/i915/Makefile        |    1 +
 drivers/gpu/drm/i915/i915_drv.h      |   29 +
 drivers/gpu/drm/i915/intel_clrmgr.c  | 1455 ++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_clrmgr.h  |  238 ++++++
 drivers/gpu/drm/i915/intel_display.c |    5 +-
 drivers/gpu/drm/i915/intel_dp.c      |    4 +
 drivers/gpu/drm/i915/intel_dsi.c     |    4 +
 7 files changed, 1734 insertions(+), 2 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_clrmgr.c
 create mode 100644 drivers/gpu/drm/i915/intel_clrmgr.h

-- 
1.7.10.4

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

end of thread, other threads:[~2014-02-25 11:41 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-20 12:37 [PATCH 0/6] Intel Color Manager Framework Shashank Sharma
2014-02-20 12:37 ` [PATCH 1/6] drm/i915: Add Color manager framework Shashank Sharma
2014-02-20 12:37 ` [PATCH 2/6] drm/i915: Color Manager: Add CSC color correction Shashank Sharma
2014-02-20 12:37 ` [PATCH 3/6] drm/i915: Color manager: Add Gamma correction Shashank Sharma
2014-02-20 12:37 ` [PATCH 4/6] drm/i915: Color manager: brightness/contrast Shashank Sharma
2014-02-20 12:37 ` [PATCH 5/6] drm/i915: Color manager: hue/saturation correction Shashank Sharma
2014-02-20 12:37 ` [PATCH 6/6] drm/i915: Save color manager status Shashank Sharma
2014-02-20 13:11 ` [Intel-gfx] [PATCH 0/6] Intel Color Manager Framework Ville Syrjälä
2014-02-21  3:34   ` Sharma, Shashank
2014-02-21  9:17     ` Ville Syrjälä
2014-02-21 14:20       ` Sharma, Shashank
2014-02-21 14:46         ` [Intel-gfx] " Ville Syrjälä
2014-02-21 15:41           ` Alex Deucher
2014-02-25 11:41             ` [Intel-gfx] " Thierry Reding
2014-02-22  4:11           ` Sharma, Shashank
2014-02-21 14:49         ` Rob Clark
2014-02-21 18:24           ` Sean Paul
2014-02-21 18:57   ` [Intel-gfx] " Stéphane Marchesin
2014-02-22  3:49     ` Sharma, Shashank
2014-02-24  4:04       ` Stéphane Marchesin
2014-02-25  3:56         ` Sharma, Shashank

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.