drm/i915: Use CONFIG_DRM_FBDEV_EMULATION
Subsystems (2)
PATCH 1/1 drm/i915: Use CONFIG_DRM_FBDEV_EMULATION
Instead of our own duplicated one. This fixes a bug in the driver unload code if DRM_FBDEV_EMULATION=n but DRM_I915_FBDEV=y because we try to unregister the nonexistent fbdev drm_framebuffer.
--- drivers/gpu/drm/i915/Kconfig | 15 --------------- drivers/gpu/drm/i915/Makefile | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_dp_mst.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 +- 7 files changed, 8 insertions(+), 23 deletions(-)
drivers/gpu/drm/i915/Kconfig +0 -15
@@ -36,21 +36,6 @@ config DRM_I915 i810 driver instead, and the Atom z5xx series has an entirely different implementation. -config DRM_I915_FBDEV - bool "Enable legacy fbdev support for the modesetting 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. - - If in doubt, say "Y". - config DRM_I915_PRELIMINARY_HW_SUPPORT bool "Enable preliminary support for prerelease Intel hardware by default" depends on DRM_I915
drivers/gpu/drm/i915/Makefile +1 -1
@@ -62,7 +62,7 @@ i915-y += intel_audio.o \ intel_sideband.o \ intel_sprite.o i915-$(CONFIG_ACPI) += intel_acpi.o intel_opregion.o -i915-$(CONFIG_DRM_I915_FBDEV) += intel_fbdev.o +i915-$(CONFIG_DRM_FBDEV_EMULATION) += intel_fbdev.o # modesetting output/encoder code i915-y += dvo_ch7017.o \
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
@@ -1868,7 +1868,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)struct intel_framebuffer *fb;struct drm_framebuffer *drm_fb; -#ifdef CONFIG_DRM_I915_FBDEV +#ifdef CONFIG_DRM_FBDEV_EMULATION struct drm_i915_private *dev_priv = dev->dev_private; ifbdev = dev_priv->fbdev;
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -1855,7 +1855,7 @@ struct drm_i915_private {struct drm_i915_gem_object *vlv_pctx; -#ifdef CONFIG_DRM_I915_FBDEV +#ifdef CONFIG_DRM_FBDEV_EMULATION /* list of fbdev register on this device */ struct intel_fbdev *fbdev;struct work_struct fbdev_suspend_work;
drivers/gpu/drm/i915/intel_display.c +2 -2
@@ -10131,7 +10131,7 @@ static struct drm_framebuffer * mode_fits_in_fbdev(struct drm_device *dev, struct drm_display_mode *mode) { -#ifdef CONFIG_DRM_I915_FBDEV +#ifdef CONFIG_DRM_FBDEV_EMULATION struct drm_i915_private *dev_priv = dev->dev_private;struct drm_i915_gem_object *obj;struct drm_framebuffer *fb;
@@ -14313,7 +14313,7 @@ intel_user_framebuffer_create(struct drm_device *dev,return intel_framebuffer_create (dev, mode_cmd, obj); } -#ifndef CONFIG_DRM_I915_FBDEV +#ifndef CONFIG_DRM_FBDEV_EMULATION static inline void intel_fbdev_output_poll_changed (struct drm_device *dev) { }
drivers/gpu/drm/i915/intel_dp_mst.c +2 -2
@@ -406,7 +406,7 @@ static bool intel_dp_mst_get_hw_state(struct intel_connector *connector)static void intel_connector_add_to_fbdev (struct intel_connector *connector) { -#ifdef CONFIG_DRM_I915_FBDEV +#ifdef CONFIG_DRM_FBDEV_EMULATION struct drm_i915_private *dev_priv =to_i915 (connector->base.dev);drm_fb_helper_add_one_connector (&dev_priv->fbdev->helper, &connector->base);#endif
@@ -414,7 +414,7 @@ static void intel_connector_add_to_fbdev(struct intel_connector *connector)static void intel_connector_remove_from_fbdev (struct intel_connector *connector) { -#ifdef CONFIG_DRM_I915_FBDEV +#ifdef CONFIG_DRM_FBDEV_EMULATION struct drm_i915_private *dev_priv =to_i915 (connector->base.dev);drm_fb_helper_remove_one_connector (&dev_priv->fbdev->helper, &connector->base);#endif
drivers/gpu/drm/i915/intel_drv.h +1 -1
@@ -1205,7 +1205,7 @@ void intel_dvo_init(struct drm_device *dev);/* legacy fbdev emulation in intel_fbdev.c */ -#ifdef CONFIG_DRM_I915_FBDEV +#ifdef CONFIG_DRM_FBDEV_EMULATION extern int intel_fbdev_init (struct drm_device *dev);extern void intel_fbdev_initial_config (void *data,async_cookie_t cookie);extern void intel_fbdev_fini (struct drm_device *dev);
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Daniel Vetter
Instead of our own duplicated one. This fixes a bug in the driver unload code if DRM_FBDEV_EMULATION=n but DRM_I915_FBDEV=y because we try to unregister the nonexistent fbdev
drm_framebuffer.Cc Archit Taneja <[email protected]>Cc Maarten Lankhorst <[email protected]>Reported-by Maarten Lankhorst <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/i915/Kconfig | 15 --------------- drivers/gpu/drm/i915/Makefile | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_dp_mst.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 +- 7 files changed, 8 insertions(+), 23 deletions(-)
Isn't this going to cause some pain to users because .config may not have this symbol yet? Arguably this is somewhat mitigated by the fact that both symbols are "default y", but technically somebody could have DRM_I915_FBDEV=n in their .config and after this change fbdev emulation will be switched on again.
I'm not sure how to upgrade more sanely, though, so perhaps this is just a bullet that needs biting.
Thierry
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 19 lines · Thierry Reding
Quoted 8 lines · Daniel Vetter
Instead of our own duplicated one. This fixes a bug in the driver unload code if DRM_FBDEV_EMULATION=n but DRM_I915_FBDEV=y because we try to unregister the nonexistent fbdev
drm_framebuffer.Cc Archit Taneja <[email protected]>Cc Maarten Lankhorst <[email protected]>Reported-by Maarten Lankhorst <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Quoted 9 lines
--- drivers/gpu/drm/i915/Kconfig | 15 --------------- drivers/gpu/drm/i915/Makefile | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_dp_mst.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 +- 7 files changed, 8 insertions(+), 23 deletions(-)
Quoted 8 lines
Isn't this going to cause some pain to users because .config may not have this symbol yet? Arguably this is somewhat mitigated by the fact that both symbols are "default y", but technically somebody could have DRM_I915_FBDEV=n in their .config and after this change fbdev emulation will be switched on again.
I'm not sure how to upgrade more sanely, though, so perhaps this is just a bullet that needs biting.
There are other drivers two with their private FBDEV option (like msm) so I don't think we can do any sensible upgrade logic that just works. -Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Op 10-08-15 om 13:34 schreef Daniel Vetter:
Quoted 132 lines
Instead of our own duplicated one. This fixes a bug in the driver unload code if DRM_FBDEV_EMULATION=n but DRM_I915_FBDEV=y because we try to unregister the nonexistent fbdev
drm_framebuffer.Cc Archit Taneja <[email protected]>Cc Maarten Lankhorst <[email protected]>Reported-by Maarten Lankhorst <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/i915/Kconfig | 15 --------------- drivers/gpu/drm/i915/Makefile | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_dp_mst.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 +- 7 files changed, 8 insertions(+), 23 deletions(-)drivers/gpu/drm/i915/Kconfig +0
-15@@ -36,21 +36,6 @@ config DRM_I915 i810 driver instead, and the Atom z5xx series has an entirely different implementation. -config DRM_I915_FBDEV - bool "Enable legacy fbdev support for the modesetting 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. - - If in doubt, say "Y". - config DRM_I915_PRELIMINARY_HW_SUPPORT bool "Enable preliminary support for prerelease Intel hardware by default" depends on DRM_I915drivers/gpu/drm/i915/Makefile +1
-1@@ -62,7 +62,7 @@ i915-y += intel_audio.o \ intel_sideband.o \ intel_sprite.o i915-$(CONFIG_ACPI) += intel_acpi.o intel_opregion.o -i915-$(CONFIG_DRM_I915_FBDEV) += intel_fbdev.o +i915-$(CONFIG_DRM_FBDEV_EMULATION) += intel_fbdev.o # modesetting output/encoder code i915-y += dvo_ch7017.o \drivers/gpu/drm/i915/i915_debugfs.c +1
-1@@ -1868,7 +1868,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)struct intel_framebuffer *fb;struct drm_framebuffer *drm_fb; -#ifdef CONFIG_DRM_I915_FBDEV +#ifdef CONFIG_DRM_FBDEV_EMULATION struct drm_i915_private *dev_priv = dev->dev_private; ifbdev = dev_priv->fbdev;drivers/gpu/drm/i915/i915_drv.h +1
-1@@ -1855,7 +1855,7 @@ struct drm_i915_private {struct drm_i915_gem_object *vlv_pctx; -#ifdef CONFIG_DRM_I915_FBDEV +#ifdef CONFIG_DRM_FBDEV_EMULATION /* list of fbdev register on this device */ struct intel_fbdev *fbdev;struct work_struct fbdev_suspend_work;drivers/gpu/drm/i915/intel_display.c +2
-2@@ -10131,7 +10131,7 @@ static struct drm_framebuffer * mode_fits_in_fbdev(struct drm_device *dev, struct drm_display_mode *mode) { -#ifdef CONFIG_DRM_I915_FBDEV +#ifdef CONFIG_DRM_FBDEV_EMULATION struct drm_i915_private *dev_priv = dev->dev_private;struct drm_i915_gem_object *obj;struct drm_framebuffer *fb;@@ -14313,7 +14313,7 @@ intel_user_framebuffer_create(struct drm_device *dev,return intel_framebuffer_create (dev, mode_cmd, obj); } -#ifndef CONFIG_DRM_I915_FBDEV +#ifndef CONFIG_DRM_FBDEV_EMULATION static inline void intel_fbdev_output_poll_changed (struct drm_device *dev) { }drivers/gpu/drm/i915/intel_dp_mst.c +2
-2@@ -406,7 +406,7 @@ static bool intel_dp_mst_get_hw_state(struct intel_connector *connector)static void intel_connector_add_to_fbdev (struct intel_connector *connector) { -#ifdef CONFIG_DRM_I915_FBDEV +#ifdef CONFIG_DRM_FBDEV_EMULATION struct drm_i915_private *dev_priv =to_i915 (connector->base.dev);drm_fb_helper_add_one_connector (&dev_priv->fbdev->helper, &connector->base);#endif @@ -414,7 +414,7 @@ static void intel_connector_add_to_fbdev(struct intel_connector *connector)static void intel_connector_remove_from_fbdev (struct intel_connector *connector) { -#ifdef CONFIG_DRM_I915_FBDEV +#ifdef CONFIG_DRM_FBDEV_EMULATION struct drm_i915_private *dev_priv =to_i915 (connector->base.dev);drm_fb_helper_remove_one_connector (&dev_priv->fbdev->helper, &connector->base);#endif drivers/gpu/drm/i915/intel_drv.h +0
-0
drivers/gpu/drm/i915/intel_drv.h void intel_dvo_init(struct drm_device *dev); · line 1211
Quoted 8 lines
drivers/gpu/drm/i915/intel_drv.h +1
-1@@ -1205,7 +1205,7 @@ void intel_dvo_init(struct drm_device *dev);/* legacy fbdev emulation in intel_fbdev.c */ -#ifdef CONFIG_DRM_I915_FBDEV +#ifdef CONFIG_DRM_FBDEV_EMULATION extern int intel_fbdev_init (struct drm_device *dev);extern void intel_fbdev_initial_config (void *data,async_cookie_t cookie);extern void intel_fbdev_fini (struct drm_device *dev);
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Op 10-08-15 om 13:34 schreef Daniel Vetter:
Quoted 24 lines
Instead of our own duplicated one. This fixes a bug in the driver unload code if DRM_FBDEV_EMULATION=n but DRM_I915_FBDEV=y because we try to unregister the nonexistent fbdev
drm_framebuffer.Cc Archit Taneja <[email protected]>Cc Maarten Lankhorst <[email protected]>Reported-by Maarten Lankhorst <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/i915/Kconfig | 15 --------------- drivers/gpu/drm/i915/Makefile | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_dp_mst.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 +- 7 files changed, 8 insertions(+), 23 deletions(-)drivers/gpu/drm/i915/Kconfig +0
-0@@ -36,21 +36,6 @@ config DRM_I915 i810 driver instead, and the Atom z5xx series has an entirely
drivers/gpu/drm/i915/Kconfig config DRM_I915 · line 39
Quoted 10 lines
drivers/gpu/drm/i915/Kconfig +0
-7different implementation. -config DRM_I915_FBDEV - bool "Enable legacy fbdev support for the modesetting intel driver" - depends on DRM_I915 - select DRM_KMS_FB_HELPER - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT
Did some testing and didn't find a way to break this. Has the bug been fixed where if some option selects X that selects Y it also had to select Y?
Oh well, have my r-b. :-)
~Maarten
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter
AppliedQuoted 27 lines · Maarten Lankhorst
Op 10-08-15 om 13:34 schreef Daniel Vetter:
Quoted 26 lines
Instead of our own duplicated one. This fixes a bug in the driver unload code if DRM_FBDEV_EMULATION=n but DRM_I915_FBDEV=y because we try to unregister the nonexistent fbdev
drm_framebuffer.Cc Archit Taneja <[email protected]>Cc Maarten Lankhorst <[email protected]>Reported-by Maarten Lankhorst <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/i915/Kconfig | 15 --------------- drivers/gpu/drm/i915/Makefile | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_dp_mst.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 +- 7 files changed, 8 insertions(+), 23 deletions(-)drivers/gpu/drm/i915/Kconfig +0
-0@@ -36,21 +36,6 @@ config DRM_I915 i810 driver instead, and the Atom z5xx series has an entirely different implementation.
Quoted 10 lines
drivers/gpu/drm/i915/Kconfig config DRM_I915
Quoted 8 lines
drivers/gpu/drm/i915/Kconfig +0
-7-config DRM_I915_FBDEV - bool "Enable legacy fbdev support for the modesetting intel driver" - depends on DRM_I915 - select DRM_KMS_FB_HELPER - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLITDid some testing and didn't find a way to break this. Has the bug been fixed where if some option selects X that selects Y it also had to select Y?
Nope, but DRM_FBDEV_EMULATION should carry all the same selects as we did.
Quoted 4 lines
Oh well, have my r-b. :-)
Reviewed-by Maarten Lankhorst <[email protected]>
Thanks, applied to drm-misc.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Task id: 7131 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
ILK -2 302/302 300/302
SNB 315/315 315/315 IVB 336/336 336/336
BYT -1 283/283 282/283
HSW 378/378 378/378
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*ILK igt@kms_flip@flip-vs-dpms-interruptible PASS(1) DMESG_WARN(1) *ILK igt@kms_flip@wf_vblank-vs-modeset-interruptible PASS(1) DMESG_WARN(1) *BYT igt@gem_partial_pwrite_pread@reads-uncached PASS(1) FAIL(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx