Revert "disp: msm: dp: disable pluggable eDP display backlight config"

This reverts commit bd47e3e63b.

Change-Id: I45fc13b3195d8d2b87a00e632e78c79a33c2c31c
This commit is contained in:
Giovanni Ricca 2024-12-11 11:41:32 +01:00
parent 773c8da3f9
commit cfd12f86e2
No known key found for this signature in database
5 changed files with 5 additions and 20 deletions

View file

@ -2128,7 +2128,6 @@ static int dp_init_sub_modules(struct dp_display_private *dp)
dp->dp_display.is_mst_supported = dp->parser->has_mst;
dp->dp_display.dsc_cont_pps = dp->parser->dsc_continuous_pps;
dp->dp_display.no_backlight_support = dp->parser->no_backlight_support;
dp->catalog = dp_catalog_get(dev, dp->parser);
if (IS_ERR(dp->catalog)) {
rc = PTR_ERR(dp->catalog);
@ -2633,7 +2632,7 @@ static int dp_display_enable(struct dp_display *dp_display, void *panel)
goto end;
/*edp backlight enable and edp pwm enable*/
if ((dp_display->is_edp) && (!dp_display->no_backlight_support)) {
if (dp_display->is_edp) {
rc = dp->power->edp_panel_set_gpio(dp->power, DP_GPIO_EDP_BACKLIGHT_PWR, true);
if (rc) {
DP_ERR("Cannot turn edp backlight power on");
@ -2733,7 +2732,7 @@ static int dp_display_post_enable(struct dp_display *dp_display, void *panel)
dp_display_stream_post_enable(dp, dp_panel);
if ((dp_display->is_edp) && (!dp_display->no_backlight_support)) {
if (dp_display->is_edp) {
rc = dp->power->edp_panel_set_gpio(dp->power, DP_GPIO_EDP_BACKLIGHT_EN, true);
if (rc) {
DP_ERR("Cannot turn edp backlight power on");
@ -2803,7 +2802,7 @@ static int dp_display_pre_disable(struct dp_display *dp_display, void *panel)
goto end;
}
if ((dp_display->is_edp) && (!dp_display->no_backlight_support)) {
if (dp_display->is_edp) {
rc = dp->power->edp_panel_set_gpio(dp->power, DP_GPIO_EDP_BACKLIGHT_EN, false);
if (rc) {
DP_ERR("Cannot turn edp backlight power off");
@ -2886,7 +2885,7 @@ static int dp_display_disable(struct dp_display *dp_display, void *panel)
goto end;
}
if ((dp_display->is_edp) && (!dp_display->no_backlight_support)) {
if (dp_display->is_edp) {
rc = dp->power->edp_panel_set_gpio(dp->power, DP_GPIO_EDP_BACKLIGHT_PWR, false);
if (rc)
DP_ERR("Cannot turn edp backlight power off\n");
@ -3425,9 +3424,6 @@ static int dp_display_set_backlight(struct dp_display *dp_display,
return -EINVAL;
}
if(dp_display->no_backlight_support)
return 0;
dp = container_of(dp_display, struct dp_display_private, dp_display);
dp_panel = panel;

View file

@ -97,7 +97,6 @@ struct dp_display {
u32 max_mixer_count;
u32 max_dsc_count;
bool cont_splash_enabled;
bool no_backlight_support;
int (*enable)(struct dp_display *dp_display, void *panel);
int (*post_enable)(struct dp_display *dp_display, void *panel);

View file

@ -300,8 +300,6 @@ static void dp_parser_bl_config(struct dp_parser *parser)
} else {
parser->pwm_period_usecs = val;
}
parser->no_backlight_support = of_property_read_bool(of_node,
"qcom,no-backlight-support");
}
static int dp_parser_gpio(struct dp_parser *parser)

View file

@ -232,7 +232,6 @@ static inline char *dp_phy_aux_config_type_to_string(u32 cfg_type)
* @has_mst_sideband: MST sideband feature enable status
* @no_aux_switch: presence AUX switch status
* @gpio_aux_switch: presence GPIO AUX switch status
* @no_backlight_support: For some display type that no support backlight
* @dsc_feature_enable: DSC feature enable status
* @fec_feature_enable: FEC feature enable status
* @dsc_continuous_pps: PPS sent every frame by HW
@ -274,7 +273,6 @@ struct dp_parser {
bool gpio_aux_switch;
bool lphw_hpd;
bool panel_notifier_support;
bool no_backlight_support;
u32 bl_min_level;
u32 bl_max_level;
u32 brightness_max_level;

View file

@ -746,13 +746,7 @@ static int dp_power_edp_panel_set_gpio(struct dp_power *dp_power,
return -EINVAL;
if ((pin_state >= DP_GPIO_EDP_MIN) && (pin_state < DP_GPIO_EDP_MAX)) {
if (gpio_is_valid(config[pin_state].gpio)) {
rc = gpio_direction_output(config[pin_state].gpio, enable);
if (rc)
DP_ERR("unable to set gpio rc=%d\n", rc);
} else {
DP_ERR("gpio invalid for %d pin\n", pin_state);
}
gpio_direction_output(config[pin_state].gpio, enable);
} else {
pr_err(" Invalid GPIO call\n");
return -EINVAL;