diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-01-19 16:34:01 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2010-01-20 17:39:02 -0500 |
commit | 54f088a9603dbee88809cb2ddfd8dc1ef8a74be5 (patch) | |
tree | 81e03ac860920dba11ed452c59a7e75b2b37ddfe | |
parent | e2f8e87089427d3a203538dc73058b90e82b11f6 (diff) |
drm/radeon/kms: fix atombios_crtc_set_base
Make it call the proper backend depending on the
GPU family. Right now r4xx cards with atombios modesetting
enabled were using the avivo crtc base code. This also
allows us to add support for new asics more easily.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
-rw-r--r-- | drivers/gpu/drm/radeon/atombios_crtc.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index 260fcf59f00c..a60610271af6 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c | |||
@@ -575,8 +575,8 @@ void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode *mode) | |||
575 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); | 575 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); |
576 | } | 576 | } |
577 | 577 | ||
578 | int atombios_crtc_set_base(struct drm_crtc *crtc, int x, int y, | 578 | static int avivo_crtc_set_base(struct drm_crtc *crtc, int x, int y, |
579 | struct drm_framebuffer *old_fb) | 579 | struct drm_framebuffer *old_fb) |
580 | { | 580 | { |
581 | struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); | 581 | struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); |
582 | struct drm_device *dev = crtc->dev; | 582 | struct drm_device *dev = crtc->dev; |
@@ -706,6 +706,18 @@ int atombios_crtc_set_base(struct drm_crtc *crtc, int x, int y, | |||
706 | return 0; | 706 | return 0; |
707 | } | 707 | } |
708 | 708 | ||
709 | int atombios_crtc_set_base(struct drm_crtc *crtc, int x, int y, | ||
710 | struct drm_framebuffer *old_fb) | ||
711 | { | ||
712 | struct drm_device *dev = crtc->dev; | ||
713 | struct radeon_device *rdev = dev->dev_private; | ||
714 | |||
715 | if (ASIC_IS_AVIVO(rdev)) | ||
716 | return avivo_crtc_set_base(crtc, x, y, old_fb); | ||
717 | else | ||
718 | return radeon_crtc_set_base(crtc, x, y, old_fb); | ||
719 | } | ||
720 | |||
709 | int atombios_crtc_mode_set(struct drm_crtc *crtc, | 721 | int atombios_crtc_mode_set(struct drm_crtc *crtc, |
710 | struct drm_display_mode *mode, | 722 | struct drm_display_mode *mode, |
711 | struct drm_display_mode *adjusted_mode, | 723 | struct drm_display_mode *adjusted_mode, |
@@ -727,7 +739,7 @@ int atombios_crtc_mode_set(struct drm_crtc *crtc, | |||
727 | else { | 739 | else { |
728 | if (radeon_crtc->crtc_id == 0) | 740 | if (radeon_crtc->crtc_id == 0) |
729 | atombios_set_crtc_dtd_timing(crtc, adjusted_mode); | 741 | atombios_set_crtc_dtd_timing(crtc, adjusted_mode); |
730 | radeon_crtc_set_base(crtc, x, y, old_fb); | 742 | atombios_crtc_set_base(crtc, x, y, old_fb); |
731 | radeon_legacy_atom_set_surface(crtc); | 743 | radeon_legacy_atom_set_surface(crtc); |
732 | } | 744 | } |
733 | atombios_overscan_setup(crtc, mode, adjusted_mode); | 745 | atombios_overscan_setup(crtc, mode, adjusted_mode); |