aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-01-20 17:12:54 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-02-13 18:07:53 -0500
commit76a39dbfb2d1bc45219839e5a95d4ceaf6ca114f (patch)
treec6b6a620f88deb9956b6e9e92d1393d185e502c6
parent203cb50143029b2bc95736ce10f7defcf59aca44 (diff)
drm/fb-helper: don't disable everything in initial_config
This should be done in the drivers for two reasons: - it gets in the way of fastboot efforts - it links the fb helpers with the crtc helpers instead of going through the real interface vfuncs, forcing i915 to fake all the ->disable callbacks used by the crtc helper to avoid ugly Oopsen v2: Resolve conflicts since drivers still call drm_fb_helper_single_add_all_connectors. Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/ast/ast_fb.c5
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_fbdev.c4
-rw-r--r--drivers/gpu/drm/drm_fb_cma_helper.c3
-rw-r--r--drivers/gpu/drm/drm_fb_helper.c3
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fbdev.c3
-rw-r--r--drivers/gpu/drm/gma500/framebuffer.c4
-rw-r--r--drivers/gpu/drm/i915/intel_fb.c3
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_fb.c5
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_fbcon.c3
-rw-r--r--drivers/gpu/drm/radeon/radeon_fb.c4
-rw-r--r--drivers/gpu/drm/udl/udl_fb.c4
-rw-r--r--drivers/staging/omapdrm/omap_fbdev.c4
12 files changed, 42 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c
index 3e6584b940dc..81763cad9940 100644
--- a/drivers/gpu/drm/ast/ast_fb.c
+++ b/drivers/gpu/drm/ast/ast_fb.c
@@ -40,6 +40,7 @@
40#include <drm/drmP.h> 40#include <drm/drmP.h>
41#include <drm/drm_crtc.h> 41#include <drm/drm_crtc.h>
42#include <drm/drm_fb_helper.h> 42#include <drm/drm_fb_helper.h>
43#include <drm/drm_crtc_helper.h>
43#include "ast_drv.h" 44#include "ast_drv.h"
44 45
45static void ast_dirty_update(struct ast_fbdev *afbdev, 46static void ast_dirty_update(struct ast_fbdev *afbdev,
@@ -314,6 +315,10 @@ int ast_fbdev_init(struct drm_device *dev)
314 } 315 }
315 316
316 drm_fb_helper_single_add_all_connectors(&afbdev->helper); 317 drm_fb_helper_single_add_all_connectors(&afbdev->helper);
318
319 /* disable all the possible outputs/crtcs before entering KMS mode */
320 drm_helper_disable_unused_functions(dev);
321
317 drm_fb_helper_initial_config(&afbdev->helper, 32); 322 drm_fb_helper_initial_config(&afbdev->helper, 32);
318 return 0; 323 return 0;
319} 324}
diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
index 3daea0f638c3..b96605c6e1b6 100644
--- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c
+++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
@@ -11,6 +11,7 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <drm/drmP.h> 12#include <drm/drmP.h>
13#include <drm/drm_fb_helper.h> 13#include <drm/drm_fb_helper.h>
14#include <drm/drm_crtc_helper.h>
14 15
15#include <linux/fb.h> 16#include <linux/fb.h>
16 17
@@ -291,6 +292,9 @@ int cirrus_fbdev_init(struct cirrus_device *cdev)
291 return ret; 292 return ret;
292 } 293 }
293 drm_fb_helper_single_add_all_connectors(&gfbdev->helper); 294 drm_fb_helper_single_add_all_connectors(&gfbdev->helper);
295
296 /* disable all the possible outputs/crtcs before entering KMS mode */
297 drm_helper_disable_unused_functions(cdev->dev);
294 drm_fb_helper_initial_config(&gfbdev->helper, bpp_sel); 298 drm_fb_helper_initial_config(&gfbdev->helper, bpp_sel);
295 299
296 return 0; 300 return 0;
diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
index 1b6ba2d4d60c..ef3d33a8a7e2 100644
--- a/drivers/gpu/drm/drm_fb_cma_helper.c
+++ b/drivers/gpu/drm/drm_fb_cma_helper.c
@@ -333,6 +333,9 @@ struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev,
333 333
334 } 334 }
335 335
336 /* disable all the possible outputs/crtcs before entering KMS mode */
337 drm_helper_disable_unused_functions(dev);
338
336 ret = drm_fb_helper_initial_config(helper, preferred_bpp); 339 ret = drm_fb_helper_initial_config(helper, preferred_bpp);
337 if (ret < 0) { 340 if (ret < 0) {
338 dev_err(dev->dev, "Failed to set inital hw configuration.\n"); 341 dev_err(dev->dev, "Failed to set inital hw configuration.\n");
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index f5d362680f2b..d841b68aaa3e 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1360,9 +1360,6 @@ bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel)
1360 struct drm_device *dev = fb_helper->dev; 1360 struct drm_device *dev = fb_helper->dev;
1361 int count = 0; 1361 int count = 0;
1362 1362
1363 /* disable all the possible outputs/crtcs before entering KMS mode */
1364 drm_helper_disable_unused_functions(fb_helper->dev);
1365
1366 drm_fb_helper_parse_command_line(fb_helper); 1363 drm_fb_helper_parse_command_line(fb_helper);
1367 1364
1368 count = drm_fb_helper_probe_connector_modes(fb_helper, 1365 count = drm_fb_helper_probe_connector_modes(fb_helper,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index 086d0f79785f..fe2a0f068af7 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -295,6 +295,9 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
295 295
296 } 296 }
297 297
298 /* disable all the possible outputs/crtcs before entering KMS mode */
299 drm_helper_disable_unused_functions(dev);
300
298 ret = drm_fb_helper_initial_config(helper, PREFERRED_BPP); 301 ret = drm_fb_helper_initial_config(helper, PREFERRED_BPP);
299 if (ret < 0) { 302 if (ret < 0) {
300 DRM_ERROR("failed to set up hw configuration.\n"); 303 DRM_ERROR("failed to set up hw configuration.\n");
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index c1ef37e2efdf..fee3bf85af4a 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -616,6 +616,10 @@ int psb_fbdev_init(struct drm_device *dev)
616 INTELFB_CONN_LIMIT); 616 INTELFB_CONN_LIMIT);
617 617
618 drm_fb_helper_single_add_all_connectors(&fbdev->psb_fb_helper); 618 drm_fb_helper_single_add_all_connectors(&fbdev->psb_fb_helper);
619
620 /* disable all the possible outputs/crtcs before entering KMS mode */
621 drm_helper_disable_unused_functions(dev);
622
619 drm_fb_helper_initial_config(&fbdev->psb_fb_helper, 32); 623 drm_fb_helper_initial_config(&fbdev->psb_fb_helper, 32);
620 return 0; 624 return 0;
621} 625}
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index 1c510da04d16..e67061249934 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -258,6 +258,9 @@ void intel_fbdev_initial_config(struct drm_device *dev)
258{ 258{
259 drm_i915_private_t *dev_priv = dev->dev_private; 259 drm_i915_private_t *dev_priv = dev->dev_private;
260 260
261 /* disable all the possible outputs/crtcs before entering KMS mode */
262 drm_helper_disable_unused_functions(dev);
263
261 /* Due to peculiar init order wrt to hpd handling this is separate. */ 264 /* Due to peculiar init order wrt to hpd handling this is separate. */
262 drm_fb_helper_initial_config(&dev_priv->fbdev->helper, 32); 265 drm_fb_helper_initial_config(&dev_priv->fbdev->helper, 32);
263} 266}
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c
index 5c69b432f99a..5bded5b74eaf 100644
--- a/drivers/gpu/drm/mgag200/mgag200_fb.c
+++ b/drivers/gpu/drm/mgag200/mgag200_fb.c
@@ -13,6 +13,7 @@
13#include <linux/module.h> 13#include <linux/module.h>
14#include <drm/drmP.h> 14#include <drm/drmP.h>
15#include <drm/drm_fb_helper.h> 15#include <drm/drm_fb_helper.h>
16#include <drm/drm_crtc_helper.h>
16 17
17#include <linux/fb.h> 18#include <linux/fb.h>
18 19
@@ -278,6 +279,10 @@ int mgag200_fbdev_init(struct mga_device *mdev)
278 return ret; 279 return ret;
279 } 280 }
280 drm_fb_helper_single_add_all_connectors(&mfbdev->helper); 281 drm_fb_helper_single_add_all_connectors(&mfbdev->helper);
282
283 /* disable all the possible outputs/crtcs before entering KMS mode */
284 drm_helper_disable_unused_functions(mdev->dev);
285
281 drm_fb_helper_initial_config(&mfbdev->helper, 32); 286 drm_fb_helper_initial_config(&mfbdev->helper, 32);
282 287
283 return 0; 288 return 0;
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index d4ecb4deb484..b1ebfe30f912 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -491,6 +491,9 @@ nouveau_fbcon_init(struct drm_device *dev)
491 else 491 else
492 preferred_bpp = 32; 492 preferred_bpp = 32;
493 493
494 /* disable all the possible outputs/crtcs before entering KMS mode */
495 drm_helper_disable_unused_functions(dev);
496
494 drm_fb_helper_initial_config(&fbcon->helper, preferred_bpp); 497 drm_fb_helper_initial_config(&fbcon->helper, preferred_bpp);
495 return 0; 498 return 0;
496} 499}
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
index 515e5ee1f9ee..b48d1c8cf9eb 100644
--- a/drivers/gpu/drm/radeon/radeon_fb.c
+++ b/drivers/gpu/drm/radeon/radeon_fb.c
@@ -379,6 +379,10 @@ int radeon_fbdev_init(struct radeon_device *rdev)
379 } 379 }
380 380
381 drm_fb_helper_single_add_all_connectors(&rfbdev->helper); 381 drm_fb_helper_single_add_all_connectors(&rfbdev->helper);
382
383 /* disable all the possible outputs/crtcs before entering KMS mode */
384 drm_helper_disable_unused_functions(rdev->ddev);
385
382 drm_fb_helper_initial_config(&rfbdev->helper, bpp_sel); 386 drm_fb_helper_initial_config(&rfbdev->helper, bpp_sel);
383 return 0; 387 return 0;
384} 388}
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
index b9feec9d08d3..cf5d05a0d955 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
@@ -619,6 +619,10 @@ int udl_fbdev_init(struct drm_device *dev)
619 } 619 }
620 620
621 drm_fb_helper_single_add_all_connectors(&ufbdev->helper); 621 drm_fb_helper_single_add_all_connectors(&ufbdev->helper);
622
623 /* disable all the possible outputs/crtcs before entering KMS mode */
624 drm_helper_disable_unused_functions(dev);
625
622 drm_fb_helper_initial_config(&ufbdev->helper, bpp_sel); 626 drm_fb_helper_initial_config(&ufbdev->helper, bpp_sel);
623 return 0; 627 return 0;
624} 628}
diff --git a/drivers/staging/omapdrm/omap_fbdev.c b/drivers/staging/omapdrm/omap_fbdev.c
index 2728e37e02be..7e66eb138315 100644
--- a/drivers/staging/omapdrm/omap_fbdev.c
+++ b/drivers/staging/omapdrm/omap_fbdev.c
@@ -369,6 +369,10 @@ struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev)
369 } 369 }
370 370
371 drm_fb_helper_single_add_all_connectors(helper); 371 drm_fb_helper_single_add_all_connectors(helper);
372
373 /* disable all the possible outputs/crtcs before entering KMS mode */
374 drm_helper_disable_unused_functions(dev);
375
372 drm_fb_helper_initial_config(helper, 32); 376 drm_fb_helper_initial_config(helper, 32);
373 377
374 priv->fbdev = helper; 378 priv->fbdev = helper;