From patchwork Mon May 25 19:47:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 1297550 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=BpyCtpac; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49W70k6Y89z9sRK for ; Tue, 26 May 2020 05:47:32 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 172548168D; Mon, 25 May 2020 21:47:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1590436045; bh=/VmFQd7WKrA1tABYQ6QtdFchhD6la0OSyYsXgxsjL2U=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=BpyCtpacBXGts/nuNACyPiofx6D6KTQ376PIPFQpW4IS7DEHikxXWEXCrQRU664ok EnrR/IXV7xYo0I/jJ8E20gYAZ3+fhTnmFcBY7qcctOByAPfLRz16k4LEiUUMdGaGrv FhS6uMJO1kNLp0m/M4thxM7BolpUdxPazoTgn3TVKjCcVIckTeiUuCnKiTQmjrjmp3 zfBELNO/+BDhuROwTDcVeyairEVxoBCWONPYyAORr+ouWUL+lzKNTEVlN6YNP+EQ/L K/oPu/ckCKxFxEpFv4Ay6u6yJdlOw6vdjSAr3FWdO51gyyxv1VstXDX18P0mj7zTAD U6aqQB+xCabKQ== Received: by phobos.denx.de (Postfix, from userid 109) id CE9278168F; Mon, 25 May 2020 21:47:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3C2418168A for ; Mon, 25 May 2020 21:47:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=agust@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49W70S6GpBz1rtN9; Mon, 25 May 2020 21:47:20 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49W70S5zSBz1r3kc; Mon, 25 May 2020 21:47:20 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id mw6YgnOIbjz6; Mon, 25 May 2020 21:47:19 +0200 (CEST) X-Auth-Info: Pc+Hs7UTPPpOVRRO3yLHRQikhWGh33hEwqOkJlA1jTw= Received: from crub.agik.hopto.org (pd95f11d0.dip0.t-ipconnect.de [217.95.17.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 25 May 2020 21:47:19 +0200 (CEST) From: Anatolij Gustschin To: u-boot@lists.denx.de Cc: sjg@chromium.org Subject: [PATCH] video: make vidconsole commands optional Date: Mon, 25 May 2020 21:47:19 +0200 Message-Id: <20200525194719.926-1-agust@denx.de> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Converting some boards to DM_VIDEO results in build breakage due to increased code size. Make video console specific commands optional to recude binary size. Signed-off-by: Anatolij Gustschin Reviewed-by: Simon Glass --- drivers/video/Kconfig | 8 ++++++++ drivers/video/vidconsole-uclass.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 28c22fe525..eb5e26644a 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -35,6 +35,14 @@ config BACKLIGHT_GPIO it understands the standard device tree (leds/backlight/gpio-backlight.txt) +config CMD_VIDCONSOLE + bool "Enable vidconsole commands lcdputs and setcurs" + depends on DM_VIDEO + default y + help + Enabling this will provide 'setcurs' and 'lcdputs' commands which + support cursor positioning and drawing strings on video framebuffer. + config VIDEO_BPP8 bool "Support 8-bit-per-pixel displays" depends on DM_VIDEO diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c index d30e6db6f6..901347c467 100644 --- a/drivers/video/vidconsole-uclass.c +++ b/drivers/video/vidconsole-uclass.c @@ -613,6 +613,7 @@ UCLASS_DRIVER(vidconsole) = { .per_device_auto_alloc_size = sizeof(struct vidconsole_priv), }; +#if CONFIG_IS_ENABLED(CMD_VIDCONSOLE) void vidconsole_position_cursor(struct udevice *dev, unsigned col, unsigned row) { struct vidconsole_priv *priv = dev_get_uclass_priv(dev); @@ -673,3 +674,4 @@ U_BOOT_CMD( "print string on video framebuffer", " " ); +#endif /* CONFIG_IS_ENABLED(CMD_VIDCONSOLE) */