From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS autolearn=no autolearn_force=no version=3.4.1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=e1mhWiQ+nK1TpnHegOmWn7jYPQfPzfQzNgARNwRVues=; b=PxtsegXUXvdsxfarZ7D5xOYVGXWvTYoB0FtyNdg+CD6ioIdPg1YL5G7XqorINa9M9d HPcJkxjytOerYpxZYEC/hpjLSpsiINTNFB2QRn9Mnf5s8Fj/b9snFw+rLAVOB/tvqmmS uokEKUkPHuuAXqh7xQUl/VCiltEQlRPq3nl/MV6V6U0iuxxpfdfJJhjS46VUeiPUlxPa qpgEre8Yo73Ta4Co4kV/kk/CClWzyus7fQnIpY4fieZutaekiiGo6a1C6T42R4n3W2S2 BuCyhATyDup9KjH64Cn+MNHFZTWDtnwRz3twiur/M4tw8to+3iUyy9wxweoZ+/XrCqJg ZZbg== X-Gm-Message-State: ANoB5pnKdlxYCmVo6bw6jsWnWXrGm/Nh3SAxSRGIwh5WDfqqCDgjDS21 zTZx40UzGAmBkjJtR+je+90= X-Google-Smtp-Source: AA0mqf7PIOY9sVwrkuF+HKiQVpAYCxXMjsNyDxp/2zaNSy/5ZlK/tcFjYPJMxwV37fhp/jBnseaaZw== X-Received: by 2002:aa7:daca:0:b0:46b:8078:2431 with SMTP id x10-20020aa7daca000000b0046b80782431mr27143396eds.408.1670308832172; Mon, 05 Dec 2022 22:40:32 -0800 (PST) Message-ID: <27ade063-79df-dad9-0427-e16f1ddb43ef@kernel.org> Date: Tue, 6 Dec 2022 07:40:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Content-Language: en-US To: Samuel Thibault , Greg Kroah-Hartman , kbd@lists.altlinux.org References: <20221205000739.583233140@ens-lyon.org> <20221205000807.751605665@ens-lyon.org> From: Jiri Slaby In-Reply-To: <20221205000807.751605665@ens-lyon.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 06 Dec 2022 15:07:26 +0300 Cc: linux-kernel@vger.kernel.org Subject: Re: [kbd] [patch 1/3] VT: Add height parameter to con_font_get/set consw operations X-BeenThere: kbd@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Linux console tools development discussion List-Id: Linux console tools development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Dec 2022 06:40:37 -0000 Archived-At: List-Archive: On 05. 12. 22, 1:07, Samuel Thibault wrote: > The current con_font_get/set API currently hardcodes a 32-pixel-tall > limitation, which only dates from the old VGA hardware which could not > handle taller fonts than that. > > This change just adds a vpitch parameter to release this > constraint. Drivers which do not support vpitch != 32 can just return > EINVAL when it is not 32, font loading tools will revert to trying 32 > and succeed. > > This change makes the fbcon driver consider vpitch appropriately, thus > making it able to load large fonts. > > Signed-off-by: Samuel Thibault > ... > --- linux-6.0.orig/drivers/usb/misc/sisusbvga/sisusb_con.c > +++ linux-6.0/drivers/usb/misc/sisusbvga/sisusb_con.c ... > @@ -1243,13 +1244,15 @@ sisusbcon_font_set(struct vc_data *c, st > > /* Interface routine */ > static int > -sisusbcon_font_get(struct vc_data *c, struct console_font *font) > +sisusbcon_font_get(struct vc_data *c, struct console_font *font, unsigned int vpitch) > { > struct sisusb_usb_data *sisusb; > > sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); > if (!sisusb) > return -ENODEV; > + if (vpitch != 32) > + return -EINVAL; > > /* sisusb->lock is down */ > > @@ -1268,7 +1271,7 @@ sisusbcon_font_get(struct vc_data *c, st > } > > /* Copy 256 chars only, like vgacon */ > - memcpy(font->data, sisusb->font_backup, 256 * 32); > + memcpy(font->data, sisusb->font_backup, 256 * height); Have you tested this? What does this 'height' refer to? thanks, -- js suse labs