fbdev-less i915, take 2
Subsystems (18)
cover fbdev-less i915, take 2
Hi all,
By popular demand (our embedded guys kept asking for this) I've resurrected my fbdev less patches. Now Rob's msm driver can be completely completely without CONFIG_FB stuff at all when disabling the fbdev helper support.
Review highly welcome.
Cheers, Daniel
Daniel Vetter (3):
drm: Add separate Kconfig option for fbdev helpers drm/i915: Kconfig option to disable the legacy fbdev support drm/i915: rename intel_fb.c to intel_fbdev.c
drivers/gpu/drm/Kconfig | 69 ++------ drivers/gpu/drm/Makefile | 3 +- drivers/gpu/drm/ast/Kconfig | 1 + drivers/gpu/drm/cirrus/Kconfig | 1 + drivers/gpu/drm/drm_crtc_helper.c | 4 + drivers/gpu/drm/drm_fb_helper.c | 4 - drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/gma500/Kconfig | 1 + drivers/gpu/drm/i915/Kconfig | 67 ++++++++ drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_debugfs.c | 9 +- drivers/gpu/drm/i915/i915_dma.c | 8 +- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/intel_display.c | 12 +- drivers/gpu/drm/i915/intel_drv.h | 36 +++- drivers/gpu/drm/i915/intel_fb.c | 323 ----------------------------------- drivers/gpu/drm/i915/intel_fbdev.c | 323 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/mgag200/Kconfig | 1 + drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/nouveau/Kconfig | 1 + drivers/gpu/drm/omapdrm/Kconfig | 1 + drivers/gpu/drm/qxl/Kconfig | 1 + drivers/gpu/drm/rcar-du/Kconfig | 1 + drivers/gpu/drm/shmobile/Kconfig | 1 + drivers/gpu/drm/tilcdc/Kconfig | 1 + drivers/gpu/drm/udl/Kconfig | 1 + drivers/gpu/host1x/drm/Kconfig | 1 + drivers/staging/imx-drm/Kconfig | 1 + 28 files changed, 477 insertions(+), 401 deletions(-) create mode 100644 drivers/gpu/drm/i915/Kconfig delete mode 100644 drivers/gpu/drm/i915/intel_fb.c create mode 100644 drivers/gpu/drm/i915/intel_fbdev.c
Signature · 1 line
1.8.1.4
PATCH 1/3 drm: Add separate Kconfig option for fbdev helpers
For drivers which might want to disable fbdev legacy support.
Select the new option in all drivers for now, so this shouldn't result in any change. Drivers need some work anyway to make fbdev support optional (if they have it implemented, that is), so the recommended way to expose this is by adding per-driver options. At least as long as most drivers don't support disabling the fbdev support.
v2: Update for new drm drivers msm and rcar-du. Note that Rob's msm driver can already take advantage of this, which allows us to build msm without any fbdev depencies in the kernel!
v3: Move the MODULE_* stuff from the fbdev helper file to drm_crtc_helper.c.
--- drivers/gpu/drm/Kconfig | 11 ++++++++++- drivers/gpu/drm/Makefile | 3 ++- drivers/gpu/drm/ast/Kconfig | 1 + drivers/gpu/drm/cirrus/Kconfig | 1 + drivers/gpu/drm/drm_crtc_helper.c | 4 ++++ drivers/gpu/drm/drm_fb_helper.c | 4 ---- drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/gma500/Kconfig | 1 + drivers/gpu/drm/mgag200/Kconfig | 1 + drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/nouveau/Kconfig | 1 + drivers/gpu/drm/omapdrm/Kconfig | 1 + drivers/gpu/drm/qxl/Kconfig | 1 + drivers/gpu/drm/rcar-du/Kconfig | 1 + drivers/gpu/drm/shmobile/Kconfig | 1 + drivers/gpu/drm/tilcdc/Kconfig | 1 + drivers/gpu/drm/udl/Kconfig | 1 + drivers/gpu/host1x/drm/Kconfig | 1 + drivers/staging/imx-drm/Kconfig | 1 + 19 files changed, 31 insertions(+), 6 deletions(-)
drivers/gpu/drm/Kconfig +10 -1
@@ -29,11 +29,17 @@ config DRM_USB config DRM_KMS_HELPER tristate depends on DRM + help + CRTC helpers for KMS drivers. + +config DRM_KMS_FB_HELPER + bool + depends on DRM_KMS_HELPER select FB select FRAMEBUFFER_CONSOLE if !EXPERT select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE help - FB and CRTC helpers for KMS drivers. + FBDEV helpers for KMS drivers. config DRM_LOAD_EDID_FIRMWARE bool "Allow to specify an EDID data set instead of probing for it"
@@ -64,6 +70,7 @@ config DRM_GEM_CMA_HELPER config DRM_KMS_CMA_HELPER bool select DRM_GEM_CMA_HELPER + select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT
@@ -96,6 +103,7 @@ config DRM_RADEON select FB_CFB_IMAGEBLIT select FW_LOADER select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM select POWER_SUPPLY select HWMON
@@ -130,6 +138,7 @@ config DRM_I915 select SHMEM select TMPFS select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT
drivers/gpu/drm/Makefile +2 -1
@@ -21,8 +21,9 @@ drm-$(CONFIG_PCI) += ati_pcigart.o drm-usb-y := drm_usb.o -drm_kms_helper-y := drm_fb_helper.o drm_crtc_helper.o drm_dp_helper.o +drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o +drm_kms_helper-$(CONFIG_DRM_KMS_FB_HELPER) += drm_fb_helper.o drm_kms_helper-$(CONFIG_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
drivers/gpu/drm/ast/Kconfig +1 -0
@@ -6,6 +6,7 @@ config DRM_AST select FB_SYS_FILLRECT select FB_SYS_IMAGEBLIT select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM help Say yes for experimental AST GPU driver. Do not enable
drivers/gpu/drm/cirrus/Kconfig +1 -0
@@ -5,6 +5,7 @@ config DRM_CIRRUS_QEMU select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM help This is a KMS driver for emulated cirrus device in qemu.
drivers/gpu/drm/drm_crtc_helper.c +4 -0
@@ -39,6 +39,10 @@#include <drm/drm_fb_helper.h> #include <drm/drm_edid.h> +MODULE_AUTHOR ("David Airlie, Jesse Barnes" ); +MODULE_DESCRIPTION ("DRM KMS helper" ); +MODULE_LICENSE ("GPL and additional rights" ); +/** * drm_helper_move_panel_connectors_to_head() - move panels to the front in the * connector list
drivers/gpu/drm/drm_fb_helper.c +0 -4
@@ -39,10 +39,6 @@#include <drm/drm_fb_helper.h> #include <drm/drm_crtc_helper.h> -MODULE_AUTHOR ("David Airlie, Jesse Barnes" ); -MODULE_DESCRIPTION ("DRM KMS helper" ); -MODULE_LICENSE ("GPL and additional rights" ); -static LIST_HEAD (kernel_fb_helper_list);/**
drivers/gpu/drm/exynos/Kconfig +1 -0
@@ -2,6 +2,7 @@ config DRM_EXYNOS tristate "DRM Support for Samsung SoC EXYNOS Series" depends on OF && DRM && (PLAT_SAMSUNG || ARCH_MULTIPLATFORM) select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT
drivers/gpu/drm/gma500/Kconfig +1 -0
@@ -5,6 +5,7 @@ config DRM_GMA500 select FB_CFB_FILLRECT select FB_CFB_IMAGEBLIT select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM # GMA500 depends on ACPI_VIDEO when ACPI is enabled, just like i915 select ACPI_VIDEO if ACPI
drivers/gpu/drm/mgag200/Kconfig +1 -0
@@ -5,6 +5,7 @@ config DRM_MGAG200 select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM help This is a KMS driver for the MGA G200 server chips, it
drivers/gpu/drm/msm/Kconfig +1 -0
@@ -14,6 +14,7 @@ config DRM_MSM config DRM_MSM_FBDEV bool "Enable legacy fbdev support for MSM modesetting driver" depends on DRM_MSM + select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT
drivers/gpu/drm/nouveau/Kconfig +1 -0
@@ -3,6 +3,7 @@ config DRM_NOUVEAU depends on DRM && PCI select FW_LOADER select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM select FB_CFB_FILLRECT select FB_CFB_COPYAREA
drivers/gpu/drm/omapdrm/Kconfig +1 -0
@@ -5,6 +5,7 @@ config DRM_OMAP depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM depends on OMAP2_DSS select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT
drivers/gpu/drm/qxl/Kconfig +1 -0
@@ -6,6 +6,7 @@ config DRM_QXL select FB_SYS_IMAGEBLIT select FB_DEFERRED_IO select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM help QXL virtual GPU for Spice virtualization desktop integration. Do not enable this driver unless your distro ships a corresponding X.org QXL driver that can handle kernel modesetting.
drivers/gpu/drm/rcar-du/Kconfig +1 -0
@@ -4,6 +4,7 @@ config DRM_RCAR_DU select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER + select DRM_KMS_FB_HELPER help Choose this option if you have an R-Car chipset. If M is selected the module will be called rcar-du-drm.
drivers/gpu/drm/shmobile/Kconfig +1 -0
@@ -2,6 +2,7 @@ config DRM_SHMOBILE tristate "DRM Support for SH Mobile" depends on DRM && (ARM || SUPERH) select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER help
drivers/gpu/drm/tilcdc/Kconfig +1 -0
@@ -2,6 +2,7 @@ config DRM_TILCDC tristate "DRM Support for TI LCDC Display Controller" depends on DRM && OF && ARM select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER select VIDEOMODE_HELPERS
drivers/gpu/drm/udl/Kconfig +1 -0
@@ -8,6 +8,7 @@ config DRM_UDL select FB_SYS_IMAGEBLIT select FB_DEFERRED_IO select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER help This is a KMS driver for the USB displaylink video adapters. Say M/Y to add support for these devices via drm/kms interfaces.
drivers/gpu/host1x/drm/Kconfig +1 -0
@@ -2,6 +2,7 @@ config DRM_TEGRA bool "NVIDIA Tegra DRM" depends on DRM select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT
drivers/staging/imx-drm/Kconfig +1 -0
@@ -1,6 +1,7 @@ config DRM_IMX tristate "DRM Support for Freescale i.MX" select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select VIDEOMODE_HELPERS select DRM_GEM_CMA_HELPER select DRM_KMS_CMA_HELPER
Signature · 1 line
1.8.1.4
Re: [PATCH 1/3] drm: Add separate Kconfig option for fbdev helpers
Quoted 12 lines · Daniel Vetter
For drivers which might want to disable fbdev legacy support.
Select the new option in all drivers for now, so this shouldn't result in any change. Drivers need some work anyway to make fbdev support optional (if they have it implemented, that is), so the recommended way to expose this is by adding per-driver options. At least as long as most drivers don't support disabling the fbdev support.
v2: Update for new drm drivers msm and rcar-du. Note that Rob's msm driver can already take advantage of this, which allows us to build msm without any fbdev depencies in the kernel!
Quoted 6 lines
v3: Move the MODULE_* stuff from the fbdev helper file to
drm_crtc_helper.c.Cc David Herrmann <[email protected]>Cc Rob Clark <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
\o/-by: Rob Clark <[email protected]>
(and also:
)
Quoted 297 lines
--- drivers/gpu/drm/Kconfig | 11 ++++++++++- drivers/gpu/drm/Makefile | 3 ++- drivers/gpu/drm/ast/Kconfig | 1 + drivers/gpu/drm/cirrus/Kconfig | 1 + drivers/gpu/drm/drm_crtc_helper.c | 4 ++++ drivers/gpu/drm/drm_fb_helper.c | 4 ---- drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/gma500/Kconfig | 1 + drivers/gpu/drm/mgag200/Kconfig | 1 + drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/nouveau/Kconfig | 1 + drivers/gpu/drm/omapdrm/Kconfig | 1 + drivers/gpu/drm/qxl/Kconfig | 1 + drivers/gpu/drm/rcar-du/Kconfig | 1 + drivers/gpu/drm/shmobile/Kconfig | 1 + drivers/gpu/drm/tilcdc/Kconfig | 1 + drivers/gpu/drm/udl/Kconfig | 1 + drivers/gpu/host1x/drm/Kconfig | 1 + drivers/staging/imx-drm/Kconfig | 1 + 19 files changed, 31 insertions(+), 6 deletions(-)drivers/gpu/drm/Kconfig +10
-1@@ -29,11 +29,17 @@ config DRM_USB config DRM_KMS_HELPER tristate depends on DRM + help + CRTC helpers for KMS drivers. + +config DRM_KMS_FB_HELPER + bool + depends on DRM_KMS_HELPER select FB select FRAMEBUFFER_CONSOLE if !EXPERT select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE help - FB and CRTC helpers for KMS drivers. + FBDEV helpers for KMS drivers. config DRM_LOAD_EDID_FIRMWARE bool "Allow to specify an EDID data set instead of probing for it"@@ -64,6 +70,7 @@ config DRM_GEM_CMA_HELPER config DRM_KMS_CMA_HELPER bool select DRM_GEM_CMA_HELPER + select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT@@ -96,6 +103,7 @@ config DRM_RADEON select FB_CFB_IMAGEBLIT select FW_LOADER select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM select POWER_SUPPLY select HWMON@@ -130,6 +138,7 @@ config DRM_I915 select SHMEM select TMPFS select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLITdrivers/gpu/drm/Makefile +2
-1@@ -21,8 +21,9 @@ drm-$(CONFIG_PCI) += ati_pcigart.o drm-usb-y := drm_usb.o -drm_kms_helper-y := drm_fb_helper.o drm_crtc_helper.o drm_dp_helper.o +drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o +drm_kms_helper-$(CONFIG_DRM_KMS_FB_HELPER) += drm_fb_helper.o drm_kms_helper-$(CONFIG_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.odrivers/gpu/drm/ast/Kconfig +1
-0@@ -6,6 +6,7 @@ config DRM_AST select FB_SYS_FILLRECT select FB_SYS_IMAGEBLIT select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM help Say yes for experimental AST GPU driver. Do not enabledrivers/gpu/drm/cirrus/Kconfig +1
-0@@ -5,6 +5,7 @@ config DRM_CIRRUS_QEMU select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM help This is a KMS driver for emulated cirrus device in qemu.drivers/gpu/drm/drm_crtc_helper.c +4
-0@@ -39,6 +39,10 @@#include <drm/drm_fb_helper.h> #include <drm/drm_edid.h> +MODULE_AUTHOR ("David Airlie, Jesse Barnes" ); +MODULE_DESCRIPTION ("DRM KMS helper" ); +MODULE_LICENSE ("GPL and additional rights" ); +/** * drm_helper_move_panel_connectors_to_head() - move panels to the front in the * connector list drivers/gpu/drm/drm_fb_helper.c +0
-4@@ -39,10 +39,6 @@#include <drm/drm_fb_helper.h> #include <drm/drm_crtc_helper.h> -MODULE_AUTHOR ("David Airlie, Jesse Barnes" ); -MODULE_DESCRIPTION ("DRM KMS helper" ); -MODULE_LICENSE ("GPL and additional rights" ); -static LIST_HEAD (kernel_fb_helper_list);/** drivers/gpu/drm/exynos/Kconfig +1
-0@@ -2,6 +2,7 @@ config DRM_EXYNOS tristate "DRM Support for Samsung SoC EXYNOS Series" depends on OF && DRM && (PLAT_SAMSUNG || ARCH_MULTIPLATFORM) select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLITdrivers/gpu/drm/gma500/Kconfig +1
-0@@ -5,6 +5,7 @@ config DRM_GMA500 select FB_CFB_FILLRECT select FB_CFB_IMAGEBLIT select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM # GMA500 depends on ACPI_VIDEO when ACPI is enabled, just like i915 select ACPI_VIDEO if ACPIdrivers/gpu/drm/mgag200/Kconfig +1
-0@@ -5,6 +5,7 @@ config DRM_MGAG200 select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM help This is a KMS driver for the MGA G200 server chips, itdrivers/gpu/drm/msm/Kconfig +1
-0@@ -14,6 +14,7 @@ config DRM_MSM config DRM_MSM_FBDEV bool "Enable legacy fbdev support for MSM modesetting driver" depends on DRM_MSM + select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLITdrivers/gpu/drm/nouveau/Kconfig +1
-0@@ -3,6 +3,7 @@ config DRM_NOUVEAU depends on DRM && PCI select FW_LOADER select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM select FB_CFB_FILLRECT select FB_CFB_COPYAREAdrivers/gpu/drm/omapdrm/Kconfig +1
-0@@ -5,6 +5,7 @@ config DRM_OMAP depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM depends on OMAP2_DSS select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLITdrivers/gpu/drm/qxl/Kconfig +1
-0@@ -6,6 +6,7 @@ config DRM_QXL select FB_SYS_IMAGEBLIT select FB_DEFERRED_IO select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM help QXL virtual GPU for Spice virtualization desktop integration. Do not enable this driver unless your distro ships a corresponding X.org QXL driver that can handle kernel modesetting.drivers/gpu/drm/rcar-du/Kconfig +1
-0@@ -4,6 +4,7 @@ config DRM_RCAR_DU select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER + select DRM_KMS_FB_HELPER help Choose this option if you have an R-Car chipset. If M is selected the module will be called rcar-du-drm.drivers/gpu/drm/shmobile/Kconfig +1
-0@@ -2,6 +2,7 @@ config DRM_SHMOBILE tristate "DRM Support for SH Mobile" depends on DRM && (ARM || SUPERH) select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER helpdrivers/gpu/drm/tilcdc/Kconfig +1
-0@@ -2,6 +2,7 @@ config DRM_TILCDC tristate "DRM Support for TI LCDC Display Controller" depends on DRM && OF && ARM select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER select VIDEOMODE_HELPERSdrivers/gpu/drm/udl/Kconfig +1
-0@@ -8,6 +8,7 @@ config DRM_UDL select FB_SYS_IMAGEBLIT select FB_DEFERRED_IO select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER help This is a KMS driver for the USB displaylink video adapters. Say M/Y to add support for these devices via drm/kms interfaces.drivers/gpu/host1x/drm/Kconfig +1
-0@@ -2,6 +2,7 @@ config DRM_TEGRA bool "NVIDIA Tegra DRM" depends on DRM select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLITdrivers/staging/imx-drm/Kconfig +1
-1@@ -1,6 +1,7 @@ config DRM_IMX tristate "DRM Support for Freescale i.MX" select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select VIDEOMODE_HELPERS select DRM_GEM_CMA_HELPER select DRM_KMS_CMA_HELPER --1.8.1.4
Re: [PATCH 1/3] drm: Add separate Kconfig option for fbdev helpers
Quoted 20 lines · Rob Clark
Quoted 12 lines · Daniel Vetter
For drivers which might want to disable fbdev legacy support.
Select the new option in all drivers for now, so this shouldn't result in any change. Drivers need some work anyway to make fbdev support optional (if they have it implemented, that is), so the recommended way to expose this is by adding per-driver options. At least as long as most drivers don't support disabling the fbdev support.
v2: Update for new drm drivers msm and rcar-du. Note that Rob's msm driver can already take advantage of this, which allows us to build msm without any fbdev depencies in the kernel!
Quoted 6 lines
v3: Move the MODULE_* stuff from the fbdev helper file to
drm_crtc_helper.c.Cc David Herrmann <[email protected]>Cc Rob Clark <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Quoted 5 lines
\o/-by: Rob Clark <[email protected]>
(and also:
Reviewed-by Rob Clark <[email protected]>)
Thanks for the review, patch merged to drm-intel-next with Dave's ack on irc.
-Daniel
Quoted 298 lines
Quoted 298 lines
--- drivers/gpu/drm/Kconfig | 11 ++++++++++- drivers/gpu/drm/Makefile | 3 ++- drivers/gpu/drm/ast/Kconfig | 1 + drivers/gpu/drm/cirrus/Kconfig | 1 + drivers/gpu/drm/drm_crtc_helper.c | 4 ++++ drivers/gpu/drm/drm_fb_helper.c | 4 ---- drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/gma500/Kconfig | 1 + drivers/gpu/drm/mgag200/Kconfig | 1 + drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/nouveau/Kconfig | 1 + drivers/gpu/drm/omapdrm/Kconfig | 1 + drivers/gpu/drm/qxl/Kconfig | 1 + drivers/gpu/drm/rcar-du/Kconfig | 1 + drivers/gpu/drm/shmobile/Kconfig | 1 + drivers/gpu/drm/tilcdc/Kconfig | 1 + drivers/gpu/drm/udl/Kconfig | 1 + drivers/gpu/host1x/drm/Kconfig | 1 + drivers/staging/imx-drm/Kconfig | 1 + 19 files changed, 31 insertions(+), 6 deletions(-)drivers/gpu/drm/Kconfig +10
-1@@ -29,11 +29,17 @@ config DRM_USB config DRM_KMS_HELPER tristate depends on DRM + help + CRTC helpers for KMS drivers. + +config DRM_KMS_FB_HELPER + bool + depends on DRM_KMS_HELPER select FB select FRAMEBUFFER_CONSOLE if !EXPERT select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE help - FB and CRTC helpers for KMS drivers. + FBDEV helpers for KMS drivers. config DRM_LOAD_EDID_FIRMWARE bool "Allow to specify an EDID data set instead of probing for it"@@ -64,6 +70,7 @@ config DRM_GEM_CMA_HELPER config DRM_KMS_CMA_HELPER bool select DRM_GEM_CMA_HELPER + select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT@@ -96,6 +103,7 @@ config DRM_RADEON select FB_CFB_IMAGEBLIT select FW_LOADER select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM select POWER_SUPPLY select HWMON@@ -130,6 +138,7 @@ config DRM_I915 select SHMEM select TMPFS select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLITdrivers/gpu/drm/Makefile +2
-1@@ -21,8 +21,9 @@ drm-$(CONFIG_PCI) += ati_pcigart.o drm-usb-y := drm_usb.o -drm_kms_helper-y := drm_fb_helper.o drm_crtc_helper.o drm_dp_helper.o +drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o +drm_kms_helper-$(CONFIG_DRM_KMS_FB_HELPER) += drm_fb_helper.o drm_kms_helper-$(CONFIG_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.odrivers/gpu/drm/ast/Kconfig +1
-0@@ -6,6 +6,7 @@ config DRM_AST select FB_SYS_FILLRECT select FB_SYS_IMAGEBLIT select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM help Say yes for experimental AST GPU driver. Do not enabledrivers/gpu/drm/cirrus/Kconfig +1
-0@@ -5,6 +5,7 @@ config DRM_CIRRUS_QEMU select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM help This is a KMS driver for emulated cirrus device in qemu.drivers/gpu/drm/drm_crtc_helper.c +4
-0@@ -39,6 +39,10 @@#include <drm/drm_fb_helper.h> #include <drm/drm_edid.h> +MODULE_AUTHOR ("David Airlie, Jesse Barnes" ); +MODULE_DESCRIPTION ("DRM KMS helper" ); +MODULE_LICENSE ("GPL and additional rights" ); +/** * drm_helper_move_panel_connectors_to_head() - move panels to the front in the * connector list drivers/gpu/drm/drm_fb_helper.c +0
-4@@ -39,10 +39,6 @@#include <drm/drm_fb_helper.h> #include <drm/drm_crtc_helper.h> -MODULE_AUTHOR ("David Airlie, Jesse Barnes" ); -MODULE_DESCRIPTION ("DRM KMS helper" ); -MODULE_LICENSE ("GPL and additional rights" ); -static LIST_HEAD (kernel_fb_helper_list);/** drivers/gpu/drm/exynos/Kconfig +1
-0@@ -2,6 +2,7 @@ config DRM_EXYNOS tristate "DRM Support for Samsung SoC EXYNOS Series" depends on OF && DRM && (PLAT_SAMSUNG || ARCH_MULTIPLATFORM) select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLITdrivers/gpu/drm/gma500/Kconfig +1
-0@@ -5,6 +5,7 @@ config DRM_GMA500 select FB_CFB_FILLRECT select FB_CFB_IMAGEBLIT select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM # GMA500 depends on ACPI_VIDEO when ACPI is enabled, just like i915 select ACPI_VIDEO if ACPIdrivers/gpu/drm/mgag200/Kconfig +1
-0@@ -5,6 +5,7 @@ config DRM_MGAG200 select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM help This is a KMS driver for the MGA G200 server chips, itdrivers/gpu/drm/msm/Kconfig +1
-0@@ -14,6 +14,7 @@ config DRM_MSM config DRM_MSM_FBDEV bool "Enable legacy fbdev support for MSM modesetting driver" depends on DRM_MSM + select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLITdrivers/gpu/drm/nouveau/Kconfig +1
-0@@ -3,6 +3,7 @@ config DRM_NOUVEAU depends on DRM && PCI select FW_LOADER select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM select FB_CFB_FILLRECT select FB_CFB_COPYAREAdrivers/gpu/drm/omapdrm/Kconfig +1
-0@@ -5,6 +5,7 @@ config DRM_OMAP depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM depends on OMAP2_DSS select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLITdrivers/gpu/drm/qxl/Kconfig +1
-0@@ -6,6 +6,7 @@ config DRM_QXL select FB_SYS_IMAGEBLIT select FB_DEFERRED_IO select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_TTM help QXL virtual GPU for Spice virtualization desktop integration. Do not enable this driver unless your distro ships a corresponding X.org QXL driver that can handle kernel modesetting.drivers/gpu/drm/rcar-du/Kconfig +1
-0@@ -4,6 +4,7 @@ config DRM_RCAR_DU select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER + select DRM_KMS_FB_HELPER help Choose this option if you have an R-Car chipset. If M is selected the module will be called rcar-du-drm.drivers/gpu/drm/shmobile/Kconfig +1
-0@@ -2,6 +2,7 @@ config DRM_SHMOBILE tristate "DRM Support for SH Mobile" depends on DRM && (ARM || SUPERH) select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER helpdrivers/gpu/drm/tilcdc/Kconfig +1
-0@@ -2,6 +2,7 @@ config DRM_TILCDC tristate "DRM Support for TI LCDC Display Controller" depends on DRM && OF && ARM select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER select VIDEOMODE_HELPERSdrivers/gpu/drm/udl/Kconfig +1
-0@@ -8,6 +8,7 @@ config DRM_UDL select FB_SYS_IMAGEBLIT select FB_DEFERRED_IO select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER help This is a KMS driver for the USB displaylink video adapters. Say M/Y to add support for these devices via drm/kms interfaces.drivers/gpu/host1x/drm/Kconfig +1
-0@@ -2,6 +2,7 @@ config DRM_TEGRA bool "NVIDIA Tegra DRM" depends on DRM select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLITdrivers/staging/imx-drm/Kconfig +1
-1@@ -1,6 +1,7 @@ config DRM_IMX tristate "DRM Support for Freescale i.MX" select DRM_KMS_HELPER + select DRM_KMS_FB_HELPER select VIDEOMODE_HELPERS select DRM_GEM_CMA_HELPER select DRM_KMS_CMA_HELPER --1.8.1.4
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 2/3 drm/i915: Kconfig option to disable the legacy fbdev support
In reply to Daniel VetterBoots Just Fine (tm)!
The only glitch seems to be that at least on Fedora the boot splash gets confused and doesn't display much at all.
And since there's no ugly console flickering anymore in between, the flicker while switching between X servers (VT support is still enabled) is even more jarring.
Also, I'm unsure whether we don't need to somehow kick out vgacon, now that nothing else gets in the way. But stuff seems to work, so I don't care. Also everything still works as well with VGA_CONSOLE=n
Also the #ifdef mess needs a bit of a cleanup, follow-up patches will do just that.
To keep the Kconfig tidy, extract all the i915 options into its own file.
v2:
- Rebase on top of the preliminary hw support option and the intel_drv.h cleanup.
- Shut up warnings in i915_debugfs.c
--- drivers/gpu/drm/Kconfig | 60 +------------------------------- drivers/gpu/drm/i915/Kconfig | 67 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_debugfs.c | 9 ++--- drivers/gpu/drm/i915/i915_dma.c | 6 ++++ drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_display.c | 10 ++++++ drivers/gpu/drm/i915/intel_drv.h | 36 +++++++++++++++---- 8 files changed, 122 insertions(+), 71 deletions(-) create mode 100644 drivers/gpu/drm/i915/Kconfig
drivers/gpu/drm/Kconfig +1 -59
@@ -128,65 +128,7 @@ config DRM_I810 selected, the module will be called i810. AGP support is required for this driver to work. -config DRM_I915 - tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics" - depends on DRM - depends on AGP - depends on AGP_INTEL - # we need shmfs for the swappable backing store, and in particular - # the shmem_readpage() which depends upon tmpfs - select SHMEM - select TMPFS - select DRM_KMS_HELPER - select DRM_KMS_FB_HELPER - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - # i915 depends on ACPI_VIDEO when ACPI is enabled - # but for select to work, need to select ACPI_VIDEO's dependencies, ick - select BACKLIGHT_LCD_SUPPORT if ACPI - select BACKLIGHT_CLASS_DEVICE if ACPI - select VIDEO_OUTPUT_CONTROL if ACPI - select INPUT if ACPI - select THERMAL if ACPI - select ACPI_VIDEO if ACPI - select ACPI_BUTTON if ACPI - help - Choose this option if you have a system that has "Intel Graphics - Media Accelerator" or "HD Graphics" integrated graphics, - including 830M, 845G, 852GM, 855GM, 865G, 915G, 945G, 965G, - G35, G41, G43, G45 chipsets and Celeron, Pentium, Core i3, - Core i5, Core i7 as well as Atom CPUs with integrated graphics. - If M is selected, the module will be called i915. AGP support - is required for this driver to work. This driver is used by - the Intel driver in X.org 6.8 and XFree86 4.4 and above. It - replaces the older i830 module that supported a subset of the - hardware in older X.org releases. - - Note that the older i810/i815 chipsets require the use of the - i810 driver instead, and the Atom z5xx series has an entirely - different implementation. - -config DRM_I915_KMS - bool "Enable modesetting on intel by default" - depends on DRM_I915 - help - Choose this option if you want kernel modesetting enabled by default, - and you have a new enough userspace to support this. Running old - userspaces with this enabled will cause pain. Note that this causes - the driver to bind to PCI devices, which precludes loading things - like intelfb. - -config DRM_I915_PRELIMINARY_HW_SUPPORT - bool "Enable preliminary support for prerelease Intel hardware by default" - depends on DRM_I915 - help - Choose this option if you have prerelease Intel hardware and want the - i915 driver to support it by default. You can enable such support at - runtime with the module option i915.preliminary_hw_support=1; this - option changes the default for that module option. - - If in doubt, say "N". +source "drivers/gpu/drm/i915/Kconfig" config DRM_MGA tristate "Matrox g200/g400"
drivers/gpu/drm/i915/Kconfig new file +67 -0
67 lines not on this page · raw message
drivers/gpu/drm/i915/Makefile +2 -1
@@ -33,7 +33,6 @@ i915-y := i915_drv.o i915_dma.o i915_irq.o \ intel_panel.o \ intel_pm.o \ intel_i2c.o \ - intel_fb.o \ intel_tv.o \ intel_dvo.o \ intel_ringbuffer.o \
@@ -54,6 +53,8 @@ i915-$(CONFIG_COMPAT) += i915_ioc32.o i915-$(CONFIG_ACPI) += intel_acpi.o +i915-$(CONFIG_DRM_I915_FBDEV) += intel_fb.o + obj-$(CONFIG_DRM_I915) += i915.o CFLAGS_i915_trace_points.o := -I$(src)
drivers/gpu/drm/i915/i915_debugfs.c +5 -4
@@ -1399,12 +1399,12 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) {struct drm_info_node *node = (struct drm_info_node *) m->private;struct drm_device *dev = node->minor->dev; -drm_i915_private_t *dev_priv = dev->dev_private; -struct intel_fbdev *ifbdev; +struct intel_fbdev *ifbdev =NULL ;struct intel_framebuffer *fb; -int ret; - ret =mutex_lock_interruptible (&dev->mode_config.mutex); +#ifdef CONFIG_DRM_I915_FBDEV +struct drm_i915_private *dev_priv = dev->dev_private; +int ret =mutex_lock_interruptible (&dev->mode_config.mutex);if (ret)return ret;
@@ -1420,6 +1420,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)describe_obj (m, fb->obj);seq_putc (m,'\n' );mutex_unlock (&dev->mode_config.mutex); +#endif mutex_lock (&dev->mode_config.fb_lock);list_for_each_entry (fb, &dev->mode_config.fb_list, base.head) {
drivers/gpu/drm/i915/i915_dma.c +6 -0
@@ -1416,6 +1416,7 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master) master->driver_priv =NULL ; } +#ifdef CONFIG_FB static void i915_kick_out_firmware_fb (struct drm_i915_private *dev_priv) {struct apertures_struct *ap;
@@ -1436,6 +1437,11 @@ static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) kfree(ap); } +#else +static void i915_kick_out_firmware_fb (struct drm_i915_private *dev_priv) +{ +} +#endif static void i915_dump_device_info (struct drm_i915_private *dev_priv) {
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -1354,8 +1354,10 @@ typedef struct drm_i915_private {struct drm_i915_gem_object *vlv_pctx; +#ifdef CONFIG_DRM_I915_FBDEV /* list of fbdev register on this device */ struct intel_fbdev *fbdev; +#endif /* * The console may be contended at resume, but we don't
drivers/gpu/drm/i915/intel_display.c +10 -0
@@ -7318,6 +7318,7 @@ static struct drm_framebuffer * mode_fits_in_fbdev(struct drm_device *dev, struct drm_display_mode *mode) { +#ifdef CONFIG_DRM_I915_FBDEV struct drm_i915_private *dev_priv = dev->dev_private;struct drm_i915_gem_object *obj;struct drm_framebuffer *fb;
@@ -7338,6 +7339,9 @@ mode_fits_in_fbdev(struct drm_device *dev,return NULL ;return fb; +#else +return NULL ; +#endif } bool intel_get_load_detect_pipe(struct drm_connector *connector,
@@ -10084,6 +10088,12 @@ intel_user_framebuffer_create(struct drm_device *dev,return intel_framebuffer_create (dev, mode_cmd, obj); } +#ifndef CONFIG_DRM_I915_FBDEV +static inline void intel_fb_output_poll_changed (struct drm_device *dev) +{ +} +#endif +static const struct drm_mode_config_funcs intel_mode_funcs = { .fb_create = intel_user_framebuffer_create, .output_poll_changed = intel_fb_output_poll_changed,
drivers/gpu/drm/i915/intel_drv.h +29 -7
@@ -716,14 +716,36 @@ bool intel_dsi_init(struct drm_device *dev);void intel_dvo_init (struct drm_device *dev); -/* intel_fb.c */ -int intel_fbdev_init (struct drm_device *dev); -void intel_fbdev_initial_config (struct drm_device *dev); -void intel_fbdev_fini (struct drm_device *dev); -void intel_fbdev_set_suspend (struct drm_device *dev,int state); -void intel_fb_output_poll_changed (struct drm_device *dev); -void intel_fb_restore_mode (struct drm_device *dev); +/* legacy fbdev emulation in intel_fb.c */ +#ifdef CONFIG_DRM_I915_FBDEV +extern int intel_fbdev_init (struct drm_device *dev); +extern void intel_fbdev_initial_config (struct drm_device *dev); +extern void intel_fbdev_fini (struct drm_device *dev); +extern void intel_fbdev_set_suspend (struct drm_device *dev,int state); +extern void intel_fb_output_poll_changed (struct drm_device *dev); +extern void intel_fb_restore_mode (struct drm_device *dev); +#else +static inline int intel_fbdev_init (struct drm_device *dev) +{ +return 0 ; +} +static inline void intel_fbdev_initial_config (struct drm_device *dev) +{ +} + +static inline void intel_fbdev_fini (struct drm_device *dev) +{ +} + +static inline void intel_fbdev_set_suspend (struct drm_device *dev,int state) +{ +} + +static inline void intel_fb_restore_mode (struct drm_device *dev) +{ +} +#endif /* intel_hdmi.c */ void intel_hdmi_init (struct drm_device *dev,int hdmi_reg,enum port port);
Signature · 1 line
1.8.1.4
Re: [PATCH 2/3] drm/i915: Kconfig option to disable the legacy fbdev support
drivers/gpu/drm/i915/i915_dma.c void i915_master_destroy(struct drm_device *dev, struct drm_master *master) · line 1419
Quoted 12 lines · Daniel Vetter
drivers/gpu/drm/i915/i915_debugfs.c +0
-0mutex_lock (&dev->mode_config.fb_lock);list_for_each_entry (fb, &dev->mode_config.fb_list, base.head) {drivers/gpu/drm/i915/i915_dma.c +1
-0@@ -1416,6 +1416,7 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master) master->driver_priv =NULL ; } +#ifdef CONFIG_FB
Why use CONFIG_FB here, as this is i915, should use CONFIG_DRM_I915_FBDEV right?
drivers/gpu/drm/i915/i915_dma.c static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) · line 1445
Quoted 13 lines
drivers/gpu/drm/i915/i915_dma.c +5
-0static void i915_kick_out_firmware_fb (struct drm_i915_private *dev_priv) {struct apertures_struct *ap;@@ -1436,6 +1437,11 @@ static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) kfree(ap); } +#else +static void i915_kick_out_firmware_fb (struct drm_i915_private *dev_priv) +{ +} +#endif
Regards,
Chon Ming
PATCH 1/1 drm/i915: Kconfig option to disable the legacy fbdev support
Boots Just Fine (tm)!
The only glitch seems to be that at least on Fedora the boot splash gets confused and doesn't display much at all.
And since there's no ugly console flickering anymore in between, the flicker while switching between X servers (VT support is still enabled) is even more jarring.
Also, I'm unsure whether we don't need to somehow kick out vgacon, now that nothing else gets in the way. But stuff seems to work, so I don't care. Also everything still works as well with VGA_CONSOLE=n
Also the #ifdef mess needs a bit of a cleanup, follow-up patches will do just that.
To keep the Kconfig tidy, extract all the i915 options into its own file.
v2:
- Rebase on top of the preliminary hw support option and the intel_drv.h cleanup.
- Shut up warnings in i915_debugfs.c
v3: Use the right CONFIG variable, spotted by Chon Ming.
--- drivers/gpu/drm/Kconfig | 60 +------------------------------- drivers/gpu/drm/i915/Kconfig | 67 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_debugfs.c | 9 ++--- drivers/gpu/drm/i915/i915_dma.c | 6 ++++ drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_display.c | 10 ++++++ drivers/gpu/drm/i915/intel_drv.h | 36 +++++++++++++++---- 8 files changed, 122 insertions(+), 71 deletions(-) create mode 100644 drivers/gpu/drm/i915/Kconfig
drivers/gpu/drm/Kconfig +1 -59
@@ -128,65 +128,7 @@ config DRM_I810 selected, the module will be called i810. AGP support is required for this driver to work. -config DRM_I915 - tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics" - depends on DRM - depends on AGP - depends on AGP_INTEL - # we need shmfs for the swappable backing store, and in particular - # the shmem_readpage() which depends upon tmpfs - select SHMEM - select TMPFS - select DRM_KMS_HELPER - select DRM_KMS_FB_HELPER - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - # i915 depends on ACPI_VIDEO when ACPI is enabled - # but for select to work, need to select ACPI_VIDEO's dependencies, ick - select BACKLIGHT_LCD_SUPPORT if ACPI - select BACKLIGHT_CLASS_DEVICE if ACPI - select VIDEO_OUTPUT_CONTROL if ACPI - select INPUT if ACPI - select THERMAL if ACPI - select ACPI_VIDEO if ACPI - select ACPI_BUTTON if ACPI - help - Choose this option if you have a system that has "Intel Graphics - Media Accelerator" or "HD Graphics" integrated graphics, - including 830M, 845G, 852GM, 855GM, 865G, 915G, 945G, 965G, - G35, G41, G43, G45 chipsets and Celeron, Pentium, Core i3, - Core i5, Core i7 as well as Atom CPUs with integrated graphics. - If M is selected, the module will be called i915. AGP support - is required for this driver to work. This driver is used by - the Intel driver in X.org 6.8 and XFree86 4.4 and above. It - replaces the older i830 module that supported a subset of the - hardware in older X.org releases. - - Note that the older i810/i815 chipsets require the use of the - i810 driver instead, and the Atom z5xx series has an entirely - different implementation. - -config DRM_I915_KMS - bool "Enable modesetting on intel by default" - depends on DRM_I915 - help - Choose this option if you want kernel modesetting enabled by default, - and you have a new enough userspace to support this. Running old - userspaces with this enabled will cause pain. Note that this causes - the driver to bind to PCI devices, which precludes loading things - like intelfb. - -config DRM_I915_PRELIMINARY_HW_SUPPORT - bool "Enable preliminary support for prerelease Intel hardware by default" - depends on DRM_I915 - help - Choose this option if you have prerelease Intel hardware and want the - i915 driver to support it by default. You can enable such support at - runtime with the module option i915.preliminary_hw_support=1; this - option changes the default for that module option. - - If in doubt, say "N". +source "drivers/gpu/drm/i915/Kconfig" config DRM_MGA tristate "Matrox g200/g400"
drivers/gpu/drm/i915/Kconfig new file +67 -0
67 lines not on this page · raw message
drivers/gpu/drm/i915/Makefile +2 -1
@@ -33,7 +33,6 @@ i915-y := i915_drv.o i915_dma.o i915_irq.o \ intel_panel.o \ intel_pm.o \ intel_i2c.o \ - intel_fb.o \ intel_tv.o \ intel_dvo.o \ intel_ringbuffer.o \
@@ -54,6 +53,8 @@ i915-$(CONFIG_COMPAT) += i915_ioc32.o i915-$(CONFIG_ACPI) += intel_acpi.o +i915-$(CONFIG_DRM_I915_FBDEV) += intel_fb.o + obj-$(CONFIG_DRM_I915) += i915.o CFLAGS_i915_trace_points.o := -I$(src)
drivers/gpu/drm/i915/i915_debugfs.c +5 -4
@@ -1399,12 +1399,12 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) {struct drm_info_node *node = (struct drm_info_node *) m->private;struct drm_device *dev = node->minor->dev; -drm_i915_private_t *dev_priv = dev->dev_private; -struct intel_fbdev *ifbdev; +struct intel_fbdev *ifbdev =NULL ;struct intel_framebuffer *fb; -int ret; - ret =mutex_lock_interruptible (&dev->mode_config.mutex); +#ifdef CONFIG_DRM_I915_FBDEV +struct drm_i915_private *dev_priv = dev->dev_private; +int ret =mutex_lock_interruptible (&dev->mode_config.mutex);if (ret)return ret;
@@ -1420,6 +1420,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)describe_obj (m, fb->obj);seq_putc (m,'\n' );mutex_unlock (&dev->mode_config.mutex); +#endif mutex_lock (&dev->mode_config.fb_lock);list_for_each_entry (fb, &dev->mode_config.fb_list, base.head) {
drivers/gpu/drm/i915/i915_dma.c +6 -0
@@ -1416,6 +1416,7 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master) master->driver_priv =NULL ; } +#ifdef CONFIG_DRM_I915_FBDEV static void i915_kick_out_firmware_fb (struct drm_i915_private *dev_priv) {struct apertures_struct *ap;
@@ -1436,6 +1437,11 @@ static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) kfree(ap); } +#else +static void i915_kick_out_firmware_fb (struct drm_i915_private *dev_priv) +{ +} +#endif static void i915_dump_device_info (struct drm_i915_private *dev_priv) {
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -1354,8 +1354,10 @@ typedef struct drm_i915_private {struct drm_i915_gem_object *vlv_pctx; +#ifdef CONFIG_DRM_I915_FBDEV /* list of fbdev register on this device */ struct intel_fbdev *fbdev; +#endif /* * The console may be contended at resume, but we don't
drivers/gpu/drm/i915/intel_display.c +10 -0
@@ -7318,6 +7318,7 @@ static struct drm_framebuffer * mode_fits_in_fbdev(struct drm_device *dev, struct drm_display_mode *mode) { +#ifdef CONFIG_DRM_I915_FBDEV struct drm_i915_private *dev_priv = dev->dev_private;struct drm_i915_gem_object *obj;struct drm_framebuffer *fb;
@@ -7338,6 +7339,9 @@ mode_fits_in_fbdev(struct drm_device *dev,return NULL ;return fb; +#else +return NULL ; +#endif } bool intel_get_load_detect_pipe(struct drm_connector *connector,
@@ -10084,6 +10088,12 @@ intel_user_framebuffer_create(struct drm_device *dev,return intel_framebuffer_create (dev, mode_cmd, obj); } +#ifndef CONFIG_DRM_I915_FBDEV +static inline void intel_fb_output_poll_changed (struct drm_device *dev) +{ +} +#endif +static const struct drm_mode_config_funcs intel_mode_funcs = { .fb_create = intel_user_framebuffer_create, .output_poll_changed = intel_fb_output_poll_changed,
drivers/gpu/drm/i915/intel_drv.h +29 -7
@@ -716,14 +716,36 @@ bool intel_dsi_init(struct drm_device *dev);void intel_dvo_init (struct drm_device *dev); -/* intel_fb.c */ -int intel_fbdev_init (struct drm_device *dev); -void intel_fbdev_initial_config (struct drm_device *dev); -void intel_fbdev_fini (struct drm_device *dev); -void intel_fbdev_set_suspend (struct drm_device *dev,int state); -void intel_fb_output_poll_changed (struct drm_device *dev); -void intel_fb_restore_mode (struct drm_device *dev); +/* legacy fbdev emulation in intel_fb.c */ +#ifdef CONFIG_DRM_I915_FBDEV +extern int intel_fbdev_init (struct drm_device *dev); +extern void intel_fbdev_initial_config (struct drm_device *dev); +extern void intel_fbdev_fini (struct drm_device *dev); +extern void intel_fbdev_set_suspend (struct drm_device *dev,int state); +extern void intel_fb_output_poll_changed (struct drm_device *dev); +extern void intel_fb_restore_mode (struct drm_device *dev); +#else +static inline int intel_fbdev_init (struct drm_device *dev) +{ +return 0 ; +} +static inline void intel_fbdev_initial_config (struct drm_device *dev) +{ +} + +static inline void intel_fbdev_fini (struct drm_device *dev) +{ +} + +static inline void intel_fbdev_set_suspend (struct drm_device *dev,int state) +{ +} + +static inline void intel_fb_restore_mode (struct drm_device *dev) +{ +} +#endif /* intel_hdmi.c */ void intel_hdmi_init (struct drm_device *dev,int hdmi_reg,enum port port);
Signature · 1 line
1.8.1.4
Re: [Intel-gfx] [PATCH] drm/i915: Kconfig option to disable the legacy fbdev support
Quoted 8 lines · Daniel Vetter
mode_fits_in_fbdev(struct
drm_device*dev,drivers/gpu/drm/i915/intel_display.c +1
-0struct drm_display_mode *mode) { +#ifdef CONFIG_DRM_I915_FBDEV struct drm_i915_private *dev_priv = dev->dev_private;struct drm_i915_gem_object *obj;struct drm_framebuffer *fb;
drivers/gpu/drm/i915/intel_display.c mode_fits_in_fbdev(struct drm_device *dev, · line 7344
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +3
-0@@ -7338,6 +7339,9 @@ mode_fits_in_fbdev(struct drm_device *dev,return NULL ;return fb; +#else +return NULL ; +#endif
This for example is not fbdev specific. There used to be code, extracted from this function, to sanity check that the mode fitted in the fb provided by the user and by the bios. Which caught a few problems in the past.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Re: [PATCH] drm/i915: Kconfig option to disable the legacy fbdev support
Quoted 11 lines · Chris Wilson
Quoted 10 lines · Daniel Vetter
mode_fits_in_fbdev(struct
drm_device*dev,drivers/gpu/drm/i915/intel_display.c +1
-0struct drm_display_mode *mode) { +#ifdef CONFIG_DRM_I915_FBDEV struct drm_i915_private *dev_priv = dev->dev_private;struct drm_i915_gem_object *obj;struct drm_framebuffer *fb;@@ -7338,6 +7339,9 @@ mode_fits_in_fbdev(struct drm_device *dev,return NULL ;
Quoted 9 lines
drivers/gpu/drm/i915/intel_display.c mode_fits_in_fbdev(struct drm_device *dev, · line 7344
Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +3
-0return fb; +#else +return NULL ; +#endif This for example is not fbdev specific. There used to be code, extracted from this function, to sanity check that the mode fitted in the fb provided by the user and by the bios. Which caught a few problems in the past.
Hm, I think we should check the size of the underlying gem bo against the fb we create. Then core drm should take care of all constraint checking.
But the size check in intel_framebuffer_init seems to indeed be missing. I'll add something and submit a patch.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Jani Nikula
maintainerRe: [Intel-gfx] [PATCH] drm/i915: Kconfig option to disable the legacy fbdev support
In reply to Daniel VetterQuoted 13 lines · Daniel Vetter
Boots Just Fine (tm)!
The only glitch seems to be that at least on Fedora the boot splash gets confused and doesn't display much at all.
And since there's no ugly console flickering anymore in between, the flicker while switching between X servers (VT support is still enabled) is even more jarring.
Also, I'm unsure whether we don't need to somehow kick out vgacon, now that nothing else gets in the way. But stuff seems to work, so I don't care. Also everything still works as well with VGA_CONSOLE=n
Quoted 5 lines
Also the #ifdef mess needs a bit of a cleanup, follow-up patches will do just that.
To keep the
Kconfigtidy, extract all the i915 options into its own file.
Obligatory bikeshed: I'd really like the Kconfig move to be a separate prep patch.
BR,
Jani.
Quoted 346 lines
v2:
- Rebase on top of the preliminary hw support option and theintel_drv.hcleanup.
- Shut up warnings ini915_debugfs.cv3: Use the right CONFIG variable, spotted by Chon Ming.
Cc Lee, Chon Ming <[email protected]>Cc David Herrmann <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/Kconfig | 60 +------------------------------- drivers/gpu/drm/i915/Kconfig | 67 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_debugfs.c | 9 ++--- drivers/gpu/drm/i915/i915_dma.c | 6 ++++ drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_display.c | 10 ++++++ drivers/gpu/drm/i915/intel_drv.h | 36 +++++++++++++++---- 8 files changed, 122 insertions(+), 71 deletions(-) create mode 100644 drivers/gpu/drm/i915/Kconfigdrivers/gpu/drm/Kconfig +1
-59@@ -128,65 +128,7 @@ config DRM_I810 selected, the module will be called i810. AGP support is required for this driver to work. -config DRM_I915 - tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics" - depends on DRM - depends on AGP - depends on AGP_INTEL - # we need shmfs for the swappable backing store, and in particular - # the shmem_readpage() which depends upon tmpfs - select SHMEM - select TMPFS - select DRM_KMS_HELPER - select DRM_KMS_FB_HELPER - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - # i915 depends on ACPI_VIDEO when ACPI is enabled - # but for select to work, need to select ACPI_VIDEO's dependencies, ick - select BACKLIGHT_LCD_SUPPORT if ACPI - select BACKLIGHT_CLASS_DEVICE if ACPI - select VIDEO_OUTPUT_CONTROL if ACPI - select INPUT if ACPI - select THERMAL if ACPI - select ACPI_VIDEO if ACPI - select ACPI_BUTTON if ACPI - help - Choose this option if you have a system that has "Intel Graphics - Media Accelerator" or "HD Graphics" integrated graphics, - including 830M, 845G, 852GM, 855GM, 865G, 915G, 945G, 965G, - G35, G41, G43, G45 chipsets and Celeron, Pentium, Core i3, - Core i5, Core i7 as well as Atom CPUs with integrated graphics. - If M is selected, the module will be called i915. AGP support - is required for this driver to work. This driver is used by - the Intel driver in X.org 6.8 and XFree86 4.4 and above. It - replaces the older i830 module that supported a subset of the - hardware in older X.org releases. - - Note that the older i810/i815 chipsets require the use of the - i810 driver instead, and the Atom z5xx series has an entirely - different implementation. - -config DRM_I915_KMS - bool "Enable modesetting on intel by default" - depends on DRM_I915 - help - Choose this option if you want kernel modesetting enabled by default, - and you have a new enough userspace to support this. Running old - userspaces with this enabled will cause pain. Note that this causes - the driver to bind to PCI devices, which precludes loading things - like intelfb. - -config DRM_I915_PRELIMINARY_HW_SUPPORT - bool "Enable preliminary support for prerelease Intel hardware by default" - depends on DRM_I915 - help - Choose this option if you have prerelease Intel hardware and want the - i915 driver to support it by default. You can enable such support at - runtime with the module option i915.preliminary_hw_support=1; this - option changes the default for that module option. - - If in doubt, say "N". +source "drivers/gpu/drm/i915/Kconfig" config DRM_MGA tristate "Matrox g200/g400"drivers/gpu/drm/i915/Kconfig new file +67
-0@@ -0,0 +1,67 @@ +config DRM_I915 + tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics" + depends on DRM + depends on AGP + depends on AGP_INTEL + # we need shmfs for the swappable backing store, and in particular + # the shmem_readpage() which depends upon tmpfs + select SHMEM + select TMPFS + select DRM_KMS_HELPER + # i915 depends on ACPI_VIDEO when ACPI is enabled + # but for select to work, need to select ACPI_VIDEO's dependencies, ick + select BACKLIGHT_LCD_SUPPORT if ACPI + select BACKLIGHT_CLASS_DEVICE if ACPI + select VIDEO_OUTPUT_CONTROL if ACPI + select INPUT if ACPI + select ACPI_VIDEO if ACPI + select ACPI_BUTTON if ACPI + help + Choose this option if you have a system that has "Intel Graphics + Media Accelerator" or "HD Graphics" integrated graphics, + including 830M, 845G, 852GM, 855GM, 865G, 915G, 945G, 965G, + G35, G41, G43, G45 chipsets and Celeron, Pentium, Core i3, + Core i5, Core i7 as well as Atom CPUs with integrated graphics. + If M is selected, the module will be called i915. AGP support + is required for this driver to work. This driver is used by + the Intel driver in X.org 6.8 and XFree86 4.4 and above. It + replaces the older i830 module that supported a subset of the + hardware in older X.org releases. + + Note that the older i810/i815 chipsets require the use of the + i810 driver instead, and the Atom z5xx series has an entirely + different implementation. + +config DRM_I915_KMS + bool "Enable modesetting on intel by default" + depends on DRM_I915 + help + Choose this option if you want kernel modesetting enabled by default, + and you have a new enough userspace to support this. Running old + userspaces with this enabled will cause pain. Note that this causes + the driver to bind to PCI devices, which precludes loading things + like intelfb. + +config DRM_I915_FBDEV + bool "Enable legacy fbdev support for the modesettting intel driver" + depends on DRM_I915 + select DRM_KMS_FB_HELPER + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + default y + help + Choose this option if you have a need for the legacy fbdev + support. Note that this support also provide the linux console + support on top of the intel modesetting driver. + +config DRM_I915_PRELIMINARY_HW_SUPPORT + bool "Enable preliminary support for prerelease Intel hardware by default" + depends on DRM_I915 + help + Choose this option if you have prerelease Intel hardware and want the + i915 driver to support it by default. You can enable such support at + runtime with the module option i915.preliminary_hw_support=1; this + option changes the default for that module option. + + If in doubt, say "N".drivers/gpu/drm/i915/Makefile +2
-1@@ -33,7 +33,6 @@ i915-y := i915_drv.o i915_dma.o i915_irq.o \ intel_panel.o \ intel_pm.o \ intel_i2c.o \ - intel_fb.o \ intel_tv.o \ intel_dvo.o \ intel_ringbuffer.o \@@ -54,6 +53,8 @@ i915-$(CONFIG_COMPAT) += i915_ioc32.o i915-$(CONFIG_ACPI) += intel_acpi.o +i915-$(CONFIG_DRM_I915_FBDEV) += intel_fb.o + obj-$(CONFIG_DRM_I915) += i915.o CFLAGS_i915_trace_points.o := -I$(src)drivers/gpu/drm/i915/i915_debugfs.c +5
-4@@ -1399,12 +1399,12 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) {struct drm_info_node *node = (struct drm_info_node *) m->private;struct drm_device *dev = node->minor->dev; -drm_i915_private_t *dev_priv = dev->dev_private; -struct intel_fbdev *ifbdev; +struct intel_fbdev *ifbdev =NULL ;struct intel_framebuffer *fb; -int ret; - ret =mutex_lock_interruptible (&dev->mode_config.mutex); +#ifdef CONFIG_DRM_I915_FBDEV +struct drm_i915_private *dev_priv = dev->dev_private; +int ret =mutex_lock_interruptible (&dev->mode_config.mutex);if (ret)return ret;@@ -1420,6 +1420,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)describe_obj (m, fb->obj);seq_putc (m,'\n' );mutex_unlock (&dev->mode_config.mutex); +#endif mutex_lock (&dev->mode_config.fb_lock);list_for_each_entry (fb, &dev->mode_config.fb_list, base.head) {drivers/gpu/drm/i915/i915_dma.c +6
-0@@ -1416,6 +1416,7 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master) master->driver_priv =NULL ; } +#ifdef CONFIG_DRM_I915_FBDEV static void i915_kick_out_firmware_fb (struct drm_i915_private *dev_priv) {struct apertures_struct *ap;@@ -1436,6 +1437,11 @@ static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) kfree(ap); } +#else +static void i915_kick_out_firmware_fb (struct drm_i915_private *dev_priv) +{ +} +#endif static void i915_dump_device_info (struct drm_i915_private *dev_priv) {drivers/gpu/drm/i915/i915_drv.h +2
-0@@ -1354,8 +1354,10 @@ typedef struct drm_i915_private {struct drm_i915_gem_object *vlv_pctx; +#ifdef CONFIG_DRM_I915_FBDEV /* list of fbdev register on this device */ struct intel_fbdev *fbdev; +#endif /* * The console may be contended at resume, but we don't drivers/gpu/drm/i915/intel_display.c +10
-0@@ -7318,6 +7318,7 @@ static struct drm_framebuffer * mode_fits_in_fbdev(struct drm_device *dev, struct drm_display_mode *mode) { +#ifdef CONFIG_DRM_I915_FBDEV struct drm_i915_private *dev_priv = dev->dev_private;struct drm_i915_gem_object *obj;struct drm_framebuffer *fb;@@ -7338,6 +7339,9 @@ mode_fits_in_fbdev(struct drm_device *dev,return NULL ;return fb; +#else +return NULL ; +#endif } bool intel_get_load_detect_pipe(struct drm_connector *connector,@@ -10084,6 +10088,12 @@ intel_user_framebuffer_create(struct drm_device *dev,return intel_framebuffer_create (dev, mode_cmd, obj); } +#ifndef CONFIG_DRM_I915_FBDEV +static inline void intel_fb_output_poll_changed (struct drm_device *dev) +{ +} +#endif +static const struct drm_mode_config_funcs intel_mode_funcs = { .fb_create = intel_user_framebuffer_create, .output_poll_changed = intel_fb_output_poll_changed,drivers/gpu/drm/i915/intel_drv.h +29
-7@@ -716,14 +716,36 @@ bool intel_dsi_init(struct drm_device *dev);void intel_dvo_init (struct drm_device *dev); -/* intel_fb.c */ -int intel_fbdev_init (struct drm_device *dev); -void intel_fbdev_initial_config (struct drm_device *dev); -void intel_fbdev_fini (struct drm_device *dev); -void intel_fbdev_set_suspend (struct drm_device *dev,int state); -void intel_fb_output_poll_changed (struct drm_device *dev); -void intel_fb_restore_mode (struct drm_device *dev); +/* legacy fbdev emulation in intel_fb.c */ +#ifdef CONFIG_DRM_I915_FBDEV +extern int intel_fbdev_init (struct drm_device *dev); +extern void intel_fbdev_initial_config (struct drm_device *dev); +extern void intel_fbdev_fini (struct drm_device *dev); +extern void intel_fbdev_set_suspend (struct drm_device *dev,int state); +extern void intel_fb_output_poll_changed (struct drm_device *dev); +extern void intel_fb_restore_mode (struct drm_device *dev); +#else +static inline int intel_fbdev_init (struct drm_device *dev) +{ +return 0 ; +} +static inline void intel_fbdev_initial_config (struct drm_device *dev) +{ +} + +static inline void intel_fbdev_fini (struct drm_device *dev) +{ +} + +static inline void intel_fbdev_set_suspend (struct drm_device *dev,int state) +{ +} + +static inline void intel_fb_restore_mode (struct drm_device *dev) +{ +} +#endif /* intel_hdmi.c */ void intel_hdmi_init (struct drm_device *dev,int hdmi_reg,enum port port);Signature · 6 lines
1.8.1.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Re: [PATCH] drm/i915: Kconfig option to disable the legacy fbdev support
In reply to Daniel VetterQuoted 24 lines · Daniel Vetter
Boots Just Fine (tm)!
The only glitch seems to be that at least on Fedora the boot splash gets confused and doesn't display much at all.
And since there's no ugly console flickering anymore in between, the flicker while switching between X servers (VT support is still enabled) is even more jarring.
Also, I'm unsure whether we don't need to somehow kick out vgacon, now that nothing else gets in the way. But stuff seems to work, so I don't care. Also everything still works as well with VGA_CONSOLE=n
Also the #ifdef mess needs a bit of a cleanup, follow-up patches will do just that.
To keep the
Kconfigtidy, extract all the i915 options into its own file.v2:
- Rebase on top of the preliminary hw support option and theintel_drv.hcleanup.
- Shut up warnings ini915_debugfs.c
Quoted 6 lines
v3: Use the right CONFIG variable, spotted by Chon Ming.
Cc Lee, Chon Ming <[email protected]>Cc David Herrmann <[email protected]>Signed-off-by Daniel Vetter <[email protected]>---
Look good to me this series.
Quoted 330 lines
drivers/gpu/drm/Kconfig | 60 +------------------------------- drivers/gpu/drm/i915/Kconfig | 67 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_debugfs.c | 9 ++--- drivers/gpu/drm/i915/i915_dma.c | 6 ++++ drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_display.c | 10 ++++++ drivers/gpu/drm/i915/intel_drv.h | 36 +++++++++++++++---- 8 files changed, 122 insertions(+), 71 deletions(-) create mode 100644 drivers/gpu/drm/i915/Kconfigdrivers/gpu/drm/Kconfig +1
-59@@ -128,65 +128,7 @@ config DRM_I810 selected, the module will be called i810. AGP support is required for this driver to work. -config DRM_I915 - tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics" - depends on DRM - depends on AGP - depends on AGP_INTEL - # we need shmfs for the swappable backing store, and in particular - # the shmem_readpage() which depends upon tmpfs - select SHMEM - select TMPFS - select DRM_KMS_HELPER - select DRM_KMS_FB_HELPER - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - # i915 depends on ACPI_VIDEO when ACPI is enabled - # but for select to work, need to select ACPI_VIDEO's dependencies, ick - select BACKLIGHT_LCD_SUPPORT if ACPI - select BACKLIGHT_CLASS_DEVICE if ACPI - select VIDEO_OUTPUT_CONTROL if ACPI - select INPUT if ACPI - select THERMAL if ACPI - select ACPI_VIDEO if ACPI - select ACPI_BUTTON if ACPI - help - Choose this option if you have a system that has "Intel Graphics - Media Accelerator" or "HD Graphics" integrated graphics, - including 830M, 845G, 852GM, 855GM, 865G, 915G, 945G, 965G, - G35, G41, G43, G45 chipsets and Celeron, Pentium, Core i3, - Core i5, Core i7 as well as Atom CPUs with integrated graphics. - If M is selected, the module will be called i915. AGP support - is required for this driver to work. This driver is used by - the Intel driver in X.org 6.8 and XFree86 4.4 and above. It - replaces the older i830 module that supported a subset of the - hardware in older X.org releases. - - Note that the older i810/i815 chipsets require the use of the - i810 driver instead, and the Atom z5xx series has an entirely - different implementation. - -config DRM_I915_KMS - bool "Enable modesetting on intel by default" - depends on DRM_I915 - help - Choose this option if you want kernel modesetting enabled by default, - and you have a new enough userspace to support this. Running old - userspaces with this enabled will cause pain. Note that this causes - the driver to bind to PCI devices, which precludes loading things - like intelfb. - -config DRM_I915_PRELIMINARY_HW_SUPPORT - bool "Enable preliminary support for prerelease Intel hardware by default" - depends on DRM_I915 - help - Choose this option if you have prerelease Intel hardware and want the - i915 driver to support it by default. You can enable such support at - runtime with the module option i915.preliminary_hw_support=1; this - option changes the default for that module option. - - If in doubt, say "N". +source "drivers/gpu/drm/i915/Kconfig" config DRM_MGA tristate "Matrox g200/g400"drivers/gpu/drm/i915/Kconfig new file +67
-0@@ -0,0 +1,67 @@ +config DRM_I915 + tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics" + depends on DRM + depends on AGP + depends on AGP_INTEL + # we need shmfs for the swappable backing store, and in particular + # the shmem_readpage() which depends upon tmpfs + select SHMEM + select TMPFS + select DRM_KMS_HELPER + # i915 depends on ACPI_VIDEO when ACPI is enabled + # but for select to work, need to select ACPI_VIDEO's dependencies, ick + select BACKLIGHT_LCD_SUPPORT if ACPI + select BACKLIGHT_CLASS_DEVICE if ACPI + select VIDEO_OUTPUT_CONTROL if ACPI + select INPUT if ACPI + select ACPI_VIDEO if ACPI + select ACPI_BUTTON if ACPI + help + Choose this option if you have a system that has "Intel Graphics + Media Accelerator" or "HD Graphics" integrated graphics, + including 830M, 845G, 852GM, 855GM, 865G, 915G, 945G, 965G, + G35, G41, G43, G45 chipsets and Celeron, Pentium, Core i3, + Core i5, Core i7 as well as Atom CPUs with integrated graphics. + If M is selected, the module will be called i915. AGP support + is required for this driver to work. This driver is used by + the Intel driver in X.org 6.8 and XFree86 4.4 and above. It + replaces the older i830 module that supported a subset of the + hardware in older X.org releases. + + Note that the older i810/i815 chipsets require the use of the + i810 driver instead, and the Atom z5xx series has an entirely + different implementation. + +config DRM_I915_KMS + bool "Enable modesetting on intel by default" + depends on DRM_I915 + help + Choose this option if you want kernel modesetting enabled by default, + and you have a new enough userspace to support this. Running old + userspaces with this enabled will cause pain. Note that this causes + the driver to bind to PCI devices, which precludes loading things + like intelfb. + +config DRM_I915_FBDEV + bool "Enable legacy fbdev support for the modesettting intel driver" + depends on DRM_I915 + select DRM_KMS_FB_HELPER + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + default y + help + Choose this option if you have a need for the legacy fbdev + support. Note that this support also provide the linux console + support on top of the intel modesetting driver. + +config DRM_I915_PRELIMINARY_HW_SUPPORT + bool "Enable preliminary support for prerelease Intel hardware by default" + depends on DRM_I915 + help + Choose this option if you have prerelease Intel hardware and want the + i915 driver to support it by default. You can enable such support at + runtime with the module option i915.preliminary_hw_support=1; this + option changes the default for that module option. + + If in doubt, say "N".drivers/gpu/drm/i915/Makefile +2
-1@@ -33,7 +33,6 @@ i915-y := i915_drv.o i915_dma.o i915_irq.o \ intel_panel.o \ intel_pm.o \ intel_i2c.o \ - intel_fb.o \ intel_tv.o \ intel_dvo.o \ intel_ringbuffer.o \@@ -54,6 +53,8 @@ i915-$(CONFIG_COMPAT) += i915_ioc32.o i915-$(CONFIG_ACPI) += intel_acpi.o +i915-$(CONFIG_DRM_I915_FBDEV) += intel_fb.o + obj-$(CONFIG_DRM_I915) += i915.o CFLAGS_i915_trace_points.o := -I$(src)drivers/gpu/drm/i915/i915_debugfs.c +5
-4@@ -1399,12 +1399,12 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) {struct drm_info_node *node = (struct drm_info_node *) m->private;struct drm_device *dev = node->minor->dev; -drm_i915_private_t *dev_priv = dev->dev_private; -struct intel_fbdev *ifbdev; +struct intel_fbdev *ifbdev =NULL ;struct intel_framebuffer *fb; -int ret; - ret =mutex_lock_interruptible (&dev->mode_config.mutex); +#ifdef CONFIG_DRM_I915_FBDEV +struct drm_i915_private *dev_priv = dev->dev_private; +int ret =mutex_lock_interruptible (&dev->mode_config.mutex);if (ret)return ret;@@ -1420,6 +1420,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)describe_obj (m, fb->obj);seq_putc (m,'\n' );mutex_unlock (&dev->mode_config.mutex); +#endif mutex_lock (&dev->mode_config.fb_lock);list_for_each_entry (fb, &dev->mode_config.fb_list, base.head) {drivers/gpu/drm/i915/i915_dma.c +6
-0@@ -1416,6 +1416,7 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master) master->driver_priv =NULL ; } +#ifdef CONFIG_DRM_I915_FBDEV static void i915_kick_out_firmware_fb (struct drm_i915_private *dev_priv) {struct apertures_struct *ap;@@ -1436,6 +1437,11 @@ static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) kfree(ap); } +#else +static void i915_kick_out_firmware_fb (struct drm_i915_private *dev_priv) +{ +} +#endif static void i915_dump_device_info (struct drm_i915_private *dev_priv) {drivers/gpu/drm/i915/i915_drv.h +2
-0@@ -1354,8 +1354,10 @@ typedef struct drm_i915_private {struct drm_i915_gem_object *vlv_pctx; +#ifdef CONFIG_DRM_I915_FBDEV /* list of fbdev register on this device */ struct intel_fbdev *fbdev; +#endif /* * The console may be contended at resume, but we don't drivers/gpu/drm/i915/intel_display.c +10
-0@@ -7318,6 +7318,7 @@ static struct drm_framebuffer * mode_fits_in_fbdev(struct drm_device *dev, struct drm_display_mode *mode) { +#ifdef CONFIG_DRM_I915_FBDEV struct drm_i915_private *dev_priv = dev->dev_private;struct drm_i915_gem_object *obj;struct drm_framebuffer *fb;@@ -7338,6 +7339,9 @@ mode_fits_in_fbdev(struct drm_device *dev,return NULL ;return fb; +#else +return NULL ; +#endif } bool intel_get_load_detect_pipe(struct drm_connector *connector,@@ -10084,6 +10088,12 @@ intel_user_framebuffer_create(struct drm_device *dev,return intel_framebuffer_create (dev, mode_cmd, obj); } +#ifndef CONFIG_DRM_I915_FBDEV +static inline void intel_fb_output_poll_changed (struct drm_device *dev) +{ +} +#endif +static const struct drm_mode_config_funcs intel_mode_funcs = { .fb_create = intel_user_framebuffer_create, .output_poll_changed = intel_fb_output_poll_changed,drivers/gpu/drm/i915/intel_drv.h +29
-7@@ -716,14 +716,36 @@ bool intel_dsi_init(struct drm_device *dev);void intel_dvo_init (struct drm_device *dev); -/* intel_fb.c */ -int intel_fbdev_init (struct drm_device *dev); -void intel_fbdev_initial_config (struct drm_device *dev); -void intel_fbdev_fini (struct drm_device *dev); -void intel_fbdev_set_suspend (struct drm_device *dev,int state); -void intel_fb_output_poll_changed (struct drm_device *dev); -void intel_fb_restore_mode (struct drm_device *dev); +/* legacy fbdev emulation in intel_fb.c */ +#ifdef CONFIG_DRM_I915_FBDEV +extern int intel_fbdev_init (struct drm_device *dev); +extern void intel_fbdev_initial_config (struct drm_device *dev); +extern void intel_fbdev_fini (struct drm_device *dev); +extern void intel_fbdev_set_suspend (struct drm_device *dev,int state); +extern void intel_fb_output_poll_changed (struct drm_device *dev); +extern void intel_fb_restore_mode (struct drm_device *dev); +#else +static inline int intel_fbdev_init (struct drm_device *dev) +{ +return 0 ; +} +static inline void intel_fbdev_initial_config (struct drm_device *dev) +{ +} + +static inline void intel_fbdev_fini (struct drm_device *dev) +{ +} + +static inline void intel_fbdev_set_suspend (struct drm_device *dev,int state) +{ +} + +static inline void intel_fb_restore_mode (struct drm_device *dev) +{ +} +#endif /* intel_hdmi.c */ void intel_hdmi_init (struct drm_device *dev,int hdmi_reg,enum port port);Signature · 1 line
1.8.1.4
Re: [PATCH] drm/i915: Kconfig option to disable the legacy fbdev support
Quoted 27 lines · Chon Ming
Quoted 26 lines · Daniel Vetter
Boots Just Fine (tm)!
The only glitch seems to be that at least on Fedora the boot splash gets confused and doesn't display much at all.
And since there's no ugly console flickering anymore in between, the flicker while switching between X servers (VT support is still enabled) is even more jarring.
Also, I'm unsure whether we don't need to somehow kick out vgacon, now that nothing else gets in the way. But stuff seems to work, so I don't care. Also everything still works as well with VGA_CONSOLE=n
Also the #ifdef mess needs a bit of a cleanup, follow-up patches will do just that.
To keep the
Kconfigtidy, extract all the i915 options into its own file.v2:
- Rebase on top of the preliminary hw support option and theintel_drv.hcleanup.
- Shut up warnings ini915_debugfs.cv3: Use the right CONFIG variable, spotted by Chon Ming.
Quoted 8 lines
Quoted 4 lines
Cc Lee, Chon Ming <[email protected]>Cc David Herrmann <[email protected]>Signed-off-by Daniel Vetter <[email protected]>---
Look good to me this series.
Reviewed-by Chon Ming Lee <[email protected]>
Thanks for the review, all patches merged to dinq. -Daniel
Quoted 331 lines
Quoted 331 lines
drivers/gpu/drm/Kconfig | 60 +------------------------------- drivers/gpu/drm/i915/Kconfig | 67 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_debugfs.c | 9 ++--- drivers/gpu/drm/i915/i915_dma.c | 6 ++++ drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_display.c | 10 ++++++ drivers/gpu/drm/i915/intel_drv.h | 36 +++++++++++++++---- 8 files changed, 122 insertions(+), 71 deletions(-) create mode 100644 drivers/gpu/drm/i915/Kconfigdrivers/gpu/drm/Kconfig +1
-59@@ -128,65 +128,7 @@ config DRM_I810 selected, the module will be called i810. AGP support is required for this driver to work. -config DRM_I915 - tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics" - depends on DRM - depends on AGP - depends on AGP_INTEL - # we need shmfs for the swappable backing store, and in particular - # the shmem_readpage() which depends upon tmpfs - select SHMEM - select TMPFS - select DRM_KMS_HELPER - select DRM_KMS_FB_HELPER - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - # i915 depends on ACPI_VIDEO when ACPI is enabled - # but for select to work, need to select ACPI_VIDEO's dependencies, ick - select BACKLIGHT_LCD_SUPPORT if ACPI - select BACKLIGHT_CLASS_DEVICE if ACPI - select VIDEO_OUTPUT_CONTROL if ACPI - select INPUT if ACPI - select THERMAL if ACPI - select ACPI_VIDEO if ACPI - select ACPI_BUTTON if ACPI - help - Choose this option if you have a system that has "Intel Graphics - Media Accelerator" or "HD Graphics" integrated graphics, - including 830M, 845G, 852GM, 855GM, 865G, 915G, 945G, 965G, - G35, G41, G43, G45 chipsets and Celeron, Pentium, Core i3, - Core i5, Core i7 as well as Atom CPUs with integrated graphics. - If M is selected, the module will be called i915. AGP support - is required for this driver to work. This driver is used by - the Intel driver in X.org 6.8 and XFree86 4.4 and above. It - replaces the older i830 module that supported a subset of the - hardware in older X.org releases. - - Note that the older i810/i815 chipsets require the use of the - i810 driver instead, and the Atom z5xx series has an entirely - different implementation. - -config DRM_I915_KMS - bool "Enable modesetting on intel by default" - depends on DRM_I915 - help - Choose this option if you want kernel modesetting enabled by default, - and you have a new enough userspace to support this. Running old - userspaces with this enabled will cause pain. Note that this causes - the driver to bind to PCI devices, which precludes loading things - like intelfb. - -config DRM_I915_PRELIMINARY_HW_SUPPORT - bool "Enable preliminary support for prerelease Intel hardware by default" - depends on DRM_I915 - help - Choose this option if you have prerelease Intel hardware and want the - i915 driver to support it by default. You can enable such support at - runtime with the module option i915.preliminary_hw_support=1; this - option changes the default for that module option. - - If in doubt, say "N". +source "drivers/gpu/drm/i915/Kconfig" config DRM_MGA tristate "Matrox g200/g400"drivers/gpu/drm/i915/Kconfig new file +67
-0@@ -0,0 +1,67 @@ +config DRM_I915 + tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics" + depends on DRM + depends on AGP + depends on AGP_INTEL + # we need shmfs for the swappable backing store, and in particular + # the shmem_readpage() which depends upon tmpfs + select SHMEM + select TMPFS + select DRM_KMS_HELPER + # i915 depends on ACPI_VIDEO when ACPI is enabled + # but for select to work, need to select ACPI_VIDEO's dependencies, ick + select BACKLIGHT_LCD_SUPPORT if ACPI + select BACKLIGHT_CLASS_DEVICE if ACPI + select VIDEO_OUTPUT_CONTROL if ACPI + select INPUT if ACPI + select ACPI_VIDEO if ACPI + select ACPI_BUTTON if ACPI + help + Choose this option if you have a system that has "Intel Graphics + Media Accelerator" or "HD Graphics" integrated graphics, + including 830M, 845G, 852GM, 855GM, 865G, 915G, 945G, 965G, + G35, G41, G43, G45 chipsets and Celeron, Pentium, Core i3, + Core i5, Core i7 as well as Atom CPUs with integrated graphics. + If M is selected, the module will be called i915. AGP support + is required for this driver to work. This driver is used by + the Intel driver in X.org 6.8 and XFree86 4.4 and above. It + replaces the older i830 module that supported a subset of the + hardware in older X.org releases. + + Note that the older i810/i815 chipsets require the use of the + i810 driver instead, and the Atom z5xx series has an entirely + different implementation. + +config DRM_I915_KMS + bool "Enable modesetting on intel by default" + depends on DRM_I915 + help + Choose this option if you want kernel modesetting enabled by default, + and you have a new enough userspace to support this. Running old + userspaces with this enabled will cause pain. Note that this causes + the driver to bind to PCI devices, which precludes loading things + like intelfb. + +config DRM_I915_FBDEV + bool "Enable legacy fbdev support for the modesettting intel driver" + depends on DRM_I915 + select DRM_KMS_FB_HELPER + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + default y + help + Choose this option if you have a need for the legacy fbdev + support. Note that this support also provide the linux console + support on top of the intel modesetting driver. + +config DRM_I915_PRELIMINARY_HW_SUPPORT + bool "Enable preliminary support for prerelease Intel hardware by default" + depends on DRM_I915 + help + Choose this option if you have prerelease Intel hardware and want the + i915 driver to support it by default. You can enable such support at + runtime with the module option i915.preliminary_hw_support=1; this + option changes the default for that module option. + + If in doubt, say "N".drivers/gpu/drm/i915/Makefile +2
-1@@ -33,7 +33,6 @@ i915-y := i915_drv.o i915_dma.o i915_irq.o \ intel_panel.o \ intel_pm.o \ intel_i2c.o \ - intel_fb.o \ intel_tv.o \ intel_dvo.o \ intel_ringbuffer.o \@@ -54,6 +53,8 @@ i915-$(CONFIG_COMPAT) += i915_ioc32.o i915-$(CONFIG_ACPI) += intel_acpi.o +i915-$(CONFIG_DRM_I915_FBDEV) += intel_fb.o + obj-$(CONFIG_DRM_I915) += i915.o CFLAGS_i915_trace_points.o := -I$(src)drivers/gpu/drm/i915/i915_debugfs.c +5
-4@@ -1399,12 +1399,12 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) {struct drm_info_node *node = (struct drm_info_node *) m->private;struct drm_device *dev = node->minor->dev; -drm_i915_private_t *dev_priv = dev->dev_private; -struct intel_fbdev *ifbdev; +struct intel_fbdev *ifbdev =NULL ;struct intel_framebuffer *fb; -int ret; - ret =mutex_lock_interruptible (&dev->mode_config.mutex); +#ifdef CONFIG_DRM_I915_FBDEV +struct drm_i915_private *dev_priv = dev->dev_private; +int ret =mutex_lock_interruptible (&dev->mode_config.mutex);if (ret)return ret;@@ -1420,6 +1420,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)describe_obj (m, fb->obj);seq_putc (m,'\n' );mutex_unlock (&dev->mode_config.mutex); +#endif mutex_lock (&dev->mode_config.fb_lock);list_for_each_entry (fb, &dev->mode_config.fb_list, base.head) {drivers/gpu/drm/i915/i915_dma.c +6
-0@@ -1416,6 +1416,7 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master) master->driver_priv =NULL ; } +#ifdef CONFIG_DRM_I915_FBDEV static void i915_kick_out_firmware_fb (struct drm_i915_private *dev_priv) {struct apertures_struct *ap;@@ -1436,6 +1437,11 @@ static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) kfree(ap); } +#else +static void i915_kick_out_firmware_fb (struct drm_i915_private *dev_priv) +{ +} +#endif static void i915_dump_device_info (struct drm_i915_private *dev_priv) {drivers/gpu/drm/i915/i915_drv.h +2
-0@@ -1354,8 +1354,10 @@ typedef struct drm_i915_private {struct drm_i915_gem_object *vlv_pctx; +#ifdef CONFIG_DRM_I915_FBDEV /* list of fbdev register on this device */ struct intel_fbdev *fbdev; +#endif /* * The console may be contended at resume, but we don't drivers/gpu/drm/i915/intel_display.c +10
-0@@ -7318,6 +7318,7 @@ static struct drm_framebuffer * mode_fits_in_fbdev(struct drm_device *dev, struct drm_display_mode *mode) { +#ifdef CONFIG_DRM_I915_FBDEV struct drm_i915_private *dev_priv = dev->dev_private;struct drm_i915_gem_object *obj;struct drm_framebuffer *fb;@@ -7338,6 +7339,9 @@ mode_fits_in_fbdev(struct drm_device *dev,return NULL ;return fb; +#else +return NULL ; +#endif } bool intel_get_load_detect_pipe(struct drm_connector *connector,@@ -10084,6 +10088,12 @@ intel_user_framebuffer_create(struct drm_device *dev,return intel_framebuffer_create (dev, mode_cmd, obj); } +#ifndef CONFIG_DRM_I915_FBDEV +static inline void intel_fb_output_poll_changed (struct drm_device *dev) +{ +} +#endif +static const struct drm_mode_config_funcs intel_mode_funcs = { .fb_create = intel_user_framebuffer_create, .output_poll_changed = intel_fb_output_poll_changed,drivers/gpu/drm/i915/intel_drv.h +29
-7@@ -716,14 +716,36 @@ bool intel_dsi_init(struct drm_device *dev);void intel_dvo_init (struct drm_device *dev); -/* intel_fb.c */ -int intel_fbdev_init (struct drm_device *dev); -void intel_fbdev_initial_config (struct drm_device *dev); -void intel_fbdev_fini (struct drm_device *dev); -void intel_fbdev_set_suspend (struct drm_device *dev,int state); -void intel_fb_output_poll_changed (struct drm_device *dev); -void intel_fb_restore_mode (struct drm_device *dev); +/* legacy fbdev emulation in intel_fb.c */ +#ifdef CONFIG_DRM_I915_FBDEV +extern int intel_fbdev_init (struct drm_device *dev); +extern void intel_fbdev_initial_config (struct drm_device *dev); +extern void intel_fbdev_fini (struct drm_device *dev); +extern void intel_fbdev_set_suspend (struct drm_device *dev,int state); +extern void intel_fb_output_poll_changed (struct drm_device *dev); +extern void intel_fb_restore_mode (struct drm_device *dev); +#else +static inline int intel_fbdev_init (struct drm_device *dev) +{ +return 0 ; +} +static inline void intel_fbdev_initial_config (struct drm_device *dev) +{ +} + +static inline void intel_fbdev_fini (struct drm_device *dev) +{ +} + +static inline void intel_fbdev_set_suspend (struct drm_device *dev,int state) +{ +} + +static inline void intel_fb_restore_mode (struct drm_device *dev) +{ +} +#endif /* intel_hdmi.c */ void intel_hdmi_init (struct drm_device *dev,int hdmi_reg,enum port port);Signature · 1 line
1.8.1.4
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 3/3 drm/i915: rename intel_fb.c to intel_fbdev.c
In reply to Daniel VetterThis file is all about the legacy fbdev support. If we want to extract framebuffer functions, we better put those into a separate file.
Also rename functions accordingly, only two have used the intel_fb_ prefix anyway.
--- drivers/gpu/drm/i915/Makefile | 2 +- drivers/gpu/drm/i915/i915_dma.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 4 +- drivers/gpu/drm/i915/intel_drv.h | 8 +- drivers/gpu/drm/i915/intel_fb.c | 323 ----------------------------------- drivers/gpu/drm/i915/intel_fbdev.c | 323 +++++++++++++++++++++++++++++++++++ 6 files changed, 331 insertions(+), 331 deletions(-) delete mode 100644 drivers/gpu/drm/i915/intel_fb.c create mode 100644 drivers/gpu/drm/i915/intel_fbdev.c
drivers/gpu/drm/i915/Makefile +1 -1
@@ -53,7 +53,7 @@ i915-$(CONFIG_COMPAT) += i915_ioc32.o i915-$(CONFIG_ACPI) += intel_acpi.o -i915-$(CONFIG_DRM_I915_FBDEV) += intel_fb.o +i915-$(CONFIG_DRM_I915_FBDEV) += intel_fbdev.o obj-$(CONFIG_DRM_I915) += i915.o
drivers/gpu/drm/i915/i915_dma.c +1 -1
@@ -1865,7 +1865,7 @@ void i915_driver_lastclose(struct drm_device * dev)return ;if (drm_core_check_feature (dev,DRIVER_MODESET )) { -intel_fb_restore_mode (dev); +intel_fbdev_restore_mode (dev);vga_switcheroo_process_delayed_switch ();return ; }
drivers/gpu/drm/i915/intel_display.c +2 -2
@@ -10089,14 +10089,14 @@ intel_user_framebuffer_create(struct drm_device *dev, }#ifndef CONFIG_DRM_I915_FBDEV -static inline void intel_fb_output_poll_changed (struct drm_device *dev) +static inline void intel_fbdev_output_poll_changed (struct drm_device *dev) { }#endif static const struct drm_mode_config_funcs intel_mode_funcs = { .fb_create = intel_user_framebuffer_create, - .output_poll_changed = intel_fb_output_poll_changed, + .output_poll_changed = intel_fbdev_output_poll_changed, };/* Set up chip specific display functions */
drivers/gpu/drm/i915/intel_drv.h +4 -4
@@ -716,14 +716,14 @@ bool intel_dsi_init(struct drm_device *dev);void intel_dvo_init (struct drm_device *dev); -/* legacy fbdev emulation in intel_fb.c */ +/* legacy fbdev emulation in intel_fbdev.c */ #ifdef CONFIG_DRM_I915_FBDEV extern int intel_fbdev_init (struct drm_device *dev);extern void intel_fbdev_initial_config (struct drm_device *dev);extern void intel_fbdev_fini (struct drm_device *dev);extern void intel_fbdev_set_suspend (struct drm_device *dev,int state); -extern void intel_fb_output_poll_changed (struct drm_device *dev); -extern void intel_fb_restore_mode (struct drm_device *dev); +extern void intel_fbdev_output_poll_changed (struct drm_device *dev); +extern void intel_fbdev_restore_mode (struct drm_device *dev);#else static inline int intel_fbdev_init (struct drm_device *dev) {
@@ -742,7 +742,7 @@ static inline void intel_fbdev_set_suspend(struct drm_device *dev, int state) { } -static inline void intel_fb_restore_mode (struct drm_device *dev) +static inline void intel_fbdev_restore_mode (struct drm_device *dev) { }#endif
drivers/gpu/drm/i915/intel_fb.c deleted +0 -323
323 lines not on this page · raw message
drivers/gpu/drm/i915/intel_fbdev.c new file +323 -0
323 lines not on this page · raw message
Signature · 6 lines
1.8.1.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 7 lines · Daniel Vetter
Hi all,
By popular demand (our embedded guys kept asking for this) I've resurrected my fbdev less patches. Now Rob's msm driver can be completely completely without
CONFIG_FBstuff at all when disabling the fbdev helper support.Review highly welcome.
I still think this is misleading. fbdev to me is /dev/fb not fbcon. They are related only by implementation.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre