From df8cd54286fbae5903d8ede390ec4a11cb6c4b6c Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 29 May 2008 14:02:14 +1000 Subject: 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. --- linux-core/intel_tv.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'linux-core/intel_tv.c') diff --git a/linux-core/intel_tv.c b/linux-core/intel_tv.c index 650c46f7..18fb1f37 100644 --- a/linux-core/intel_tv.c +++ b/linux-core/intel_tv.c @@ -1590,15 +1590,18 @@ out: return ret; } +static const struct drm_output_helper_funcs intel_tv_helper_funcs = { + .mode_fixup = intel_tv_mode_fixup, + .prepare = intel_output_prepare, + .mode_set = intel_tv_mode_set, + .commit = intel_output_commit, +}; + static const struct drm_output_funcs intel_tv_output_funcs = { .dpms = intel_tv_dpms, .save = intel_tv_save, .restore = intel_tv_restore, .mode_valid = intel_tv_mode_valid, - .mode_fixup = intel_tv_mode_fixup, - .prepare = intel_output_prepare, - .mode_set = intel_tv_mode_set, - .commit = intel_output_commit, .detect = intel_tv_detect, .get_modes = intel_tv_get_modes, .cleanup = intel_tv_destroy, @@ -1674,6 +1677,7 @@ intel_tv_init(struct drm_device *dev) tv_priv->tv_format = kstrdup(tv_modes[initial_mode].name, GFP_KERNEL); + drm_output_helper_add(output, &intel_tv_helper_funcs); output->driver_private = intel_output; output->interlace_allowed = FALSE; output->doublescan_allowed = FALSE; -- cgit v1.2.3