diff options
| author | Patrik Jakobsson <patrik.r.jakobsson@gmail.com> | 2013-07-10 11:40:54 -0400 |
|---|---|---|
| committer | Patrik Jakobsson <patrik.r.jakobsson@gmail.com> | 2013-07-23 19:47:20 -0400 |
| commit | 4855177ed0d94621eaf1c6bec64f16318a8be5fe (patch) | |
| tree | fcf823619867ec3425df1e5bfd79a54989b607fa | |
| parent | d1fa08f3bacb6fc9a7642c85a4fa8976a3f1afac (diff) | |
drm/gma500/psb: Use identical generic crtc funcs
This patch makes psb use the gma_xxx counterparts that are identical. I
took them in one sweep as they should not cause any regressions.
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
| -rw-r--r-- | drivers/gpu/drm/gma500/psb_intel_display.c | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c index fa57864f210d..0642e7d37fa8 100644 --- a/drivers/gpu/drm/gma500/psb_intel_display.c +++ b/drivers/gpu/drm/gma500/psb_intel_display.c | |||
| @@ -255,18 +255,6 @@ static void psb_intel_crtc_dpms(struct drm_crtc *crtc, int mode) | |||
| 255 | REG_WRITE(DSPARB, 0x3F3E); | 255 | REG_WRITE(DSPARB, 0x3F3E); |
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | static void psb_intel_crtc_prepare(struct drm_crtc *crtc) | ||
| 259 | { | ||
| 260 | struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; | ||
| 261 | crtc_funcs->dpms(crtc, DRM_MODE_DPMS_OFF); | ||
| 262 | } | ||
| 263 | |||
| 264 | static void psb_intel_crtc_commit(struct drm_crtc *crtc) | ||
| 265 | { | ||
| 266 | struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; | ||
| 267 | crtc_funcs->dpms(crtc, DRM_MODE_DPMS_ON); | ||
| 268 | } | ||
| 269 | |||
| 270 | void psb_intel_encoder_prepare(struct drm_encoder *encoder) | 258 | void psb_intel_encoder_prepare(struct drm_encoder *encoder) |
| 271 | { | 259 | { |
| 272 | struct drm_encoder_helper_funcs *encoder_funcs = | 260 | struct drm_encoder_helper_funcs *encoder_funcs = |
| @@ -291,14 +279,6 @@ void psb_intel_encoder_destroy(struct drm_encoder *encoder) | |||
| 291 | kfree(intel_encoder); | 279 | kfree(intel_encoder); |
| 292 | } | 280 | } |
| 293 | 281 | ||
| 294 | static bool psb_intel_crtc_mode_fixup(struct drm_crtc *crtc, | ||
| 295 | const struct drm_display_mode *mode, | ||
| 296 | struct drm_display_mode *adjusted_mode) | ||
| 297 | { | ||
| 298 | return true; | ||
| 299 | } | ||
| 300 | |||
| 301 | |||
| 302 | /** | 282 | /** |
| 303 | * Return the pipe currently connected to the panel fitter, | 283 | * Return the pipe currently connected to the panel fitter, |
| 304 | * or -1 if the panel fitter is not present or not in use | 284 | * or -1 if the panel fitter is not present or not in use |
| @@ -1006,27 +986,14 @@ static void psb_intel_crtc_destroy(struct drm_crtc *crtc) | |||
| 1006 | kfree(psb_intel_crtc); | 986 | kfree(psb_intel_crtc); |
| 1007 | } | 987 | } |
| 1008 | 988 | ||
| 1009 | static void psb_intel_crtc_disable(struct drm_crtc *crtc) | ||
| 1010 | { | ||
| 1011 | struct gtt_range *gt; | ||
| 1012 | struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; | ||
| 1013 | |||
| 1014 | crtc_funcs->dpms(crtc, DRM_MODE_DPMS_OFF); | ||
| 1015 | |||
| 1016 | if (crtc->fb) { | ||
| 1017 | gt = to_psb_fb(crtc->fb)->gtt; | ||
| 1018 | psb_gtt_unpin(gt); | ||
| 1019 | } | ||
| 1020 | } | ||
| 1021 | |||
| 1022 | const struct drm_crtc_helper_funcs psb_intel_helper_funcs = { | 989 | const struct drm_crtc_helper_funcs psb_intel_helper_funcs = { |
| 1023 | .dpms = psb_intel_crtc_dpms, | 990 | .dpms = psb_intel_crtc_dpms, |
| 1024 | .mode_fixup = psb_intel_crtc_mode_fixup, | 991 | .mode_fixup = gma_crtc_mode_fixup, |
| 1025 | .mode_set = psb_intel_crtc_mode_set, | 992 | .mode_set = psb_intel_crtc_mode_set, |
| 1026 | .mode_set_base = psb_intel_pipe_set_base, | 993 | .mode_set_base = psb_intel_pipe_set_base, |
| 1027 | .prepare = psb_intel_crtc_prepare, | 994 | .prepare = gma_crtc_prepare, |
| 1028 | .commit = psb_intel_crtc_commit, | 995 | .commit = gma_crtc_commit, |
| 1029 | .disable = psb_intel_crtc_disable, | 996 | .disable = gma_crtc_disable, |
| 1030 | }; | 997 | }; |
| 1031 | 998 | ||
| 1032 | const struct drm_crtc_funcs psb_intel_crtc_funcs = { | 999 | const struct drm_crtc_funcs psb_intel_crtc_funcs = { |
