drm/amdgpu/virtual_dce: drop empty function
Subsystems (2)
PATCH 1/4 drm/amdgpu/virtual_dce: drop empty function
No need to ack non-existent interrupts.
--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 11 ----------- 1 file changed, 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +0 -11
@@ -697,15 +697,6 @@ static int dce_virtual_set_crtc_irq_state(struct amdgpu_device *adev,return 0 ; } -static void dce_virtual_crtc_vblank_int_ack (struct amdgpu_device *adev, -int crtc) -{ -if (crtc >= adev->mode_info.num_crtc) { -DRM_DEBUG ("invalid crtc %d\n" , crtc); -return ; - } -} -static int dce_virtual_crtc_irq (struct amdgpu_device *adev,struct amdgpu_irq_src *source,struct amdgpu_iv_entry *entry)
@@ -713,8 +704,6 @@ static int dce_virtual_crtc_irq(struct amdgpu_device *adev,unsigned crtc =0 ;unsigned irq_type =AMDGPU_CRTC_IRQ_VBLANK1 ; -dce_virtual_crtc_vblank_int_ack (adev, crtc); -if (amdgpu_irq_enabled (adev, source, irq_type)) {drm_handle_vblank (adev->ddev, crtc); }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1475208829-27834-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org
PATCH 2/4 drm/amdgpu/virtual_dce: adjust config ifdef
Include the CIK asics in the ifdef.
--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +2 -2
@@ -99,15 +99,15 @@ static void dce_virtual_stop_mc_access(struct amdgpu_device *adev, struct amdgpu_mode_mc_save *save) {switch (adev->asic_type) { +#ifdef CONFIG_DRM_AMDGPU_CIK case CHIP_BONAIRE :case CHIP_HAWAII :case CHIP_KAVERI :case CHIP_KABINI :case CHIP_MULLINS : -#ifdef CONFIG_DRM_AMDGPU_CIK dce_v8_0_disable_dce (adev); -#endif break ; +#endif case CHIP_FIJI :case CHIP_TONGA :dce_v10_0_disable_dce (adev);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1475208829-27834-2-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Deng, Emily
Reviewed-by Emily DengRE: [PATCH 2/4] drm/amdgpu/virtual_dce: adjust config ifdef
Quoted 41 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Alex Deucher
Sent: Friday, September 30, 2016 12:14 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 2/4] drm/amdgpu/virtual_dce: adjust config ifdefInclude the CIK asics in the ifdef.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_virtual.c +2
-3@@ -99,15 +99,15 @@ static void dce_virtual_stop_mc_access(struct amdgpu_device *adev, struct amdgpu_mode_mc_save *save) {switch (adev->asic_type) { +#ifdef CONFIG_DRM_AMDGPU_CIK case CHIP_BONAIRE :case CHIP_HAWAII :case CHIP_KAVERI :case CHIP_KABINI :case CHIP_MULLINS : -#ifdef CONFIG_DRM_AMDGPU_CIK dce_v8_0_disable_dce (adev); -#endif break ; +#endif case CHIP_FIJI :case CHIP_TONGA :dce_v10_0_disable_dce (adev); --2.5.5
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/4 drm/amdgpu/dce6: add dce_v6_0_disable_dce
In reply to a message not in the archiveNeeded for virtual dce support
--- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 50 ++++++++++++++++++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/dce_v6_0.h | 2 ++ 2 files changed, 48 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +46 -4
@@ -490,12 +490,55 @@ static void dce_v6_0_resume_mc_access(struct amdgpu_device *adev,static void dce_v6_0_set_vga_render_state (struct amdgpu_device *adev,bool render) { -if (!render) +if (!render)WREG32 (R_000300_VGA_RENDER_CONTROL ,RREG32 (R_000300_VGA_RENDER_CONTROL ) &C_000300_VGA_VSTATUS_CNTL ); } +static int dce_v6_0_get_num_crtc (struct amdgpu_device *adev) +{ +int num_crtc =0 ; + +switch (adev->asic_type) { +case CHIP_TAHITI : +case CHIP_PITCAIRN : +case CHIP_VERDE : + num_crtc =6 ; +break ; +case CHIP_OLAND : + num_crtc =2 ; +break ; +default : + num_crtc =0 ; + } +return num_crtc; +} + +void dce_v6_0_disable_dce (struct amdgpu_device *adev) +{ +/*Disable VGA render and enabled crtc, if has DCE engine*/ +if (amdgpu_atombios_has_dce_engine_info (adev)) { +u32 tmp; +int crtc_enabled, i; + +dce_v6_0_set_vga_render_state (adev, false); + +/*Disable crtc*/ +for (i =0 ; i <dce_v6_0_get_num_crtc (adev); i++) { + crtc_enabled =RREG32 (EVERGREEN_CRTC_CONTROL + crtc_offsets[i]) & +EVERGREEN_CRTC_MASTER_EN ; +if (crtc_enabled) { +WREG32 (EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i],1 ); + tmp =RREG32 (EVERGREEN_CRTC_CONTROL + crtc_offsets[i]); + tmp &= ~EVERGREEN_CRTC_MASTER_EN ; +WREG32 (EVERGREEN_CRTC_CONTROL + crtc_offsets[i], tmp); +WREG32 (EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i],0 ); + } + } + } +} +static void dce_v6_0_program_fmt (struct drm_encoder *encoder) {
@@ -2217,21 +2260,20 @@ static int dce_v6_0_early_init(void *handle)dce_v6_0_set_display_funcs (adev);dce_v6_0_set_irq_funcs (adev); + adev->mode_info.num_crtc =dce_v6_0_get_num_crtc (adev); +switch (adev->asic_type) {case CHIP_TAHITI :case CHIP_PITCAIRN :case CHIP_VERDE : - adev->mode_info.num_crtc =6 ; adev->mode_info.num_hpd =6 ; adev->mode_info.num_dig =6 ;break ;case CHIP_OLAND : - adev->mode_info.num_crtc =2 ; adev->mode_info.num_hpd =2 ; adev->mode_info.num_dig =2 ;break ;default : -/* FIXME: not supported yet */ return -EINVAL ; }
drivers/gpu/drm/amd/amdgpu/dce_v6_0.h +2 -0
@@ -26,4 +26,6 @@extern const struct amd_ip_funcs dce_v6_0_ip_funcs; +void dce_v6_0_disable_dce (struct amdgpu_device *adev); +#endif
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1475208829-27834-3-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org
RE: [PATCH 3/4] drm/amdgpu/dce6: add dce_v6_0_disable_dce
Hi Alex,
It seems hasn't support virtual display for dce_v6_0 asic?
Quoted 122 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Alex Deucher
Sent: Friday, September 30, 2016 12:14 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 3/4] drm/amdgpu/dce6: adddce_v6_0_disable_dceNeeded for virtual dce support
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 50 ++++++++++++++++++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/dce_v6_0.h | 2 ++ 2 files changed, 48 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +0
-0@@ -490,12 +490,55 @@ static void dce_v6_0_resume_mc_access(struct
amdgpu_device*adev, static void dce_v6_0_set_vga_render_state(structamdgpu_device*adev,drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +1
-1bool render) { -if (!render) +if (!render) WREG32(R_000300_VGA_RENDER_CONTROL, RREG32(R_000300_VGA_RENDER_CONTROL) &
C_000300_VGA_VSTATUS_CNTL);}
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +29
-0+static int dce_v6_0_get_num_crtc (struct amdgpu_device *adev) { +int num_crtc =0 ; + +switch (adev->asic_type) { +case CHIP_TAHITI : +case CHIP_PITCAIRN : +case CHIP_VERDE : + num_crtc =6 ; +break ; +case CHIP_OLAND : + num_crtc =2 ; +break ; +default : + num_crtc =0 ; + } +return num_crtc; +} + +void dce_v6_0_disable_dce (struct amdgpu_device *adev) { +/*Disable VGA render and enabled crtc, if has DCE engine*/ +if (amdgpu_atombios_has_dce_engine_info (adev)) { +u32 tmp; +int crtc_enabled, i; + +dce_v6_0_set_vga_render_state (adev, false); + +/*Disable crtc*/ +for (i =0 ; i <dce_v6_0_get_num_crtc (adev); i++) { + crtc_enabled =
RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i])&drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +8
-0+EVERGREEN_CRTC_MASTER_EN ; +if (crtc_enabled) { + WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1); + tmp =RREG32 (EVERGREEN_CRTC_CONTROL + crtc_offsets[i]); + tmp &= ~EVERGREEN_CRTC_MASTER_EN ; + WREG32(EVERGREEN_CRTC_CONTROL +crtc_offsets[i], tmp);
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +9
-3+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 0); + } + } + } +} +static void dce_v6_0_program_fmt (struct drm_encoder *encoder) {@@ -2217,21 +2260,20 @@ static int dce_v6_0_early_init(void *handle)dce_v6_0_set_display_funcs (adev);dce_v6_0_set_irq_funcs (adev); + adev->mode_info.num_crtc =dce_v6_0_get_num_crtc (adev); +switch (adev->asic_type) {case CHIP_TAHITI :case CHIP_PITCAIRN :case CHIP_VERDE : - adev->mode_info.num_crtc =6 ; adev->mode_info.num_hpd =6 ; adev->mode_info.num_dig =6 ;break ;case CHIP_OLAND : - adev->mode_info.num_crtc =2 ; adev->mode_info.num_hpd =2 ; adev->mode_info.num_dig =2 ;break ;default : -/* FIXME: not supported yet */ return -EINVAL ; }drivers/gpu/drm/amd/amdgpu/dce_v6_0.h +2
-1@@ -26,4 +26,6 @@extern const struct amd_ip_funcs dce_v6_0_ip_funcs; +void dce_v6_0_disable_dce (struct amdgpu_device *adev); +#endif --2.5.5
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): DM5PR12MB165939907FBCC4F813DD44B78FC10-2J9CzHegvk/[email protected]
RE: [PATCH 3/4] drm/amdgpu/dce6: add dce_v6_0_disable_dce
Quoted 9 lines
-----Original Message-----
From: Deng, Emily
Sent: Friday, September 30, 2016 3:21 AM
To: Alex Deucher; [email protected]
Cc: Deucher, Alexander
Subject: RE: [PATCH 3/4] drm/amdgpu/dce6: adddce_v6_0_disable_dceHi Alex,
It seems hasn't support virtual display fordce_v6_0asic?
SI support was developed in parallel and landed after your virtual dce patches went in.
Alex
Quoted 123 lines
Quoted 123 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Alex Deucher
Sent: Friday, September 30, 2016 12:14 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 3/4] drm/amdgpu/dce6: adddce_v6_0_disable_dceNeeded for virtual dce support
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 50 ++++++++++++++++++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/dce_v6_0.h | 2 ++ 2 files changed, 48 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +0
-0@@ -490,12 +490,55 @@ static void dce_v6_0_resume_mc_access(struct
amdgpu_device*adev, static void dce_v6_0_set_vga_render_state(structamdgpu_device*adev,drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +1
-1bool render) { -if (!render) +if (!render) WREG32(R_000300_VGA_RENDER_CONTROL, RREG32(R_000300_VGA_RENDER_CONTROL) &
C_000300_VGA_VSTATUS_CNTL);}
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +29
-0+static int dce_v6_0_get_num_crtc (struct amdgpu_device *adev) { +int num_crtc =0 ; + +switch (adev->asic_type) { +case CHIP_TAHITI : +case CHIP_PITCAIRN : +case CHIP_VERDE : + num_crtc =6 ; +break ; +case CHIP_OLAND : + num_crtc =2 ; +break ; +default : + num_crtc =0 ; + } +return num_crtc; +} + +void dce_v6_0_disable_dce (struct amdgpu_device *adev) { +/*Disable VGA render and enabled crtc, if has DCE engine*/ +if (amdgpu_atombios_has_dce_engine_info (adev)) { +u32 tmp; +int crtc_enabled, i; + +dce_v6_0_set_vga_render_state (adev, false); + +/*Disable crtc*/ +for (i =0 ; i <dce_v6_0_get_num_crtc (adev); i++) { + crtc_enabled =
RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i])&drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +8
-0+EVERGREEN_CRTC_MASTER_EN ; +if (crtc_enabled) { + WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1); + tmp =RREG32 (EVERGREEN_CRTC_CONTROL + crtc_offsets[i]); + tmp &= ~EVERGREEN_CRTC_MASTER_EN ; + WREG32(EVERGREEN_CRTC_CONTROL +crtc_offsets[i], tmp);
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +9
-3+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 0); + } + } + } +} +static void dce_v6_0_program_fmt (struct drm_encoder *encoder) {@@ -2217,21 +2260,20 @@ static int dce_v6_0_early_init(void *handle)dce_v6_0_set_display_funcs (adev);dce_v6_0_set_irq_funcs (adev); + adev->mode_info.num_crtc =dce_v6_0_get_num_crtc (adev); +switch (adev->asic_type) {case CHIP_TAHITI :case CHIP_PITCAIRN :case CHIP_VERDE : - adev->mode_info.num_crtc =6 ; adev->mode_info.num_hpd =6 ; adev->mode_info.num_dig =6 ;break ;case CHIP_OLAND : - adev->mode_info.num_crtc =2 ; adev->mode_info.num_hpd =2 ; adev->mode_info.num_dig =2 ;break ;default : -/* FIXME: not supported yet */ return -EINVAL ; }drivers/gpu/drm/amd/amdgpu/dce_v6_0.h +2
-1@@ -26,4 +26,6 @@extern const struct amd_ip_funcs dce_v6_0_ip_funcs; +void dce_v6_0_disable_dce (struct amdgpu_device *adev); +#endif --2.5.5
Quoted 4 lines
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): MWHPR12MB16941D29FF3BF08E407DC0C4F7C10-Gy0DoCVfaSW4WA4dJ5YXGAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Re: [PATCH 3/4] drm/amdgpu/dce6: add dce_v6_0_disable_dce
Quoted 11 lines · Alexander
Quoted 9 lines
-----Original Message-----
From: Deng, Emily
Sent: Friday, September 30, 2016 3:21 AM
To: Alex Deucher; [email protected]
Cc: Deucher, Alexander
Subject: RE: [PATCH 3/4] drm/amdgpu/dce6: adddce_v6_0_disable_dceHi Alex,
It seems hasn't support virtual display fordce_v6_0asic?SI support was developed in parallel and landed after your virtual dce patches went in.
Ping on this series.
Alex
Quoted 126 lines
Alex
Quoted 123 lines
Quoted 123 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Alex Deucher
Sent: Friday, September 30, 2016 12:14 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 3/4] drm/amdgpu/dce6: adddce_v6_0_disable_dceNeeded for virtual dce support
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 50 ++++++++++++++++++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/dce_v6_0.h | 2 ++ 2 files changed, 48 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +0
-0@@ -490,12 +490,55 @@ static void dce_v6_0_resume_mc_access(struct
amdgpu_device*adev, static void dce_v6_0_set_vga_render_state(structamdgpu_device*adev,
bool render)
{drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +1
-1-if (!render) +if (!render) WREG32(R_000300_VGA_RENDER_CONTROL, RREG32(R_000300_VGA_RENDER_CONTROL) &
C_000300_VGA_VSTATUS_CNTL);}
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +29
-0+static int dce_v6_0_get_num_crtc (struct amdgpu_device *adev) { +int num_crtc =0 ; + +switch (adev->asic_type) { +case CHIP_TAHITI : +case CHIP_PITCAIRN : +case CHIP_VERDE : + num_crtc =6 ; +break ; +case CHIP_OLAND : + num_crtc =2 ; +break ; +default : + num_crtc =0 ; + } +return num_crtc; +} + +void dce_v6_0_disable_dce (struct amdgpu_device *adev) { +/*Disable VGA render and enabled crtc, if has DCE engine*/ +if (amdgpu_atombios_has_dce_engine_info (adev)) { +u32 tmp; +int crtc_enabled, i; + +dce_v6_0_set_vga_render_state (adev, false); + +/*Disable crtc*/ +for (i =0 ; i <dce_v6_0_get_num_crtc (adev); i++) { + crtc_enabled =
RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i])&drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +8
-0+EVERGREEN_CRTC_MASTER_EN ; +if (crtc_enabled) { + WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1); + tmp =RREG32 (EVERGREEN_CRTC_CONTROL + crtc_offsets[i]); + tmp &= ~EVERGREEN_CRTC_MASTER_EN ; + WREG32(EVERGREEN_CRTC_CONTROL +crtc_offsets[i], tmp);
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +9
-3+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 0); + } + } + } +} +static void dce_v6_0_program_fmt (struct drm_encoder *encoder) {@@ -2217,21 +2260,20 @@ static int dce_v6_0_early_init(void *handle)dce_v6_0_set_display_funcs (adev);dce_v6_0_set_irq_funcs (adev); + adev->mode_info.num_crtc =dce_v6_0_get_num_crtc (adev); +switch (adev->asic_type) {case CHIP_TAHITI :case CHIP_PITCAIRN :case CHIP_VERDE : - adev->mode_info.num_crtc =6 ; adev->mode_info.num_hpd =6 ; adev->mode_info.num_dig =6 ;break ;case CHIP_OLAND : - adev->mode_info.num_crtc =2 ; adev->mode_info.num_hpd =2 ; adev->mode_info.num_dig =2 ;break ;default : -/* FIXME: not supported yet */ return -EINVAL ; }drivers/gpu/drm/amd/amdgpu/dce_v6_0.h +2
-1@@ -26,4 +26,6 @@extern const struct amd_ip_funcs dce_v6_0_ip_funcs; +void dce_v6_0_disable_dce (struct amdgpu_device *adev); +#endif --2.5.5
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deng, Emily
Reviewed-by Emily DengRE: [PATCH 3/4] drm/amdgpu/dce6: add dce_v6_0_disable_dce
In reply to a message not in the archiveQuoted 147 lines
-----Original Message-----
From: Deucher, Alexander
Sent: Friday, September 30, 2016 9:19 PM
To: Deng, Emily <[email protected]>; Alex Deucher <[email protected]>; [email protected]
Subject: RE: [PATCH 3/4] drm/amdgpu/dce6: adddce_v6_0_disable_dceQuoted 9 lines
-----Original Message-----
From: Deng, Emily
Sent: Friday, September 30, 2016 3:21 AM
To: Alex Deucher; [email protected]
Cc: Deucher, Alexander
Subject: RE: [PATCH 3/4] drm/amdgpu/dce6: adddce_v6_0_disable_dceHi Alex,
It seems hasn't support virtual display fordce_v6_0asic?SI support was developed in parallel and landed after your virtual dce patches went in.
Alex
Quoted 18 lines
Quoted 18 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Alex Deucher
Sent: Friday, September 30, 2016 12:14 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 3/4] drm/amdgpu/dce6: adddce_v6_0_disable_dceNeeded for virtual dce support
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 50 ++++++++++++++++++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/dce_v6_0.h | 2 ++ 2 files changed, 48 insertions(+), 4 deletions(-)Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c static void
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +0
-0@@ -490,12 +490,55 @@ static voiddce_v6_0_resume_mc_access(struct
Quoted 38 lines
Quoted 38 lines
amdgpu_device*adev, static void
dce_v6_0_set_vga_render_state(structamdgpu_device*adev,drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +1
-1bool render) { -if (!render) +if (!render) WREG32(R_000300_VGA_RENDER_CONTROL, RREG32(R_000300_VGA_RENDER_CONTROL) &
C_000300_VGA_VSTATUS_CNTL);}
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +25
-0+static int dce_v6_0_get_num_crtc (struct amdgpu_device *adev) { +int num_crtc =0 ; + +switch (adev->asic_type) { +case CHIP_TAHITI : +case CHIP_PITCAIRN : +case CHIP_VERDE : + num_crtc =6 ; +break ; +case CHIP_OLAND : + num_crtc =2 ; +break ; +default : + num_crtc =0 ; + } +return num_crtc; +} + +void dce_v6_0_disable_dce (struct amdgpu_device *adev) { +/*Disable VGA render and enabled crtc, if has DCE engine*/ +if (amdgpu_atombios_has_dce_engine_info (adev)) { +u32 tmp; +int crtc_enabled, i; + +dce_v6_0_set_vga_render_state (adev, false);Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c static void dce_v6_0_resume_mc_access(struct amdgpu_device *adev,
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +4
-0+ +/*Disable crtc*/ +for (i =0 ; i <dce_v6_0_get_num_crtc (adev); i++) { + crtc_enabled =
RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i])&drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +3
-0+EVERGREEN_CRTC_MASTER_EN ; +if (crtc_enabled) { + WREG32(EVERGREEN_CRTC_UPDATE_LOCKcrtc_offsets[i], 1);
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +1
-0+ tmp = RREG32(EVERGREEN_CRTC_CONTROLcrtc_offsets[i]);
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +2
-0+ tmp &= ~EVERGREEN_CRTC_MASTER_EN ; + WREG32(EVERGREEN_CRTC_CONTROL +crtc_offsets[i], tmp);
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +1
-0+ WREG32(EVERGREEN_CRTC_UPDATE_LOCKcrtc_offsets[i], 0);
Quoted 46 lines
Quoted 46 lines
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +7
-3+ } + } + } +} +static void dce_v6_0_program_fmt (struct drm_encoder *encoder) {@@ -2217,21 +2260,20 @@ static int dce_v6_0_early_init(void *handle)dce_v6_0_set_display_funcs (adev);dce_v6_0_set_irq_funcs (adev); + adev->mode_info.num_crtc =dce_v6_0_get_num_crtc (adev); +switch (adev->asic_type) {case CHIP_TAHITI :case CHIP_PITCAIRN :case CHIP_VERDE : - adev->mode_info.num_crtc =6 ; adev->mode_info.num_hpd =6 ; adev->mode_info.num_dig =6 ;break ;case CHIP_OLAND : - adev->mode_info.num_crtc =2 ; adev->mode_info.num_hpd =2 ; adev->mode_info.num_dig =2 ;break ;default : -/* FIXME: not supported yet */ return -EINVAL ; }drivers/gpu/drm/amd/amdgpu/dce_v6_0.h +2
-1@@ -26,4 +26,6 @@extern const struct amd_ip_funcs dce_v6_0_ip_funcs; +void dce_v6_0_disable_dce (struct amdgpu_device *adev); +#endif --2.5.5
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/4 drm/amdgpu/virtual_dce: add dce6 support
In reply to a message not in the archivedisable the real dce hw if the asic supports dce.
--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +14 -0
@@ -27,6 +27,9 @@#include "atom.h" #include "amdgpu_pll.h" #include "amdgpu_connectors.h" +#ifdef CONFIG_DRM_AMDGPU_SI +#include "dce_v6_0.h" +#endif #ifdef CONFIG_DRM_AMDGPU_CIK #include "dce_v8_0.h" #endif
@@ -99,6 +102,14 @@ static void dce_virtual_stop_mc_access(struct amdgpu_device *adev, struct amdgpu_mode_mc_save *save) {switch (adev->asic_type) { +#ifdef CONFIG_DRM_AMDGPU_SI +case CHIP_TAHITI : +case CHIP_PITCAIRN : +case CHIP_VERDE : +case CHIP_OLAND : +dce_v6_0_disable_dce (adev); +break ; +#endif #ifdef CONFIG_DRM_AMDGPU_CIK case CHIP_BONAIRE :case CHIP_HAWAII :
@@ -119,6 +130,9 @@ static void dce_virtual_stop_mc_access(struct amdgpu_device *adev,dce_v11_0_disable_dce (adev);break ;case CHIP_TOPAZ : +#ifdef CONFIG_DRM_AMDGPU_SI +case CHIP_HAINAN : +#endif /* no DCE */ return ;default :
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deng, Emily
Reviewed-by Emily DengQuoted 49 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Alex Deucher
Sent: Friday, September 30, 2016 12:14 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 1/4] drm/amdgpu/virtual_dce: drop empty functionNo need to ack non-existent interrupts.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 11 ----------- 1 file changed, 11 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_virtual.c +0
-9@@ -697,15 +697,6 @@ static int dce_virtual_set_crtc_irq_state(structamdgpu_device *adev, return 0; } -static void dce_virtual_crtc_vblank_int_ack (struct amdgpu_device *adev, -int crtc) -{ -if (crtc >= adev->mode_info.num_crtc) { -DRM_DEBUG ("invalid crtc %d\n" , crtc); -return ; - } -} - static int dce_virtual_crtc_irq(struct amdgpu_device *adev, struct amdgpu_irq_src *source,drivers/gpu/drm/amd/amdgpu/dce_virtual.c +1
-3struct amdgpu_iv_entry *entry) @@ -713,8 +704,6 @@ static int dce_virtual_crtc_irq(struct amdgpu_device *adev, unsigned crtc = 0;unsigned irq_type =AMDGPU_CRTC_IRQ_VBLANK1 ; -dce_virtual_crtc_vblank_int_ack (adev, crtc); -if (amdgpu_irq_enabled (adev, source, irq_type)) {drm_handle_vblank (adev->ddev, crtc); } --2.5.5
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx