summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-05-29 14:02:14 +1000
committerDave Airlie <airlied@redhat.com>2008-05-29 14:02:14 +1000
commitdf8cd54286fbae5903d8ede390ec4a11cb6c4b6c (patch)
tree915a1b55354bbd6e2f32f68ecd4d1fde8fb5cae6 /shared-core
parentee5afc63428488c9c39e5ecd7d8cdc646a7b65b7 (diff)
modesetting: reorganise code into core and helper functions.
This splits a lot of the core modesetting code out into a file of helper functions, that are only called from themselves and/or the driver. The driver gets called into more often or can call these functions from itself if it is a helper using driver. I've broken framebuffer resize doing this but I didn't like the API for that in any case.
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/i915_init.c3
-rw-r--r--shared-core/i915_irq.c11
2 files changed, 8 insertions, 6 deletions
diff --git a/shared-core/i915_init.c b/shared-core/i915_init.c
index bda15e01..f03f8949 100644
--- a/shared-core/i915_init.c
+++ b/shared-core/i915_init.c
@@ -13,6 +13,7 @@
#include "i915_drm.h"
#include "i915_drv.h"
#include "intel_bios.h"
+#include "intel_drv.h"
/**
* i915_probe_agp - get AGP bootup configuration
@@ -232,7 +233,7 @@ int i915_load_modeset_init(struct drm_device *dev)
}
intel_modeset_init(dev);
- drm_initial_config(dev, false);
+ drm_helper_initial_config(dev, false);
drm_mm_print(&dev->bm.man[DRM_BO_MEM_VRAM].manager, "VRAM");
drm_mm_print(&dev->bm.man[DRM_BO_MEM_TT].manager, "TT");
diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c
index 592e881b..ccedc70e 100644
--- a/shared-core/i915_irq.c
+++ b/shared-core/i915_irq.c
@@ -31,6 +31,7 @@
#include "i915_drm.h"
#include "i915_drv.h"
#include "intel_drv.h"
+#include "drm_crtc_helper.h"
#define MAX_NOPID ((u32)~0)
@@ -471,8 +472,8 @@ static void i915_hotplug_tv(struct drm_device *dev)
goto unlock;
status = output->funcs->detect(output);
- drm_hotplug_stage_two(dev, output,
- status == output_status_connected ? 1 : 0);
+ drm_helper_hotplug_stage_two(dev, output,
+ status == output_status_connected ? 1 : 0);
unlock:
mutex_unlock(&dev->mode_config.mutex);
@@ -497,7 +498,7 @@ static void i915_hotplug_crt(struct drm_device *dev, bool isconnected)
if (iout == 0)
goto unlock;
- drm_hotplug_stage_two(dev, output, isconnected);
+ drm_helper_hotplug_stage_two(dev, output, isconnected);
unlock:
mutex_unlock(&dev->mode_config.mutex);
@@ -518,9 +519,9 @@ static void i915_hotplug_sdvo(struct drm_device *dev, int sdvoB)
status = output->funcs->detect(output);
if (status != output_status_connected)
- drm_hotplug_stage_two(dev, output, false);
+ drm_helper_hotplug_stage_two(dev, output, false);
else
- drm_hotplug_stage_two(dev, output, true);
+ drm_helper_hotplug_stage_two(dev, output, true);
intel_sdvo_set_hotplug(output, 1);