diff options
author | Dave Airlie <airlied@redhat.com> | 2008-05-29 14:02:14 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-05-29 14:02:14 +1000 |
commit | df8cd54286fbae5903d8ede390ec4a11cb6c4b6c (patch) | |
tree | 915a1b55354bbd6e2f32f68ecd4d1fde8fb5cae6 /linux-core/intel_tv.c | |
parent | ee5afc63428488c9c39e5ecd7d8cdc646a7b65b7 (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_tv.c')
-rw-r--r-- | linux-core/intel_tv.c | 12 |
1 files changed, 8 insertions, 4 deletions
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; |