From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9E822C433FE for ; Sat, 15 Oct 2022 19:11:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4761D84DFC; Sat, 15 Oct 2022 21:11:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="lXtFXMXj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DDFC284E22; Sat, 15 Oct 2022 21:11:34 +0200 (CEST) Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 40AFB84D5E for ; Sat, 15 Oct 2022 21:11:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wm1-x32d.google.com with SMTP id c7-20020a05600c0ac700b003c6cad86f38so8629941wmr.2 for ; Sat, 15 Oct 2022 12:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=1WLADT1GzS/SPc/rSFmsOs0LTuwx/bW3hRJRBkMq4Ws=; b=lXtFXMXjPOO+7kZnNGInNCUCcIDW5dP2agOAciV/nRMSxU9skrqgLGs50vtkXLrqmb VHPrlnm8qChHe6Up+eiKqiEn93lcGLQpoZq5YFY0JTgQ4YeSoDCzecQAfeZIBkaf8ifn u+/8J/frF7Tc0qPxRKLUHpEpyUC1A+CKR9/ypI93qRNa3x0X+qf8Z3/nHKhgku01/BzP IWNUZvOPGzCJla5ybpjCoLuc1WBKxHQgKDpTMwTcz8wmrDuiGNucNwQMvCZnW0AJMCXo au5JR8UlN9KU0zTvyBXpcbyrxgPmcWegnga0X6/3DocuNElL+kUplnHTCPL95Shw38Ze 2XRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1WLADT1GzS/SPc/rSFmsOs0LTuwx/bW3hRJRBkMq4Ws=; b=2pJcpU+BSKY4qX3hKHnp3ospZev6sclhcd2zuRYHTtkUQrA71BpfrT9vBh2afLSUbi 6vj4f1QFwB5TzZty43xK8CASDXVm+xkggjVD5ncgERpCVrTpvdw+atYzyGP+YG8n2GiM Z0ory3qDVayyTjayJICcLJHamTun1ACLXF5UDBOYKhdl+6BEC8fEkPcthF9PuhXnYKzg FC2Uz3tjdgwVXGvL+6L3uXqoa/b4Jn1zUGV+3uYR15rxqKPZioQaH4ribH1CPCN5Od2x Juc0XTxDvgKHHjDPHUXYJvvi3nhGx8YF3gpJzQt1OsrhIIoCvx8FdLoIkSKT8kHOe9uB Cr5A== X-Gm-Message-State: ACrzQf1YME/DV/sIds2gnl1Ge99OXLMkMNMYb0DG2lIBvxykSCPrE9KH WUUZEkvifQdfEcBF5UHCR8IcvA== X-Google-Smtp-Source: AMsMyM7g8z5lPesxBupmBXbpBl3NJC9eKIWO10zkTWcfmL/ovfUiSKMTNh6y145gx+v+hJpj7JpvBA== X-Received: by 2002:a05:600c:314a:b0:3c6:d75e:1abe with SMTP id h10-20020a05600c314a00b003c6d75e1abemr2479773wmo.71.1665861091631; Sat, 15 Oct 2022 12:11:31 -0700 (PDT) Received: from hera (ppp046103015185.access.hol.gr. [46.103.15.185]) by smtp.gmail.com with ESMTPSA id 20-20020a05600c021400b003b4c979e6bcsm10307865wmi.10.2022.10.15.12.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Oct 2022 12:11:31 -0700 (PDT) Date: Sat, 15 Oct 2022 22:11:29 +0300 From: Ilias Apalodimas To: Heinrich Schuchardt Cc: u-boot@lists.denx.de Subject: Re: [PATCH 1/1] efi_loader: avoid EFI_CALL() for clearing screen Message-ID: References: <20221015101547.9179-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221015101547.9179-1-heinrich.schuchardt@canonical.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean On Sat, Oct 15, 2022 at 12:15:47PM +0200, Heinrich Schuchardt wrote: > Carve out function efi_clear_screen. > > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_loader/efi_console.c | 26 +++++++++++++++++--------- > 1 file changed, 17 insertions(+), 9 deletions(-) > > diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c > index 3354b217a9..6d4784e140 100644 > --- a/lib/efi_loader/efi_console.c > +++ b/lib/efi_loader/efi_console.c > @@ -460,6 +460,20 @@ static efi_status_t EFIAPI efi_cout_set_attribute( > return EFI_EXIT(EFI_SUCCESS); > } > > +/** > + * efi_cout_clear_screen() - clear screen > + */ > +static void efi_clear_screen(void) > +{ > + /* > + * The Linux console wants both a clear and a home command. The video > + * uclass does not support [H without coordinates, yet. > + */ > + printf(ESC "[2J" ESC "[1;1H"); > + efi_con_mode.cursor_column = 0; > + efi_con_mode.cursor_row = 0; > +} > + > /** > * efi_cout_clear_screen() - clear screen > * > @@ -475,13 +489,7 @@ static efi_status_t EFIAPI efi_cout_clear_screen( > { > EFI_ENTRY("%p", this); > > - /* > - * The Linux console wants both a clear and a home command. The video > - * uclass does not support [H without coordinates, yet. > - */ > - printf(ESC "[2J" ESC "[1;1H"); > - efi_con_mode.cursor_column = 0; > - efi_con_mode.cursor_row = 0; > + efi_clear_screen(); > > return EFI_EXIT(EFI_SUCCESS); > } > @@ -510,7 +518,7 @@ static efi_status_t EFIAPI efi_cout_set_mode( > return EFI_EXIT(EFI_UNSUPPORTED); > > efi_con_mode.mode = mode_number; > - EFI_CALL(efi_cout_clear_screen(this)); > + efi_clear_screen(); > > return EFI_EXIT(EFI_SUCCESS); > } > @@ -536,7 +544,7 @@ static efi_status_t EFIAPI efi_cout_reset( > efi_con_mode.attribute = 0x07; > printf(ESC "[0;37;40m"); > /* Clear screen */ > - EFI_CALL(efi_cout_clear_screen(this)); > + efi_clear_screen(); > > return EFI_EXIT(EFI_SUCCESS); > } > -- > 2.37.2 > Reviewed-by: Ilias Apalodimas