From patchwork Sat Nov 3 21:41:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 196946 X-Patchwork-Delegate: sjg@chromium.org 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 EE2E02C00C2 for ; Sun, 4 Nov 2012 08:44:39 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 54C4F4A269; Sat, 3 Nov 2012 22:43:45 +0100 (CET) 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 1zH-2uheB-Mf; Sat, 3 Nov 2012 22:43:45 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DE9C94A18C; Sat, 3 Nov 2012 22:42:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5042B4A171 for ; Sat, 3 Nov 2012 22:42:18 +0100 (CET) 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 S2SvhAadLCWX for ; Sat, 3 Nov 2012 22:42:17 +0100 (CET) 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-yh0-f74.google.com (mail-yh0-f74.google.com [209.85.213.74]) by theia.denx.de (Postfix) with ESMTPS id 594604A159 for ; Sat, 3 Nov 2012 22:42:05 +0100 (CET) Received: by mail-yh0-f74.google.com with SMTP id 10so530325yhl.3 for ; Sat, 03 Nov 2012 14:42:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=SkxKX/QA5jwQSSuht0jStLs6c+QOG44MOJ469NmdPvo=; b=FadH8DINs9Uk/te9H8FaC11mq9shTDSOOkxwxGF9Xkt1jshRhZvJGU0OvLkX9csHqe ZUQmGvu9qqSrUdgACkbD2DEcqO80dlHVp6B/gQvYSKbieZPo4AvjKFxMqN9VW/H6bz8Z uPEjVRgR+2nJG3SZ0a5+SWrMHJt3bkJychF0ClmTNup26qW1ay3rVKnnVoPpSSDd/1jk i5eK2Pl4GViXyUXdr+KGg0S+7KEtVdVOUcDXCSvkM5F/cM8whiqMoua3FWOF7JEEgp63 pw/iZ6rUpl/Zycsn3kUIyqlfjh4y6m8KTzHHW7iz1UOtq4wYfWOMQ+YazDfm4FDIRfae s9KA== Received: by 10.236.117.66 with SMTP id i42mr3900884yhh.8.1351978924099; Sat, 03 Nov 2012 14:42:04 -0700 (PDT) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id r6si820603yhc.7.2012.11.03.14.42.04 (version=TLSv1/SSLv3 cipher=AES128-SHA); Sat, 03 Nov 2012 14:42:04 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id E48A3100047; Sat, 3 Nov 2012 14:42:03 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id C3C461619C4; Sat, 3 Nov 2012 14:42:03 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sat, 3 Nov 2012 14:41:40 -0700 Message-Id: <1351978902-23719-19-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1351978902-23719-1-git-send-email-sjg@chromium.org> References: <1351978902-23719-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQm9SiNtyROgOsCeKgPm++YFirCWBR59LPSiSiZpRef/564E6v8lrjQhExWlHf78pFROV3J0k3JAN/dhgbpInS/XxPJyP0ZTAcVpF3Jt/vfnZ00ZqcUzEN/5pvVwhkZ1r1I5d1VHQRjgxTj6rQm7rn+O7uM8caJRuF9FRhJ8v3FXJIg3gDF18x+J5agxQfa/CLmEiebX Cc: Duncan Laurie Subject: [U-Boot] [PATCH 18/20] video: Check for valid FB pointer before clearing 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Duncan Laurie This command will start erasing at memory address zero if there is not a valid framebuffer address that was found during video_init(). This is a common case with Chrome OS devices in normal mode when we do not execute the video option rom in coreboot. Signed-off-by: Duncan Laurie Signed-off-by: Simon Glass --- drivers/video/cfb_console.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index c8d3e42..2b1f604 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -1976,6 +1976,7 @@ int video_get_screen_columns(void) void video_clear(void) { - memsetl(video_fb_address, - (VIDEO_VISIBLE_ROWS * VIDEO_LINE_LEN) / sizeof(int), 0); + if (video_fb_address) + memsetl(video_fb_address, + (VIDEO_VISIBLE_ROWS * VIDEO_LINE_LEN) / sizeof(int), 0); }