mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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>
This commit is contained in:
parent
aa8e286a8a
commit
734dd01d56
9 changed files with 22 additions and 14 deletions
|
@ -876,7 +876,7 @@ int amdgpu_display_get_crtc_scanoutpos(struct drm_device *dev,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int amdgpu_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc)
|
int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc)
|
||||||
{
|
{
|
||||||
if (crtc < 0 || crtc >= adev->mode_info.num_crtc)
|
if (crtc < 0 || crtc >= adev->mode_info.num_crtc)
|
||||||
return AMDGPU_CRTC_IRQ_NONE;
|
return AMDGPU_CRTC_IRQ_NONE;
|
||||||
|
|
|
@ -1025,7 +1025,7 @@ u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe)
|
||||||
int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe)
|
int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe)
|
||||||
{
|
{
|
||||||
struct amdgpu_device *adev = dev->dev_private;
|
struct amdgpu_device *adev = dev->dev_private;
|
||||||
int idx = amdgpu_crtc_idx_to_irq_type(adev, pipe);
|
int idx = amdgpu_display_crtc_idx_to_irq_type(adev, pipe);
|
||||||
|
|
||||||
return amdgpu_irq_get(adev, &adev->crtc_irq, idx);
|
return amdgpu_irq_get(adev, &adev->crtc_irq, idx);
|
||||||
}
|
}
|
||||||
|
@ -1041,7 +1041,7 @@ int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe)
|
||||||
void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe)
|
void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe)
|
||||||
{
|
{
|
||||||
struct amdgpu_device *adev = dev->dev_private;
|
struct amdgpu_device *adev = dev->dev_private;
|
||||||
int idx = amdgpu_crtc_idx_to_irq_type(adev, pipe);
|
int idx = amdgpu_display_crtc_idx_to_irq_type(adev, pipe);
|
||||||
|
|
||||||
amdgpu_irq_put(adev, &adev->crtc_irq, idx);
|
amdgpu_irq_put(adev, &adev->crtc_irq, idx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -651,7 +651,7 @@ bool amdgpu_display_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
|
||||||
struct drm_display_mode *adjusted_mode);
|
struct drm_display_mode *adjusted_mode);
|
||||||
void amdgpu_panel_mode_fixup(struct drm_encoder *encoder,
|
void amdgpu_panel_mode_fixup(struct drm_encoder *encoder,
|
||||||
struct drm_display_mode *adjusted_mode);
|
struct drm_display_mode *adjusted_mode);
|
||||||
int amdgpu_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc);
|
int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc);
|
||||||
|
|
||||||
/* fbdev layer */
|
/* fbdev layer */
|
||||||
int amdgpu_fbdev_init(struct amdgpu_device *adev);
|
int amdgpu_fbdev_init(struct amdgpu_device *adev);
|
||||||
|
|
|
@ -2537,7 +2537,8 @@ static void dce_v10_0_crtc_dpms(struct drm_crtc *crtc, int mode)
|
||||||
amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE);
|
amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE);
|
||||||
dce_v10_0_vga_enable(crtc, false);
|
dce_v10_0_vga_enable(crtc, false);
|
||||||
/* Make sure VBLANK and PFLIP interrupts are still enabled */
|
/* Make sure VBLANK and PFLIP interrupts are still enabled */
|
||||||
type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id);
|
type = amdgpu_display_crtc_idx_to_irq_type(adev,
|
||||||
|
amdgpu_crtc->crtc_id);
|
||||||
amdgpu_irq_update(adev, &adev->crtc_irq, type);
|
amdgpu_irq_update(adev, &adev->crtc_irq, type);
|
||||||
amdgpu_irq_update(adev, &adev->pageflip_irq, type);
|
amdgpu_irq_update(adev, &adev->pageflip_irq, type);
|
||||||
drm_crtc_vblank_on(crtc);
|
drm_crtc_vblank_on(crtc);
|
||||||
|
@ -3249,7 +3250,7 @@ static int dce_v10_0_crtc_irq(struct amdgpu_device *adev,
|
||||||
{
|
{
|
||||||
unsigned crtc = entry->src_id - 1;
|
unsigned crtc = entry->src_id - 1;
|
||||||
uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg);
|
uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg);
|
||||||
unsigned irq_type = amdgpu_crtc_idx_to_irq_type(adev, crtc);
|
unsigned int irq_type = amdgpu_display_crtc_idx_to_irq_type(adev, crtc);
|
||||||
|
|
||||||
switch (entry->src_data[0]) {
|
switch (entry->src_data[0]) {
|
||||||
case 0: /* vblank */
|
case 0: /* vblank */
|
||||||
|
|
|
@ -2612,7 +2612,8 @@ static void dce_v11_0_crtc_dpms(struct drm_crtc *crtc, int mode)
|
||||||
amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE);
|
amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE);
|
||||||
dce_v11_0_vga_enable(crtc, false);
|
dce_v11_0_vga_enable(crtc, false);
|
||||||
/* Make sure VBLANK and PFLIP interrupts are still enabled */
|
/* Make sure VBLANK and PFLIP interrupts are still enabled */
|
||||||
type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id);
|
type = amdgpu_display_crtc_idx_to_irq_type(adev,
|
||||||
|
amdgpu_crtc->crtc_id);
|
||||||
amdgpu_irq_update(adev, &adev->crtc_irq, type);
|
amdgpu_irq_update(adev, &adev->crtc_irq, type);
|
||||||
amdgpu_irq_update(adev, &adev->pageflip_irq, type);
|
amdgpu_irq_update(adev, &adev->pageflip_irq, type);
|
||||||
drm_crtc_vblank_on(crtc);
|
drm_crtc_vblank_on(crtc);
|
||||||
|
@ -3368,7 +3369,8 @@ static int dce_v11_0_crtc_irq(struct amdgpu_device *adev,
|
||||||
{
|
{
|
||||||
unsigned crtc = entry->src_id - 1;
|
unsigned crtc = entry->src_id - 1;
|
||||||
uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg);
|
uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg);
|
||||||
unsigned irq_type = amdgpu_crtc_idx_to_irq_type(adev, crtc);
|
unsigned int irq_type = amdgpu_display_crtc_idx_to_irq_type(adev,
|
||||||
|
crtc);
|
||||||
|
|
||||||
switch (entry->src_data[0]) {
|
switch (entry->src_data[0]) {
|
||||||
case 0: /* vblank */
|
case 0: /* vblank */
|
||||||
|
|
|
@ -2425,7 +2425,8 @@ static void dce_v6_0_crtc_dpms(struct drm_crtc *crtc, int mode)
|
||||||
amdgpu_atombios_crtc_enable(crtc, ATOM_ENABLE);
|
amdgpu_atombios_crtc_enable(crtc, ATOM_ENABLE);
|
||||||
amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE);
|
amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE);
|
||||||
/* Make sure VBLANK and PFLIP interrupts are still enabled */
|
/* Make sure VBLANK and PFLIP interrupts are still enabled */
|
||||||
type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id);
|
type = amdgpu_display_crtc_idx_to_irq_type(adev,
|
||||||
|
amdgpu_crtc->crtc_id);
|
||||||
amdgpu_irq_update(adev, &adev->crtc_irq, type);
|
amdgpu_irq_update(adev, &adev->crtc_irq, type);
|
||||||
amdgpu_irq_update(adev, &adev->pageflip_irq, type);
|
amdgpu_irq_update(adev, &adev->pageflip_irq, type);
|
||||||
drm_crtc_vblank_on(crtc);
|
drm_crtc_vblank_on(crtc);
|
||||||
|
@ -2966,7 +2967,8 @@ static int dce_v6_0_crtc_irq(struct amdgpu_device *adev,
|
||||||
{
|
{
|
||||||
unsigned crtc = entry->src_id - 1;
|
unsigned crtc = entry->src_id - 1;
|
||||||
uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg);
|
uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg);
|
||||||
unsigned irq_type = amdgpu_crtc_idx_to_irq_type(adev, crtc);
|
unsigned int irq_type = amdgpu_display_crtc_idx_to_irq_type(adev,
|
||||||
|
crtc);
|
||||||
|
|
||||||
switch (entry->src_data[0]) {
|
switch (entry->src_data[0]) {
|
||||||
case 0: /* vblank */
|
case 0: /* vblank */
|
||||||
|
|
|
@ -2441,7 +2441,8 @@ static void dce_v8_0_crtc_dpms(struct drm_crtc *crtc, int mode)
|
||||||
amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE);
|
amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE);
|
||||||
dce_v8_0_vga_enable(crtc, false);
|
dce_v8_0_vga_enable(crtc, false);
|
||||||
/* Make sure VBLANK and PFLIP interrupts are still enabled */
|
/* Make sure VBLANK and PFLIP interrupts are still enabled */
|
||||||
type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id);
|
type = amdgpu_display_crtc_idx_to_irq_type(adev,
|
||||||
|
amdgpu_crtc->crtc_id);
|
||||||
amdgpu_irq_update(adev, &adev->crtc_irq, type);
|
amdgpu_irq_update(adev, &adev->crtc_irq, type);
|
||||||
amdgpu_irq_update(adev, &adev->pageflip_irq, type);
|
amdgpu_irq_update(adev, &adev->pageflip_irq, type);
|
||||||
drm_crtc_vblank_on(crtc);
|
drm_crtc_vblank_on(crtc);
|
||||||
|
@ -3063,7 +3064,8 @@ static int dce_v8_0_crtc_irq(struct amdgpu_device *adev,
|
||||||
{
|
{
|
||||||
unsigned crtc = entry->src_id - 1;
|
unsigned crtc = entry->src_id - 1;
|
||||||
uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg);
|
uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg);
|
||||||
unsigned irq_type = amdgpu_crtc_idx_to_irq_type(adev, crtc);
|
unsigned int irq_type = amdgpu_display_crtc_idx_to_irq_type(adev,
|
||||||
|
crtc);
|
||||||
|
|
||||||
switch (entry->src_data[0]) {
|
switch (entry->src_data[0]) {
|
||||||
case 0: /* vblank */
|
case 0: /* vblank */
|
||||||
|
|
|
@ -149,7 +149,8 @@ static void dce_virtual_crtc_dpms(struct drm_crtc *crtc, int mode)
|
||||||
case DRM_MODE_DPMS_ON:
|
case DRM_MODE_DPMS_ON:
|
||||||
amdgpu_crtc->enabled = true;
|
amdgpu_crtc->enabled = true;
|
||||||
/* Make sure VBLANK interrupts are still enabled */
|
/* Make sure VBLANK interrupts are still enabled */
|
||||||
type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id);
|
type = amdgpu_display_crtc_idx_to_irq_type(adev,
|
||||||
|
amdgpu_crtc->crtc_id);
|
||||||
amdgpu_irq_update(adev, &adev->crtc_irq, type);
|
amdgpu_irq_update(adev, &adev->crtc_irq, type);
|
||||||
drm_crtc_vblank_on(crtc);
|
drm_crtc_vblank_on(crtc);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -3687,7 +3687,7 @@ static void manage_dm_interrupts(struct amdgpu_device *adev,
|
||||||
* constant is the same as PFLIP
|
* constant is the same as PFLIP
|
||||||
*/
|
*/
|
||||||
int irq_type =
|
int irq_type =
|
||||||
amdgpu_crtc_idx_to_irq_type(
|
amdgpu_display_crtc_idx_to_irq_type(
|
||||||
adev,
|
adev,
|
||||||
acrtc->crtc_id);
|
acrtc->crtc_id);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue