drm/radeon: remove (pre|post)_page_flip callbacks
authorChristian König <christian.koenig@amd.com>
Tue, 27 May 2014 14:49:18 +0000 (16:49 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 2 Jun 2014 14:25:10 +0000 (10:25 -0400)
They are doing the same on all generations anyway.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/r100.c
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_asic.c
drivers/gpu/drm/radeon/radeon_asic.h
drivers/gpu/drm/radeon/radeon_display.c
drivers/gpu/drm/radeon/rs600.c

index b406546440da7cda8d7da10f7acbf6e6c22186e0..ec31a82208367c74c0fcdf9c8df394283cda1af7 100644 (file)
@@ -1300,36 +1300,6 @@ void dce4_wait_for_vblank(struct radeon_device *rdev, int crtc)
        }
 }
 
-/**
- * radeon_irq_kms_pflip_irq_get - pre-pageflip callback.
- *
- * @rdev: radeon_device pointer
- * @crtc: crtc to prepare for pageflip on
- *
- * Pre-pageflip callback (evergreen+).
- * Enables the pageflip irq (vblank irq).
- */
-void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc)
-{
-       /* enable the pflip int */
-       radeon_irq_kms_pflip_irq_get(rdev, crtc);
-}
-
-/**
- * evergreen_post_page_flip - pos-pageflip callback.
- *
- * @rdev: radeon_device pointer
- * @crtc: crtc to cleanup pageflip on
- *
- * Post-pageflip callback (evergreen+).
- * Disables the pageflip irq (vblank irq).
- */
-void evergreen_post_page_flip(struct radeon_device *rdev, int crtc)
-{
-       /* disable the pflip int */
-       radeon_irq_kms_pflip_irq_put(rdev, crtc);
-}
-
 /**
  * evergreen_page_flip - pageflip callback.
  *
index b6c32640df20bed4e954ec5ee2b12a4e43053251..840651f3361016ac5ee491d7b5f4b4bfb58830e4 100644 (file)
@@ -141,36 +141,6 @@ void r100_wait_for_vblank(struct radeon_device *rdev, int crtc)
        }
 }
 
-/**
- * r100_pre_page_flip - pre-pageflip callback.
- *
- * @rdev: radeon_device pointer
- * @crtc: crtc to prepare for pageflip on
- *
- * Pre-pageflip callback (r1xx-r4xx).
- * Enables the pageflip irq (vblank irq).
- */
-void r100_pre_page_flip(struct radeon_device *rdev, int crtc)
-{
-       /* enable the pflip int */
-       radeon_irq_kms_pflip_irq_get(rdev, crtc);
-}
-
-/**
- * r100_post_page_flip - pos-pageflip callback.
- *
- * @rdev: radeon_device pointer
- * @crtc: crtc to cleanup pageflip on
- *
- * Post-pageflip callback (r1xx-r4xx).
- * Disables the pageflip irq (vblank irq).
- */
-void r100_post_page_flip(struct radeon_device *rdev, int crtc)
-{
-       /* disable the pflip int */
-       radeon_irq_kms_pflip_irq_put(rdev, crtc);
-}
-
 /**
  * r100_page_flip - pageflip callback.
  *
index 325f3a586cb75978678842fcfbe61275e2cc8112..2b919afd7d4cb8e22ffba9409991bbd4b9c8688c 100644 (file)
@@ -1881,9 +1881,7 @@ struct radeon_asic {
        } dpm;
        /* pageflipping */
        struct {
-               void (*pre_page_flip)(struct radeon_device *rdev, int crtc);
                u32 (*page_flip)(struct radeon_device *rdev, int crtc, u64 crtc_base);
-               void (*post_page_flip)(struct radeon_device *rdev, int crtc);
        } pflip;
 };
 
@@ -2742,9 +2740,7 @@ void radeon_ring_write(struct radeon_ring *ring, uint32_t v);
 #define radeon_pm_finish(rdev) (rdev)->asic->pm.finish((rdev))
 #define radeon_pm_init_profile(rdev) (rdev)->asic->pm.init_profile((rdev))
 #define radeon_pm_get_dynpm_state(rdev) (rdev)->asic->pm.get_dynpm_state((rdev))
-#define radeon_pre_page_flip(rdev, crtc) (rdev)->asic->pflip.pre_page_flip((rdev), (crtc))
 #define radeon_page_flip(rdev, crtc, base) (rdev)->asic->pflip.page_flip((rdev), (crtc), (base))
-#define radeon_post_page_flip(rdev, crtc) (rdev)->asic->pflip.post_page_flip((rdev), (crtc))
 #define radeon_wait_for_vblank(rdev, crtc) (rdev)->asic->display.wait_for_vblank((rdev), (crtc))
 #define radeon_mc_wait_for_idle(rdev) (rdev)->asic->mc_wait_for_idle((rdev))
 #define radeon_get_xclk(rdev) (rdev)->asic->get_xclk((rdev))
index ddcd0a29f592255ce5ec876f780bacccc2d0a04b..cb7a0eafadfc62199b4af4ba40bd68730dbc8f91 100644 (file)
@@ -248,9 +248,7 @@ static struct radeon_asic r100_asic = {
                .set_clock_gating = &radeon_legacy_set_clock_gating,
        },
        .pflip = {
-               .pre_page_flip = &r100_pre_page_flip,
                .page_flip = &r100_page_flip,
-               .post_page_flip = &r100_post_page_flip,
        },
 };
 
@@ -315,9 +313,7 @@ static struct radeon_asic r200_asic = {
                .set_clock_gating = &radeon_legacy_set_clock_gating,
        },
        .pflip = {
-               .pre_page_flip = &r100_pre_page_flip,
                .page_flip = &r100_page_flip,
-               .post_page_flip = &r100_post_page_flip,
        },
 };
 
@@ -396,9 +392,7 @@ static struct radeon_asic r300_asic = {
                .set_clock_gating = &radeon_legacy_set_clock_gating,
        },
        .pflip = {
-               .pre_page_flip = &r100_pre_page_flip,
                .page_flip = &r100_page_flip,
-               .post_page_flip = &r100_post_page_flip,
        },
 };
 
@@ -463,9 +457,7 @@ static struct radeon_asic r300_asic_pcie = {
                .set_clock_gating = &radeon_legacy_set_clock_gating,
        },
        .pflip = {
-               .pre_page_flip = &r100_pre_page_flip,
                .page_flip = &r100_page_flip,
-               .post_page_flip = &r100_post_page_flip,
        },
 };
 
@@ -530,9 +522,7 @@ static struct radeon_asic r420_asic = {
                .set_clock_gating = &radeon_atom_set_clock_gating,
        },
        .pflip = {
-               .pre_page_flip = &r100_pre_page_flip,
                .page_flip = &r100_page_flip,
-               .post_page_flip = &r100_post_page_flip,
        },
 };
 
@@ -597,9 +587,7 @@ static struct radeon_asic rs400_asic = {
                .set_clock_gating = &radeon_legacy_set_clock_gating,
        },
        .pflip = {
-               .pre_page_flip = &r100_pre_page_flip,
                .page_flip = &r100_page_flip,
-               .post_page_flip = &r100_post_page_flip,
        },
 };
 
@@ -666,9 +654,7 @@ static struct radeon_asic rs600_asic = {
                .set_clock_gating = &radeon_atom_set_clock_gating,
        },
        .pflip = {
-               .pre_page_flip = &rs600_pre_page_flip,
                .page_flip = &rs600_page_flip,
-               .post_page_flip = &rs600_post_page_flip,
        },
 };
 
@@ -735,9 +721,7 @@ static struct radeon_asic rs690_asic = {
                .set_clock_gating = &radeon_atom_set_clock_gating,
        },
        .pflip = {
-               .pre_page_flip = &rs600_pre_page_flip,
                .page_flip = &rs600_page_flip,
-               .post_page_flip = &rs600_post_page_flip,
        },
 };
 
@@ -802,9 +786,7 @@ static struct radeon_asic rv515_asic = {
                .set_clock_gating = &radeon_atom_set_clock_gating,
        },
        .pflip = {
-               .pre_page_flip = &rs600_pre_page_flip,
                .page_flip = &rs600_page_flip,
-               .post_page_flip = &rs600_post_page_flip,
        },
 };
 
@@ -869,9 +851,7 @@ static struct radeon_asic r520_asic = {
                .set_clock_gating = &radeon_atom_set_clock_gating,
        },
        .pflip = {
-               .pre_page_flip = &rs600_pre_page_flip,
                .page_flip = &rs600_page_flip,
-               .post_page_flip = &rs600_post_page_flip,
        },
 };
 
@@ -968,9 +948,7 @@ static struct radeon_asic r600_asic = {
                .get_temperature = &rv6xx_get_temp,
        },
        .pflip = {
-               .pre_page_flip = &rs600_pre_page_flip,
                .page_flip = &rs600_page_flip,
-               .post_page_flip = &rs600_post_page_flip,
        },
 };
 
@@ -1059,9 +1037,7 @@ static struct radeon_asic rv6xx_asic = {
                .force_performance_level = &rv6xx_dpm_force_performance_level,
        },
        .pflip = {
-               .pre_page_flip = &rs600_pre_page_flip,
                .page_flip = &rs600_page_flip,
-               .post_page_flip = &rs600_post_page_flip,
        },
 };
 
@@ -1150,9 +1126,7 @@ static struct radeon_asic rs780_asic = {
                .force_performance_level = &rs780_dpm_force_performance_level,
        },
        .pflip = {
-               .pre_page_flip = &rs600_pre_page_flip,
                .page_flip = &rs600_page_flip,
-               .post_page_flip = &rs600_post_page_flip,
        },
 };
 
@@ -1256,9 +1230,7 @@ static struct radeon_asic rv770_asic = {
                .vblank_too_short = &rv770_dpm_vblank_too_short,
        },
        .pflip = {
-               .pre_page_flip = &rs600_pre_page_flip,
                .page_flip = &rv770_page_flip,
-               .post_page_flip = &rs600_post_page_flip,
        },
 };
 
@@ -1375,9 +1347,7 @@ static struct radeon_asic evergreen_asic = {
                .vblank_too_short = &cypress_dpm_vblank_too_short,
        },
        .pflip = {
-               .pre_page_flip = &evergreen_pre_page_flip,
                .page_flip = &evergreen_page_flip,
-               .post_page_flip = &evergreen_post_page_flip,
        },
 };
 
@@ -1467,9 +1437,7 @@ static struct radeon_asic sumo_asic = {
                .force_performance_level = &sumo_dpm_force_performance_level,
        },
        .pflip = {
-               .pre_page_flip = &evergreen_pre_page_flip,
                .page_flip = &evergreen_page_flip,
-               .post_page_flip = &evergreen_post_page_flip,
        },
 };
 
@@ -1560,9 +1528,7 @@ static struct radeon_asic btc_asic = {
                .vblank_too_short = &btc_dpm_vblank_too_short,
        },
        .pflip = {
-               .pre_page_flip = &evergreen_pre_page_flip,
                .page_flip = &evergreen_page_flip,
-               .post_page_flip = &evergreen_post_page_flip,
        },
 };
 
@@ -1704,9 +1670,7 @@ static struct radeon_asic cayman_asic = {
                .vblank_too_short = &ni_dpm_vblank_too_short,
        },
        .pflip = {
-               .pre_page_flip = &evergreen_pre_page_flip,
                .page_flip = &evergreen_page_flip,
-               .post_page_flip = &evergreen_post_page_flip,
        },
 };
 
@@ -1805,9 +1769,7 @@ static struct radeon_asic trinity_asic = {
                .enable_bapm = &trinity_dpm_enable_bapm,
        },
        .pflip = {
-               .pre_page_flip = &evergreen_pre_page_flip,
                .page_flip = &evergreen_page_flip,
-               .post_page_flip = &evergreen_post_page_flip,
        },
 };
 
@@ -1936,9 +1898,7 @@ static struct radeon_asic si_asic = {
                .vblank_too_short = &ni_dpm_vblank_too_short,
        },
        .pflip = {
-               .pre_page_flip = &evergreen_pre_page_flip,
                .page_flip = &evergreen_page_flip,
-               .post_page_flip = &evergreen_post_page_flip,
        },
 };
 
@@ -2099,9 +2059,7 @@ static struct radeon_asic ci_asic = {
                .powergate_uvd = &ci_dpm_powergate_uvd,
        },
        .pflip = {
-               .pre_page_flip = &evergreen_pre_page_flip,
                .page_flip = &evergreen_page_flip,
-               .post_page_flip = &evergreen_post_page_flip,
        },
 };
 
@@ -2204,9 +2162,7 @@ static struct radeon_asic kv_asic = {
                .enable_bapm = &kv_dpm_enable_bapm,
        },
        .pflip = {
-               .pre_page_flip = &evergreen_pre_page_flip,
                .page_flip = &evergreen_page_flip,
-               .post_page_flip = &evergreen_post_page_flip,
        },
 };
 
index e6455b935e88416423002ff871cf2141fc8ba1c7..953607d69eb1733ebd53892693ef87ded5926f12 100644 (file)
@@ -135,9 +135,7 @@ extern void r100_pm_prepare(struct radeon_device *rdev);
 extern void r100_pm_finish(struct radeon_device *rdev);
 extern void r100_pm_init_profile(struct radeon_device *rdev);
 extern void r100_pm_get_dynpm_state(struct radeon_device *rdev);
-extern void r100_pre_page_flip(struct radeon_device *rdev, int crtc);
 extern u32 r100_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
-extern void r100_post_page_flip(struct radeon_device *rdev, int crtc);
 extern void r100_wait_for_vblank(struct radeon_device *rdev, int crtc);
 extern int r100_mc_wait_for_idle(struct radeon_device *rdev);
 
@@ -241,9 +239,7 @@ void rs600_hpd_set_polarity(struct radeon_device *rdev,
 extern void rs600_pm_misc(struct radeon_device *rdev);
 extern void rs600_pm_prepare(struct radeon_device *rdev);
 extern void rs600_pm_finish(struct radeon_device *rdev);
-extern void rs600_pre_page_flip(struct radeon_device *rdev, int crtc);
 extern u32 rs600_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
-extern void rs600_post_page_flip(struct radeon_device *rdev, int crtc);
 void rs600_set_safe_registers(struct radeon_device *rdev);
 extern void avivo_wait_for_vblank(struct radeon_device *rdev, int crtc);
 extern int rs600_mc_wait_for_idle(struct radeon_device *rdev);
@@ -520,9 +516,7 @@ extern void sumo_pm_init_profile(struct radeon_device *rdev);
 extern void btc_pm_init_profile(struct radeon_device *rdev);
 int sumo_set_uvd_clocks(struct radeon_device *rdev, u32 vclk, u32 dclk);
 int evergreen_set_uvd_clocks(struct radeon_device *rdev, u32 vclk, u32 dclk);
-extern void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc);
 extern u32 evergreen_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
-extern void evergreen_post_page_flip(struct radeon_device *rdev, int crtc);
 extern void dce4_wait_for_vblank(struct radeon_device *rdev, int crtc);
 void evergreen_disable_interrupt_state(struct radeon_device *rdev);
 int evergreen_mc_wait_for_idle(struct radeon_device *rdev);
index 8d99d5ee8014c4f23e031a31cbeab85bde33d81a..beccc4a2ceb4bf451f6568f5321bdf51726f9b46 100644 (file)
@@ -342,7 +342,7 @@ void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id)
 
        drm_vblank_put(rdev->ddev, radeon_crtc->crtc_id);
        radeon_fence_unref(&work->fence);
-       radeon_post_page_flip(work->rdev, work->crtc_id);
+       radeon_irq_kms_pflip_irq_get(rdev, work->crtc_id);
        schedule_work(&work->work);
 }
 
@@ -471,7 +471,7 @@ static int radeon_crtc_page_flip(struct drm_crtc *crtc,
        }
 
        /* set the proper interrupt */
-       radeon_pre_page_flip(rdev, radeon_crtc->crtc_id);
+       radeon_irq_kms_pflip_irq_get(rdev, radeon_crtc->crtc_id);
 
        return 0;
 
index 72d3616de08e054efe6199fcd529f59cef3e18d5..e005bd74a8079658d8e0c047f2b64ce7c11678b1 100644 (file)
@@ -109,18 +109,6 @@ void avivo_wait_for_vblank(struct radeon_device *rdev, int crtc)
        }
 }
 
-void rs600_pre_page_flip(struct radeon_device *rdev, int crtc)
-{
-       /* enable the pflip int */
-       radeon_irq_kms_pflip_irq_get(rdev, crtc);
-}
-
-void rs600_post_page_flip(struct radeon_device *rdev, int crtc)
-{
-       /* disable the pflip int */
-       radeon_irq_kms_pflip_irq_put(rdev, crtc);
-}
-
 u32 rs600_page_flip(struct radeon_device *rdev, int crtc_id, u64 crtc_base)
 {
        struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc_id];