Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

[DEV][PATCH] KCAL - Advanced color control for Qualcomm MDSS 8226/8926/8974/8084

$
0
0
Hello! If you're keen on custom kernels, especially for Nexus devices, you've probably heard the term Color/Gamma Control thrown around a bit. A once *very* device dependent feature now made available for the following chipsets:
Code:

MDSS_MDP_HW_REV_100        MDSS_MDP_REV(1, 0, 0) /* 8974 v1.0 */
MDSS_MDP_HW_REV_101        MDSS_MDP_REV(1, 1, 0) /* 8x26 v1.0 */
MDSS_MDP_HW_REV_101_1        MDSS_MDP_REV(1, 1, 1) /* 8x26 v2.0, 8926 v1.0 */
MDSS_MDP_HW_REV_101_2        MDSS_MDP_REV(1, 1, 2) /* 8926 v2.0 */
MDSS_MDP_HW_REV_102        MDSS_MDP_REV(1, 2, 0) /* 8974 v2.0 */
MDSS_MDP_HW_REV_102_1        MDSS_MDP_REV(1, 2, 1) /* 8974 v3.0 (Pro) */
MDSS_MDP_HW_REV_103        MDSS_MDP_REV(1, 3, 0) /* 8084 v1.0 */
MDSS_MDP_HW_REV_103_1        MDSS_MDP_REV(1, 3, 1) /* 8084 v1.1 */
MDSS_MDP_HW_REV_200        MDSS_MDP_REV(2, 0, 0) /* 8092 v1.0 */

Color calibration allows you to use an app (or root shell) to manipulate the following post-processing features of the Qualcomm MDSS:
Code:

RGB Multipliers (Area Reduction Gamma Correction)
Display Color Inversion (Individual Gamma Curves)
Hue/Saturation/Value/Contrast Manipulation (Picture Adjustment) - Not yet available for MDP_HW_REV_103 and greater

Too confusing? Here's a video demonstration on Moto G 2014 (Titan):


Sysfs paths/variables:
Code:

/sys/devices/platform/kcal_ctrl.0/kcal - (0-256 0-256 0-256) - Controls R/G/B Multipliers
/sys/devices/platform/kcal_ctrl.0/kcal_min - (0-256) - Controls minimum RGB Multiplier value
/sys/devices/platform/kcal_ctrl.0/kcal_enable - (0-1) - Enables/Disables RGB Multiplier Control
/sys/devices/platform/kcal_ctrl.0/kcal_invert - (0-1) - Enables/Disables Display Inversion Mode
/sys/devices/platform/kcal_ctrl.0/kcal_sat - (224-383 or 128) - Controls saturation intensity - use 128 for grayscale mode
/sys/devices/platform/kcal_ctrl.0/kcal_hue - (0-1536) - Controls display hue - may have issues with msm8x26 in the higher values
/sys/devices/platform/kcal_ctrl.0/kcal_val - (128-383) - Controls display value
/sys/devices/platform/kcal_ctrl.0/kcal_cont - (128 - 383) - Controls display contrast

Link your favorite kernel developer back to this thread and ask them to add support!

KCAL support is fully available for mdp5 chipsets, with the exception of picture adjustment control for APQ8084 and beyond until I can have some testers step up, or get my hands on that hardware. There are two patches required for kernel developers to add:
https://github.com/savoca/kernel-msm...5da39eae7e2d17
https://github.com/savoca/kernel-msm...e002c2c9b41377

KCAL support for mdp3 chipsets (msm8x10) is available as well, but only has support for RGB Multipliers:
https://github.com/savoca/kernel-msm...091ad64a55756f

And finally, an app to control your display - available for free here:
http://downloads.codefi.re/savoca/kcal

Thank you to LG for the display inversion control and code reference, also thank you to @faux123 for insight/reference with MDP3 RGB multipliers

Viewing all articles
Browse latest Browse all 3614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>