From patchwork Wed Jul 19 08:15:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 704472 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 E492BC001DC for ; Wed, 19 Jul 2023 08:16:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230388AbjGSIQ6 (ORCPT ); Wed, 19 Jul 2023 04:16:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230324AbjGSIQr (ORCPT ); Wed, 19 Jul 2023 04:16:47 -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 6D0871737 for ; Wed, 19 Jul 2023 01:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689754556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pl7rDesBC4To4uNjgzRPqO8NIm8bPxHEaiAgd1Bj9kg=; b=PfSa6n63zHE8uNzDWqdIszLbwAAWuipTPAHdMKmS5SispHpM2kYNzUdDFTqtgFOxUL3T3E 3xTbB5/Zo1MIz3LudN3xAtbiZHVsW+rI110E4PUfg2mFrmQvyee8h4NzZBDKPG344UYFLJ wBgVMq1wiYEpEezBLL0qG+5Trv8UXD8= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-36-7shd19faNmKqc6z17dg9ng-1; Wed, 19 Jul 2023 04:15:55 -0400 X-MC-Unique: 7shd19faNmKqc6z17dg9ng-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-31443e13f9dso3833203f8f.0 for ; Wed, 19 Jul 2023 01:15:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689754554; x=1690359354; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pl7rDesBC4To4uNjgzRPqO8NIm8bPxHEaiAgd1Bj9kg=; b=dgKGgM0IN9vC/cjUIrGkA51bJPhakYg5iUSnODkekZa9YL8mCiLyrqN+LXOkpHOqn0 mH4e0Co5wsGo9FRmkR3TBz5R6Yjb31pfuF4hpompp/h3bYbFH+JTYQxsyED2GFd30GM5 me1jrx72X1moZN37+UYM9fOaJVyyLbDY5iXcB2ZJ+aTUMs84NzjVqp/EfO8ROKxIlDmf QBvxMS3/AiPKfYIe+DdEDEXDaoUxNI/zOa8cqM1McQi5nB5Lg0XSFKsf5WvNRv3ddmk2 bcufOAqNQJJIheg7RwOIEgR1A7uSKlSLD6S2a9powAlmJ8fWmdRCaE9OfvYPlVO/Cs+w e5KQ== X-Gm-Message-State: ABy/qLY5YgaIWkXan+sYkOl6RcwLMqvpgBMnV880mKhz8M+Dq5lkCNjh 9dBjPzD+yYqNLcRVfNYqN5hu7eAyz2C3t5gEK9NazksZo990yd4xSbiH+xaGvBiYrcDe6Wp2JZw Xrc/+M+5MghjYYlzO0RMxeec= X-Received: by 2002:adf:f087:0:b0:314:4c78:8b84 with SMTP id n7-20020adff087000000b003144c788b84mr4142560wro.17.1689754554399; Wed, 19 Jul 2023 01:15:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlFpqnqhnG2ZCWh/0oWIuDm9np5hx9FVZp0cyJdayt5CqHwUybqL7yFTlLi+cxoPwsgimsvCTw== X-Received: by 2002:adf:f087:0:b0:314:4c78:8b84 with SMTP id n7-20020adff087000000b003144c788b84mr4142546wro.17.1689754554100; Wed, 19 Jul 2023 01:15:54 -0700 (PDT) Received: from minerva.home (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id d5-20020a5d5385000000b0031423a8f4f7sm4574354wrv.56.2023.07.19.01.15.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 01:15:53 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Thomas Zimmermann , Geert Uytterhoeven , Arnd Bergmann , Javier Martinez Canillas , Greg Kroah-Hartman , Helge Deller , Jacek Lawrynowicz , Jeffrey Hugo , Nipun Gupta , Oded Gabbay , Pieter Jansen van Vuuren , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: [PATCH v6 1/4] video: Add auxiliary display drivers to Graphics support menu Date: Wed, 19 Jul 2023 10:15:35 +0200 Message-ID: <20230719081544.741051-2-javierm@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230719081544.741051-1-javierm@redhat.com> References: <20230719081544.741051-1-javierm@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org The drivers in this subsystem are for character-based LCD displays, which can fall into the same category of the DRM/KMS and fbdev drivers that are located under the "Graphics support" menu. Add auxdisplay there as well. Suggested-by: Thomas Zimmermann Signed-off-by: Javier Martinez Canillas Reviewed-by: Arnd Bergmann Tested-by: Arnd Bergmann --- (no changes since v5) Changes in v5: - Take the auxdisplay/Kconfig source out of "if HAS_IOMEM" (Geert Uytterhoeven). drivers/Kconfig | 2 -- drivers/video/Kconfig | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/Kconfig b/drivers/Kconfig index 514ae6b24cb2..496ca02ee18f 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -129,8 +129,6 @@ source "drivers/dma-buf/Kconfig" source "drivers/dca/Kconfig" -source "drivers/auxdisplay/Kconfig" - source "drivers/uio/Kconfig" source "drivers/vfio/Kconfig" diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 8b2b9ac37c3d..e5b1cc54cafa 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -25,6 +25,8 @@ config VIDEO_NOMODESET bool default n +source "drivers/auxdisplay/Kconfig" + if HAS_IOMEM config HAVE_FB_ATMEL From patchwork Wed Jul 19 08:15:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 704720 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 3D116C001DE for ; Wed, 19 Jul 2023 08:16:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230359AbjGSIQ6 (ORCPT ); Wed, 19 Jul 2023 04:16:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230313AbjGSIQr (ORCPT ); Wed, 19 Jul 2023 04:16:47 -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 5D3641B9 for ; Wed, 19 Jul 2023 01:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689754558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Pd9+AMWEkVJOiciXCYw1Tf+rzcgyczWb3kQKGEiVtIU=; b=do2+z8Mg9pLEiMDAN0rIm+txqUfowWtziGxSRR+077k6NS+/atxDmiietlm1MMccTsAK12 df4EtNXJTZubLeN9T9nCgqIHQWnWhyAOFBQ6OQGZZE3DMNaRPb820mJHveta0ztdyHprRH hA1R5xuC7r7tZcC3lHsK2T0lpzOi76E= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-426-xPEL-GIwMxyQr29ffbB2Cw-1; Wed, 19 Jul 2023 04:15:57 -0400 X-MC-Unique: xPEL-GIwMxyQr29ffbB2Cw-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2b83988c45bso52701101fa.3 for ; Wed, 19 Jul 2023 01:15:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689754556; x=1690359356; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Pd9+AMWEkVJOiciXCYw1Tf+rzcgyczWb3kQKGEiVtIU=; b=QbA9qGRPFiN1VEczTtG3+V/SwrlOk2M8kZRNsoGUa6QbzhkWG2Dx8c6KZCYxvotNy7 p+4MxsrGBsLESWP2kSNlSt7NFfA/S4CNKixSx8dM+2bgH3e+50kfwDEwgSfecZCUDLyx jeXyeKKzJQKaXhQzBLdpLcwQAr1HfoXwnsSs5X8iggxSL/jxveX9x5QryFnAWerQIFEF eOlVxZ0gxy7DLYDcWqZIclUE8+OdG17lSF5NVTECZcLFJFZLNudcbOQ/pBJklFKqPSuZ ffPid+1kHiAByxZwDsofRiY4aCSPxqYWNC4UazWcta8i1byLYxFNqpExW3gptItxQ420 /Jxg== X-Gm-Message-State: ABy/qLZ6kYLyPPFjhOjq5ZARw2US/Uw/NW4zZhszzm8zJHgyX8uAup52 b/s/A+Mc8wVKEiAm4n7k+QXDkRGPdL8ye21UiST9yLXhsholUCe05tIKlOv02XFr03aX+6jw6M9 Z0E9hCYOu/qotvGFY+jLAEd0= X-Received: by 2002:a19:7b15:0:b0:4fd:b223:92c with SMTP id w21-20020a197b15000000b004fdb223092cmr1230919lfc.60.1689754555705; Wed, 19 Jul 2023 01:15:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlHno/1chUJTf1rjuNnYddw5kOcRZNwehqp+4sji7Jshm1BBprwe+2OopXrx1y3MX+ycvHs8DA== X-Received: by 2002:a19:7b15:0:b0:4fd:b223:92c with SMTP id w21-20020a197b15000000b004fdb223092cmr1230906lfc.60.1689754555255; Wed, 19 Jul 2023 01:15:55 -0700 (PDT) Received: from minerva.home (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id d5-20020a5d5385000000b0031423a8f4f7sm4574354wrv.56.2023.07.19.01.15.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 01:15:54 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Thomas Zimmermann , Geert Uytterhoeven , Arnd Bergmann , Javier Martinez Canillas , Andy Shevchenko , Daniel Vetter , Helge Deller , Randy Dunlap , Sam Ravnborg , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: [PATCH v6 2/4] fbdev: Move core fbdev symbols to a separate Kconfig file Date: Wed, 19 Jul 2023 10:15:36 +0200 Message-ID: <20230719081544.741051-3-javierm@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230719081544.741051-1-javierm@redhat.com> References: <20230719081544.741051-1-javierm@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org The drivers/video/fbdev/Kconfig defines both symbols for fbdev drivers and core fbdev symbols, that can be enabled independently of the fbdev drivers. Split the Kconfig in two, one that only has the symbols for fbdev drivers and another one that contains the fbdev core symbols. Suggested-by: Arnd Bergmann Signed-off-by: Javier Martinez Canillas Reviewed-by: Arnd Bergmann Tested-by: Arnd Bergmann --- Changes in v6: - Don't move FB_{HECUBA,SVGALIB,MACMODES} to config/Kcore (Arnd Bergmann). drivers/video/fbdev/Kconfig | 187 +------------------------------ drivers/video/fbdev/core/Kconfig | 186 ++++++++++++++++++++++++++++++ 2 files changed, 188 insertions(+), 185 deletions(-) create mode 100644 drivers/video/fbdev/core/Kconfig diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index c12c166be7d1..ed881d5b3ee0 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -3,9 +3,6 @@ # fbdev configuration # -config FB_NOTIFY - bool - menuconfig FB tristate "Support for frame buffer devices" select FB_NOTIFY @@ -42,153 +39,6 @@ menuconfig FB (e.g. an accelerated X server) and that are not frame buffer device-aware may cause unexpected results. If unsure, say N. -config FIRMWARE_EDID - bool "Enable firmware EDID" - depends on FB - help - This enables access to the EDID transferred from the firmware. - On the i386, this is from the Video BIOS. Enable this if DDC/I2C - transfers do not work for your driver and if you are using - nvidiafb, i810fb or savagefb. - - In general, choosing Y for this option is safe. If you - experience extremely long delays while booting before you get - something on your display, try setting this to N. Matrox cards in - combination with certain motherboards and monitors are known to - suffer from this problem. - -config FB_DEVICE - bool "Provide legacy /dev/fb* device" - depends on FB - default y - help - Say Y here if you want the legacy /dev/fb* device file and - interfaces within sysfs anc procfs. It is only required if you - have userspace programs that depend on fbdev for graphics output. - This does not affect the framebuffer console. If unsure, say N. - -config FB_DDC - tristate - depends on FB - select I2C_ALGOBIT - select I2C - -config FB_CFB_FILLRECT - tristate - depends on FB - help - Include the cfb_fillrect function for generic software rectangle - filling. This is used by drivers that don't provide their own - (accelerated) version. - -config FB_CFB_COPYAREA - tristate - depends on FB - help - Include the cfb_copyarea function for generic software area copying. - This is used by drivers that don't provide their own (accelerated) - version. - -config FB_CFB_IMAGEBLIT - tristate - depends on FB - help - Include the cfb_imageblit function for generic software image - blitting. This is used by drivers that don't provide their own - (accelerated) version. - -config FB_CFB_REV_PIXELS_IN_BYTE - bool - depends on FB - help - Allow generic frame-buffer functions to work on displays with 1, 2 - and 4 bits per pixel depths which has opposite order of pixels in - byte order to bytes in long order. - -config FB_SYS_FILLRECT - tristate - depends on FB - help - Include the sys_fillrect function for generic software rectangle - filling. This is used by drivers that don't provide their own - (accelerated) version and the framebuffer is in system RAM. - -config FB_SYS_COPYAREA - tristate - depends on FB - help - Include the sys_copyarea function for generic software area copying. - This is used by drivers that don't provide their own (accelerated) - version and the framebuffer is in system RAM. - -config FB_SYS_IMAGEBLIT - tristate - depends on FB - help - Include the sys_imageblit function for generic software image - blitting. This is used by drivers that don't provide their own - (accelerated) version and the framebuffer is in system RAM. - -config FB_PROVIDE_GET_FB_UNMAPPED_AREA - bool - depends on FB - help - Allow generic frame-buffer to provide get_fb_unmapped_area - function to provide shareable character device support on nommu. - -menuconfig FB_FOREIGN_ENDIAN - bool "Framebuffer foreign endianness support" - depends on FB - help - This menu will let you enable support for the framebuffers with - non-native endianness (e.g. Little-Endian framebuffer on a - Big-Endian machine). Most probably you don't have such hardware, - so it's safe to say "n" here. - -choice - prompt "Choice endianness support" - depends on FB_FOREIGN_ENDIAN - -config FB_BOTH_ENDIAN - bool "Support for Big- and Little-Endian framebuffers" - -config FB_BIG_ENDIAN - bool "Support for Big-Endian framebuffers only" - -config FB_LITTLE_ENDIAN - bool "Support for Little-Endian framebuffers only" - -endchoice - -config FB_SYS_FOPS - tristate - depends on FB - -config FB_DEFERRED_IO - bool - depends on FB - -config FB_IO_HELPERS - bool - depends on FB - select FB_CFB_COPYAREA - select FB_CFB_FILLRECT - select FB_CFB_IMAGEBLIT - -config FB_SYS_HELPERS - bool - depends on FB - select FB_SYS_COPYAREA - select FB_SYS_FILLRECT - select FB_SYS_FOPS - select FB_SYS_IMAGEBLIT - -config FB_SYS_HELPERS_DEFERRED - bool - depends on FB - select FB_DEFERRED_IO - select FB_SYS_HELPERS - config FB_HECUBA tristate depends on FB @@ -205,41 +55,6 @@ config FB_MACMODES tristate depends on FB -config FB_BACKLIGHT - tristate - depends on FB - select BACKLIGHT_CLASS_DEVICE - -config FB_MODE_HELPERS - bool "Enable Video Mode Handling Helpers" - depends on FB - help - This enables functions for handling video modes using the - Generalized Timing Formula and the EDID parser. A few drivers rely - on this feature such as the radeonfb, rivafb, and the i810fb. If - your driver does not take advantage of this feature, choosing Y will - just increase the kernel size by about 5K. - -config FB_TILEBLITTING - bool "Enable Tile Blitting Support" - depends on FB - help - This enables tile blitting. Tile blitting is a drawing technique - where the screen is divided into rectangular sections (tiles), whereas - the standard blitting divides the screen into pixels. Because the - default drawing element is a tile, drawing functions will be passed - parameters in terms of number of tiles instead of number of pixels. - For example, to draw a single character, instead of using bitmaps, - an index to an array of bitmaps will be used. To clear or move a - rectangular section of a screen, the rectangle will be described in - terms of number of tiles in the x- and y-axis. - - This is particularly important to one driver, matroxfb. If - unsure, say N. - -comment "Frame buffer hardware drivers" - depends on FB - config FB_GRVGA tristate "Aeroflex Gaisler framebuffer support" depends on FB && SPARC @@ -2223,3 +2038,5 @@ config FB_SM712 source "drivers/video/fbdev/omap/Kconfig" source "drivers/video/fbdev/omap2/Kconfig" source "drivers/video/fbdev/mmp/Kconfig" + +source "drivers/video/fbdev/core/Kconfig" diff --git a/drivers/video/fbdev/core/Kconfig b/drivers/video/fbdev/core/Kconfig new file mode 100644 index 000000000000..fd3b7f5b4b7a --- /dev/null +++ b/drivers/video/fbdev/core/Kconfig @@ -0,0 +1,186 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# fbdev core configuration +# + +config FB_NOTIFY + bool + +config FIRMWARE_EDID + bool "Enable firmware EDID" + depends on FB + help + This enables access to the EDID transferred from the firmware. + On the i386, this is from the Video BIOS. Enable this if DDC/I2C + transfers do not work for your driver and if you are using + nvidiafb, i810fb or savagefb. + + In general, choosing Y for this option is safe. If you + experience extremely long delays while booting before you get + something on your display, try setting this to N. Matrox cards in + combination with certain motherboards and monitors are known to + suffer from this problem. + +config FB_DEVICE + bool "Provide legacy /dev/fb* device" + depends on FB + default y + help + Say Y here if you want the legacy /dev/fb* device file and + interfaces within sysfs anc procfs. It is only required if you + have userspace programs that depend on fbdev for graphics output. + This does not affect the framebuffer console. If unsure, say N. + +config FB_DDC + tristate + depends on FB + select I2C_ALGOBIT + select I2C + +config FB_CFB_FILLRECT + tristate + depends on FB + help + Include the cfb_fillrect function for generic software rectangle + filling. This is used by drivers that don't provide their own + (accelerated) version. + +config FB_CFB_COPYAREA + tristate + depends on FB + help + Include the cfb_copyarea function for generic software area copying. + This is used by drivers that don't provide their own (accelerated) + version. + +config FB_CFB_IMAGEBLIT + tristate + depends on FB + help + Include the cfb_imageblit function for generic software image + blitting. This is used by drivers that don't provide their own + (accelerated) version. + +config FB_CFB_REV_PIXELS_IN_BYTE + bool + depends on FB + help + Allow generic frame-buffer functions to work on displays with 1, 2 + and 4 bits per pixel depths which has opposite order of pixels in + byte order to bytes in long order. + +config FB_SYS_FILLRECT + tristate + depends on FB + help + Include the sys_fillrect function for generic software rectangle + filling. This is used by drivers that don't provide their own + (accelerated) version and the framebuffer is in system RAM. + +config FB_SYS_COPYAREA + tristate + depends on FB + help + Include the sys_copyarea function for generic software area copying. + This is used by drivers that don't provide their own (accelerated) + version and the framebuffer is in system RAM. + +config FB_SYS_IMAGEBLIT + tristate + depends on FB + help + Include the sys_imageblit function for generic software image + blitting. This is used by drivers that don't provide their own + (accelerated) version and the framebuffer is in system RAM. + +config FB_PROVIDE_GET_FB_UNMAPPED_AREA + bool + depends on FB + help + Allow generic frame-buffer to provide get_fb_unmapped_area + function to provide shareable character device support on nommu. + +menuconfig FB_FOREIGN_ENDIAN + bool "Framebuffer foreign endianness support" + depends on FB + help + This menu will let you enable support for the framebuffers with + non-native endianness (e.g. Little-Endian framebuffer on a + Big-Endian machine). Most probably you don't have such hardware, + so it's safe to say "n" here. + +choice + prompt "Choice endianness support" + depends on FB_FOREIGN_ENDIAN + +config FB_BOTH_ENDIAN + bool "Support for Big- and Little-Endian framebuffers" + +config FB_BIG_ENDIAN + bool "Support for Big-Endian framebuffers only" + +config FB_LITTLE_ENDIAN + bool "Support for Little-Endian framebuffers only" + +endchoice + +config FB_SYS_FOPS + tristate + depends on FB + +config FB_DEFERRED_IO + bool + depends on FB + +config FB_IO_HELPERS + bool + depends on FB + select FB_CFB_COPYAREA + select FB_CFB_FILLRECT + select FB_CFB_IMAGEBLIT + +config FB_SYS_HELPERS + bool + depends on FB + select FB_SYS_COPYAREA + select FB_SYS_FILLRECT + select FB_SYS_FOPS + select FB_SYS_IMAGEBLIT + +config FB_SYS_HELPERS_DEFERRED + bool + depends on FB + select FB_DEFERRED_IO + select FB_SYS_HELPERS + +config FB_BACKLIGHT + tristate + depends on FB + select BACKLIGHT_CLASS_DEVICE + +config FB_MODE_HELPERS + bool "Enable Video Mode Handling Helpers" + depends on FB + help + This enables functions for handling video modes using the + Generalized Timing Formula and the EDID parser. A few drivers rely + on this feature such as the radeonfb, rivafb, and the i810fb. If + your driver does not take advantage of this feature, choosing Y will + just increase the kernel size by about 5K. + +config FB_TILEBLITTING + bool "Enable Tile Blitting Support" + depends on FB + help + This enables tile blitting. Tile blitting is a drawing technique + where the screen is divided into rectangular sections (tiles), whereas + the standard blitting divides the screen into pixels. Because the + default drawing element is a tile, drawing functions will be passed + parameters in terms of number of tiles instead of number of pixels. + For example, to draw a single character, instead of using bitmaps, + an index to an array of bitmaps will be used. To clear or move a + rectangular section of a screen, the rectangle will be described in + terms of number of tiles in the x- and y-axis. + + This is particularly important to one driver, matroxfb. If + unsure, say N. From patchwork Wed Jul 19 08:15:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 704721 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 0B4CEEB64DA for ; Wed, 19 Jul 2023 08:16:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230353AbjGSIQp (ORCPT ); Wed, 19 Jul 2023 04:16:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230297AbjGSIQm (ORCPT ); Wed, 19 Jul 2023 04:16:42 -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 301C31723 for ; Wed, 19 Jul 2023 01:16:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689754559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZeeOgXhUO/vClYx94S4+R9MkQtXVmG+u/hRQc6B/8fg=; b=E+vqcRu3amLfTYSu3qF/AsiafGcSiWllMCU4dgyMWT6NiUAXn97SynoSBLdVY1oLFWLeDb IOYw+1Ry3qRu1M9f9S/t4t64pSw5t2BOMikk+oCJYZyMCXkDAwm/LMN9mRV3UlSJT60b6H SvOqUE5oFbPpyPQPIcwDuJ6iqe3AM+o= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-230-iunWBkVXOs2te5-YFSY54w-1; Wed, 19 Jul 2023 04:15:58 -0400 X-MC-Unique: iunWBkVXOs2te5-YFSY54w-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-31443e13f9dso3833220f8f.0 for ; Wed, 19 Jul 2023 01:15:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689754557; x=1690359357; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZeeOgXhUO/vClYx94S4+R9MkQtXVmG+u/hRQc6B/8fg=; b=i0HMPtUH/NUH+mnMFL9GrpSUZ2rWdFhhKpXQe4PYDnrAFxaFXNhp5KwPZ96TZPYnts Bu/gLzS+kMFz/QC0osP/kWyQD857yYbXBQVyHShzbn4veYu2lQyA3xpj0JKGzA5c011O cb0IwAU9zj1ehxi9VQloXB2ckfuJviDUDtw4uC7Cu4ielKfwSGjJBeWviytx7WD4DLhE WYv7+J8i81WNAYom20cWSULYTf8GyydnNinZ9lLBN0UY4P10nnJPDLajNy2yRoTrUwGa +C9W52lEhm0gWyu2ie00M8s8tyxKsFWe7bftrhoWYYXjfoqSOJ5R0nGOjh97IF3JgjVL 7f1Q== X-Gm-Message-State: ABy/qLa+BBCGauEwFRvrzht3O9eVSa/bAaE8zySIeZzw+xD5hfSdm9OD vRXI+a9bQ1ryw7DiQWQjBp5WFkAgxI19wnqhz0SY4BxmNuAZlusIBtUYkoHolPn/DD36wDUGPvH zWBgYfbnxxV67s6EoFXxpg+o= X-Received: by 2002:adf:d092:0:b0:314:220d:7 with SMTP id y18-20020adfd092000000b00314220d0007mr3554061wrh.45.1689754557219; Wed, 19 Jul 2023 01:15:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlGY2y+prWD5XWLGQGaYZwypVJIFXzKlEB9j8IG51gxmAdkABEIdv/HLlPZUPrtR3g7NYLDxrQ== X-Received: by 2002:adf:d092:0:b0:314:220d:7 with SMTP id y18-20020adfd092000000b00314220d0007mr3554049wrh.45.1689754556937; Wed, 19 Jul 2023 01:15:56 -0700 (PDT) Received: from minerva.home (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id d5-20020a5d5385000000b0031423a8f4f7sm4574354wrv.56.2023.07.19.01.15.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 01:15:56 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Thomas Zimmermann , Geert Uytterhoeven , Arnd Bergmann , Javier Martinez Canillas , Andy Shevchenko , Borislav Petkov , Daniel Thompson , Daniel Vetter , Dave Hansen , Greg Kroah-Hartman , "H. Peter Anvin" , Helge Deller , Ingo Molnar , Jingoo Han , Lee Jones , Randy Dunlap , Sam Ravnborg , Thomas Gleixner , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, x86@kernel.org Subject: [PATCH v6 3/4] fbdev: Split frame buffer support in FB and FB_CORE symbols Date: Wed, 19 Jul 2023 10:15:37 +0200 Message-ID: <20230719081544.741051-4-javierm@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230719081544.741051-1-javierm@redhat.com> References: <20230719081544.741051-1-javierm@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Currently the CONFIG_FB option has to be enabled even if no legacy fbdev drivers are needed (e.g: only to have support for framebuffer consoles). The DRM subsystem has a fbdev emulation layer, but depends on CONFIG_FB and so it can only be enabled if that dependency is enabled as well. That means fbdev drivers have to be explicitly disabled if users want to enable CONFIG_FB, only to use fbcon and/or the DRM fbdev emulation layer. This patch introduces a non-visible CONFIG_FB_CORE symbol that could be enabled just to have core support needed for CONFIG_DRM_FBDEV_EMULATION, allowing CONFIG_FB to be disabled (and automatically disabling all the fbdev drivers). Nothing from fb_backlight.o and fbmon.o is used by the DRM fbdev emulation layer so these two objects can be compiled out when CONFIG_FB is disabled. Signed-off-by: Javier Martinez Canillas Reviewed-by: Arnd Bergmann Tested-by: Arnd Bergmann --- Changes in v6: - Fix link error when CONFIG_FB_CORE=y and CONFIG_FB=m (Arnd Bergmann). Changes in v5: - Fix ifdef guard check in drivers/video/backlight/backlight.c (Arnd Bergmann). Changes in v4: - Fix menuconfig hierarchy that was broken in v3 (Arnd Bergmann). Changes in v3: - Really make a hidden symbol by removing the prompt (Arnd Bergmann). - Change FB_CORE to config instead of menuconfig (Arnd Bergmann). - Keep "depends on FB" for FIRMWARE_EDID (Arnd Bergmann). - Compile out fb_backlight.o and fbmon.o that are only needed for FB (Arnd Bergmann). - Make FB_DEVICE to depend on FB_CORE instead of selecting it. Changes in v2: - Keep "depends on FB" for FB_DDC, FB_HECUBA, FB_SVGALIB, FB_MACMODES, FB_BACKLIGHT, FB_MODE_HELPERS and FB_TILEBLITTING (Arnd Bergmann). - Don't change the fb.o object name (Arnd Bergmann). - Make FB_CORE a non-visible Kconfig symbol instead (Thomas Zimmermann). arch/x86/Makefile | 2 +- arch/x86/video/Makefile | 2 +- drivers/video/backlight/backlight.c | 6 +++--- drivers/video/console/Kconfig | 2 +- drivers/video/fbdev/Kconfig | 10 ++++++++-- drivers/video/fbdev/core/Kconfig | 30 ++++++++++++++++------------- drivers/video/fbdev/core/Makefile | 10 ++++++---- 7 files changed, 37 insertions(+), 25 deletions(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index b39975977c03..89a02e69be5f 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -259,7 +259,7 @@ drivers-$(CONFIG_PCI) += arch/x86/pci/ # suspend and hibernation support drivers-$(CONFIG_PM) += arch/x86/power/ -drivers-$(CONFIG_FB) += arch/x86/video/ +drivers-$(CONFIG_FB_CORE) += arch/x86/video/ #### # boot loader support. Several targets are kept for legacy purposes diff --git a/arch/x86/video/Makefile b/arch/x86/video/Makefile index 11640c116115..5ebe48752ffc 100644 --- a/arch/x86/video/Makefile +++ b/arch/x86/video/Makefile @@ -1,2 +1,2 @@ # SPDX-License-Identifier: GPL-2.0-only -obj-$(CONFIG_FB) += fbdev.o +obj-$(CONFIG_FB_CORE) += fbdev.o diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 9a885d398c22..86e1cdc8e369 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -79,8 +79,8 @@ static const char *const backlight_scale_types[] = { [BACKLIGHT_SCALE_NON_LINEAR] = "non-linear", }; -#if defined(CONFIG_FB) || (defined(CONFIG_FB_MODULE) && \ - defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)) +#if defined(CONFIG_FB_CORE) || (defined(CONFIG_FB_CORE_MODULE) && \ + defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)) /* * fb_notifier_callback * @@ -155,7 +155,7 @@ static inline int backlight_register_fb(struct backlight_device *bd) static inline void backlight_unregister_fb(struct backlight_device *bd) { } -#endif /* CONFIG_FB */ +#endif /* CONFIG_FB_CORE */ static void backlight_generate_event(struct backlight_device *bd, enum backlight_update_reason reason) diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index a2a88d42edf0..1b5a319971ed 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig @@ -72,7 +72,7 @@ config DUMMY_CONSOLE_ROWS config FRAMEBUFFER_CONSOLE bool "Framebuffer Console support" - depends on FB && !UML + depends on FB_CORE && !UML select VT_HW_CONSOLE_BINDING select CRC32 select FONT_SUPPORT diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index ed881d5b3ee0..c0b0419e98b6 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -4,9 +4,9 @@ # menuconfig FB - tristate "Support for frame buffer devices" + tristate "Support for frame buffer device drivers" + select FB_CORE select FB_NOTIFY - select VIDEO_CMDLINE help The frame buffer device provides an abstraction for the graphics hardware. It represents the frame buffer of some video hardware and @@ -30,6 +30,12 @@ menuconfig FB for more information. + This enables support for native frame buffer device (fbdev) drivers. + + The DRM subsystem provides support for emulated frame buffer devices + on top of KMS drivers, but this option allows legacy fbdev drivers to + be enabled as well. + Say Y here and to the driver for your graphics board below if you are compiling a kernel for a non-x86 architecture. diff --git a/drivers/video/fbdev/core/Kconfig b/drivers/video/fbdev/core/Kconfig index fd3b7f5b4b7a..528e4dd2199c 100644 --- a/drivers/video/fbdev/core/Kconfig +++ b/drivers/video/fbdev/core/Kconfig @@ -3,6 +3,10 @@ # fbdev core configuration # +config FB_CORE + select VIDEO_CMDLINE + tristate + config FB_NOTIFY bool @@ -23,7 +27,7 @@ config FIRMWARE_EDID config FB_DEVICE bool "Provide legacy /dev/fb* device" - depends on FB + depends on FB_CORE default y help Say Y here if you want the legacy /dev/fb* device file and @@ -39,7 +43,7 @@ config FB_DDC config FB_CFB_FILLRECT tristate - depends on FB + depends on FB_CORE help Include the cfb_fillrect function for generic software rectangle filling. This is used by drivers that don't provide their own @@ -47,7 +51,7 @@ config FB_CFB_FILLRECT config FB_CFB_COPYAREA tristate - depends on FB + depends on FB_CORE help Include the cfb_copyarea function for generic software area copying. This is used by drivers that don't provide their own (accelerated) @@ -55,7 +59,7 @@ config FB_CFB_COPYAREA config FB_CFB_IMAGEBLIT tristate - depends on FB + depends on FB_CORE help Include the cfb_imageblit function for generic software image blitting. This is used by drivers that don't provide their own @@ -63,7 +67,7 @@ config FB_CFB_IMAGEBLIT config FB_CFB_REV_PIXELS_IN_BYTE bool - depends on FB + depends on FB_CORE help Allow generic frame-buffer functions to work on displays with 1, 2 and 4 bits per pixel depths which has opposite order of pixels in @@ -71,7 +75,7 @@ config FB_CFB_REV_PIXELS_IN_BYTE config FB_SYS_FILLRECT tristate - depends on FB + depends on FB_CORE help Include the sys_fillrect function for generic software rectangle filling. This is used by drivers that don't provide their own @@ -79,7 +83,7 @@ config FB_SYS_FILLRECT config FB_SYS_COPYAREA tristate - depends on FB + depends on FB_CORE help Include the sys_copyarea function for generic software area copying. This is used by drivers that don't provide their own (accelerated) @@ -87,7 +91,7 @@ config FB_SYS_COPYAREA config FB_SYS_IMAGEBLIT tristate - depends on FB + depends on FB_CORE help Include the sys_imageblit function for generic software image blitting. This is used by drivers that don't provide their own @@ -126,22 +130,22 @@ endchoice config FB_SYS_FOPS tristate - depends on FB + depends on FB_CORE config FB_DEFERRED_IO bool - depends on FB + depends on FB_CORE config FB_IO_HELPERS bool - depends on FB + depends on FB_CORE select FB_CFB_COPYAREA select FB_CFB_FILLRECT select FB_CFB_IMAGEBLIT config FB_SYS_HELPERS bool - depends on FB + depends on FB_CORE select FB_SYS_COPYAREA select FB_SYS_FILLRECT select FB_SYS_FOPS @@ -149,7 +153,7 @@ config FB_SYS_HELPERS config FB_SYS_HELPERS_DEFERRED bool - depends on FB + depends on FB_CORE select FB_DEFERRED_IO select FB_SYS_HELPERS diff --git a/drivers/video/fbdev/core/Makefile b/drivers/video/fbdev/core/Makefile index 9150bafd9e89..edfde2948e5c 100644 --- a/drivers/video/fbdev/core/Makefile +++ b/drivers/video/fbdev/core/Makefile @@ -1,10 +1,12 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_FB_NOTIFY) += fb_notify.o -obj-$(CONFIG_FB) += fb.o -fb-y := fb_backlight.o \ - fb_info.o \ - fbmem.o fbmon.o fbcmap.o \ +obj-$(CONFIG_FB_CORE) += fb.o +fb-y := fb_info.o \ + fbmem.o fbcmap.o \ modedb.o fbcvt.o fb_cmdline.o fb_io_fops.o +ifdef CONFIG_FB +fb-y += fb_backlight.o fbmon.o +endif fb-$(CONFIG_FB_DEFERRED_IO) += fb_defio.o fb-$(CONFIG_FB_DEVICE) += fb_chrdev.o \ fb_procfs.o \