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

Commit 788de4de authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "disp: msm: dp: Update correct count for mst encoder count"

parents cbfe7a87 dd19b3c2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1576,6 +1576,7 @@ static int dp_init_sub_modules(struct dp_display_private *dp)
	}

	g_dp_display->is_mst_supported = dp->parser->has_mst;
	g_dp_display->no_mst_encoder = dp->parser->no_mst_encoder;

	dp->catalog = dp_catalog_get(dev, dp->parser);
	if (IS_ERR(dp->catalog)) {
@@ -3130,6 +3131,9 @@ int dp_display_get_num_of_displays(void)

int dp_display_get_num_of_streams(void)
{
	if (g_dp_display->no_mst_encoder)
		return 0;

	return DP_STREAM_MAX;
}

+2 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 */

#ifndef _DP_DISPLAY_H_
@@ -70,6 +70,7 @@ struct dp_display {
	bool is_sst_connected;
	bool is_mst_supported;
	u32 max_pclk_khz;
	u32 no_mst_encoder;
	void *dp_mst_prv_info;

	int (*enable)(struct dp_display *dp_display, void *panel);
+5 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/of_gpio.h>
@@ -706,6 +706,10 @@ static int dp_parser_mst(struct dp_parser *parser)

	parser->has_mst = of_property_read_bool(dev->of_node,
			"qcom,mst-enable");

	parser->no_mst_encoder = of_property_read_bool(dev->of_node,
			"qcom,no-mst-encoder");

	parser->has_mst_sideband = parser->has_mst;

	DP_DEBUG("mst parsing successful. mst:%d\n", parser->has_mst);
+3 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
 */

#ifndef _DP_PARSER_H_
@@ -190,6 +190,7 @@ static inline char *dp_phy_aux_config_type_to_string(u32 cfg_type)
 * @has_mst: MST feature enable status
 * @has_mst_sideband: MST sideband feature enable status
 * @no_aux_switch: presence AUX switch status
 * @no_mst_encoder: only one dp interface available
 * @gpio_aux_switch: presence GPIO AUX switch status
 * @dsc_feature_enable: DSC feature enable status
 * @fec_feature_enable: FEC feature enable status
@@ -219,6 +220,7 @@ struct dp_parser {
	bool has_mst;
	bool has_mst_sideband;
	bool no_aux_switch;
	bool no_mst_encoder;
	bool dsc_feature_enable;
	bool fec_feature_enable;
	bool has_widebus;
+1 −0
Original line number Diff line number Diff line
@@ -1620,6 +1620,7 @@ static int _sde_kms_setup_displays(struct drm_device *dev,

		/* update display cap to MST_MODE for DP MST encoders */
		info.capabilities |= MSM_DISPLAY_CAP_MST_MODE;
		sde_kms->dp_stream_count = dp_display_get_num_of_streams();
		for (idx = 0; idx < sde_kms->dp_stream_count; idx++) {
			info.h_tile_instance[0] = idx;
			encoder = sde_encoder_init(dev, &info);