build fixes to make fbdev optional
Subsystems (19)
cover build fixes to make fbdev optional
0-day has been annoying me lately with a constant trickle of build failures with a few drivers when DRM_FBDEV_EMULATION is not set. This series here should fix them all I hope.
-Daniel
Daniel Vetter (5):
drm/fb-helper: Add a dummy remove_conflicting_framebuffers
drm: Remove superflous linux/fb.h includes drm/vmwgfx: select CONFIG_FB
drm/radeon|amgpu: Make fbdev emulation optional
drm: Protect fb_defio in drivers with CONFIG_KMS_FBDEV_EMULATION
drivers/gpu/drm/Kconfig | 8 -------- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 1 - .../gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c | 1 - drivers/gpu/drm/armada/armada_fbdev.c | 1 - drivers/gpu/drm/ast/ast_fb.c | 1 - drivers/gpu/drm/bochs/bochs.h | 1 - drivers/gpu/drm/bochs/bochs_drv.c | 3 ++- drivers/gpu/drm/bridge/parade-ps8622.c | 1 - drivers/gpu/drm/cirrus/cirrus_drv.c | 2 +- drivers/gpu/drm/cirrus/cirrus_fbdev.c | 2 -- drivers/gpu/drm/drm_fb_helper.c | 1 - drivers/gpu/drm/gma500/accel_2d.c | 1 - drivers/gpu/drm/gma500/framebuffer.c | 1 - drivers/gpu/drm/gma500/psb_intel_modes.c | 1 - drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/intel_fbdev.c | 1 - drivers/gpu/drm/i915/intel_modes.c | 1 - drivers/gpu/drm/imx/imx-drm-core.c | 1 - drivers/gpu/drm/imx/ipuv3-crtc.c | 1 - drivers/gpu/drm/mgag200/mgag200_drv.c | 2 +- drivers/gpu/drm/mgag200/mgag200_fb.c | 2 -- drivers/gpu/drm/mgag200/mgag200_main.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c | 1 - drivers/gpu/drm/qxl/qxl_fb.c | 5 ++++- drivers/gpu/drm/radeon/radeon_drv.c | 3 ++- drivers/gpu/drm/radeon/radeon_fb.c | 3 +-- drivers/gpu/drm/sun4i/sun4i_drv.c | 3 ++- drivers/gpu/drm/udl/udl_fb.c | 4 ++++ drivers/gpu/drm/vc4/vc4_drv.c | 3 ++- drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 3 ++- drivers/gpu/drm/vmwgfx/Kconfig | 1 + include/drm/drm_fb_helper.h | 14 ++++++++++++++ 41 files changed, 40 insertions(+), 48 deletions(-)
Signature · 6 lines
2.8.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/5 drm/fb-helper: Add a dummy remove_conflicting_framebuffers
Lots of drivers don't properly compile without this when CONFIG_FB=n. It's kinda a hack, but since CONFIG_FB doesn't stub any fucntions when it's disabled I think it makes sense to add it to drm_fb_helper.h.
Long term we probably need to rethink all the logic to unload firmware framebuffer drivers, at least if we want to be able to move away from CONFIG_FB and fbcon.
v2: Unfortunately just stubbing out remove_conflicting_framebuffers in drm_fb_helper.h upset gcc about static vs. non-static declarations, so a new wrapper it needs to be. Means more churn :(
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/bochs/bochs_drv.c | 3 ++- drivers/gpu/drm/cirrus/cirrus_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/mgag200/mgag200_drv.c | 2 +- drivers/gpu/drm/mgag200/mgag200_main.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- drivers/gpu/drm/radeon/radeon_drv.c | 3 ++- drivers/gpu/drm/sun4i/sun4i_drv.c | 3 ++- drivers/gpu/drm/vc4/vc4_drv.c | 3 ++- drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 3 ++- include/drm/drm_fb_helper.h | 14 ++++++++++++++ 12 files changed, 30 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -1
@@ -341,7 +341,7 @@ static int amdgpu_kick_out_firmware_fb(struct pci_dev *pdev)#ifdef CONFIG_X86 primary = pdev->resource[PCI_ROM_RESOURCE ].flags &IORESOURCE_ROM_SHADOW ;#endif -remove_conflicting_framebuffers (ap,"amdgpudrmfb" , primary); +drm_fb_helper_remove_conflicting_framebuffers (ap,"amdgpudrmfb" , primary);kfree (ap);return 0 ;
drivers/gpu/drm/bochs/bochs_drv.c +2 -1
@@ -8,6 +8,7 @@#include <linux/mm.h> #include <linux/module.h> #include <linux/slab.h> +#include <drm/drm_fb_helper.h> #include "bochs.h"
@@ -153,7 +154,7 @@ static int bochs_kick_out_firmware_fb(struct pci_dev *pdev) ap->ranges[0 ].base =pci_resource_start (pdev,0 ); ap->ranges[0 ].size =pci_resource_len (pdev,0 ); -remove_conflicting_framebuffers (ap,"bochsdrmfb" , false); +drm_fb_helper_remove_conflicting_framebuffers (ap,"bochsdrmfb" , false);kfree (ap);return 0 ;
drivers/gpu/drm/cirrus/cirrus_drv.c +1 -1
@@ -57,7 +57,7 @@ static int cirrus_kick_out_firmware_fb(struct pci_dev *pdev)#ifdef CONFIG_X86 primary = pdev->resource[PCI_ROM_RESOURCE ].flags &IORESOURCE_ROM_SHADOW ;#endif -remove_conflicting_framebuffers (ap,"cirrusdrmfb" , primary); +drm_fb_helper_remove_conflicting_framebuffers (ap,"cirrusdrmfb" , primary);kfree (ap);return 0 ;
drivers/gpu/drm/i915/i915_drv.c +1 -1
@@ -685,7 +685,7 @@ static int i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) primary = pdev->resource[PCI_ROM_RESOURCE ].flags &IORESOURCE_ROM_SHADOW ; - ret =remove_conflicting_framebuffers (ap,"inteldrmfb" , primary); + ret =drm_fb_helper_remove_conflicting_framebuffers (ap,"inteldrmfb" , primary);kfree (ap);
drivers/gpu/drm/mgag200/mgag200_drv.c +1 -1
@@ -56,7 +56,7 @@ static void mgag200_kick_out_firmware_fb(struct pci_dev *pdev)#ifdef CONFIG_X86 primary = pdev->resource[PCI_ROM_RESOURCE ].flags &IORESOURCE_ROM_SHADOW ;#endif -remove_conflicting_framebuffers (ap,"mgag200drmfb" , primary); +drm_fb_helper_remove_conflicting_framebuffers (ap,"mgag200drmfb" , primary);kfree (ap); }
drivers/gpu/drm/mgag200/mgag200_main.c +1 -1
@@ -135,7 +135,7 @@ static int mga_vram_init(struct mga_device *mdev) aper->ranges[0 ].base = mdev->mc.vram_base; aper->ranges[0 ].size = mdev->mc.vram_window; -remove_conflicting_framebuffers (aper,"mgafb" , true); +drm_fb_helper_remove_conflicting_framebuffers (aper,"mgafb" , true);kfree (aper); if (!devm_request_mem_region(mdev->dev->dev, mdev->mc.vram_base, mdev->mc.vram_window,
drivers/gpu/drm/nouveau/nouveau_drm.c +1 -1
@@ -351,7 +351,7 @@ static int nouveau_drm_probe(struct pci_dev *pdev, boot = pdev->resource[PCI_ROM_RESOURCE ].flags &IORESOURCE_ROM_SHADOW ;#endif if (nouveau_modeset !=2 ) -remove_conflicting_framebuffers (aper,"nouveaufb" , boot); +drm_fb_helper_remove_conflicting_framebuffers (aper,"nouveaufb" , boot);kfree (aper); ret = nvkm_device_pci_new(pdev, nouveau_config, nouveau_debug,
drivers/gpu/drm/radeon/radeon_drv.c +2 -1
@@ -39,6 +39,7 @@#include <linux/pm_runtime.h> #include <linux/vga_switcheroo.h> #include <drm/drm_gem.h> +#include <drm/drm_fb_helper.h> #include "drm_crtc_helper.h" #include "radeon_kfd.h"
@@ -324,7 +325,7 @@ static int radeon_kick_out_firmware_fb(struct pci_dev *pdev)#ifdef CONFIG_X86 primary = pdev->resource[PCI_ROM_RESOURCE ].flags &IORESOURCE_ROM_SHADOW ;#endif -remove_conflicting_framebuffers (ap,"radeondrmfb" , primary); +drm_fb_helper_remove_conflicting_framebuffers (ap,"radeondrmfb" , primary);kfree (ap);return 0 ;
drivers/gpu/drm/sun4i/sun4i_drv.c +2 -1
@@ -17,6 +17,7 @@#include <drm/drm_crtc_helper.h> #include <drm/drm_fb_cma_helper.h> #include <drm/drm_gem_cma_helper.h> +#include <drm/drm_fb_helper.h> #include "sun4i_crtc.h" #include "sun4i_drv.h"
@@ -109,7 +110,7 @@ static void sun4i_remove_framebuffers(void) ap->ranges[0 ].base =0 ; ap->ranges[0 ].size = ~0 ; -remove_conflicting_framebuffers (ap,"sun4i-drm-fb" , false); +drm_fb_helper_remove_conflicting_framebuffers (ap,"sun4i-drm-fb" , false);kfree (ap); }
drivers/gpu/drm/vc4/vc4_drv.c +2 -1
@@ -16,6 +16,7 @@#include <linux/platform_device.h> #include <linux/pm_runtime.h> #include "drm_fb_cma_helper.h" +#include <drm/drm_fb_helper.h> #include "uapi/drm/vc4_drm.h" #include "vc4_drv.h"
@@ -214,7 +215,7 @@ static void vc4_kick_out_firmware_fb(void) ap->ranges[0 ].base =0 ; ap->ranges[0 ].size = ~0 ; -remove_conflicting_framebuffers (ap,"vc4drmfb" , false); +drm_fb_helper_remove_conflicting_framebuffers (ap,"vc4drmfb" , false);kfree (ap); }
drivers/gpu/drm/virtio/virtgpu_drm_bus.c +2 -1
@@ -24,6 +24,7 @@*/ #include <linux/pci.h> +#include <drm/drm_fb_helper.h> #include "virtgpu_drv.h"
@@ -42,7 +43,7 @@ static void virtio_pci_kick_out_firmware_fb(struct pci_dev *pci_dev) primary = pci_dev->resource[PCI_ROM_RESOURCE ].flags &IORESOURCE_ROM_SHADOW ; -remove_conflicting_framebuffers (ap,"virtiodrmfb" , primary); +drm_fb_helper_remove_conflicting_framebuffers (ap,"virtiodrmfb" , primary);kfree (ap); }
include/drm/drm_fb_helper.h +14 -0
@@ -32,6 +32,7 @@struct drm_fb_helper ; +#include <drm/drm_crtc.h> #include <linux/kgdb.h> enum mode_set_atomic {
@@ -281,6 +282,12 @@ drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn,int drm_fb_helper_add_one_connector (struct drm_fb_helper *fb_helper,struct drm_connector *connector);int drm_fb_helper_remove_one_connector (struct drm_fb_helper *fb_helper,struct drm_connector *connector); +static inline int +drm_fb_helper_remove_conflicting_framebuffers (struct apertures_struct *a, +const char *name,bool primary) +{ +return remove_conflicting_framebuffers (a, name, primary); +}#else static inline int drm_fb_helper_modinit (void ) {
@@ -474,5 +481,12 @@ drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper, {return 0 ; } + +static inline int +drm_fb_helper_remove_conflicting_framebuffers (struct apertures_struct *a, +const char *name,bool primary) +{ +return 0 ; +}#endif #endif
Signature · 6 lines
2.8.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/5 drm: Remove superflous linux/fb.h includes
In reply to Daniel VetterEveryone who uses the fbdev emulation helpers doesn't need to include fb.h directly. Remove it.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c | 1 - drivers/gpu/drm/armada/armada_fbdev.c | 1 - drivers/gpu/drm/ast/ast_fb.c | 1 - drivers/gpu/drm/bochs/bochs.h | 1 - drivers/gpu/drm/bridge/parade-ps8622.c | 1 - drivers/gpu/drm/cirrus/cirrus_fbdev.c | 2 -- drivers/gpu/drm/drm_fb_helper.c | 1 - drivers/gpu/drm/gma500/accel_2d.c | 1 - drivers/gpu/drm/gma500/framebuffer.c | 1 - drivers/gpu/drm/gma500/psb_intel_modes.c | 1 - drivers/gpu/drm/i915/intel_fbdev.c | 1 - drivers/gpu/drm/i915/intel_modes.c | 1 - drivers/gpu/drm/imx/imx-drm-core.c | 1 - drivers/gpu/drm/imx/ipuv3-crtc.c | 1 - drivers/gpu/drm/mgag200/mgag200_fb.c | 2 -- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c | 1 - drivers/gpu/drm/qxl/qxl_fb.c | 1 - drivers/gpu/drm/radeon/radeon_fb.c | 1 - 26 files changed, 28 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +0 -1
@@ -25,7 +25,6 @@*/ #include <linux/module.h> #include <linux/slab.h> -#include <linux/fb.h> #include <drm/drmP.h> #include <drm/drm_crtc.h>
drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c +0 -1
@@ -22,7 +22,6 @@*/ #include <linux/module.h> #include <linux/slab.h> -#include <linux/fb.h> #include "linux/delay.h" #include "hwmgr.h"
drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c +0 -1
@@ -22,7 +22,6 @@*/ #include <linux/module.h> #include <linux/slab.h> -#include <linux/fb.h> #include <asm/div64.h> #include "linux/delay.h" #include "pp_acpi.h"
drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c +0 -1
@@ -22,7 +22,6 @@*/ #include <linux/module.h> #include <linux/slab.h> -#include <linux/fb.h> #include "ppatomctrl.h" #include "atombios.h"
drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c +0 -1
@@ -22,7 +22,6 @@*/ #include <linux/module.h> #include <linux/slab.h> -#include <linux/fb.h> #include "linux/delay.h" #include "pp_acpi.h" #include "hwmgr.h"
drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c +0 -1
@@ -22,7 +22,6 @@*/ #include <linux/module.h> #include <linux/slab.h> -#include <linux/fb.h> #include "tonga_processpptables.h" #include "ppatomctrl.h"
drivers/gpu/drm/armada/armada_fbdev.c +0 -1
@@ -7,7 +7,6 @@* published by the Free Software Foundation. */ #include <linux/errno.h> -#include <linux/fb.h> #include <linux/kernel.h> #include <linux/module.h>
drivers/gpu/drm/ast/ast_fb.c +0 -1
@@ -33,7 +33,6 @@#include <linux/tty.h> #include <linux/sysrq.h> #include <linux/delay.h> -#include <linux/fb.h> #include <linux/init.h>
drivers/gpu/drm/bochs/bochs.h +0 -1
@@ -1,5 +1,4 @@#include <linux/io.h> -#include <linux/fb.h> #include <linux/console.h> #include <drm/drmP.h>
drivers/gpu/drm/bridge/parade-ps8622.c +0 -1
@@ -16,7 +16,6 @@#include <linux/backlight.h> #include <linux/delay.h> #include <linux/err.h> -#include <linux/fb.h> #include <linux/gpio.h> #include <linux/gpio/consumer.h> #include <linux/i2c.h>
drivers/gpu/drm/cirrus/cirrus_fbdev.c +0 -2
@@ -13,8 +13,6 @@#include <drm/drm_fb_helper.h> #include <drm/drm_crtc_helper.h> -#include <linux/fb.h> -#include "cirrus_drv.h" static void cirrus_dirty_update(struct cirrus_fbdev *afbdev,
drivers/gpu/drm/drm_fb_helper.c +0 -1
@@ -32,7 +32,6 @@#include <linux/kernel.h> #include <linux/sysrq.h> #include <linux/slab.h> -#include <linux/fb.h> #include <linux/module.h> #include <drm/drmP.h> #include <drm/drm_crtc.h>
drivers/gpu/drm/gma500/accel_2d.c +0 -1
@@ -28,7 +28,6 @@#include <linux/tty.h> #include <linux/slab.h> #include <linux/delay.h> -#include <linux/fb.h> #include <linux/init.h> #include <linux/console.h>
drivers/gpu/drm/gma500/framebuffer.c +0 -1
@@ -26,7 +26,6 @@#include <linux/tty.h> #include <linux/slab.h> #include <linux/delay.h> -#include <linux/fb.h> #include <linux/init.h> #include <linux/console.h>
drivers/gpu/drm/gma500/psb_intel_modes.c +0 -1
@@ -18,7 +18,6 @@*/ #include <linux/i2c.h> -#include <linux/fb.h> #include <drm/drmP.h> #include "psb_intel_drv.h"
drivers/gpu/drm/i915/intel_fbdev.c +0 -1
@@ -34,7 +34,6 @@#include <linux/tty.h> #include <linux/sysrq.h> #include <linux/delay.h> -#include <linux/fb.h> #include <linux/init.h> #include <linux/vga_switcheroo.h>
drivers/gpu/drm/i915/intel_modes.c +0 -1
@@ -25,7 +25,6 @@#include <linux/slab.h> #include <linux/i2c.h> -#include <linux/fb.h> #include <drm/drm_edid.h> #include <drm/drmP.h> #include "intel_drv.h"
drivers/gpu/drm/imx/imx-drm-core.c +0 -1
@@ -16,7 +16,6 @@#include <linux/component.h> #include <linux/device.h> #include <linux/dma-buf.h> -#include <linux/fb.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/reservation.h>
drivers/gpu/drm/imx/ipuv3-crtc.c +0 -1
@@ -21,7 +21,6 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_helper.h> -#include <linux/fb.h> #include <linux/clk.h> #include <linux/errno.h> #include <drm/drm_gem_cma_helper.h>
drivers/gpu/drm/mgag200/mgag200_fb.c +0 -2
@@ -15,8 +15,6 @@#include <drm/drm_fb_helper.h> #include <drm/drm_crtc_helper.h> -#include <linux/fb.h> -#include "mgag200_drv.h" static void mga_dirty_update(struct mga_fbdev *mfbdev,
drivers/gpu/drm/nouveau/nouveau_fbcon.c +0 -1
@@ -32,7 +32,6 @@#include <linux/tty.h> #include <linux/sysrq.h> #include <linux/delay.h> -#include <linux/fb.h> #include <linux/init.h> #include <linux/screen_info.h> #include <linux/vga_switcheroo.h>
drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +0 -1
@@ -13,7 +13,6 @@#include <linux/backlight.h> #include <linux/delay.h> -#include <linux/fb.h> #include <linux/gpio/consumer.h> #include <linux/interrupt.h> #include <linux/jiffies.h>
drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c +0 -1
@@ -14,7 +14,6 @@#include <linux/module.h> #include <linux/delay.h> #include <linux/spi/spi.h> -#include <linux/fb.h> #include <linux/gpio/consumer.h> #include <linux/of_gpio.h>
drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c +0 -1
@@ -28,7 +28,6 @@#include <linux/jiffies.h> #include <linux/sched.h> #include <linux/backlight.h> -#include <linux/fb.h> #include <linux/gpio/consumer.h> #include <linux/of.h> #include <linux/of_gpio.h>
drivers/gpu/drm/qxl/qxl_fb.c +0 -1
@@ -24,7 +24,6 @@* David Airlie */ #include <linux/module.h> -#include <linux/fb.h> #include "drmP.h" #include "drm/drm.h"
drivers/gpu/drm/radeon/radeon_fb.c +0 -1
@@ -25,7 +25,6 @@*/ #include <linux/module.h> #include <linux/slab.h> -#include <linux/fb.h> #include <drm/drmP.h> #include <drm/drm_crtc.h>
Signature · 6 lines
2.8.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/5 drm/vmwgfx: select CONFIG_FB
In reply to Daniel Vettervmwgfx doesn't actually build without that.
It would be great if vmwgfx could switch over to the fbdev emulation helpers, since those will take care of all this already. I guess one reason to not do that was lack of defio support in the helpers, but that's fixed now. If there's any other hold-up, we should figure out what it is and whether it makes sense to address it.
--- drivers/gpu/drm/vmwgfx/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/vmwgfx/Kconfig +1 -0
@@ -6,6 +6,7 @@ config DRM_VMWGFX select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select DRM_TTM + select FB # Only needed for the transitional use of drm_crtc_init - can be removed # again once vmwgfx sets up the primary plane itself. select DRM_KMS_HELPER
Signature · 6 lines
2.8.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/5 drm/radeon|amgpu: Make fbdev emulation optional
In reply to Daniel VetterSeems to at least compile fine, only change needed was to use the fb_set_suspend helper.
--- drivers/gpu/drm/Kconfig | 8 -------- drivers/gpu/drm/radeon/radeon_fb.c | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-)
drivers/gpu/drm/Kconfig +0 -8
@@ -129,12 +129,8 @@ config DRM_R128 config DRM_RADEON tristate "ATI Radeon" depends on DRM && PCI - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT select FW_LOADER select DRM_KMS_HELPER - select DRM_KMS_FB_HELPER select DRM_TTM select POWER_SUPPLY select HWMON
@@ -153,12 +149,8 @@ source "drivers/gpu/drm/radeon/Kconfig" config DRM_AMDGPU tristate "AMD GPU" depends on DRM && PCI - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT select FW_LOADER select DRM_KMS_HELPER - select DRM_KMS_FB_HELPER select DRM_TTM select POWER_SUPPLY select HWMON
drivers/gpu/drm/radeon/radeon_fb.c +1 -1
@@ -382,7 +382,7 @@ void radeon_fbdev_fini(struct radeon_device *rdev)void radeon_fbdev_set_suspend (struct radeon_device *rdev,int state) {if (rdev->mode_info.rfbdev) -fb_set_suspend (rdev->mode_info.rfbdev->helper.fbdev, state); +drm_fb_helper_set_suspend (&rdev->mode_info.rfbdev->helper, state); }bool radeon_fbdev_robj_is_fb (struct radeon_device *rdev,struct radeon_bo *robj)
Signature · 6 lines
2.8.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 5/5 drm: Protect fb_defio in drivers with CONFIG_KMS_FBDEV_EMULATION
In reply to Daniel VetterFor reasons that entirely elude me fb.h exposes all the structures, even when it is not enabled. Except for special stuff like fb_defio.
Which means all the drivers which haven't yet switched over to the defio support in the helpers and still roll their own, will fail to compile when fbdev emulation is disabled. Protect just those bits, as a gnarly reminder that conversion to the core defio helpers would be good.
--- drivers/gpu/drm/qxl/qxl_fb.c | 4 ++++ drivers/gpu/drm/udl/udl_fb.c | 4 ++++ 2 files changed, 8 insertions(+)
drivers/gpu/drm/qxl/qxl_fb.c +4 -0
@@ -72,10 +72,12 @@ static void qxl_fb_image_init(struct qxl_fb_image *qxl_fb_image, } } +#ifdef CONFIG_DRM_FBDEV_EMULATION static struct fb_deferred_io qxl_defio = { .delay =QXL_DIRTY_DELAY , .deferred_io = drm_fb_helper_deferred_io, }; +#endif static struct fb_ops qxlfb_ops = { .owner =THIS_MODULE ,
@@ -312,8 +314,10 @@ static int qxlfb_create(struct qxl_fbdev *qfbdev, goto out_destroy_fbi; } +#ifdef CONFIG_DRM_FBDEV_EMULATION info->fbdefio = &qxl_defio;fb_deferred_io_init (info); +#endif qdev->fbdev_info = info; qdev->fbdev_qfb = &qfbdev->qfb;
drivers/gpu/drm/udl/udl_fb.c +4 -0
@@ -203,6 +203,7 @@ static int udl_fb_open(struct fb_info *info, int user) ufbdev->fb_count++; +#ifdef CONFIG_DRM_FBDEV_EMULATION if (fb_defio && (info->fbdefio ==NULL )) {/* enable defio at last moment if not disabled by client */
@@ -218,6 +219,7 @@ static int udl_fb_open(struct fb_info *info, int user) info->fbdefio = fbdefio; fb_deferred_io_init(info); } +#endif pr_notice ("open /dev/fb%d user=%d fb_info=%p count=%d\n" , info->node, user, info, ufbdev->fb_count);
@@ -235,12 +237,14 @@ static int udl_fb_release(struct fb_info *info, int user) ufbdev->fb_count--; +#ifdef CONFIG_DRM_FBDEV_EMULATION if ((ufbdev->fb_count ==0 ) && (info->fbdefio)) {fb_deferred_io_cleanup (info);kfree (info->fbdefio); info->fbdefio =NULL ; info->fbops->fb_mmap = udl_fb_mmap; } +#endif pr_warn ("released /dev/fb%d user=%d count=%d\n" , info->node, user, ufbdev->fb_count);
Signature · 6 lines
2.8.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 11 lines · Daniel Vetter
0-day has been annoying me lately with a constant trickle of build failures with a few drivers when
DRM_FBDEV_EMULATIONis not set. This series here should fix them all I hope.
-DanielDaniel Vetter (5):
drm/fb-helper: Add a dummyremove_conflicting_framebuffers
drm: Remove superflouslinux/fb.hincludes drm/vmwgfx: selectCONFIG_FB
drm/radeon|amgpu: Make fbdev emulation optional
drm: Protectfb_defioin drivers withCONFIG_KMS_FBDEV_EMULATION
For the series:
Quoted 44 lines
drivers/gpu/drm/Kconfig | 8 -------- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 1 - .../gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c | 1 - drivers/gpu/drm/armada/armada_fbdev.c | 1 - drivers/gpu/drm/ast/ast_fb.c | 1 - drivers/gpu/drm/bochs/bochs.h | 1 - drivers/gpu/drm/bochs/bochs_drv.c | 3 ++- drivers/gpu/drm/bridge/parade-ps8622.c | 1 - drivers/gpu/drm/cirrus/cirrus_drv.c | 2 +- drivers/gpu/drm/cirrus/cirrus_fbdev.c | 2 -- drivers/gpu/drm/drm_fb_helper.c | 1 - drivers/gpu/drm/gma500/accel_2d.c | 1 - drivers/gpu/drm/gma500/framebuffer.c | 1 - drivers/gpu/drm/gma500/psb_intel_modes.c | 1 - drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/intel_fbdev.c | 1 - drivers/gpu/drm/i915/intel_modes.c | 1 - drivers/gpu/drm/imx/imx-drm-core.c | 1 - drivers/gpu/drm/imx/ipuv3-crtc.c | 1 - drivers/gpu/drm/mgag200/mgag200_drv.c | 2 +- drivers/gpu/drm/mgag200/mgag200_fb.c | 2 -- drivers/gpu/drm/mgag200/mgag200_main.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c | 1 - drivers/gpu/drm/qxl/qxl_fb.c | 5 ++++- drivers/gpu/drm/radeon/radeon_drv.c | 3 ++- drivers/gpu/drm/radeon/radeon_fb.c | 3 +-- drivers/gpu/drm/sun4i/sun4i_drv.c | 3 ++- drivers/gpu/drm/udl/udl_fb.c | 4 ++++ drivers/gpu/drm/vc4/vc4_drv.c | 3 ++- drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 3 ++- drivers/gpu/drm/vmwgfx/Kconfig | 1 + include/drm/drm_fb_helper.h | 14 ++++++++++++++ 41 files changed, 40 insertions(+), 48 deletions(-)
Quoted 7 lines
--
2.8.1_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 13 lines · Alex Deucher
Quoted 11 lines · Daniel Vetter
0-day has been annoying me lately with a constant trickle of build failures with a few drivers when
DRM_FBDEV_EMULATIONis not set. This series here should fix them all I hope.
-DanielDaniel Vetter (5):
drm/fb-helper: Add a dummyremove_conflicting_framebuffers
drm: Remove superflouslinux/fb.hincludes drm/vmwgfx: selectCONFIG_FB
drm/radeon|amgpu: Make fbdev emulation optional
drm: Protectfb_defioin drivers withCONFIG_KMS_FBDEV_EMULATION
Quoted 2 lines
For the series:
Reviewed-by Alex Deucher <[email protected]>
Thanks for the review, all applied to drm-misc.
-Daniel
Quoted 52 lines
Quoted 52 lines
drivers/gpu/drm/Kconfig | 8 -------- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 1 - .../gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c | 1 - drivers/gpu/drm/armada/armada_fbdev.c | 1 - drivers/gpu/drm/ast/ast_fb.c | 1 - drivers/gpu/drm/bochs/bochs.h | 1 - drivers/gpu/drm/bochs/bochs_drv.c | 3 ++- drivers/gpu/drm/bridge/parade-ps8622.c | 1 - drivers/gpu/drm/cirrus/cirrus_drv.c | 2 +- drivers/gpu/drm/cirrus/cirrus_fbdev.c | 2 -- drivers/gpu/drm/drm_fb_helper.c | 1 - drivers/gpu/drm/gma500/accel_2d.c | 1 - drivers/gpu/drm/gma500/framebuffer.c | 1 - drivers/gpu/drm/gma500/psb_intel_modes.c | 1 - drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/intel_fbdev.c | 1 - drivers/gpu/drm/i915/intel_modes.c | 1 - drivers/gpu/drm/imx/imx-drm-core.c | 1 - drivers/gpu/drm/imx/ipuv3-crtc.c | 1 - drivers/gpu/drm/mgag200/mgag200_drv.c | 2 +- drivers/gpu/drm/mgag200/mgag200_fb.c | 2 -- drivers/gpu/drm/mgag200/mgag200_main.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c | 1 - drivers/gpu/drm/qxl/qxl_fb.c | 5 ++++- drivers/gpu/drm/radeon/radeon_drv.c | 3 ++- drivers/gpu/drm/radeon/radeon_fb.c | 3 +-- drivers/gpu/drm/sun4i/sun4i_drv.c | 3 ++- drivers/gpu/drm/udl/udl_fb.c | 4 ++++ drivers/gpu/drm/vc4/vc4_drv.c | 3 ++- drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 3 ++- drivers/gpu/drm/vmwgfx/Kconfig | 1 + include/drm/drm_fb_helper.h | 14 ++++++++++++++ 41 files changed, 40 insertions(+), 48 deletions(-)--
2.8.1_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel