Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1854693pxb; Sat, 14 Nov 2020 04:51:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzdt07IJbZ3TcL7Iym73PIq/cRoGpRzizg9rsHagRgVTJQoERF2JbioisrAfBy+b770gd80 X-Received: by 2002:a17:906:d1c3:: with SMTP id bs3mr6187729ejb.246.1605358288441; Sat, 14 Nov 2020 04:51:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605358288; cv=none; d=google.com; s=arc-20160816; b=EqiMyLFKYS0RUYaiVcYNTgwUaoSwExaksmbm9I4CIPXyzEvQ8e+kWMeBRki2DKepWs 5QIbk7rVzWC/3JtfDf7E1A4rMdmDrMlqmjzsiO1ybV3SV5Tp03mBuOFHK5BEMmkD6Mf+ dD3KqK9CZMCcdzi7/NL9ZAGK20bKxYeJBPvvPcy/+IzM0NmRlaErN7IMKLK5FVPluP4t 8I3SxK8QvEyjRC0nSniSwZXlkYqNPEc1v6y9pwlUf+J2J9lVBrsVOdYDLKewFP8u8E6w 0+vhtPqwnf4ohtyIt8Qlr8tYT67AnWMbA5/vlDEum6YNT/b2ZkjO1jsk6sD2Cha9jPI0 z9zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/alDDGu77kr1jyJS2Dgo0f8lEWMLifOcaqhyEonywU8=; b=E8uTbhOBtVQ50MA4qX1pYW4NncnzdKJa0foOfcSVWDoXYO0xm/mKVk0n/B2hZ3Ztym mQt0iYSHoBrtCviB86eBaxd/GG/2QvT1jHHeaDFLVxc8WEqva6KKvANWgO1diCSCXUkv RM8qq9cQ7uYLrMgyzT5siSoINR+irKmVaH0b3RynDquZ86yaeUIeW092JNlY5s05N5qJ xmWRrAP15BO6OoeSSIcnUp4aTkflF/AwvTVtKQVa5+5toYWjDCs3brmf1vfoIlPODS4U ANeKHnfruBC+okmqR7ZymIPfJtSd1Q0ob91xCPyEMm2LZzMgqiO/oLuqu5Tjpksidsee gyHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aZZUKtrU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hd40si3011891ejc.265.2020.11.14.04.51.05; Sat, 14 Nov 2020 04:51:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aZZUKtrU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726778AbgKNMrY (ORCPT + 99 others); Sat, 14 Nov 2020 07:47:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726112AbgKNMrX (ORCPT ); Sat, 14 Nov 2020 07:47:23 -0500 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85878C0613D1; Sat, 14 Nov 2020 04:47:23 -0800 (PST) Received: by mail-pj1-x1042.google.com with SMTP id f12so1595249pjp.4; Sat, 14 Nov 2020 04:47:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/alDDGu77kr1jyJS2Dgo0f8lEWMLifOcaqhyEonywU8=; b=aZZUKtrUI7FUZgNGTm6DhtaXCamioS0bcVM4yFOgeZ+hB3mXPddqxnr31T1x6L9cUR MWquPRrsz+r8KdnHNpo23GDU1SPGYQ+vxFD3gzNIm15BlwfVU7/+Q/Hqt6qG1jgRGplg R75u0DD9C2uGSJj+wOvc8R9h97myHYN0cywbq8d0Wg1qglgQ6ELvlpKqYORyUQOW/Y7o G5zBMMdU2blRUi2RtuFa4x/SW6tllf97FApPk2ItQlc9+UQdy1ljwxYr/STw5eW9g4a8 WFmU+f13dm0rNIwTUURrUGfbfVZpqQOm6rHy0nJdoFYUWBQvIXMSwaFo0wBQSs/X6hAD Xi9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/alDDGu77kr1jyJS2Dgo0f8lEWMLifOcaqhyEonywU8=; b=fTeADznYJ5MBJ9jVt4DkYtQTNO6ulag8v7h27NnTTuFXErPeg9fb/zD4/ORH5lBh/r bNH/M2hJrtuYgzOFPbRphbSSOJgqsyeC03i14gTqoBkdQIPMhyHhLUcfJYgsR0Gy7K+l /CfNu2kw07wVQ5ZWgNvMcQqQ3BqW+rdpvLy4uHvn7J79t2qWgcoUJZqVzektUJNfr1he snxefKtzmOs6iNHEcZ4E3EwBpeFl3u/Z8xkBX9FyXJ3g1QeBWK03qQYNzA0RV9QsOewW pbjFaGLiBSDoooOemIvdEhQUTB+U7WHlQUKHNTy5QHaePLYMvzQESLSl/ENtbBptxP/W iXuw== X-Gm-Message-State: AOAM531Hj9r7PM2YhtczQ9kpYwk/z+RbGIXrGzS68FMRA6Lz3GxGusWz XDN84S3syWZJmZs9DUBv2SQkur/SNUrTDsQ= X-Received: by 2002:a17:90a:5884:: with SMTP id j4mr7589631pji.7.1605358043132; Sat, 14 Nov 2020 04:47:23 -0800 (PST) Received: from PWN ([221.124.243.27]) by smtp.gmail.com with ESMTPSA id s9sm12522743pfs.89.2020.11.14.04.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Nov 2020 04:47:22 -0800 (PST) Date: Sat, 14 Nov 2020 07:47:16 -0500 From: Peilin Ye To: Greg Kroah-Hartman Cc: Daniel Vetter , Jiri Slaby , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: Re: [PATCH v3 0/5] console: Miscellaneous clean-ups, do not use FNTCHARCNT() in fbcon.c Message-ID: <20201114124716.GA12895@PWN> References: <20201113211633.GY401619@phenom.ffwll.local> <20201114081021.GA11811@PWN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 14, 2020 at 01:22:22PM +0100, Greg Kroah-Hartman wrote: > On Sat, Nov 14, 2020 at 01:18:06PM +0100, Greg Kroah-Hartman wrote: > > On Sat, Nov 14, 2020 at 03:10:21AM -0500, Peilin Ye wrote: > > > Thanks for reviewing! Questions about the last patch [5/5] though, it > > > depends on the following assumption: > > > > > > """ > > > For each console `idx`, `vc_cons[idx].d->vc_font.data` and > > > `fb_display[idx].fontdata` always point to the same buffer. > > > """ > > > > > > Is this true? I think it is true by grepping for `fontdata`. I also > > > noticed that fbcon.c is using `vc->vc_font.data` and `p->fontdata` > > > interchangeably, see fbcon_get_requirement(): > > > > > > vc = vc_cons[fg_console].d; > > > [...] > > > p = &fb_display[fg_console]; > > > caps->x = 1 << (vc->vc_font.width - 1); > > > ^^^^^^^^^^^ > > > caps->y = 1 << (vc->vc_font.height - 1); > > > ^^^^^^^^^^^ > > > caps->len = (p->userfont) ? > > > FNTCHARCNT(p->fontdata) : 256; > > > ^^^^^^^^^^^ > > > > > > If it is true, then what is the point of using `fontdata` in `struct > > > fbcon_display`? Just for the `userfont` flag? Should we delete > > > `fontdata`, when we no longer need the `userfont` flag? > > > > Yes, after a quick look, I think your analysis here is correct. So if > > you can delete that, it would be nice if possible. I see, at the moment we still need `userfont` for refcount handling, I will try to delete both `fontdata` and `userfont` after refcount is taken care of. > > > In this sense I think [5/5] needs more testing. Do we have test files > > > for fbcon, or should I try to write some tests from scratch? > > > > I don't know of any direct tests, I usually just booted into that mode > > and saw if everything looked like it did before. There must be some > > tool that you can use to change the current font, as it seems to happen > > at boot time on some distros. I can't remember what it's called at the > > moment... > > Ah, here's a hint: > https://wiki.archlinux.org/index.php/Linux_console#Fonts > > The setfont tool should help you out here. Oh, I didn't know about this one. I'll go experimenting with it, thank you! Peilin Ye