diff options
author | Alan Cox <alan@linux.intel.com> | 2011-07-05 15:39:50 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-07-05 08:20:41 -0700 |
commit | 80f51c32c4b52e88c192de8471135dbbd158cc13 (patch) | |
tree | 8704b9d260b4f1ad7cd1057b0f55557eb920af2a /drivers/staging/gma500/psb_intel_display.c | |
parent | 71138b7f0735d277f71f0d7ba1918c8922f12cce (diff) | |
download | op-kernel-dev-80f51c32c4b52e88c192de8471135dbbd158cc13.zip op-kernel-dev-80f51c32c4b52e88c192de8471135dbbd158cc13.tar.gz |
gma500: add more ops
Split the 2d properties, name, and various function vectors out so that we
can get rid of more conditional gloop in favour of a per device structure.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/gma500/psb_intel_display.c')
-rw-r--r-- | drivers/staging/gma500/psb_intel_display.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/staging/gma500/psb_intel_display.c b/drivers/staging/gma500/psb_intel_display.c index 907c68e..6792d0c 100644 --- a/drivers/staging/gma500/psb_intel_display.c +++ b/drivers/staging/gma500/psb_intel_display.c @@ -1260,7 +1260,7 @@ void psb_intel_crtc_destroy(struct drm_crtc *crtc) kfree(psb_intel_crtc); } -static const struct drm_crtc_helper_funcs psb_intel_helper_funcs = { +const struct drm_crtc_helper_funcs psb_intel_helper_funcs = { .dpms = psb_intel_crtc_dpms, .mode_fixup = psb_intel_crtc_mode_fixup, .mode_set = psb_intel_crtc_mode_set, @@ -1304,12 +1304,8 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe, return; } - if (IS_MFLD(dev)) - drm_crtc_init(dev, &psb_intel_crtc->base, - &mdfld_intel_crtc_funcs); - else - drm_crtc_init(dev, &psb_intel_crtc->base, - &psb_intel_crtc_funcs); + /* Set the CRTC operations from the chip specific data */ + drm_crtc_init(dev, &psb_intel_crtc->base, dev_priv->ops->crtc_funcs); drm_mode_crtc_set_gamma_size(&psb_intel_crtc->base, 256); psb_intel_crtc->pipe = pipe; @@ -1332,15 +1328,8 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe, psb_intel_crtc->mode_dev = mode_dev; psb_intel_crtc->cursor_addr = 0; - if (IS_MRST(dev)) - drm_crtc_helper_add(&psb_intel_crtc->base, - &mrst_helper_funcs); - else if (IS_MFLD(dev)) - drm_crtc_helper_add(&psb_intel_crtc->base, - &mdfld_helper_funcs); - else - drm_crtc_helper_add(&psb_intel_crtc->base, - &psb_intel_helper_funcs); + drm_crtc_helper_add(&psb_intel_crtc->base, + dev_priv->ops->crtc_helper); /* Setup the array of drm_connector pointer array */ psb_intel_crtc->mode_set.crtc = &psb_intel_crtc->base; |