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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 622E6C001B0 for ; Wed, 5 Jul 2023 09:35:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230439AbjGEJfQ (ORCPT ); Wed, 5 Jul 2023 05:35:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231623AbjGEJfP (ORCPT ); Wed, 5 Jul 2023 05:35:15 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C9341717 for ; Wed, 5 Jul 2023 02:34:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688549669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2l0oWn80w44VFK/52z7+jyoTd7jTP9Axkcdy88qxz40=; b=Zu88lZ0XHkNjZtSSq/MId8+8oXq67YdE6bujPC3gLxrAC49UdcK7UNZmjXN2l2REJ8cPSv 6aO+UBIWP4jwAxtHHqMrj4Ss26EdqNZA6YRz3fpGMaYBcL5t5RFQL5mgozGHYo3or6GoDi eUId6WDNkX5dAsieV4m96nFoNBmmC8U= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-66-34wxqeXiPqObeCkNoCkdVQ-1; Wed, 05 Jul 2023 05:34:28 -0400 X-MC-Unique: 34wxqeXiPqObeCkNoCkdVQ-1 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-4f84a8b00e3so6274839e87.0 for ; Wed, 05 Jul 2023 02:34:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688549667; x=1691141667; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2l0oWn80w44VFK/52z7+jyoTd7jTP9Axkcdy88qxz40=; b=htF3wdnVhcyibajoKAAs/cQ8s9oB1nFOr8I85dmnYfocSKvMGrDJvkfwqdxY12Qf89 mCFxXZtPPQj4XdqlU3HNLH9le+sI8s8wd1YJRqMtKRLhjhDdSsYwLZ01ESLO1wsRJowK tb4i2JEV6zvWT5FnR3jdkIfNsQYDolwb8m27cZ79SYyEK7ialH1ldSXKkTobEStwjcsG 7yvkHbKP6WJepIvemv6Pa8veoSiZyjm5wolu0FvFnPB0HKuOMfQOR99BuVOQDW2s2ufB 9cNRjbZlQtfMnuGDVAClfJyb6q70SUUsOIqqymVZZfABXL75kg8jdXOLE2VGsyFLgsDD 4GVA== X-Gm-Message-State: ABy/qLacopB3rLHKd3oT40yjLwruarW0OAQ/QXp/BlLwlLVu+ax7ieV+ LY6JAmMDjeOx5TSxDhcTow/R0atP9TGWJgaJc1k6Ret49oZSvFB/WI5VjNr1MBiuRa1O6eHDkr1 5bAlnpJJyq7FiHtEqlYxPdcc= X-Received: by 2002:a05:6512:55c:b0:4fb:8603:f6aa with SMTP id h28-20020a056512055c00b004fb8603f6aamr10259731lfl.11.1688549667044; Wed, 05 Jul 2023 02:34:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlHdHXA+Wnp6hB3dyZ6CUVofgFnsSNYOrPiwVRr8+Xhwm5qD73pR2kC2waLM/BUW1Q1QrDqlPA== X-Received: by 2002:a05:6512:55c:b0:4fb:8603:f6aa with SMTP id h28-20020a056512055c00b004fb8603f6aamr10259712lfl.11.1688549666653; Wed, 05 Jul 2023 02:34:26 -0700 (PDT) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id u22-20020a05600c00d600b003faa6ce54b2sm1630439wmm.2.2023.07.05.02.34.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 02:34:26 -0700 (PDT) From: Javier Martinez Canillas To: Thomas Zimmermann , maarten.lankhorst@linux.intel.com, mripard@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-fbdev@vger.kernel.org, Thierry Reding , Mikko Perttunen Subject: Re: [PATCH 04/10] drm/tegra: Set fbdev flags In-Reply-To: References: <20230704160133.20261-1-tzimmermann@suse.de> <20230704160133.20261-5-tzimmermann@suse.de> <87wmzerc2s.fsf@minerva.mail-host-address-is-not-set> Date: Wed, 05 Jul 2023 11:34:25 +0200 Message-ID: <87a5war9b2.fsf@minerva.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Thomas Zimmermann writes: [...] >>> + info->flags |= FBINFO_VIRTFB; >> >> I see that all fbdev drivers just do: info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB >> >> Guess you are doing in two assignments to be consistent with drm_fbdev_dma.c ? >> I was just curious about the rationale for setting the flags in two steps. > > The _DEFAULT flag is really just a zero. And the other flags describe > different aspects of the framebuffer. I think it makes sense to set the > flags together with the respective state. For example, _VIRTFB is set > next to ->screen_buffer, because they belong together. > Yes, that makes sense. > _VIRTFB is currently only used in defio code at > > https://elixir.bootlin.com/linux/latest/source/drivers/video/fbdev/core/fb_defio.c#L232 > > I think the fbdev I/O helpers should also test this flag after all > drivers have been annotated correctly. For example, fb_io_read() would > WARN_ONCE if the _VIRTFB flag has been set; and fb_sys_read() would warn > if it hasn't been set. For the read helpers, it also makes sense to > WARN_ONCE if the _READS_FAST flag has not been set. > Agreed. Maybe you could add those warn (or at least info or debug?) even if not all drivers have been annotated correctly. That way people can be aware that is missing and fix if there are remaining drivers. > Best regards > Thomas > -- Best regards, Javier Martinez Canillas Core Platforms Red Hat 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96CF3EB64DA for ; Wed, 5 Jul 2023 09:35:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Pd9t4W7pzxzPTdJv/w1dwnOd2DzWbO25/wscphtnRVg=; b=y5C0i95oLAwpIn IaR5PIDGJaZ+a0Y/VTtOpVDewvkbpXBpf/Y2DfrVhhbDLXQBMlMiVXRlIH6zsK6IRWICPo+KWvlq+ Dmt5HqFZjE1CUaIxCxHVfClhxwQtEwDQvkQIfVTP1zAjj8MC3M6hSmP+JbFqnDzTyjb4s+Sbzmkli o8TBcGDWBjwMIeywxfB72LLSyjyWvLrdix7wk7jDg9FHLV+vKecOpMiFeYJp03c0D/Cw6iAVKRKr/ S8lddBKH27yNShfcwmyUMhipmV+sQwj357m31sEusO1nsSjkJYaK0hL4w0pWojjqiQJAN/CyUKZ6/ iFM+iCx7U0ikRSiskmFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qGyuA-00FN3b-1B; Wed, 05 Jul 2023 09:34:34 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qGyu7-00FN36-2I for linux-arm-kernel@lists.infradead.org; Wed, 05 Jul 2023 09:34:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688549669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2l0oWn80w44VFK/52z7+jyoTd7jTP9Axkcdy88qxz40=; b=Zu88lZ0XHkNjZtSSq/MId8+8oXq67YdE6bujPC3gLxrAC49UdcK7UNZmjXN2l2REJ8cPSv 6aO+UBIWP4jwAxtHHqMrj4Ss26EdqNZA6YRz3fpGMaYBcL5t5RFQL5mgozGHYo3or6GoDi eUId6WDNkX5dAsieV4m96nFoNBmmC8U= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-530-mresY-eoPLWFinA8KhVQnQ-1; Wed, 05 Jul 2023 05:34:28 -0400 X-MC-Unique: mresY-eoPLWFinA8KhVQnQ-1 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-4fb7d06a7e6so6259957e87.2 for ; Wed, 05 Jul 2023 02:34:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688549667; x=1691141667; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2l0oWn80w44VFK/52z7+jyoTd7jTP9Axkcdy88qxz40=; b=FtmjbD7gJ6b0T7UuJwqy7BzMwnG6m2602+bc5Vz/m3mMCYWWkoq05w5Ic4JXSpDf2c NWEYJQpjm3ynCze3S3db9wyvxTtSAAvnXfDxPAssoQPkF7ZGf6QiAVcyJQ5Bll+KU40l l3FJWER9agNQRY88AprhUu7qrpWiJEw4UDLzdfG65zyoCVs6VbY380yuFnSbRURD4PCq 1y8mlnQ84TQZAMFEuJ/HcfqjkY35XZYv7UXNsKCHPc285G67oA2IZneJiuQweSN5cD4b r2MPLJcsZhSKEo7/J4glbGRU85rjXBGTysng910kORxq4prAjYopqwOIjq4+vAr5Y6+G 8sTg== X-Gm-Message-State: ABy/qLa1VFGhDVcI7+nJiP9X3otvbiDT8hqf+ORRokJqRMH+lJ12hMFm w+bjaJjV4DTAZYzEMTFQWV0daEy6LEFldSfMCMY1Ge5ofd0wkukSffmd7+nTinJ6+YTp3LFtuZ1 MzSg9lFb4Ey0bQFquLQlcwky9QcObJiZRqYhw0sOdsJc= X-Received: by 2002:a05:6512:55c:b0:4fb:8603:f6aa with SMTP id h28-20020a056512055c00b004fb8603f6aamr10259733lfl.11.1688549667044; Wed, 05 Jul 2023 02:34:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlHdHXA+Wnp6hB3dyZ6CUVofgFnsSNYOrPiwVRr8+Xhwm5qD73pR2kC2waLM/BUW1Q1QrDqlPA== X-Received: by 2002:a05:6512:55c:b0:4fb:8603:f6aa with SMTP id h28-20020a056512055c00b004fb8603f6aamr10259712lfl.11.1688549666653; Wed, 05 Jul 2023 02:34:26 -0700 (PDT) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id u22-20020a05600c00d600b003faa6ce54b2sm1630439wmm.2.2023.07.05.02.34.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 02:34:26 -0700 (PDT) From: Javier Martinez Canillas To: Thomas Zimmermann , maarten.lankhorst@linux.intel.com, mripard@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-fbdev@vger.kernel.org, Thierry Reding , Mikko Perttunen Subject: Re: [PATCH 04/10] drm/tegra: Set fbdev flags In-Reply-To: References: <20230704160133.20261-1-tzimmermann@suse.de> <20230704160133.20261-5-tzimmermann@suse.de> <87wmzerc2s.fsf@minerva.mail-host-address-is-not-set> Date: Wed, 05 Jul 2023 11:34:25 +0200 Message-ID: <87a5war9b2.fsf@minerva.mail-host-address-is-not-set> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230705_023431_851125_89E6D502 X-CRM114-Status: GOOD ( 18.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Thomas Zimmermann writes: [...] >>> + info->flags |= FBINFO_VIRTFB; >> >> I see that all fbdev drivers just do: info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB >> >> Guess you are doing in two assignments to be consistent with drm_fbdev_dma.c ? >> I was just curious about the rationale for setting the flags in two steps. > > The _DEFAULT flag is really just a zero. And the other flags describe > different aspects of the framebuffer. I think it makes sense to set the > flags together with the respective state. For example, _VIRTFB is set > next to ->screen_buffer, because they belong together. > Yes, that makes sense. > _VIRTFB is currently only used in defio code at > > https://elixir.bootlin.com/linux/latest/source/drivers/video/fbdev/core/fb_defio.c#L232 > > I think the fbdev I/O helpers should also test this flag after all > drivers have been annotated correctly. For example, fb_io_read() would > WARN_ONCE if the _VIRTFB flag has been set; and fb_sys_read() would warn > if it hasn't been set. For the read helpers, it also makes sense to > WARN_ONCE if the _READS_FAST flag has not been set. > Agreed. Maybe you could add those warn (or at least info or debug?) even if not all drivers have been annotated correctly. That way people can be aware that is missing and fix if there are remaining drivers. > Best regards > Thomas > -- Best regards, Javier Martinez Canillas Core Platforms Red Hat _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 57B6BEB64DA for ; Wed, 5 Jul 2023 09:34:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8093710E341; Wed, 5 Jul 2023 09:34:35 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id D82FB10E341 for ; Wed, 5 Jul 2023 09:34:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688549671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2l0oWn80w44VFK/52z7+jyoTd7jTP9Axkcdy88qxz40=; b=CytUrYP7MWCGqMjlGubc8KvjHjjLbsSZ3sr+FlOmjuMgvNFe4ucxGo9SpT6yB1isIc6Q9K zkNLTLB4HY7iotwpjkAoDJ5f2nWd8LqCttfZHblfLJbSeqrCqCPf6NKU++N9ZQMYlCtpzU 8fBkjGFA+g2db2stnpLCvvSJmBjT598= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-63-_Qm5MZVgOtKjTyiaCXjx0g-1; Wed, 05 Jul 2023 05:34:28 -0400 X-MC-Unique: _Qm5MZVgOtKjTyiaCXjx0g-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-4fb76659cacso6272657e87.1 for ; Wed, 05 Jul 2023 02:34:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688549667; x=1691141667; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2l0oWn80w44VFK/52z7+jyoTd7jTP9Axkcdy88qxz40=; b=QIBhHtrx/MWxLTLK/pcDab7QqiIP02FXBuQ82Cv0KdLc4EGAPr/Xndkwbf+5MzGC+d hMBGV7kE/Kxgxc2leSeD9ycQ4aBMRisPV3OJsX6/CMyycDYlkGt59XxUr4CHfoAf8OnS VUp27CL5kFFspaKUCuEVIud+DQSYDVtWG/BgEOvqzWpUxxiWjh2vLuEz8RpdHgYysY0x mws4kHpNSlOiUvN3JU5apN9eG4L8sLLySaOPwJvUst7QbZEqhNm1DdKQG9E5lyWDX+jw em8uEuUqur5k2KJ1SqSAbfnIzfVABT0NknahlGFcTmQXTv7eGXOvJMR0xoQEpZW0rDnw BnaA== X-Gm-Message-State: ABy/qLbMCMiV8eMQAMgC1PxfnavDTLKOcIk4E6rVzdpg8acosdhbfE9g VeBHlojhuFtn0OOeLAKPtQbsgaz/Te+cQtBJhPY9Ci2Bmrbl7gFP1w+63xFuS7aqXFxeIy6ORmk TeJQan6sZk/itbe40nw4yqJQ0hnRt X-Received: by 2002:a05:6512:55c:b0:4fb:8603:f6aa with SMTP id h28-20020a056512055c00b004fb8603f6aamr10259728lfl.11.1688549667043; Wed, 05 Jul 2023 02:34:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlHdHXA+Wnp6hB3dyZ6CUVofgFnsSNYOrPiwVRr8+Xhwm5qD73pR2kC2waLM/BUW1Q1QrDqlPA== X-Received: by 2002:a05:6512:55c:b0:4fb:8603:f6aa with SMTP id h28-20020a056512055c00b004fb8603f6aamr10259712lfl.11.1688549666653; Wed, 05 Jul 2023 02:34:26 -0700 (PDT) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id u22-20020a05600c00d600b003faa6ce54b2sm1630439wmm.2.2023.07.05.02.34.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 02:34:26 -0700 (PDT) From: Javier Martinez Canillas To: Thomas Zimmermann , maarten.lankhorst@linux.intel.com, mripard@kernel.org Subject: Re: [PATCH 04/10] drm/tegra: Set fbdev flags In-Reply-To: References: <20230704160133.20261-1-tzimmermann@suse.de> <20230704160133.20261-5-tzimmermann@suse.de> <87wmzerc2s.fsf@minerva.mail-host-address-is-not-set> Date: Wed, 05 Jul 2023 11:34:25 +0200 Message-ID: <87a5war9b2.fsf@minerva.mail-host-address-is-not-set> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, Mikko Perttunen , Thierry Reding , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Thomas Zimmermann writes: [...] >>> + info->flags |= FBINFO_VIRTFB; >> >> I see that all fbdev drivers just do: info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB >> >> Guess you are doing in two assignments to be consistent with drm_fbdev_dma.c ? >> I was just curious about the rationale for setting the flags in two steps. > > The _DEFAULT flag is really just a zero. And the other flags describe > different aspects of the framebuffer. I think it makes sense to set the > flags together with the respective state. For example, _VIRTFB is set > next to ->screen_buffer, because they belong together. > Yes, that makes sense. > _VIRTFB is currently only used in defio code at > > https://elixir.bootlin.com/linux/latest/source/drivers/video/fbdev/core/fb_defio.c#L232 > > I think the fbdev I/O helpers should also test this flag after all > drivers have been annotated correctly. For example, fb_io_read() would > WARN_ONCE if the _VIRTFB flag has been set; and fb_sys_read() would warn > if it hasn't been set. For the read helpers, it also makes sense to > WARN_ONCE if the _READS_FAST flag has not been set. > Agreed. Maybe you could add those warn (or at least info or debug?) even if not all drivers have been annotated correctly. That way people can be aware that is missing and fix if there are remaining drivers. > Best regards > Thomas > -- Best regards, Javier Martinez Canillas Core Platforms Red Hat