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

Commit ea0cd506 authored by Abhijit Kulkarni's avatar Abhijit Kulkarni Committed by Kyle Yan
Browse files

msm: mdss: Defer wb probe until mdss probe done



Defer wb driver probe until mdss probe is completed, this is
required for supporting bin parts where multimedia hw is not
functional.

CRs-Fixed: 993024
Change-Id: Ic21c25a33a8b2430903e9c1f3d339022551d81d6
Signed-off-by: default avatarAbhijit Kulkarni <kabhijit@codeaurora.org>
parent 0909f0a3
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2016, 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
@@ -27,6 +27,7 @@

#include "mdss_panel.h"
#include "mdss_wb.h"
#include "mdss.h"

/**
 * mdss_wb_check_params - check new panel info params
@@ -128,11 +129,23 @@ static int mdss_wb_probe(struct platform_device *pdev)
{
	struct mdss_panel_data *pdata = NULL;
	struct mdss_wb_ctrl *wb_ctrl = NULL;
	struct mdss_util_intf *util;
	int rc = 0;

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

	util = mdss_get_util_intf();
	if (util == NULL) {
		pr_err("%s: Failed to get mdss utility functions\n", __func__);
		return -ENODEV;
	}

	if (!util->mdp_probe_done) {
		pr_err("%s: MDP not probed yet!\n", __func__);
		return -EPROBE_DEFER;
	}

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