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

Commit 012ea3f7 authored by Ajay Singh Parmar's avatar Ajay Singh Parmar
Browse files

msm: mdss: hdmi: support for hdmi primary



Set HDMI as primary panel if module command line contains hdmi
primary information.

Module cmd line is of format: panel=<lk_cfg>:<pan_intf>:<pan_intf_cfg>
For HDMI as primary, panel_intf would be "hdmi"

Change-Id: I25e37bb019a51c747c6c2a003bcf8d4ccc3a9f91
Signed-off-by: default avatarAjay Singh Parmar <aparmar@codeaurora.org>
parent 38febb2c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1188,6 +1188,7 @@ static int mdss_dsi_ctrl_probe(struct platform_device *pdev)
	char panel_cfg[MDSS_MAX_PANEL_LEN];
	const char *ctrl_name;
	bool cmd_cfg_cont_splash = true;
	struct mdss_panel_cfg *pan_cfg = NULL;

	if (!mdss_is_ready()) {
		pr_err("%s: MDP not probed yet!\n", __func__);
@@ -1199,6 +1200,14 @@ static int mdss_dsi_ctrl_probe(struct platform_device *pdev)
		return -ENOTSUPP;
	}

	pan_cfg = mdss_panel_intf_type(MDSS_PANEL_INTF_HDMI);
	if (IS_ERR(pan_cfg)) {
		return PTR_ERR(pan_cfg);
	} else if (pan_cfg) {
		pr_debug("%s: HDMI is primary\n", __func__);
		return -ENODEV;
	}

	ctrl_pdata = platform_get_drvdata(pdev);
	if (!ctrl_pdata) {
		ctrl_pdata = devm_kzalloc(&pdev->dev,
+9 −0
Original line number Diff line number Diff line
@@ -3876,6 +3876,7 @@ static int hdmi_tx_probe(struct platform_device *pdev)
	int rc = 0;
	struct device_node *of_node = pdev->dev.of_node;
	struct hdmi_tx_ctrl *hdmi_ctrl = NULL;
	struct mdss_panel_cfg *pan_cfg = NULL;

	if (!of_node) {
		DEV_ERR("%s: FAILED: of_node not found\n", __func__);
@@ -3900,6 +3901,14 @@ static int hdmi_tx_probe(struct platform_device *pdev)
		goto failed_dt_data;
	}

	pan_cfg = mdss_panel_intf_type(MDSS_PANEL_INTF_HDMI);
	if (IS_ERR(pan_cfg)) {
		return PTR_ERR(pan_cfg);
	} else if (pan_cfg) {
		DEV_DBG("%s: HDMI is primary\n", __func__);
		hdmi_ctrl->pdata.primary = true;
	}

	rc = hdmi_tx_init_resource(hdmi_ctrl);
	if (rc) {
		DEV_ERR("%s: FAILED: resource init. rc=%d\n",
+16 −1
Original line number Diff line number Diff line
/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -121,11 +121,26 @@ static int mdss_wb_probe(struct platform_device *pdev)
{
	struct mdss_panel_data *pdata = NULL;
	struct mdss_wb_ctrl *wb_ctrl = NULL;
	struct mdss_panel_cfg *pan_cfg = NULL;
	int rc = 0;

	if (!pdev->dev.of_node)
		return -ENODEV;

	/*
	 * In case HDMI is configured as primary, do not configure
	 * WB. Currently there is no requirement for any other panel
	 * in case HDMI is primary. Will revisit if WB is needed with
	 * HDMI as primary.
	 */
	pan_cfg = mdss_panel_intf_type(MDSS_PANEL_INTF_HDMI);
	if (IS_ERR(pan_cfg)) {
		return PTR_ERR(pan_cfg);
	} else if (pan_cfg) {
		pr_debug("%s: HDMI is primary\n", __func__);
		return -ENODEV;
	}

	wb_ctrl = devm_kzalloc(&pdev->dev, sizeof(*wb_ctrl), GFP_KERNEL);
	if (!wb_ctrl)
		return -ENOMEM;