diff options
author | Samuel Li <Samuel.Li@amd.com> | 2018-01-19 16:06:41 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-02-19 14:18:29 -0500 |
commit | 734dd01d56bfc7ecd5323c8013bb97ffbbbf18ff (patch) | |
tree | 26426dc9f887f2b80a894d771379ad2681fae7da /drivers/gpu/drm/amd | |
parent | aa8e286a8af9fc9534aa7ec0be8122b16cf1fd41 (diff) |
drm/amdgpu: rename amdgpu_crtc_idx_to_irq_type
Add display to the name for consistency.
Signed-off-by: Samuel Li <Samuel.Li@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 |
9 files changed, 22 insertions, 14 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index c7569ec3e11b..1eb0861c9147 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | |||
@@ -876,7 +876,7 @@ int amdgpu_display_get_crtc_scanoutpos(struct drm_device *dev, | |||
876 | return ret; | 876 | return ret; |
877 | } | 877 | } |
878 | 878 | ||
879 | int amdgpu_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc) | 879 | int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc) |
880 | { | 880 | { |
881 | if (crtc < 0 || crtc >= adev->mode_info.num_crtc) | 881 | if (crtc < 0 || crtc >= adev->mode_info.num_crtc) |
882 | return AMDGPU_CRTC_IRQ_NONE; | 882 | return AMDGPU_CRTC_IRQ_NONE; |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 7aa4474488ae..a99aff747cc2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |||
@@ -1025,7 +1025,7 @@ u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe) | |||
1025 | int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe) | 1025 | int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe) |
1026 | { | 1026 | { |
1027 | struct amdgpu_device *adev = dev->dev_private; | 1027 | struct amdgpu_device *adev = dev->dev_private; |
1028 | int idx = amdgpu_crtc_idx_to_irq_type(adev, pipe); | 1028 | int idx = amdgpu_display_crtc_idx_to_irq_type(adev, pipe); |
1029 | 1029 | ||
1030 | return amdgpu_irq_get(adev, &adev->crtc_irq, idx); | 1030 | return amdgpu_irq_get(adev, &adev->crtc_irq, idx); |
1031 | } | 1031 | } |
@@ -1041,7 +1041,7 @@ int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe) | |||
1041 | void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe) | 1041 | void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe) |
1042 | { | 1042 | { |
1043 | struct amdgpu_device *adev = dev->dev_private; | 1043 | struct amdgpu_device *adev = dev->dev_private; |
1044 | int idx = amdgpu_crtc_idx_to_irq_type(adev, pipe); | 1044 | int idx = amdgpu_display_crtc_idx_to_irq_type(adev, pipe); |
1045 | 1045 | ||
1046 | amdgpu_irq_put(adev, &adev->crtc_irq, idx); | 1046 | amdgpu_irq_put(adev, &adev->crtc_irq, idx); |
1047 | } | 1047 | } |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h index 5028ed60e5dc..ea1bd75bef35 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | |||
@@ -651,7 +651,7 @@ bool amdgpu_display_crtc_scaling_mode_fixup(struct drm_crtc *crtc, | |||
651 | struct drm_display_mode *adjusted_mode); | 651 | struct drm_display_mode *adjusted_mode); |
652 | void amdgpu_panel_mode_fixup(struct drm_encoder *encoder, | 652 | void amdgpu_panel_mode_fixup(struct drm_encoder *encoder, |
653 | struct drm_display_mode *adjusted_mode); | 653 | struct drm_display_mode *adjusted_mode); |
654 | int amdgpu_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc); | 654 | int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc); |
655 | 655 | ||
656 | /* fbdev layer */ | 656 | /* fbdev layer */ |
657 | int amdgpu_fbdev_init(struct amdgpu_device *adev); | 657 | int amdgpu_fbdev_init(struct amdgpu_device *adev); |
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c index 865e8ca09225..c7d1ef00f9a4 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | |||
@@ -2537,7 +2537,8 @@ static void dce_v10_0_crtc_dpms(struct drm_crtc *crtc, int mode) | |||
2537 | amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE); | 2537 | amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE); |
2538 | dce_v10_0_vga_enable(crtc, false); | 2538 | dce_v10_0_vga_enable(crtc, false); |
2539 | /* Make sure VBLANK and PFLIP interrupts are still enabled */ | 2539 | /* Make sure VBLANK and PFLIP interrupts are still enabled */ |
2540 | type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id); | 2540 | type = amdgpu_display_crtc_idx_to_irq_type(adev, |
2541 | amdgpu_crtc->crtc_id); | ||
2541 | amdgpu_irq_update(adev, &adev->crtc_irq, type); | 2542 | amdgpu_irq_update(adev, &adev->crtc_irq, type); |
2542 | amdgpu_irq_update(adev, &adev->pageflip_irq, type); | 2543 | amdgpu_irq_update(adev, &adev->pageflip_irq, type); |
2543 | drm_crtc_vblank_on(crtc); | 2544 | drm_crtc_vblank_on(crtc); |
@@ -3249,7 +3250,7 @@ static int dce_v10_0_crtc_irq(struct amdgpu_device *adev, | |||
3249 | { | 3250 | { |
3250 | unsigned crtc = entry->src_id - 1; | 3251 | unsigned crtc = entry->src_id - 1; |
3251 | uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg); | 3252 | uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg); |
3252 | unsigned irq_type = amdgpu_crtc_idx_to_irq_type(adev, crtc); | 3253 | unsigned int irq_type = amdgpu_display_crtc_idx_to_irq_type(adev, crtc); |
3253 | 3254 | ||
3254 | switch (entry->src_data[0]) { | 3255 | switch (entry->src_data[0]) { |
3255 | case 0: /* vblank */ | 3256 | case 0: /* vblank */ |
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c index fe887280a746..99bc1f36c96b 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | |||
@@ -2612,7 +2612,8 @@ static void dce_v11_0_crtc_dpms(struct drm_crtc *crtc, int mode) | |||
2612 | amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE); | 2612 | amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE); |
2613 | dce_v11_0_vga_enable(crtc, false); | 2613 | dce_v11_0_vga_enable(crtc, false); |
2614 | /* Make sure VBLANK and PFLIP interrupts are still enabled */ | 2614 | /* Make sure VBLANK and PFLIP interrupts are still enabled */ |
2615 | type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id); | 2615 | type = amdgpu_display_crtc_idx_to_irq_type(adev, |
2616 | amdgpu_crtc->crtc_id); | ||
2616 | amdgpu_irq_update(adev, &adev->crtc_irq, type); | 2617 | amdgpu_irq_update(adev, &adev->crtc_irq, type); |
2617 | amdgpu_irq_update(adev, &adev->pageflip_irq, type); | 2618 | amdgpu_irq_update(adev, &adev->pageflip_irq, type); |
2618 | drm_crtc_vblank_on(crtc); | 2619 | drm_crtc_vblank_on(crtc); |
@@ -3368,7 +3369,8 @@ static int dce_v11_0_crtc_irq(struct amdgpu_device *adev, | |||
3368 | { | 3369 | { |
3369 | unsigned crtc = entry->src_id - 1; | 3370 | unsigned crtc = entry->src_id - 1; |
3370 | uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg); | 3371 | uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg); |
3371 | unsigned irq_type = amdgpu_crtc_idx_to_irq_type(adev, crtc); | 3372 | unsigned int irq_type = amdgpu_display_crtc_idx_to_irq_type(adev, |
3373 | crtc); | ||
3372 | 3374 | ||
3373 | switch (entry->src_data[0]) { | 3375 | switch (entry->src_data[0]) { |
3374 | case 0: /* vblank */ | 3376 | case 0: /* vblank */ |
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c index 3436de3fc722..24de4aaacf2e 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | |||
@@ -2425,7 +2425,8 @@ static void dce_v6_0_crtc_dpms(struct drm_crtc *crtc, int mode) | |||
2425 | amdgpu_atombios_crtc_enable(crtc, ATOM_ENABLE); | 2425 | amdgpu_atombios_crtc_enable(crtc, ATOM_ENABLE); |
2426 | amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE); | 2426 | amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE); |
2427 | /* Make sure VBLANK and PFLIP interrupts are still enabled */ | 2427 | /* Make sure VBLANK and PFLIP interrupts are still enabled */ |
2428 | type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id); | 2428 | type = amdgpu_display_crtc_idx_to_irq_type(adev, |
2429 | amdgpu_crtc->crtc_id); | ||
2429 | amdgpu_irq_update(adev, &adev->crtc_irq, type); | 2430 | amdgpu_irq_update(adev, &adev->crtc_irq, type); |
2430 | amdgpu_irq_update(adev, &adev->pageflip_irq, type); | 2431 | amdgpu_irq_update(adev, &adev->pageflip_irq, type); |
2431 | drm_crtc_vblank_on(crtc); | 2432 | drm_crtc_vblank_on(crtc); |
@@ -2966,7 +2967,8 @@ static int dce_v6_0_crtc_irq(struct amdgpu_device *adev, | |||
2966 | { | 2967 | { |
2967 | unsigned crtc = entry->src_id - 1; | 2968 | unsigned crtc = entry->src_id - 1; |
2968 | uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg); | 2969 | uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg); |
2969 | unsigned irq_type = amdgpu_crtc_idx_to_irq_type(adev, crtc); | 2970 | unsigned int irq_type = amdgpu_display_crtc_idx_to_irq_type(adev, |
2971 | crtc); | ||
2970 | 2972 | ||
2971 | switch (entry->src_data[0]) { | 2973 | switch (entry->src_data[0]) { |
2972 | case 0: /* vblank */ | 2974 | case 0: /* vblank */ |
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c index 6f44146cd4c2..823a8c331da5 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | |||
@@ -2441,7 +2441,8 @@ static void dce_v8_0_crtc_dpms(struct drm_crtc *crtc, int mode) | |||
2441 | amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE); | 2441 | amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE); |
2442 | dce_v8_0_vga_enable(crtc, false); | 2442 | dce_v8_0_vga_enable(crtc, false); |
2443 | /* Make sure VBLANK and PFLIP interrupts are still enabled */ | 2443 | /* Make sure VBLANK and PFLIP interrupts are still enabled */ |
2444 | type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id); | 2444 | type = amdgpu_display_crtc_idx_to_irq_type(adev, |
2445 | amdgpu_crtc->crtc_id); | ||
2445 | amdgpu_irq_update(adev, &adev->crtc_irq, type); | 2446 | amdgpu_irq_update(adev, &adev->crtc_irq, type); |
2446 | amdgpu_irq_update(adev, &adev->pageflip_irq, type); | 2447 | amdgpu_irq_update(adev, &adev->pageflip_irq, type); |
2447 | drm_crtc_vblank_on(crtc); | 2448 | drm_crtc_vblank_on(crtc); |
@@ -3063,7 +3064,8 @@ static int dce_v8_0_crtc_irq(struct amdgpu_device *adev, | |||
3063 | { | 3064 | { |
3064 | unsigned crtc = entry->src_id - 1; | 3065 | unsigned crtc = entry->src_id - 1; |
3065 | uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg); | 3066 | uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg); |
3066 | unsigned irq_type = amdgpu_crtc_idx_to_irq_type(adev, crtc); | 3067 | unsigned int irq_type = amdgpu_display_crtc_idx_to_irq_type(adev, |
3068 | crtc); | ||
3067 | 3069 | ||
3068 | switch (entry->src_data[0]) { | 3070 | switch (entry->src_data[0]) { |
3069 | case 0: /* vblank */ | 3071 | case 0: /* vblank */ |
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index 3d1954a02da4..3d6cb0cc2b1d 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c | |||
@@ -149,7 +149,8 @@ static void dce_virtual_crtc_dpms(struct drm_crtc *crtc, int mode) | |||
149 | case DRM_MODE_DPMS_ON: | 149 | case DRM_MODE_DPMS_ON: |
150 | amdgpu_crtc->enabled = true; | 150 | amdgpu_crtc->enabled = true; |
151 | /* Make sure VBLANK interrupts are still enabled */ | 151 | /* Make sure VBLANK interrupts are still enabled */ |
152 | type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id); | 152 | type = amdgpu_display_crtc_idx_to_irq_type(adev, |
153 | amdgpu_crtc->crtc_id); | ||
153 | amdgpu_irq_update(adev, &adev->crtc_irq, type); | 154 | amdgpu_irq_update(adev, &adev->crtc_irq, type); |
154 | drm_crtc_vblank_on(crtc); | 155 | drm_crtc_vblank_on(crtc); |
155 | break; | 156 | break; |
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index df7ac1def275..63df977fc426 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | |||
@@ -3687,7 +3687,7 @@ static void manage_dm_interrupts(struct amdgpu_device *adev, | |||
3687 | * constant is the same as PFLIP | 3687 | * constant is the same as PFLIP |
3688 | */ | 3688 | */ |
3689 | int irq_type = | 3689 | int irq_type = |
3690 | amdgpu_crtc_idx_to_irq_type( | 3690 | amdgpu_display_crtc_idx_to_irq_type( |
3691 | adev, | 3691 | adev, |
3692 | acrtc->crtc_id); | 3692 | acrtc->crtc_id); |
3693 | 3693 | ||