LVDS display brightness support

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LVDS display brightness support

Jump to solution
2,384 Views
james_wu1
Contributor I

Hi support team

I have a i.MX 8M plus board also implement LVDS display.

LVDS display well but brightness can not be control. 

The log response "Display brightness support: false"

pwm_bl driver is working.

I can control the brightness from command line as below.

echo 1 > /sys/devices/platform/lvds_backlight/backlight/lvds_backlight/brightness

01-01 00:00:11.934 489 489 I SystemServer: StartLightsService
01-01 00:00:11.934 489 489 I SystemServiceManager: Starting com.android.server.lights.LightsService
01-01 00:00:11.940 489 489 D LightsService: Display brightness support: false
01-01 00:00:11.941 489 489 I chatty : uid=1000 system_server identical 6 lines
01-01 00:00:11.941 489 489 D LightsService: Display brightness support: false

......

LocalDisplayAdapter: tryConnectDisplayLocked 16625703383590656
01-01 00:00:11.959 330 487 E SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
01-01 00:00:11.959 489 511 W LocalDisplayAdapter: tryConnectDisplayLocked 16625703383590656
01-01 00:00:11.959 489 511 W LocalDisplayAdapter: tryConnectDisplayLocked isInternal true
01-01 00:00:11.960 489 511 W LocalDisplayAdapter: internel LocalDisplayDevice 16625703383590656
01-01 00:00:11.960 489 511 W LocalDisplayAdapter: tryConnectDisplayLocked device != null
01-01 00:00:11.968 489 511 I DisplayManagerService: Display device added: DisplayDeviceInfo{"?批遣?恍": uniqueId="local:16625703383590656", 1280 x 800, modeId 1, defaultModeId 1, supportedModes [{id=1, width=1280, height=800, fps=52.0}], colorMode 0, supportedColorModes [0], HdrCapabilities android.view.Display$HdrCapabilities@40f16308, density 150, 149.824 x 149.411 dpi, appVsyncOff 1000000, presDeadline 19230769, touch INTERNAL, rotation 0, type BUILT_IN, address {port=0, model=0x3b10fd3851e7}, state UNKNOWN, FLAG_DEFAULT_DISPLAY, FLAG_ROTATES_WITH_CONTENT, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}

 

below is dts

reg_lvds_pwr: regulator_lvdspwr {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lvds0_pwr>;
compatible = "regulator-fixed";
regulator-name = "lvds0_vdden";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio4 12 GPIO_ACTIVE_HIGH>;
enable-active-high;
};

reg_lvds_backlight_pwr: regulator_lvdsblpwr {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lvds0_backlight_pwr>;
compatible = "regulator-fixed";
regulator-name = "lvds0_bl_en";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio4 14 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-always-on;
};

lvds_backlight: lvds_backlight {
compatible = "pwm-backlight";
pwms = <&pwm2 0 50000>;
power-supply = <&reg_lvds_backlight_pwr>;
brightness-levels = <0 36 72 108 144 180 216 255>;
default-brightness-level = <6>;
status = "okay";
};

lvds0_panel {
  compatible = "vxt,vl10112880", "panel-lvds";
  backlight = <&lvds_backlight>;
  power-supply = <&reg_lvds_pwr>;

  data-mapping = "vesa-24";
  data-width = <24>;
  height-mm = <136>; /* 135.6 */
  width-mm = <217>; /* 216.96 */

panel-timing {
clock-frequency = <71100000>;
hactive = <1280>;
vactive = <800>;
hback-porch = <100>;
hfront-porch = <60>;
vback-porch = <15>;
vfront-porch = <8>;
hsync-len = <80>;
vsync-len = <80>;
};

port {
  panel_lvds_in: endpoint {
  remote-endpoint = <&lvds_out>;
  };
  };
};


&ldb {
  status = "okay";

  lvds-channel@0 {
  fsl,data-mapping = "spwg";
  fsl,data-width = <24>;
  status = "okay";

port@1 {
  reg = <1>;

  lvds_out: endpoint {
  remote-endpoint = <&panel_lvds_in>;
   };
 };
 };
};

 

Thank you.

James

0 Kudos
1 Solution
2,379 Views
igorpadykov
NXP Employee
NXP Employee
0 Kudos
2 Replies
2,380 Views
igorpadykov
NXP Employee
NXP Employee

Hi James

 

one can look at EVK brightness example

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mp-evk.d...

 

Best regards
igor

0 Kudos
2,363 Views
james_wu1
Contributor I

Hi Igor

Thank you for your help. The problem solved.

About display brightness not support problem I also modify init.rc as below

# Default backlight device

#setprop hw.backlight.dev "32e60000.mipi_dsi.0"
# Chmod/chown FSL specific sys entry

#chown system system /sys/class/backlight/32e60000.mipi_dsi.0/brightness
#chmod 0660 /sys/class/backlight/32e60000.mipi_dsi.0/brightness

setprop hw.backlight.dev "lvds_backlight"
chown system system /sys/class/backlight/lvds_backlight/brightness
chmod 0660 /sys/class/backlight/lvds_backlight/brightness

 

Best regards

James

0 Kudos