Android display color saturation

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Android display color saturation

3,535件の閲覧回数
dennis3
Contributor V

With our Android 10 solution, we were using a color saturation feature to obtain the desired color output on the display:

> setprop persist.sys.sf.color_saturation X.X

We've moved on to Android 11 (currently using 11_1.2.0) and noticed this property no longer has any effect.  Further, I noticed that if I go to the accessibility settings and select any color correction settings, they have no effect and that there is no color mode option in Settings -> Display.

Are there new requirements at the kernel level for display that might be causing these options to not work properly?  e.g., something I need to implement?  Or another configuration option or setting that used to be turned on by default but is no longer turned on?  

Basically I'm looking for why the ColorDisplayService seems to not be functioning in Android 11.

ラベル(1)
0 件の賞賛
3 返答(返信)

3,520件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Did you try to set it in evk8xx.mk?

# Set display color mode to Automatic by default
PRODUCT_PROPERTY_OVERRIDES += \
    persist.sys.sf.color_saturation=1.0 \
    persist.sys.sf.native_mode=2

 

0 件の賞賛

3,484件の閲覧回数
dennis3
Contributor V

@Zhiming_Liu I've done additional research to try to find the problem.  It seems the problem does not exist in the Android 11 sources.  Instead, it appears because we've switched from the imx8mq (quad) to the imx8mp (plus).  These two boards have different display systems and do not behave the same.

I can connect to the device over adb and stream the display (e.g., scrcpy or equiv) and see the saturation effect behaving properly on the virtual display (imx8mp only).  However, the physical display and the hdmi output have no change.  On the imx8mq however, the physical display and hdmi output all behave properly to show the saturation change based on the settings.

I'm unsure if this is an unimplemented feature on the imx8mp only or if there is a bug or configuration error somewhere.  The virtual display does behave properly though so it appears to be something with the graphics or display drivers for the physical displays.  Any suggestion appreciated.

0 件の賞賛

3,515件の閲覧回数
dennis3
Contributor V

I traced through the Android code and it looks like the saturation properly is only used for mode 0..

In ColorDisplayService:

final int displayColorSetting = SystemProperties.getInt("persist.sys.sf.native_mode", 0);
if (displayColorSetting == 0) {
   return "1.0".equals(SystemProperties.get("persist.sys.sf.color_saturation"))
       ? COLOR_MODE_NATURAL : COLOR_MODE_BOOSTED;

However, I did try the COLOR_MODE_SATURATED as well but didn't see any difference.

I traced the code down further and found that at the Android service layer, things seem to be working properly.  The properties are set through the ColorDisplayService and passed down to the SurfaceFlinger as expected.  However, at the SurfaceFlinger level, the actual call that changes the color matrix doesn't appear to be doing anything.  I put debugging in SurfaceFlinger where the color matrix is updated.  The saturation setting is applied but nothing changes on the screen.

0 件の賞賛