From patchwork Fri Sep 21 11:49:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?44Kw44Kn44Oz44O744Ki44Oz44O744Ob44Kh44Oz?= X-Patchwork-Id: 10609895 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C99F14BD for ; Fri, 21 Sep 2018 11:49:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C8ED2D8FD for ; Fri, 21 Sep 2018 11:49:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 302D42D903; Fri, 21 Sep 2018 11:49:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA9DA2D8FD for ; Fri, 21 Sep 2018 11:49:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728196AbeIURhq (ORCPT ); Fri, 21 Sep 2018 13:37:46 -0400 Received: from www3345.sakura.ne.jp ([49.212.235.55]:45047 "EHLO www3345.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727681AbeIURhq (ORCPT ); Fri, 21 Sep 2018 13:37:46 -0400 Received: from fsav106.sakura.ne.jp (fsav106.sakura.ne.jp [27.133.134.233]) by www3345.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id w8LBnETp054572; Fri, 21 Sep 2018 20:49:14 +0900 (JST) (envelope-from na-hoan@jinso.co.jp) Received: from www3345.sakura.ne.jp (49.212.235.55) by fsav106.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav106.sakura.ne.jp); Fri, 21 Sep 2018 20:49:14 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav106.sakura.ne.jp) Received: from localhost (p14010-ipadfx41marunouchi.tokyo.ocn.ne.jp [61.118.107.10]) (authenticated bits=0) by www3345.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id w8LBn9Cc054537 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 21 Sep 2018 20:49:14 +0900 (JST) (envelope-from na-hoan@jinso.co.jp) From: Nguyen An Hoan To: broonie@kernel.org, linux-renesas-soc@vger.kernel.org, geert+renesas@glider.be Cc: laurent.pinchart@ideasonboard.com, kuninori.morimoto.gx@renesas.com, yoshihiro.shimoda.uh@renesas.com, magnus.damm@gmail.com, h-inayoshi@jinso.co.jp, nv-dung@jinso.co.jp, cv-dong@jinso.co.jp, na-hoan@jinso.co.jp Subject: [PATCH] drm: rcar-du: fix probe error when DRM_RCAR_DW_HDMI disabled Date: Fri, 21 Sep 2018 20:49:03 +0900 Message-Id: <1537530543-29518-2-git-send-email-na-hoan@jinso.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537530543-29518-1-git-send-email-na-hoan@jinso.co.jp> References: <1537530543-29518-1-git-send-email-na-hoan@jinso.co.jp> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hoan Nguyen An Skip return EPROBE_DEFER when DRM_RCAR_DW_HDMI is disabled in case HDMI initialize. At this time, the rcar-du driver not be able to successfully initialize if disable DRM_RCAR_DW_HDMI (rcar_du_probe return error), so can not use other features such as RGB Analog, this patch to fix. Signed-off-by: Hoan Nguyen An --- drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_encoder.c b/drivers/gpu/drm/rcar-du/rcar_du_encoder.c index f9c933d..4dbc508 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_encoder.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_encoder.c @@ -66,8 +66,15 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu, /* Locate the DRM bridge from the encoder DT node. */ bridge = of_drm_find_bridge(enc_node); if (!bridge) { +#if IS_ENABLED(CONFIG_DRM_RCAR_DW_HDMI) ret = -EPROBE_DEFER; goto done; +#else + if (output == RCAR_DU_OUTPUT_HDMI0 || + output == RCAR_DU_OUTPUT_HDMI1) + ret = 0; + goto done; +#endif } ret = drm_encoder_init(rcdu->ddev, encoder, &encoder_funcs,