summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhijit Kulkarni <kabhijit@codeaurora.org>2016-05-23 10:54:56 -0700
committerKyle Yan <kyan@codeaurora.org>2016-05-24 17:57:44 -0700
commitea0cd5069284979c0207d256a6777bbdfe942403 (patch)
treeec6ae59d83d6497bfef376ad342b0574ce76f40d
parent0909f0a311daecf99c178dd39f928d659a5a53d9 (diff)
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: Abhijit Kulkarni <kabhijit@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_wb.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/video/fbdev/msm/mdss_wb.c b/drivers/video/fbdev/msm/mdss_wb.c
index 68ccfebf4e29..4550dd270c69 100644
--- a/drivers/video/fbdev/msm/mdss_wb.c
+++ b/drivers/video/fbdev/msm/mdss_wb.c
@@ -1,4 +1,4 @@
-/* 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;