aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-09 03:18:51 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-11 17:37:23 -0400
commit4520f53a159fb81b8c27afe52428a0959aff259c (patch)
tree7c0a64208cdd71c39cfad8f7f17a3a1fe20433b3 /drivers/gpu/drm
parent92b6f89f6b85f433ddac1f4a9eb0962dc96380fe (diff)
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. Cc: Lee, Chon Ming <chon.ming.lee@intel.com> Cc: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Chon Ming Lee <chon.ming.lee@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/Kconfig60
-rw-r--r--drivers/gpu/drm/i915/Kconfig67
-rw-r--r--drivers/gpu/drm/i915/Makefile3
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c9
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c6
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h2
-rw-r--r--drivers/gpu/drm/i915/intel_display.c10
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h36
8 files changed, 122 insertions, 71 deletions
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 3104b6d06f1a..b4e4fc0d6650 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -128,65 +128,7 @@ config DRM_I810
128 selected, the module will be called i810. AGP support is required 128 selected, the module will be called i810. AGP support is required
129 for this driver to work. 129 for this driver to work.
130 130
131config DRM_I915 131source "drivers/gpu/drm/i915/Kconfig"
132 tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics"
133 depends on DRM
134 depends on AGP
135 depends on AGP_INTEL
136 # we need shmfs for the swappable backing store, and in particular
137 # the shmem_readpage() which depends upon tmpfs
138 select SHMEM
139 select TMPFS
140 select DRM_KMS_HELPER
141 select DRM_KMS_FB_HELPER
142 select FB_CFB_FILLRECT
143 select FB_CFB_COPYAREA
144 select FB_CFB_IMAGEBLIT
145 # i915 depends on ACPI_VIDEO when ACPI is enabled
146 # but for select to work, need to select ACPI_VIDEO's dependencies, ick
147 select BACKLIGHT_LCD_SUPPORT if ACPI
148 select BACKLIGHT_CLASS_DEVICE if ACPI
149 select VIDEO_OUTPUT_CONTROL if ACPI
150 select INPUT if ACPI
151 select THERMAL if ACPI
152 select ACPI_VIDEO if ACPI
153 select ACPI_BUTTON if ACPI
154 help
155 Choose this option if you have a system that has "Intel Graphics
156 Media Accelerator" or "HD Graphics" integrated graphics,
157 including 830M, 845G, 852GM, 855GM, 865G, 915G, 945G, 965G,
158 G35, G41, G43, G45 chipsets and Celeron, Pentium, Core i3,
159 Core i5, Core i7 as well as Atom CPUs with integrated graphics.
160 If M is selected, the module will be called i915. AGP support
161 is required for this driver to work. This driver is used by
162 the Intel driver in X.org 6.8 and XFree86 4.4 and above. It
163 replaces the older i830 module that supported a subset of the
164 hardware in older X.org releases.
165
166 Note that the older i810/i815 chipsets require the use of the
167 i810 driver instead, and the Atom z5xx series has an entirely
168 different implementation.
169
170config DRM_I915_KMS
171 bool "Enable modesetting on intel by default"
172 depends on DRM_I915
173 help
174 Choose this option if you want kernel modesetting enabled by default,
175 and you have a new enough userspace to support this. Running old
176 userspaces with this enabled will cause pain. Note that this causes
177 the driver to bind to PCI devices, which precludes loading things
178 like intelfb.
179
180config DRM_I915_PRELIMINARY_HW_SUPPORT
181 bool "Enable preliminary support for prerelease Intel hardware by default"
182 depends on DRM_I915
183 help
184 Choose this option if you have prerelease Intel hardware and want the
185 i915 driver to support it by default. You can enable such support at
186 runtime with the module option i915.preliminary_hw_support=1; this
187 option changes the default for that module option.
188
189 If in doubt, say "N".
190 132
191config DRM_MGA 133config DRM_MGA
192 tristate "Matrox g200/g400" 134 tristate "Matrox g200/g400"
diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
new file mode 100644
index 000000000000..6199d0b5b958
--- /dev/null
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -0,0 +1,67 @@
1config DRM_I915
2 tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics"
3 depends on DRM
4 depends on AGP
5 depends on AGP_INTEL
6 # we need shmfs for the swappable backing store, and in particular
7 # the shmem_readpage() which depends upon tmpfs
8 select SHMEM
9 select TMPFS
10 select DRM_KMS_HELPER
11 # i915 depends on ACPI_VIDEO when ACPI is enabled
12 # but for select to work, need to select ACPI_VIDEO's dependencies, ick
13 select BACKLIGHT_LCD_SUPPORT if ACPI
14 select BACKLIGHT_CLASS_DEVICE if ACPI
15 select VIDEO_OUTPUT_CONTROL if ACPI
16 select INPUT if ACPI
17 select ACPI_VIDEO if ACPI
18 select ACPI_BUTTON if ACPI
19 help
20 Choose this option if you have a system that has "Intel Graphics
21 Media Accelerator" or "HD Graphics" integrated graphics,
22 including 830M, 845G, 852GM, 855GM, 865G, 915G, 945G, 965G,
23 G35, G41, G43, G45 chipsets and Celeron, Pentium, Core i3,
24 Core i5, Core i7 as well as Atom CPUs with integrated graphics.
25 If M is selected, the module will be called i915. AGP support
26 is required for this driver to work. This driver is used by
27 the Intel driver in X.org 6.8 and XFree86 4.4 and above. It
28 replaces the older i830 module that supported a subset of the
29 hardware in older X.org releases.
30
31 Note that the older i810/i815 chipsets require the use of the
32 i810 driver instead, and the Atom z5xx series has an entirely
33 different implementation.
34
35config DRM_I915_KMS
36 bool "Enable modesetting on intel by default"
37 depends on DRM_I915
38 help
39 Choose this option if you want kernel modesetting enabled by default,
40 and you have a new enough userspace to support this. Running old
41 userspaces with this enabled will cause pain. Note that this causes
42 the driver to bind to PCI devices, which precludes loading things
43 like intelfb.
44
45config DRM_I915_FBDEV
46 bool "Enable legacy fbdev support for the modesettting intel driver"
47 depends on DRM_I915
48 select DRM_KMS_FB_HELPER
49 select FB_CFB_FILLRECT
50 select FB_CFB_COPYAREA
51 select FB_CFB_IMAGEBLIT
52 default y
53 help
54 Choose this option if you have a need for the legacy fbdev
55 support. Note that this support also provide the linux console
56 support on top of the intel modesetting driver.
57
58config DRM_I915_PRELIMINARY_HW_SUPPORT
59 bool "Enable preliminary support for prerelease Intel hardware by default"
60 depends on DRM_I915
61 help
62 Choose this option if you have prerelease Intel hardware and want the
63 i915 driver to support it by default. You can enable such support at
64 runtime with the module option i915.preliminary_hw_support=1; this
65 option changes the default for that module option.
66
67 If in doubt, say "N".
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 65e60d26891b..45e14a8db2f3 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -33,7 +33,6 @@ i915-y := i915_drv.o i915_dma.o i915_irq.o \
33 intel_panel.o \ 33 intel_panel.o \
34 intel_pm.o \ 34 intel_pm.o \
35 intel_i2c.o \ 35 intel_i2c.o \
36 intel_fb.o \
37 intel_tv.o \ 36 intel_tv.o \
38 intel_dvo.o \ 37 intel_dvo.o \
39 intel_ringbuffer.o \ 38 intel_ringbuffer.o \
@@ -54,6 +53,8 @@ i915-$(CONFIG_COMPAT) += i915_ioc32.o
54 53
55i915-$(CONFIG_ACPI) += intel_acpi.o 54i915-$(CONFIG_ACPI) += intel_acpi.o
56 55
56i915-$(CONFIG_DRM_I915_FBDEV) += intel_fb.o
57
57obj-$(CONFIG_DRM_I915) += i915.o 58obj-$(CONFIG_DRM_I915) += i915.o
58 59
59CFLAGS_i915_trace_points.o := -I$(src) 60CFLAGS_i915_trace_points.o := -I$(src)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index a569597125db..72d04588eccb 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1403,12 +1403,12 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)
1403{ 1403{
1404 struct drm_info_node *node = (struct drm_info_node *) m->private; 1404 struct drm_info_node *node = (struct drm_info_node *) m->private;
1405 struct drm_device *dev = node->minor->dev; 1405 struct drm_device *dev = node->minor->dev;
1406 drm_i915_private_t *dev_priv = dev->dev_private; 1406 struct intel_fbdev *ifbdev = NULL;
1407 struct intel_fbdev *ifbdev;
1408 struct intel_framebuffer *fb; 1407 struct intel_framebuffer *fb;
1409 int ret;
1410 1408
1411 ret = mutex_lock_interruptible(&dev->mode_config.mutex); 1409#ifdef CONFIG_DRM_I915_FBDEV
1410 struct drm_i915_private *dev_priv = dev->dev_private;
1411 int ret = mutex_lock_interruptible(&dev->mode_config.mutex);
1412 if (ret) 1412 if (ret)
1413 return ret; 1413 return ret;
1414 1414
@@ -1424,6 +1424,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)
1424 describe_obj(m, fb->obj); 1424 describe_obj(m, fb->obj);
1425 seq_putc(m, '\n'); 1425 seq_putc(m, '\n');
1426 mutex_unlock(&dev->mode_config.mutex); 1426 mutex_unlock(&dev->mode_config.mutex);
1427#endif
1427 1428
1428 mutex_lock(&dev->mode_config.fb_lock); 1429 mutex_lock(&dev->mode_config.fb_lock);
1429 list_for_each_entry(fb, &dev->mode_config.fb_list, base.head) { 1430 list_for_each_entry(fb, &dev->mode_config.fb_list, base.head) {
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 9a5424180127..53c958ce3a02 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1416,6 +1416,7 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master)
1416 master->driver_priv = NULL; 1416 master->driver_priv = NULL;
1417} 1417}
1418 1418
1419#ifdef CONFIG_DRM_I915_FBDEV
1419static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) 1420static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv)
1420{ 1421{
1421 struct apertures_struct *ap; 1422 struct apertures_struct *ap;
@@ -1436,6 +1437,11 @@ static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv)
1436 1437
1437 kfree(ap); 1438 kfree(ap);
1438} 1439}
1440#else
1441static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv)
1442{
1443}
1444#endif
1439 1445
1440static void i915_dump_device_info(struct drm_i915_private *dev_priv) 1446static void i915_dump_device_info(struct drm_i915_private *dev_priv)
1441{ 1447{
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 36b82cc48b4c..2ea66f23c2be 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1368,8 +1368,10 @@ typedef struct drm_i915_private {
1368 1368
1369 struct drm_i915_gem_object *vlv_pctx; 1369 struct drm_i915_gem_object *vlv_pctx;
1370 1370
1371#ifdef CONFIG_DRM_I915_FBDEV
1371 /* list of fbdev register on this device */ 1372 /* list of fbdev register on this device */
1372 struct intel_fbdev *fbdev; 1373 struct intel_fbdev *fbdev;
1374#endif
1373 1375
1374 /* 1376 /*
1375 * The console may be contended at resume, but we don't 1377 * The console may be contended at resume, but we don't
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 502f000e252c..fd38c3762518 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7335,6 +7335,7 @@ static struct drm_framebuffer *
7335mode_fits_in_fbdev(struct drm_device *dev, 7335mode_fits_in_fbdev(struct drm_device *dev,
7336 struct drm_display_mode *mode) 7336 struct drm_display_mode *mode)
7337{ 7337{
7338#ifdef CONFIG_DRM_I915_FBDEV
7338 struct drm_i915_private *dev_priv = dev->dev_private; 7339 struct drm_i915_private *dev_priv = dev->dev_private;
7339 struct drm_i915_gem_object *obj; 7340 struct drm_i915_gem_object *obj;
7340 struct drm_framebuffer *fb; 7341 struct drm_framebuffer *fb;
@@ -7355,6 +7356,9 @@ mode_fits_in_fbdev(struct drm_device *dev,
7355 return NULL; 7356 return NULL;
7356 7357
7357 return fb; 7358 return fb;
7359#else
7360 return NULL;
7361#endif
7358} 7362}
7359 7363
7360bool intel_get_load_detect_pipe(struct drm_connector *connector, 7364bool intel_get_load_detect_pipe(struct drm_connector *connector,
@@ -10101,6 +10105,12 @@ intel_user_framebuffer_create(struct drm_device *dev,
10101 return intel_framebuffer_create(dev, mode_cmd, obj); 10105 return intel_framebuffer_create(dev, mode_cmd, obj);
10102} 10106}
10103 10107
10108#ifndef CONFIG_DRM_I915_FBDEV
10109static inline void intel_fb_output_poll_changed(struct drm_device *dev)
10110{
10111}
10112#endif
10113
10104static const struct drm_mode_config_funcs intel_mode_funcs = { 10114static const struct drm_mode_config_funcs intel_mode_funcs = {
10105 .fb_create = intel_user_framebuffer_create, 10115 .fb_create = intel_user_framebuffer_create,
10106 .output_poll_changed = intel_fb_output_poll_changed, 10116 .output_poll_changed = intel_fb_output_poll_changed,
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index b497a96af082..0f8402bc4222 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -713,14 +713,36 @@ bool intel_dsi_init(struct drm_device *dev);
713void intel_dvo_init(struct drm_device *dev); 713void intel_dvo_init(struct drm_device *dev);
714 714
715 715
716/* intel_fb.c */ 716/* legacy fbdev emulation in intel_fb.c */
717int intel_fbdev_init(struct drm_device *dev); 717#ifdef CONFIG_DRM_I915_FBDEV
718void intel_fbdev_initial_config(struct drm_device *dev); 718extern int intel_fbdev_init(struct drm_device *dev);
719void intel_fbdev_fini(struct drm_device *dev); 719extern void intel_fbdev_initial_config(struct drm_device *dev);
720void intel_fbdev_set_suspend(struct drm_device *dev, int state); 720extern void intel_fbdev_fini(struct drm_device *dev);
721void intel_fb_output_poll_changed(struct drm_device *dev); 721extern void intel_fbdev_set_suspend(struct drm_device *dev, int state);
722void intel_fb_restore_mode(struct drm_device *dev); 722extern void intel_fb_output_poll_changed(struct drm_device *dev);
723extern void intel_fb_restore_mode(struct drm_device *dev);
724#else
725static inline int intel_fbdev_init(struct drm_device *dev)
726{
727 return 0;
728}
723 729
730static inline void intel_fbdev_initial_config(struct drm_device *dev)
731{
732}
733
734static inline void intel_fbdev_fini(struct drm_device *dev)
735{
736}
737
738static inline void intel_fbdev_set_suspend(struct drm_device *dev, int state)
739{
740}
741
742static inline void intel_fb_restore_mode(struct drm_device *dev)
743{
744}
745#endif
724 746
725/* intel_hdmi.c */ 747/* intel_hdmi.c */
726void intel_hdmi_init(struct drm_device *dev, int hdmi_reg, enum port port); 748void intel_hdmi_init(struct drm_device *dev, int hdmi_reg, enum port port);