Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 794bdf30 authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag 'LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0' of...

Merge tag 'LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/display-drivers into android13-5.4-lahaina

"LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0"

* tag 'LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/display-drivers:
  disp: msm: dp: limit max width supported
  disp: msm: dp: add support of hotplug for eDP interface.
  disp: msm: sde: address array index out-of-bound issue
  disp: msm: dp: disable pluggable eDP display backlight config

Change-Id: I813b60f59671b80b32dfd6d36db3589860acd7fb
parents f6b6fc43 c21afee0
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 */

@@ -2301,6 +2301,7 @@ static void dp_catalog_hpd_config_hpd(struct dp_catalog_hpd *hpd, bool en)
{
	struct dp_catalog_private *catalog;
	struct dp_io_data *io_data;
	struct dp_parser *parser;

	if (!hpd) {
		DP_ERR("invalid input\n");
@@ -2309,16 +2310,17 @@ static void dp_catalog_hpd_config_hpd(struct dp_catalog_hpd *hpd, bool en)

	catalog = dp_catalog_get_priv(hpd);
	io_data = catalog->io.dp_aux;
	parser = catalog->parser;

	if (en) {
		u32 reftimer = dp_read(DP_DP_HPD_REFTIMER);

		/*
		 * Arm only the UNPLUG and HPD_IRQ interrupts for DP
		 * whereas for EDP arm only the HPD_IRQ interrupt
		 * Arm only the UNPLUG and HPD_IRQ interrupts for DP and pluggable EDP
		 * whereas for buitin EDP arm only the HPD_IRQ interrupt
		 */
		dp_write(DP_DP_HPD_INT_ACK, 0xF);
		if (hpd->is_edp)
		if ((hpd->is_edp) && (!parser->ext_hpd_en))
			dp_write(DP_DP_HPD_INT_MASK, 0x2);
		else
			dp_write(DP_DP_HPD_INT_MASK, 0xA);
+21 −7
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
 */

@@ -2119,6 +2119,8 @@ static int dp_init_sub_modules(struct dp_display_private *dp)
		goto error;
	}

	dp->parser->is_edp = dp->dp_display.is_edp;

	rc = dp->parser->parse(dp->parser);
	if (rc) {
		DP_ERR("device tree parsing failed\n");
@@ -2128,6 +2130,8 @@ 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->dp_display.ext_hpd_en = dp->parser->ext_hpd_en;
	dp->catalog = dp_catalog_get(dev, dp->parser);
	if (IS_ERR(dp->catalog)) {
		rc = PTR_ERR(dp->catalog);
@@ -2632,7 +2636,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) {
	if ((dp_display->is_edp) && (!dp_display->no_backlight_support)) {
		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");
@@ -2732,7 +2736,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) {
	if ((dp_display->is_edp) && (!dp_display->no_backlight_support)) {
		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");
@@ -2802,7 +2806,7 @@ static int dp_display_pre_disable(struct dp_display *dp_display, void *panel)
		goto end;
	}

	if (dp_display->is_edp) {
	if ((dp_display->is_edp) && (!dp_display->no_backlight_support)) {
		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");
@@ -2885,7 +2889,7 @@ static int dp_display_disable(struct dp_display *dp_display, void *panel)
		goto end;
	}

	if (dp_display->is_edp) {
	if ((dp_display->is_edp) && (!dp_display->no_backlight_support)) {
		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");
@@ -3216,6 +3220,13 @@ static enum drm_mode_status dp_display_validate_mode(

	mutex_lock(&dp->session_lock);

	if (dp->parser->max_hor_width &&
		(mode->hdisplay > dp->parser->max_hor_width)) {
		DP_DEBUG("[%s] mode is invalid exceeds max width %u\n",
			mode->name, dp->parser->max_hor_width);
		goto end;
	}

	dp_panel = panel;
	if (!dp_panel->connector) {
		DP_ERR("invalid connector\n");
@@ -3417,6 +3428,9 @@ 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;

@@ -3911,7 +3925,7 @@ static int dp_display_get_display_type(struct dp_display *dp_display,
	}

	dp = container_of(dp_display, struct dp_display_private, dp_display);

	if (dp->parser)
		*display_type = dp->parser->display_type;

	return 0;
+3 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 */

@@ -97,6 +97,8 @@ struct dp_display {
	u32 max_mixer_count;
	u32 max_dsc_count;
	bool cont_splash_enabled;
	bool no_backlight_support;
	bool ext_hpd_en;

	int (*enable)(struct dp_display *dp_display, void *panel);
	int (*post_enable)(struct dp_display *dp_display, void *panel);
+17 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
 */

@@ -470,6 +470,7 @@ int dp_connector_get_info(struct drm_connector *connector,
		struct msm_display_info *info, void *data)
{
	struct dp_display *display = data;
	const char *display_type = NULL;

	if (!info || !display || !display->drm_dev) {
		DP_ERR("invalid params\n");
@@ -478,6 +479,14 @@ int dp_connector_get_info(struct drm_connector *connector,

	info->intf_type = DRM_MODE_CONNECTOR_DisplayPort;

	display->get_display_type(display, &display_type);
	if (display_type){
		if (!strcmp(display_type, "primary"))
			info->display_type = SDE_CONNECTOR_PRIMARY;
		else if (!strcmp(display_type, "secondary"))
			info->display_type = SDE_CONNECTOR_SECONDARY;
	}

	info->num_of_h_tiles = 1;
	info->h_tile_instance[0] = 0;
	info->is_connected = display->is_sst_connected;
@@ -486,7 +495,9 @@ int dp_connector_get_info(struct drm_connector *connector,

	if (display && display->is_edp) {
		info->intf_type = DRM_MODE_CONNECTOR_eDP;
		info->display_type = SDE_CONNECTOR_PRIMARY;
		if(display->ext_hpd_en)
			info->capabilities |= MSM_DISPLAY_CAP_HOT_PLUG;
		else
			info->is_connected = true;
	} else {
		info->capabilities |= MSM_DISPLAY_CAP_HOT_PLUG;
@@ -644,6 +655,9 @@ int dp_connector_set_info_blob(struct drm_connector *connector,
	dp_display->get_display_type(dp_display, &display_type);
	sde_kms_info_add_keystr(info, "display type", display_type);

        if((dp_display->is_edp) && (dp_display->ext_hpd_en))
	        sde_kms_info_add_keystr(info, "ext bridge hpd support", "true");

	return 0;
}

+16 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
 */

@@ -167,6 +167,11 @@ static int dp_parser_misc(struct dp_parser *parser)
	if (rc)
		parser->max_lclk_khz = DP_MAX_LINK_CLK_KHZ;

	rc = of_property_read_u32(of_node,
		"qcom,max-horizontal-width", &parser->max_hor_width);
	if (rc)
		parser->max_hor_width = 0;

	for (i = 0; i < MAX_DP_MST_STREAMS; i++) {
		of_property_read_u32_index(of_node,
				"qcom,pixel-base-off", i,
@@ -174,13 +179,19 @@ static int dp_parser_misc(struct dp_parser *parser)
	}

	parser->display_type = of_get_property(of_node, "qcom,display-type", NULL);
	if (!parser->display_type)
		parser->display_type = "unknown";
	if (!parser->display_type) {
		if (parser->is_edp)
			parser->display_type = "primary";
		else
			parser->display_type = "secondary";
	}

	parser->panel_notifier_support = of_property_read_bool(of_node,
			"qcom,panel-notifier-support");
	DP_DEBUG("panel-notifier-support = %d\n", parser->panel_notifier_support);

	parser->ext_hpd_en = of_property_read_bool(of_node,
			"qcom,dp-ext-hpd");
	return 0;
}

@@ -295,6 +306,8 @@ 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)
Loading