Exemple #1
0
static int mdss_mdp_parse_dt_smp(struct platform_device *pdev)
{
	struct mdss_data_type *mdata = platform_get_drvdata(pdev);
	u32 num;
	u32 data[2];
	int rc;

	num = mdss_mdp_parse_dt_prop_len(pdev, "qcom,mdss-smp-data");

	if (num != 2)
		return -EINVAL;

	rc = mdss_mdp_parse_dt_handler(pdev, "qcom,mdss-smp-data", data, num);
	if (rc)
		return rc;

	rc = mdss_mdp_smp_setup(mdata, data[0], data[1]);

	if (rc) {
		pr_err("unable to setup smp data\n");
		return rc;
	}

	rc = of_property_read_u32(pdev->dev.of_node,
		"qcom,mdss-smp-mb-per-pipe", data);
	mdata->smp_mb_per_pipe = (!rc ? data[0] : 0);

	return 0;
}
Exemple #2
0
static int mdss_mdp_parse_dt_smp(struct platform_device *pdev)
{
    struct mdss_data_type *mdata = platform_get_drvdata(pdev);
    u32 num;
    u32 data[2];
    int rc;

    num = mdss_mdp_parse_dt_prop_len(pdev, "qcom,mdss-smp-data");

    if (num != 2)
        return -EINVAL;

    rc = mdss_mdp_parse_dt_handler(pdev, "qcom,mdss-smp-data", data, num);
    if (rc)
        return rc;

    rc = mdss_mdp_smp_setup(mdata, data[0], data[1]);

    if (rc)
        pr_err("unable to setup smp data\n");

    return rc;
}