From patchwork Wed Sep 11 21:14:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 274368 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id C26DD2C0170 for ; Thu, 12 Sep 2013 07:22:00 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0BA444A060; Wed, 11 Sep 2013 23:21:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U8QckC+dQsd2; Wed, 11 Sep 2013 23:21:57 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A08754A061; Wed, 11 Sep 2013 23:21:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CAB394A061 for ; Wed, 11 Sep 2013 23:21:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gM8N-knRjvVQ for ; Wed, 11 Sep 2013 23:21:46 +0200 (CEST) X-Greylist: delayed 415 seconds by postgrey-1.27 at theia; Wed, 11 Sep 2013 23:21:40 CEST X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) by theia.denx.de (Postfix) with ESMTPS id 253C24A060 for ; Wed, 11 Sep 2013 23:21:40 +0200 (CEST) Received: by mail-ie0-f178.google.com with SMTP id to1so10392726ieb.9 for ; Wed, 11 Sep 2013 14:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=DDnLx4esssKZV0mxeZ+HLT6GMWTICnOZuBVps9c7VHI=; b=bug+SAsOwPCSLg/qPh+sah1yMMz3iYjxD4qNw5Tz2uU0c5iQ7mAwohRaaSpcB/YxIc RnNiXHrlcxX6i0Qh+ap7aTPNlLDwGbHIxePqa8hyXabOt8ez7vk1p6vCBubC2mgNSIC8 NtewGwJUMffvveh8bcp4lTrBylStUOc2TeanqPmJZ8yTri6jhkg0qGm+YLWRwxb3bLDC Vmic/F4+RtIRB+28GiSxxkcDkI3IXxnHOuztx43Oey23Sr+6rgCsdrODA8oLq8E2IW91 vRzvNtX4QuFRpLJwKQn+uzx2/xZPBA9a7EEwHr580EJiwL6dRafCzqTJ0V/nqtkWd91u I4/A== X-Received: by 10.50.106.102 with SMTP id gt6mr12591567igb.46.1378934084366; Wed, 11 Sep 2013 14:14:44 -0700 (PDT) Received: from localhost.localdomain ([177.194.42.63]) by mx.google.com with ESMTPSA id ri1sm80170igc.2.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Sep 2013 14:14:43 -0700 (PDT) From: Fabio Estevam To: sbabic@denx.de Date: Wed, 11 Sep 2013 18:14:29 -0300 Message-Id: <1378934070-11721-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.8.1.2 MIME-Version: 1.0 Cc: Fabio Estevam , u-boot@lists.denx.de, eric@eukrea.com, b45784@freescale.com Subject: [U-Boot] [PATCH v2 1/2] mx6sabresd: Avoid hang when HDMI cable is not connected X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Fabio Estevam Since commit d9b894603 (mx6sabresd: Add LVDS splash screen support) the following hang happens if the HDMI cable is not connected or the 'panel' variable is not set: U-Boot 2013.10-rc2-12978-g47ac53d-dirty (Sep 11 2013 - 15:07:38) CPU: Freescale i.MX6Q rev1.2 at 792 MHz Reset cause: POR Board: MX6-SabreSD DRAM: 1 GiB MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 ... Provide a check to 'dev->detect' in order to prevent the hang. Reported-by: Pardeep Kumar Singla Suggested-by: Eric BĂ©nard Signed-off-by: Fabio Estevam --- Changes since v1: - Check dev->detect board/freescale/mx6sabresd/mx6sabresd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index c832bd9..0f91fe2 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -313,7 +313,7 @@ int board_video_skip(void) if (!panel) { for (i = 0; i < ARRAY_SIZE(displays); i++) { struct display_info_t const *dev = displays+i; - if (dev->detect(dev)) { + if (dev->detect && dev->detect(dev)) { panel = dev->mode.name; printf("auto-detected panel %s\n", panel); break;