From patchwork Tue Feb 7 12:58:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 725099 X-Patchwork-Delegate: agraf@suse.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 3vHl030TGHz9ryb for ; Wed, 8 Feb 2017 00:03:47 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=aosc.xyz header.i=@aosc.xyz header.b="MPkPzBoG"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0189A4B01B; Tue, 7 Feb 2017 14:03:43 +0100 (CET) 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 ZZ_Pxuxr7KNf; Tue, 7 Feb 2017 14:03:43 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 73E2F4AD1F; Tue, 7 Feb 2017 14:03:43 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BF4264AD1F for ; Tue, 7 Feb 2017 14:03:40 +0100 (CET) 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 ajTpMrfHBO4y for ; Tue, 7 Feb 2017 14:03:40 +0100 (CET) X-Greylist: delayed 301 seconds by postgrey-1.34 at theia; Tue, 07 Feb 2017 14:03:39 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 forward11p.cmail.yandex.net (forward11p.cmail.yandex.net [87.250.241.139]) by theia.denx.de (Postfix) with ESMTPS id 8880E4ACF9 for ; Tue, 7 Feb 2017 14:03:39 +0100 (CET) Received: from smtp1m.mail.yandex.net (smtp1m.mail.yandex.net [IPv6:2a02:6b8:0:2519::121]) by forward11p.cmail.yandex.net (Yandex) with ESMTP id 8328821B7F; Tue, 7 Feb 2017 15:58:37 +0300 (MSK) Received: from smtp1m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1m.mail.yandex.net (Yandex) with ESMTP id 4C2EC63C0812; Tue, 7 Feb 2017 15:58:34 +0300 (MSK) Received: by smtp1m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Ik01QyVrxL-wUZirIpJ; Tue, 07 Feb 2017 15:58:32 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aosc.xyz; s=mail; t=1486472313; bh=v2+e0hqUYpuFChs2cN5zm5lJY3m2nsYxlk3yrir1U9I=; h=From:To:Cc:Subject:Date:Message-Id; b=MPkPzBoGSxee1O7YC9fLxGo58PU7jbRTq6fyHf0/OZvooM3MWZQKPskLiOScQOhNK zPmUqRDiTXQYw26cOWAvpW5ivEYvadQjyl6Ja9gnv+SlFiDSUhf2myg8R1wc6fD9hy 8n8kgjEFh2M9zsZfB+uFXRns5TGhngXxBsAiQTHw= Authentication-Results: smtp1m.mail.yandex.net; dkim=pass header.i=@aosc.xyz X-Yandex-ForeignMX: DE X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0,1 1130000036118848 From: Icenowy Zheng To: Alexander Graf , Anatolij Gustschin , Simon Glass Date: Tue, 7 Feb 2017 20:58:11 +0800 Message-Id: <20170207125812.27167-1-icenowy@aosc.xyz> X-Mailer: git-send-email 2.11.0 Cc: u-boot@lists.denx.de, Icenowy Zheng Subject: [U-Boot] [RFC PATCH 1/2] video: add a function to acquire the GraphicDevice of cfb_console X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Sometimes the GraphicDevice of cfb_console is useful at other place. Add a function to acquire it, so that the graphics hardware (especially the framebuffer) can be reused. Signed-off-by: Icenowy Zheng --- drivers/video/cfb_console.c | 5 +++++ include/video_fb.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index c0b1b8dc17..c80ed1646f 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -2199,3 +2199,8 @@ int video_get_screen_columns(void) { return CONSOLE_COLS; } + +GraphicDevice *video_get_graphic_device(void) +{ + return pGD; +}; diff --git a/include/video_fb.h b/include/video_fb.h index b008853f30..29f2b24648 100644 --- a/include/video_fb.h +++ b/include/video_fb.h @@ -89,4 +89,6 @@ void video_set_lut ( unsigned char b /* blue */ ); +GraphicDevice *video_get_graphic_device(void); + #endif /*_VIDEO_FB_H_ */