aboutsummaryrefslogtreecommitdiff
path: root/linux-core/intel_dvo.c
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 /linux-core/intel_dvo.c
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 'linux-core/intel_dvo.c')
-rw-r--r--linux-core/intel_dvo.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/linux-core/intel_dvo.c b/linux-core/intel_dvo.c
index 6f319107..5a7da276 100644
--- a/linux-core/intel_dvo.c
+++ b/linux-core/intel_dvo.c
@@ -325,19 +325,21 @@ static struct drm_crtc *intel_dvo_get_crtc(struct drm_output *output)
}
#endif
+static const struct drm_output_helper_funcs intel_dvo_helper_funcs = {
+ .mode_fixup = intel_dvo_mode_fixup,
+ .prepare = intel_output_prepare,
+ .mode_set = intel_dvo_mode_set,
+ .commit = intel_output_commit,
+};
static const struct drm_output_funcs intel_dvo_output_funcs = {
.dpms = intel_dvo_dpms,
.save = intel_dvo_save,
.restore = intel_dvo_restore,
- .mode_valid = intel_dvo_mode_valid,
- .mode_fixup = intel_dvo_mode_fixup,
- .prepare = intel_output_prepare,
- .mode_set = intel_dvo_mode_set,
- .commit = intel_output_commit,
.detect = intel_dvo_detect,
.get_modes = intel_dvo_get_modes,
- .cleanup = intel_dvo_destroy
+ .cleanup = intel_dvo_destroy,
+ .mode_valid = intel_dvo_mode_valid,
};
/**
@@ -457,6 +459,7 @@ void intel_dvo_init(struct drm_device *dev)
goto free_i2c;
}
+ drm_output_helper_add(output, &intel_dvo_helper_funcs);
output->driver_private = intel_output;
output->display_info.subpixel_order = SubPixelHorizontalRGB;
output->interlace_allowed = false;