Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357891
b: refs/heads/master
c: 52d7ece
h: refs/heads/master
i:
  357889: f86effe
  357887: 39060d6
v: v3
  • Loading branch information
Daniel Vetter committed Dec 6, 2012
1 parent 3ea3bbb commit 6d17814
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 61bac78e03d4385e225cb2837e33974feda489c2
refs/heads/master: 52d7ecedac3f96fb562cb482c139015372728638
23 changes: 14 additions & 9 deletions trunk/drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1294,27 +1294,32 @@ static int i915_load_modeset_init(struct drm_device *dev)
if (ret)
goto cleanup_vga_switcheroo;

ret = drm_irq_install(dev);
if (ret)
goto cleanup_gem_stolen;

/* Important: The output setup functions called by modeset_init need
* working irqs for e.g. gmbus and dp aux transfers. */
intel_modeset_init(dev);

ret = i915_gem_init(dev);
if (ret)
goto cleanup_gem_stolen;

intel_modeset_gem_init(dev);
goto cleanup_irq;

INIT_WORK(&dev_priv->console_resume_work, intel_console_resume);

ret = drm_irq_install(dev);
if (ret)
goto cleanup_gem;
intel_modeset_gem_init(dev);

/* Always safe in the mode setting case. */
/* FIXME: do pre/post-mode set stuff in core KMS code */
dev->vblank_disable_allowed = 1;

ret = intel_fbdev_init(dev);
if (ret)
goto cleanup_irq;
goto cleanup_gem;

/* Only enable hotplug handling once the fbdev is fully set up. */
dev_priv->enable_hotplug_processing = true;

drm_kms_helper_poll_init(dev);

Expand All @@ -1323,13 +1328,13 @@ static int i915_load_modeset_init(struct drm_device *dev)

return 0;

cleanup_irq:
drm_irq_uninstall(dev);
cleanup_gem:
mutex_lock(&dev->struct_mutex);
i915_gem_cleanup_ringbuffer(dev);
mutex_unlock(&dev->struct_mutex);
i915_gem_cleanup_aliasing_ppgtt(dev);
cleanup_irq:
drm_irq_uninstall(dev);
cleanup_gem_stolen:
i915_gem_cleanup_stolen(dev);
cleanup_vga_switcheroo:
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ typedef struct drm_i915_private {

u32 hotplug_supported_mask;
struct work_struct hotplug_work;
bool enable_hotplug_processing;

int num_pipe;
int num_pch_pll;
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ static void i915_hotplug_work_func(struct work_struct *work)
struct drm_mode_config *mode_config = &dev->mode_config;
struct intel_encoder *encoder;

/* HPD irq before everything is fully set up. */
if (!dev_priv->enable_hotplug_processing)
return;

mutex_lock(&mode_config->mutex);
DRM_DEBUG_KMS("running encoder hotplug functions\n");

Expand Down

0 comments on commit 6d17814

Please sign in to comment.