diff options
author | Patrik Jakobsson <patrik.r.jakobsson@gmail.com> | 2013-07-10 17:24:22 -0400 |
---|---|---|
committer | Patrik Jakobsson <patrik.r.jakobsson@gmail.com> | 2013-07-23 19:47:26 -0400 |
commit | b1255b884914920f4086448ec4930e814e97afde (patch) | |
tree | 091ec2d347bdfa7b73bce4da1ed5965fba2c86b1 | |
parent | d903b610d3a319933caf6ca52c76933b11434ef6 (diff) |
drm/gma500/psb: Convert to generic crtc->destroy
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
-rw-r--r-- | drivers/gpu/drm/gma500/psb_intel_display.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c index b52bde2a0fe9..f4d308f918e3 100644 --- a/drivers/gpu/drm/gma500/psb_intel_display.c +++ b/drivers/gpu/drm/gma500/psb_intel_display.c | |||
@@ -726,27 +726,6 @@ struct drm_display_mode *psb_intel_crtc_mode_get(struct drm_device *dev, | |||
726 | return mode; | 726 | return mode; |
727 | } | 727 | } |
728 | 728 | ||
729 | static void psb_intel_crtc_destroy(struct drm_crtc *crtc) | ||
730 | { | ||
731 | struct psb_intel_crtc *psb_intel_crtc = to_psb_intel_crtc(crtc); | ||
732 | struct gtt_range *gt; | ||
733 | |||
734 | /* Unpin the old GEM object */ | ||
735 | if (psb_intel_crtc->cursor_obj) { | ||
736 | gt = container_of(psb_intel_crtc->cursor_obj, | ||
737 | struct gtt_range, gem); | ||
738 | psb_gtt_unpin(gt); | ||
739 | drm_gem_object_unreference(psb_intel_crtc->cursor_obj); | ||
740 | psb_intel_crtc->cursor_obj = NULL; | ||
741 | } | ||
742 | |||
743 | if (psb_intel_crtc->cursor_gt != NULL) | ||
744 | psb_gtt_free_range(crtc->dev, psb_intel_crtc->cursor_gt); | ||
745 | kfree(psb_intel_crtc->crtc_state); | ||
746 | drm_crtc_cleanup(crtc); | ||
747 | kfree(psb_intel_crtc); | ||
748 | } | ||
749 | |||
750 | const struct drm_crtc_helper_funcs psb_intel_helper_funcs = { | 729 | const struct drm_crtc_helper_funcs psb_intel_helper_funcs = { |
751 | .dpms = gma_crtc_dpms, | 730 | .dpms = gma_crtc_dpms, |
752 | .mode_fixup = gma_crtc_mode_fixup, | 731 | .mode_fixup = gma_crtc_mode_fixup, |
@@ -764,7 +743,7 @@ const struct drm_crtc_funcs psb_intel_crtc_funcs = { | |||
764 | .cursor_move = psb_intel_crtc_cursor_move, | 743 | .cursor_move = psb_intel_crtc_cursor_move, |
765 | .gamma_set = gma_crtc_gamma_set, | 744 | .gamma_set = gma_crtc_gamma_set, |
766 | .set_config = psb_crtc_set_config, | 745 | .set_config = psb_crtc_set_config, |
767 | .destroy = psb_intel_crtc_destroy, | 746 | .destroy = gma_crtc_destroy, |
768 | }; | 747 | }; |
769 | 748 | ||
770 | const struct gma_clock_funcs psb_clock_funcs = { | 749 | const struct gma_clock_funcs psb_clock_funcs = { |