diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-08 12:52:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-08 12:52:16 -0400 |
commit | e9f37d3a8d126e73f5737ef548cdf6f618e295e4 (patch) | |
tree | 831eb4952637828a7bbafa361185e0ca57aa86ed /drivers/gpu/drm/exynos/exynos_drm_fbdev.c | |
parent | 5fb6b953bb7aa86a9c8ea760934982cedc45c52b (diff) | |
parent | c39b06951f1dc2e384650288676c5b7dcc0ec92c (diff) |
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie:
"Highlights:
- drm:
Generic display port aux features, primary plane support, drm
master management fixes, logging cleanups, enforced locking checks
(instead of docs), documentation improvements, minor number
handling cleanup, pseudofs for shared inodes.
- ttm:
add ability to allocate from both ends
- i915:
broadwell features, power domain and runtime pm, per-process
address space infrastructure (not enabled)
- msm:
power management, hdmi audio support
- nouveau:
ongoing GPU fault recovery, initial maxwell support, random fixes
- exynos:
refactored driver to clean up a lot of abstraction, DP support
moved into drm, LVDS bridge support added, parallel panel support
- gma500:
SGX MMU support, SGX irq handling, asle irq work fixes
- radeon:
video engine bringup, ring handling fixes, use dp aux helpers
- vmwgfx:
add rendernode support"
* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (849 commits)
DRM: armada: fix corruption while loading cursors
drm/dp_helper: don't return EPROTO for defers (v2)
drm/bridge: export ptn3460_init function
drm/exynos: remove MODULE_DEVICE_TABLE definitions
ARM: dts: exynos4412-trats2: enable exynos/fimd node
ARM: dts: exynos4210-trats: enable exynos/fimd node
ARM: dts: exynos4412-trats2: add panel node
ARM: dts: exynos4210-trats: add panel node
ARM: dts: exynos4: add MIPI DSI Master node
drm/panel: add S6E8AA0 driver
ARM: dts: exynos4210-universal_c210: add proper panel node
drm/panel: add ld9040 driver
panel/ld9040: add DT bindings
panel/s6e8aa0: add DT bindings
drm/exynos: add DSIM driver
exynos/dsim: add DT bindings
drm/exynos: disallow fbdev initialization if no device is connected
drm/mipi_dsi: create dsi devices only for nodes with reg property
drm/mipi_dsi: add flags to DSI messages
Skip intel_crt_init for Dell XPS 8700
...
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_fbdev.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index e7c2f2d07f19..addbf7536da4 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c | |||
@@ -90,7 +90,7 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper, | |||
90 | /* RGB formats use only one buffer */ | 90 | /* RGB formats use only one buffer */ |
91 | buffer = exynos_drm_fb_buffer(fb, 0); | 91 | buffer = exynos_drm_fb_buffer(fb, 0); |
92 | if (!buffer) { | 92 | if (!buffer) { |
93 | DRM_LOG_KMS("buffer is null.\n"); | 93 | DRM_DEBUG_KMS("buffer is null.\n"); |
94 | return -EFAULT; | 94 | return -EFAULT; |
95 | } | 95 | } |
96 | 96 | ||
@@ -237,6 +237,24 @@ static struct drm_fb_helper_funcs exynos_drm_fb_helper_funcs = { | |||
237 | .fb_probe = exynos_drm_fbdev_create, | 237 | .fb_probe = exynos_drm_fbdev_create, |
238 | }; | 238 | }; |
239 | 239 | ||
240 | bool exynos_drm_fbdev_is_anything_connected(struct drm_device *dev) | ||
241 | { | ||
242 | struct drm_connector *connector; | ||
243 | bool ret = false; | ||
244 | |||
245 | mutex_lock(&dev->mode_config.mutex); | ||
246 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { | ||
247 | if (connector->status != connector_status_connected) | ||
248 | continue; | ||
249 | |||
250 | ret = true; | ||
251 | break; | ||
252 | } | ||
253 | mutex_unlock(&dev->mode_config.mutex); | ||
254 | |||
255 | return ret; | ||
256 | } | ||
257 | |||
240 | int exynos_drm_fbdev_init(struct drm_device *dev) | 258 | int exynos_drm_fbdev_init(struct drm_device *dev) |
241 | { | 259 | { |
242 | struct exynos_drm_fbdev *fbdev; | 260 | struct exynos_drm_fbdev *fbdev; |
@@ -248,6 +266,9 @@ int exynos_drm_fbdev_init(struct drm_device *dev) | |||
248 | if (!dev->mode_config.num_crtc || !dev->mode_config.num_connector) | 266 | if (!dev->mode_config.num_crtc || !dev->mode_config.num_connector) |
249 | return 0; | 267 | return 0; |
250 | 268 | ||
269 | if (!exynos_drm_fbdev_is_anything_connected(dev)) | ||
270 | return 0; | ||
271 | |||
251 | fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL); | 272 | fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL); |
252 | if (!fbdev) | 273 | if (!fbdev) |
253 | return -ENOMEM; | 274 | return -ENOMEM; |