remove fb_location programming
Subsystems (3)
cover remove fb_location programming
Since evergreen, the vbios has programmed the FB_LOCATION to the proper size during asic_init, so there is no need to reprogram them in the driver. We can safely leave the location as set by the vbios. This simplifies the driver significantly.
Alex Deucher (11):
drm/amdgpu/vce2: fix vce bar programming
drm/amdgpu: put gtt at 0 in the internal address space drm/amdgpu/gmc8: use the vram location programmed by the vbios drm/amdgpu/gmc7: use the vram location programmed by the vbios drm/amdgpu/gmc6: use the vram location programmed by the vbios drm/amdgpu/gmc8: drop fb location programming drm/amdgpu/gmc7: drop fb location programming drm/amdgpu/gmc6: drop fb location programming drm/amdgpu: drop set_vga_render_state from display funcs (v2) drm/amdgpu: remove *_mc_access from display funcs (v2) drm/amd/dc/dm: remove redundant display structs
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 12 -- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 135 +--------------------- drivers/gpu/drm/amd/amdgpu/dce_v10_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 80 +------------ drivers/gpu/drm/amd/amdgpu/dce_v11_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 115 ------------------ drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 82 +------------ drivers/gpu/drm/amd/amdgpu/dce_v8_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 97 +++++++--------- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 38 ++---- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 35 ++---- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 34 ++---- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 17 +-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 75 +----------- 16 files changed, 83 insertions(+), 667 deletions(-)
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): 1487363897-2707-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org
PATCH 1/11 drm/amdgpu/vce2: fix vce bar programming
Program the VCE BAR and offsets properly. The current code was carried over from a limitation from older VCE versions.
--- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v2_0.c +9 -8
@@ -167,8 +167,7 @@ static void vce_v2_0_init_cg(struct amdgpu_device *adev)static void vce_v2_0_mc_resume (struct amdgpu_device *adev) { -uint64_t addr = adev->vce.gpu_addr; -uint32_t size; +uint32_t size, offset;WREG32_P (mmVCE_CLOCK_GATING_A,0 , ~(1 <<16 ));WREG32_P (mmVCE_UENC_CLOCK_GATING,0x1FF000 , ~0xFF9FF000 );
@@ -181,19 +180,21 @@ static void vce_v2_0_mc_resume(struct amdgpu_device *adev)WREG32 (mmVCE_LMI_SWAP_CNTL1,0 );WREG32 (mmVCE_LMI_VM_CTRL,0 ); - addr +=AMDGPU_VCE_FIRMWARE_OFFSET ; +WREG32 (mmVCE_LMI_VCPU_CACHE_40BIT_BAR, (adev->vce.gpu_addr >>8 )); + + offset =AMDGPU_VCE_FIRMWARE_OFFSET ; size =VCE_V2_0_FW_SIZE ; -WREG32 (mmVCE_VCPU_CACHE_OFFSET0, addr &0x7fffffff ); +WREG32 (mmVCE_VCPU_CACHE_OFFSET0, offset &0x7fffffff );WREG32 (mmVCE_VCPU_CACHE_SIZE0, size); - addr += size; + offset += size; size =VCE_V2_0_STACK_SIZE ; -WREG32 (mmVCE_VCPU_CACHE_OFFSET1, addr &0x7fffffff ); +WREG32 (mmVCE_VCPU_CACHE_OFFSET1, offset &0x7fffffff );WREG32 (mmVCE_VCPU_CACHE_SIZE1, size); - addr += size; + offset += size; size =VCE_V2_0_DATA_SIZE ; -WREG32 (mmVCE_VCPU_CACHE_OFFSET2, addr &0x7fffffff ); +WREG32 (mmVCE_VCPU_CACHE_OFFSET2, offset &0x7fffffff );WREG32 (mmVCE_VCPU_CACHE_SIZE2, size);WREG32_P (mmVCE_LMI_CTRL2,0x0 , ~0x100 );
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/11 drm/amdgpu: put gtt at 0 in the internal address space
In reply to a message not in the archiveThere still seem to be some blocks that make accesses in the lower part of the address space. This works around this.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
@@ -603,7 +603,7 @@ void amdgpu_gtt_location(struct amdgpu_device *adev, struct amdgpu_mc *mc)dev_warn (adev->dev,"limiting GTT\n" ); mc->gtt_size = size_bf; } - mc->gtt_start = (mc->vram_start & ~mc->gtt_base_align) - mc->gtt_size; + mc->gtt_start =0 ; }else {if (mc->gtt_size > size_af) {dev_warn (adev->dev,"limiting GTT\n" );
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/11 drm/amdgpu/gmc8: use the vram location programmed by the vbios
In reply to a message not in the archiveThis makes mc programming much simpler in future patches.
Since evergreen, the vbios has been programming the fb location to the proper vram size. The only reason to reprogram it would be to change the location.
--- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +4 -1
@@ -334,13 +334,16 @@ static int gmc_v8_0_mc_load_microcode(struct amdgpu_device *adev)static void gmc_v8_0_vram_gtt_location (struct amdgpu_device *adev,struct amdgpu_mc *mc) { +u64 base =RREG32 (mmMC_VM_FB_LOCATION) &0xFFFF ; + base <<=24 ; +if (mc->mc_vram_size >0xFFC0000000ULL ) {/* leave room for at least 1024M GTT */ dev_warn (adev->dev,"limiting VRAM\n" ); mc->real_vram_size =0xFFC0000000ULL ; mc->mc_vram_size =0xFFC0000000ULL ; } -amdgpu_vram_location (adev, &adev->mc,0 ); +amdgpu_vram_location (adev, &adev->mc, base); adev->mc.gtt_base_align =0 ;amdgpu_gtt_location (adev, mc); }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/11 drm/amdgpu/gmc7: use the vram location programmed by the vbios
In reply to a message not in the archiveThis makes mc programming much simpler in future patches.
Since evergreen, the vbios has been programming the fb location to the proper vram size. The only reason to reprogram it would be to change the location.
--- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +4 -1
@@ -242,13 +242,16 @@ static int gmc_v7_0_mc_load_microcode(struct amdgpu_device *adev)static void gmc_v7_0_vram_gtt_location (struct amdgpu_device *adev,struct amdgpu_mc *mc) { +u64 base =RREG32 (mmMC_VM_FB_LOCATION) &0xFFFF ; + base <<=24 ; +if (mc->mc_vram_size >0xFFC0000000ULL ) {/* leave room for at least 1024M GTT */ dev_warn (adev->dev,"limiting VRAM\n" ); mc->real_vram_size =0xFFC0000000ULL ; mc->mc_vram_size =0xFFC0000000ULL ; } -amdgpu_vram_location (adev, &adev->mc,0 ); +amdgpu_vram_location (adev, &adev->mc, base); adev->mc.gtt_base_align =0 ;amdgpu_gtt_location (adev, mc); }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/11 drm/amdgpu/gmc6: use the vram location programmed by the vbios
In reply to a message not in the archiveThis makes mc programming much simpler in future patches.
Since evergreen, the vbios has been programming the fb location to the proper vram size. The only reason to reprogram it would be to change the location.
--- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +4 -1
@@ -228,12 +228,15 @@ static int gmc_v6_0_mc_load_microcode(struct amdgpu_device *adev)static void gmc_v6_0_vram_gtt_location (struct amdgpu_device *adev,struct amdgpu_mc *mc) { +u64 base =RREG32 (mmMC_VM_FB_LOCATION) &0xFFFF ; + base <<=24 ; +if (mc->mc_vram_size >0xFFC0000000ULL ) {dev_warn (adev->dev,"limiting VRAM\n" ); mc->real_vram_size =0xFFC0000000ULL ; mc->mc_vram_size =0xFFC0000000ULL ; } -amdgpu_vram_location (adev, &adev->mc,0 ); +amdgpu_vram_location (adev, &adev->mc, base); adev->mc.gtt_base_align =0 ;amdgpu_gtt_location (adev, mc); }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/11 drm/amdgpu/gmc8: drop fb location programming
In reply to a message not in the archiveNo need to do this as the vbios does this for us. As such we no longer need to stop the mc during init.
--- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 13 ------------- 1 file changed, 13 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +0 -13
@@ -358,7 +358,6 @@ static void gmc_v8_0_vram_gtt_location(struct amdgpu_device *adev,*/ static void gmc_v8_0_mc_program (struct amdgpu_device *adev) { -struct amdgpu_mode_mc_save save;u32 tmp;int i, j;
@@ -372,10 +371,6 @@ static void gmc_v8_0_mc_program(struct amdgpu_device *adev) }WREG32 (mmHDP_REG_COHERENCY_FLUSH_CNTL,0 ); -if (adev->mode_info.num_crtc) -amdgpu_display_set_vga_render_state (adev, false); - -gmc_v8_0_mc_stop (adev, &save);if (gmc_v8_0_wait_for_idle ((void *)adev)) {dev_warn (adev->dev,"Wait for MC idle timedout !\n" ); }
@@ -386,20 +381,12 @@ static void gmc_v8_0_mc_program(struct amdgpu_device *adev) adev->mc.vram_end >> 12);WREG32 (mmMC_VM_SYSTEM_APERTURE_DEFAULT_ADDR, adev->vram_scratch.gpu_addr >>12 ); - tmp = ((adev->mc.vram_end >>24 ) &0xFFFF ) <<16 ; - tmp |= ((adev->mc.vram_start >>24 ) &0xFFFF ); -WREG32 (mmMC_VM_FB_LOCATION, tmp); -/* XXX double check these! */ -WREG32 (mmHDP_NONSURFACE_BASE, (adev->mc.vram_start >>8 )); -WREG32 (mmHDP_NONSURFACE_INFO, (2 <<7 ) | (1 <<30 )); -WREG32 (mmHDP_NONSURFACE_SIZE,0x3FFFFFFF );WREG32 (mmMC_VM_AGP_BASE,0 );WREG32 (mmMC_VM_AGP_TOP,0x0FFFFFFF );WREG32 (mmMC_VM_AGP_BOT,0x0FFFFFFF );if (gmc_v8_0_wait_for_idle ((void *)adev)) {dev_warn (adev->dev,"Wait for MC idle timedout !\n" ); } -gmc_v8_0_mc_resume (adev, &save);WREG32 (mmBIF_FB_EN,BIF_FB_EN__FB_READ_EN_MASK |BIF_FB_EN__FB_WRITE_EN_MASK );
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/11 drm/amdgpu/gmc7: drop fb location programming
In reply to a message not in the archiveNo need to do this as the vbios does this for us. As such we no longer need to stop the mc during init.
--- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 13 ------------- 1 file changed, 13 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +0 -13
@@ -266,7 +266,6 @@ static void gmc_v7_0_vram_gtt_location(struct amdgpu_device *adev,*/ static void gmc_v7_0_mc_program (struct amdgpu_device *adev) { -struct amdgpu_mode_mc_save save;u32 tmp;int i, j;
@@ -280,10 +279,6 @@ static void gmc_v7_0_mc_program(struct amdgpu_device *adev) }WREG32 (mmHDP_REG_COHERENCY_FLUSH_CNTL,0 ); -if (adev->mode_info.num_crtc) -amdgpu_display_set_vga_render_state (adev, false); - -gmc_v7_0_mc_stop (adev, &save);if (gmc_v7_0_wait_for_idle ((void *)adev)) {dev_warn (adev->dev,"Wait for MC idle timedout !\n" ); }
@@ -294,20 +289,12 @@ static void gmc_v7_0_mc_program(struct amdgpu_device *adev) adev->mc.vram_end >> 12);WREG32 (mmMC_VM_SYSTEM_APERTURE_DEFAULT_ADDR, adev->vram_scratch.gpu_addr >>12 ); - tmp = ((adev->mc.vram_end >>24 ) &0xFFFF ) <<16 ; - tmp |= ((adev->mc.vram_start >>24 ) &0xFFFF ); -WREG32 (mmMC_VM_FB_LOCATION, tmp); -/* XXX double check these! */ -WREG32 (mmHDP_NONSURFACE_BASE, (adev->mc.vram_start >>8 )); -WREG32 (mmHDP_NONSURFACE_INFO, (2 <<7 ) | (1 <<30 )); -WREG32 (mmHDP_NONSURFACE_SIZE,0x3FFFFFFF );WREG32 (mmMC_VM_AGP_BASE,0 );WREG32 (mmMC_VM_AGP_TOP,0x0FFFFFFF );WREG32 (mmMC_VM_AGP_BOT,0x0FFFFFFF );if (gmc_v7_0_wait_for_idle ((void *)adev)) {dev_warn (adev->dev,"Wait for MC idle timedout !\n" ); } -gmc_v7_0_mc_resume (adev, &save);WREG32 (mmBIF_FB_EN,BIF_FB_EN__FB_READ_EN_MASK |BIF_FB_EN__FB_WRITE_EN_MASK );
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/11 drm/amdgpu/gmc6: drop fb location programming
In reply to a message not in the archiveNo need to do this as the vbios does this for us. As such we no longer need to stop the mc during init.
--- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 15 --------------- 1 file changed, 15 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +0 -15
@@ -243,8 +243,6 @@ static void gmc_v6_0_vram_gtt_location(struct amdgpu_device *adev,static void gmc_v6_0_mc_program (struct amdgpu_device *adev) { -struct amdgpu_mode_mc_save save; -u32 tmp;int i, j;/* Initialize HDP */
@@ -257,11 +255,6 @@ static void gmc_v6_0_mc_program(struct amdgpu_device *adev) }WREG32 (mmHDP_REG_COHERENCY_FLUSH_CNTL,0 ); -if (adev->mode_info.num_crtc) -amdgpu_display_set_vga_render_state (adev, false); - -gmc_v6_0_mc_stop (adev, &save); -if (gmc_v6_0_wait_for_idle ((void *)adev)) {dev_warn (adev->dev,"Wait for MC idle timedout !\n" ); }
@@ -274,13 +267,6 @@ static void gmc_v6_0_mc_program(struct amdgpu_device *adev) adev->mc.vram_end >> 12);WREG32 (mmMC_VM_SYSTEM_APERTURE_DEFAULT_ADDR, adev->vram_scratch.gpu_addr >>12 ); - tmp = ((adev->mc.vram_end >>24 ) &0xFFFF ) <<16 ; - tmp |= ((adev->mc.vram_start >>24 ) &0xFFFF ); -WREG32 (mmMC_VM_FB_LOCATION, tmp); -/* XXX double check these! */ -WREG32 (mmHDP_NONSURFACE_BASE, (adev->mc.vram_start >>8 )); -WREG32 (mmHDP_NONSURFACE_INFO, (2 <<7 ) | (1 <<30 )); -WREG32 (mmHDP_NONSURFACE_SIZE,0x3FFFFFFF );WREG32 (mmMC_VM_AGP_BASE,0 );WREG32 (mmMC_VM_AGP_TOP,0x0FFFFFFF );WREG32 (mmMC_VM_AGP_BOT,0x0FFFFFFF );
@@ -288,7 +274,6 @@ static void gmc_v6_0_mc_program(struct amdgpu_device *adev)if (gmc_v6_0_wait_for_idle ((void *)adev)) {dev_warn (adev->dev,"Wait for MC idle timedout !\n" ); } -gmc_v6_0_mc_resume (adev, &save); }static int gmc_v6_0_mc_init (struct amdgpu_device *adev)
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/11 drm/amdgpu: drop set_vga_render_state from display funcs (v2)
In reply to a message not in the archiveNot used.
v2: include DC as well
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 -- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/dce_v10_0.h | 3 --- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/dce_v11_0.h | 3 --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 - drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/dce_v8_0.h | 3 --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 7 ------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 --- 11 files changed, 6 insertions(+), 32 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -1
@@ -1702,7 +1702,6 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring)#define amdgpu_ih_get_wptr (adev) (adev)->irq.ih_funcs->get_wptr((adev))#define amdgpu_ih_decode_iv (adev, iv) (adev)->irq.ih_funcs->decode_iv((adev), (iv))#define amdgpu_ih_set_rptr (adev) (adev)->irq.ih_funcs->set_rptr((adev)) -#define amdgpu_display_set_vga_render_state (adev, r) (adev)->mode_info.funcs->set_vga_render_state((adev), (r))#define amdgpu_display_vblank_get_counter (adev, crtc) (adev)->mode_info.funcs->vblank_get_counter((adev), (crtc))#define amdgpu_display_vblank_wait (adev, crtc) (adev)->mode_info.funcs->vblank_wait((adev), (crtc))#define amdgpu_display_backlight_set_level (adev, e, l) (adev)->mode_info.funcs->backlight_set_level((e), (l))
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +0 -2
@@ -267,8 +267,6 @@ struct amdgpu_mode_mc_save { };struct amdgpu_display_funcs { -/* vga render */ -void (*set_vga_render_state)(struct amdgpu_device *adev,bool render);/* display watermarks */ void (*bandwidth_update)(struct amdgpu_device *adev);/* get frame count */
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +2 -3
@@ -612,8 +612,8 @@ void dce_v10_0_resume_mc_access(struct amdgpu_device *adev,WREG32 (mmVGA_RENDER_CONTROL, save->vga_render_control); } -void dce_v10_0_set_vga_render_state (struct amdgpu_device *adev, -bool render) +static void dce_v10_0_set_vga_render_state (struct amdgpu_device *adev, +bool render) {u32 tmp;
@@ -3747,7 +3747,6 @@ static void dce_v10_0_encoder_add(struct amdgpu_device *adev, }static const struct amdgpu_display_funcs dce_v10_0_display_funcs = { - .set_vga_render_state = &dce_v10_0_set_vga_render_state, .bandwidth_update = &dce_v10_0_bandwidth_update, .vblank_get_counter = &dce_v10_0_vblank_get_counter, .vblank_wait = &dce_v10_0_vblank_wait,
drivers/gpu/drm/amd/amdgpu/dce_v10_0.h +0 -3
@@ -29,9 +29,6 @@ extern const struct amdgpu_ip_block_version dce_v10_0_ip_block;extern const struct amdgpu_ip_block_version dce_v10_1_ip_block;void dce_v10_0_disable_dce (struct amdgpu_device *adev); - -void dce_v10_0_set_vga_render_state (struct amdgpu_device *adev, -bool render);void dce_v10_0_stop_mc_access (struct amdgpu_device *adev,struct amdgpu_mode_mc_save *save); void dce_v10_0_resume_mc_access(struct amdgpu_device *adev,
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +2 -3
@@ -572,8 +572,8 @@ void dce_v11_0_resume_mc_access(struct amdgpu_device *adev,WREG32 (mmVGA_RENDER_CONTROL, save->vga_render_control); } -void dce_v11_0_set_vga_render_state (struct amdgpu_device *adev, -bool render) +static void dce_v11_0_set_vga_render_state (struct amdgpu_device *adev, +bool render) {u32 tmp;
@@ -3816,7 +3816,6 @@ static void dce_v11_0_encoder_add(struct amdgpu_device *adev, }static const struct amdgpu_display_funcs dce_v11_0_display_funcs = { - .set_vga_render_state = &dce_v11_0_set_vga_render_state, .bandwidth_update = &dce_v11_0_bandwidth_update, .vblank_get_counter = &dce_v11_0_vblank_get_counter, .vblank_wait = &dce_v11_0_vblank_wait,
drivers/gpu/drm/amd/amdgpu/dce_v11_0.h +0 -3
@@ -28,9 +28,6 @@ extern const struct amdgpu_ip_block_version dce_v11_0_ip_block;extern const struct amdgpu_ip_block_version dce_v11_2_ip_block;void dce_v11_0_disable_dce (struct amdgpu_device *adev); - -void dce_v11_0_set_vga_render_state (struct amdgpu_device *adev, -bool render);void dce_v11_0_stop_mc_access (struct amdgpu_device *adev,struct amdgpu_mode_mc_save *save); void dce_v11_0_resume_mc_access(struct amdgpu_device *adev,
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +0 -1
@@ -3027,7 +3027,6 @@ static void dce_v6_0_encoder_add(struct amdgpu_device *adev, }static const struct amdgpu_display_funcs dce_v6_0_display_funcs = { - .set_vga_render_state = &dce_v6_0_set_vga_render_state, .bandwidth_update = &dce_v6_0_bandwidth_update, .vblank_get_counter = &dce_v6_0_vblank_get_counter, .vblank_wait = &dce_v6_0_vblank_wait,
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +2 -3
@@ -494,8 +494,8 @@ void dce_v8_0_resume_mc_access(struct amdgpu_device *adev,WREG32 (mmVGA_RENDER_CONTROL, save->vga_render_control); } -void dce_v8_0_set_vga_render_state (struct amdgpu_device *adev, -bool render) +static void dce_v8_0_set_vga_render_state (struct amdgpu_device *adev, +bool render) {u32 tmp;
@@ -3584,7 +3584,6 @@ static void dce_v8_0_encoder_add(struct amdgpu_device *adev, }static const struct amdgpu_display_funcs dce_v8_0_display_funcs = { - .set_vga_render_state = &dce_v8_0_set_vga_render_state, .bandwidth_update = &dce_v8_0_bandwidth_update, .vblank_get_counter = &dce_v8_0_vblank_get_counter, .vblank_wait = &dce_v8_0_vblank_wait,
drivers/gpu/drm/amd/amdgpu/dce_v8_0.h +0 -3
@@ -31,9 +31,6 @@ extern const struct amdgpu_ip_block_version dce_v8_3_ip_block;extern const struct amdgpu_ip_block_version dce_v8_5_ip_block;void dce_v8_0_disable_dce (struct amdgpu_device *adev); - -void dce_v8_0_set_vga_render_state (struct amdgpu_device *adev, -bool render);void dce_v8_0_stop_mc_access (struct amdgpu_device *adev,struct amdgpu_mode_mc_save *save); void dce_v8_0_resume_mc_access(struct amdgpu_device *adev,
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +0 -7
@@ -144,12 +144,6 @@ static void dce_virtual_resume_mc_access(struct amdgpu_device *adev,return ; } -static void dce_virtual_set_vga_render_state (struct amdgpu_device *adev, -bool render) -{ -return ; -} -/** * dce_virtual_bandwidth_update - program display watermarks *
@@ -679,7 +673,6 @@ static int dce_virtual_connector_encoder_init(struct amdgpu_device *adev, }static const struct amdgpu_display_funcs dce_virtual_display_funcs = { - .set_vga_render_state = &dce_virtual_set_vga_render_state, .bandwidth_update = &dce_virtual_bandwidth_update, .vblank_get_counter = &dce_virtual_vblank_get_counter, .vblank_wait = &dce_virtual_vblank_wait,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -3
@@ -1412,7 +1412,6 @@ static int amdgpu_notify_freesync(struct drm_device *dev, void *data,#ifdef CONFIG_DRM_AMDGPU_CIK static const struct amdgpu_display_funcs dm_dce_v8_0_display_funcs = { - .set_vga_render_state = dce_v8_0_set_vga_render_state, .bandwidth_update = dm_bandwidth_update,/* called unconditionally */ .vblank_get_counter = dm_vblank_get_counter,/* called unconditionally */ .vblank_wait = NULL,
@@ -1435,7 +1434,6 @@ static const struct amdgpu_display_funcs dm_dce_v8_0_display_funcs = {#endif static const struct amdgpu_display_funcs dm_dce_v10_0_display_funcs = { - .set_vga_render_state = dce_v10_0_set_vga_render_state, .bandwidth_update = dm_bandwidth_update,/* called unconditionally */ .vblank_get_counter = dm_vblank_get_counter,/* called unconditionally */ .vblank_wait =NULL ,
@@ -1458,7 +1456,6 @@ static const struct amdgpu_display_funcs dm_dce_v10_0_display_funcs = { };static const struct amdgpu_display_funcs dm_dce_v11_0_display_funcs = { - .set_vga_render_state = dce_v11_0_set_vga_render_state, .bandwidth_update = dm_bandwidth_update,/* called unconditionally */ .vblank_get_counter = dm_vblank_get_counter,/* called unconditionally */ .vblank_wait =NULL ,
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 10/11 drm/amdgpu: remove *_mc_access from display funcs (v2)
In reply to a message not in the archiveThese are no longer needed now that we use the fb_location programmed by the vbios.
v2: update DC as well
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 - drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 10 -- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 130 ---------------------- drivers/gpu/drm/amd/amdgpu/dce_v10_0.h | 5 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 75 ------------- drivers/gpu/drm/amd/amdgpu/dce_v11_0.h | 5 +- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 114 ------------------- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 77 ------------- drivers/gpu/drm/amd/amdgpu/dce_v8_0.h | 5 +- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 90 +++++++-------- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 18 +-- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 17 +-- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 16 +-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 -- 15 files changed, 54 insertions(+), 529 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -3
@@ -570,7 +570,6 @@ struct amdgpu_mc {struct amdgpu_irq_src vm_fault;uint32_t vram_type;uint32_t srbm_soft_reset; -struct amdgpu_mode_mc_save save;bool prt_warning; };
@@ -1714,8 +1713,6 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring)#define amdgpu_display_page_flip_get_scanoutpos (adev, crtc, vbl, pos) (adev)->mode_info.funcs->page_flip_get_scanoutpos((adev), (crtc), (vbl), (pos))#define amdgpu_display_add_encoder (adev, e, s, c) (adev)->mode_info.funcs->add_encoder((adev), (e), (s), (c))#define amdgpu_display_add_connector (adev, ci, sd, ct, ib, coi, h, r) (adev)->mode_info.funcs->add_connector((adev), (ci), (sd), (ct), (ib), (coi), (h), (r)) -#define amdgpu_display_stop_mc_access (adev, s) (adev)->mode_info.funcs->stop_mc_access((adev), (s)) -#define amdgpu_display_resume_mc_access (adev, s) (adev)->mode_info.funcs->resume_mc_access((adev), (s))#define amdgpu_emit_copy_buffer (adev, ib, s, d, b) (adev)->mman.buffer_funcs->emit_copy_buffer((ib), (s), (d), (b))#define amdgpu_emit_fill_buffer (adev, ib, s, d, b) (adev)->mman.buffer_funcs->emit_fill_buffer((ib), (s), (d), (b))#define amdgpu_gfx_get_gpu_clock_counter (adev) (adev)->gfx.funcs->get_gpu_clock_counter((adev))
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -6
@@ -2559,12 +2559,6 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev) r =amdgpu_suspend (adev); retry: -/* Disable fb access */ -if (adev->mode_info.num_crtc) { -struct amdgpu_mode_mc_save save; -amdgpu_display_stop_mc_access (adev, &save); -amdgpu_wait_for_idle (adev,AMD_IP_BLOCK_TYPE_GMC ); - }amdgpu_atombios_scratch_regs_save (adev); r =amdgpu_asic_reset (adev);amdgpu_atombios_scratch_regs_restore (adev);
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +0 -10
@@ -260,12 +260,6 @@ struct amdgpu_audio {int num_pins; }; -struct amdgpu_mode_mc_save { -u32 vga_render_control; -u32 vga_hdp_control; -bool crtc_enabled[AMDGPU_MAX_CRTCS ]; -}; -struct amdgpu_display_funcs {/* display watermarks */ void (*bandwidth_update)(struct amdgpu_device *adev);
@@ -301,10 +295,6 @@ struct amdgpu_display_funcs {uint16_t connector_object_id, struct amdgpu_hpd *hpd, struct amdgpu_router *router); -void (*stop_mc_access)(struct amdgpu_device *adev, -struct amdgpu_mode_mc_save *save); -void (*resume_mc_access)(struct amdgpu_device *adev, -struct amdgpu_mode_mc_save *save);/* it is used to enter or exit into free sync mode */ int (*notify_freesync)(struct drm_device *dev,void *data,struct drm_file *filp);
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +0 -130
142 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/dce_v10_0.h +1 -4
@@ -29,8 +29,5 @@ extern const struct amdgpu_ip_block_version dce_v10_0_ip_block;extern const struct amdgpu_ip_block_version dce_v10_1_ip_block;void dce_v10_0_disable_dce (struct amdgpu_device *adev); -void dce_v10_0_stop_mc_access (struct amdgpu_device *adev, -struct amdgpu_mode_mc_save *save); -void dce_v10_0_resume_mc_access (struct amdgpu_device *adev, -struct amdgpu_mode_mc_save *save); +#endif
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +0 -75
87 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/dce_v11_0.h +1 -4
@@ -28,8 +28,5 @@ extern const struct amdgpu_ip_block_version dce_v11_0_ip_block;extern const struct amdgpu_ip_block_version dce_v11_2_ip_block;void dce_v11_0_disable_dce (struct amdgpu_device *adev); -void dce_v11_0_stop_mc_access (struct amdgpu_device *adev, -struct amdgpu_mode_mc_save *save); -void dce_v11_0_resume_mc_access (struct amdgpu_device *adev, -struct amdgpu_mode_mc_save *save); +#endif
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +0 -114
126 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +0 -77
89 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/dce_v8_0.h +1 -4
@@ -31,8 +31,5 @@ extern const struct amdgpu_ip_block_version dce_v8_3_ip_block;extern const struct amdgpu_ip_block_version dce_v8_5_ip_block;void dce_v8_0_disable_dce (struct amdgpu_device *adev); -void dce_v8_0_stop_mc_access (struct amdgpu_device *adev, -struct amdgpu_mode_mc_save *save); -void dce_v8_0_resume_mc_access (struct amdgpu_device *adev, -struct amdgpu_mode_mc_save *save); +#endif
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +39 -51
108 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +4 -14
@@ -66,14 +66,10 @@ static const u32 crtc_offsets[6] = SI_CRTC5_REGISTER_OFFSET }; -static void gmc_v6_0_mc_stop (struct amdgpu_device *adev, -struct amdgpu_mode_mc_save *save) +static void gmc_v6_0_mc_stop (struct amdgpu_device *adev) {u32 blackout; -if (adev->mode_info.num_crtc) -amdgpu_display_stop_mc_access (adev, save); -gmc_v6_0_wait_for_idle ((void *)adev); blackout =RREG32 (mmMC_SHARED_BLACKOUT_CNTL);
@@ -90,8 +86,7 @@ static void gmc_v6_0_mc_stop(struct amdgpu_device *adev, } -static void gmc_v6_0_mc_resume (struct amdgpu_device *adev, -struct amdgpu_mode_mc_save *save) +static void gmc_v6_0_mc_resume (struct amdgpu_device *adev) {u32 tmp;
@@ -103,10 +98,6 @@ static void gmc_v6_0_mc_resume(struct amdgpu_device *adev, tmp =REG_SET_FIELD (0 ,BIF_FB_EN ,FB_READ_EN ,1 ); tmp =REG_SET_FIELD (tmp,BIF_FB_EN ,FB_WRITE_EN ,1 );WREG32 (mmBIF_FB_EN, tmp); - -if (adev->mode_info.num_crtc) -amdgpu_display_resume_mc_access (adev, save); - }static int gmc_v6_0_init_microcode (struct amdgpu_device *adev)
@@ -983,7 +974,6 @@ static int gmc_v6_0_wait_for_idle(void *handle)static int gmc_v6_0_soft_reset (void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; -struct amdgpu_mode_mc_save save;u32 srbm_soft_reset =0 ;u32 tmp =RREG32 (mmSRBM_STATUS);
@@ -999,7 +989,7 @@ static int gmc_v6_0_soft_reset(void *handle) }if (srbm_soft_reset) { -gmc_v6_0_mc_stop (adev, &save); +gmc_v6_0_mc_stop (adev);if (gmc_v6_0_wait_for_idle (adev)) {dev_warn (adev->dev,"Wait for GMC idle timed out !\n" ); }
@@ -1019,7 +1009,7 @@ static int gmc_v6_0_soft_reset(void *handle)udelay (50 ); -gmc_v6_0_mc_resume (adev, &save); +gmc_v6_0_mc_resume (adev);udelay (50 ); }
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +4 -13
@@ -74,14 +74,10 @@ static void gmc_v7_0_init_golden_registers(struct amdgpu_device *adev) } } -static void gmc_v7_0_mc_stop (struct amdgpu_device *adev, -struct amdgpu_mode_mc_save *save) +static void gmc_v7_0_mc_stop (struct amdgpu_device *adev) {u32 blackout; -if (adev->mode_info.num_crtc) -amdgpu_display_stop_mc_access (adev, save); -gmc_v7_0_wait_for_idle ((void *)adev); blackout =RREG32 (mmMC_SHARED_BLACKOUT_CNTL);
@@ -97,8 +93,7 @@ static void gmc_v7_0_mc_stop(struct amdgpu_device *adev,udelay (100 ); } -static void gmc_v7_0_mc_resume (struct amdgpu_device *adev, -struct amdgpu_mode_mc_save *save) +static void gmc_v7_0_mc_resume (struct amdgpu_device *adev) {u32 tmp;
@@ -110,9 +105,6 @@ static void gmc_v7_0_mc_resume(struct amdgpu_device *adev, tmp =REG_SET_FIELD (0 ,BIF_FB_EN ,FB_READ_EN ,1 ); tmp =REG_SET_FIELD (tmp,BIF_FB_EN ,FB_WRITE_EN ,1 );WREG32 (mmBIF_FB_EN, tmp); - -if (adev->mode_info.num_crtc) -amdgpu_display_resume_mc_access (adev, save); }/**
@@ -1143,7 +1135,6 @@ static int gmc_v7_0_wait_for_idle(void *handle)static int gmc_v7_0_soft_reset (void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; -struct amdgpu_mode_mc_save save;u32 srbm_soft_reset =0 ;u32 tmp =RREG32 (mmSRBM_STATUS);
@@ -1159,7 +1150,7 @@ static int gmc_v7_0_soft_reset(void *handle) }if (srbm_soft_reset) { -gmc_v7_0_mc_stop (adev, &save); +gmc_v7_0_mc_stop (adev);if (gmc_v7_0_wait_for_idle ((void *)adev)) {dev_warn (adev->dev,"Wait for GMC idle timed out !\n" ); }
@@ -1180,7 +1171,7 @@ static int gmc_v7_0_soft_reset(void *handle)/* Wait a little for things to settle down */ udelay (50 ); -gmc_v7_0_mc_resume (adev, &save); +gmc_v7_0_mc_resume (adev);udelay (50 ); }
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +4 -12
@@ -159,14 +159,10 @@ static void gmc_v8_0_init_golden_registers(struct amdgpu_device *adev) } } -static void gmc_v8_0_mc_stop (struct amdgpu_device *adev, -struct amdgpu_mode_mc_save *save) +static void gmc_v8_0_mc_stop (struct amdgpu_device *adev) {u32 blackout; -if (adev->mode_info.num_crtc) -amdgpu_display_stop_mc_access (adev, save); -gmc_v8_0_wait_for_idle (adev); blackout =RREG32 (mmMC_SHARED_BLACKOUT_CNTL);
@@ -182,8 +178,7 @@ static void gmc_v8_0_mc_stop(struct amdgpu_device *adev,udelay (100 ); } -static void gmc_v8_0_mc_resume (struct amdgpu_device *adev, -struct amdgpu_mode_mc_save *save) +static void gmc_v8_0_mc_resume (struct amdgpu_device *adev) {u32 tmp;
@@ -195,9 +190,6 @@ static void gmc_v8_0_mc_resume(struct amdgpu_device *adev, tmp =REG_SET_FIELD (0 ,BIF_FB_EN ,FB_READ_EN ,1 ); tmp =REG_SET_FIELD (tmp,BIF_FB_EN ,FB_WRITE_EN ,1 );WREG32 (mmBIF_FB_EN, tmp); - -if (adev->mode_info.num_crtc) -amdgpu_display_resume_mc_access (adev, save); }/**
@@ -1185,7 +1177,7 @@ static int gmc_v8_0_pre_soft_reset(void *handle)if (!adev->mc.srbm_soft_reset)return 0 ; -gmc_v8_0_mc_stop (adev, &adev->mc.save); +gmc_v8_0_mc_stop (adev);if (gmc_v8_0_wait_for_idle (adev)) {dev_warn (adev->dev,"Wait for GMC idle timed out !\n" ); }
@@ -1231,7 +1223,7 @@ static int gmc_v8_0_post_soft_reset(void *handle)if (!adev->mc.srbm_soft_reset)return 0 ; -gmc_v8_0_mc_resume (adev, &adev->mc.save); +gmc_v8_0_mc_resume (adev);return 0 ; }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -12
@@ -36,12 +36,6 @@#include "amdgpu_dm_irq.h" #include "dm_helpers.h" -#ifdef CONFIG_DRM_AMDGPU_CIK -#include "dce_v8_0.h" -#endif -#include "dce_v10_0.h" -#include "dce_v11_0.h" -#include "ivsrcid/ivsrcid_vislands30.h" #include <linux/module.h>
@@ -1427,8 +1421,6 @@ static const struct amdgpu_display_funcs dm_dce_v8_0_display_funcs = { dm_crtc_get_scanoutpos,/* called unconditionally */ .add_encoder = NULL, /* VBIOS parsing. DAL does it. */ .add_connector = NULL, /* VBIOS parsing. DAL does it. */ - .stop_mc_access = dce_v8_0_stop_mc_access, /* called unconditionally */ - .resume_mc_access = dce_v8_0_resume_mc_access, /* called unconditionally */ .notify_freesync = amdgpu_notify_freesync, };#endif
@@ -1449,8 +1441,6 @@ static const struct amdgpu_display_funcs dm_dce_v10_0_display_funcs = { dm_crtc_get_scanoutpos,/* called unconditionally */ .add_encoder = NULL, /* VBIOS parsing. DAL does it. */ .add_connector = NULL, /* VBIOS parsing. DAL does it. */ - .stop_mc_access = dce_v10_0_stop_mc_access, /* called unconditionally */ - .resume_mc_access = dce_v10_0_resume_mc_access, /* called unconditionally */ .notify_freesync = amdgpu_notify_freesync, };
@@ -1471,8 +1461,6 @@ static const struct amdgpu_display_funcs dm_dce_v11_0_display_funcs = { dm_crtc_get_scanoutpos,/* called unconditionally */ .add_encoder = NULL, /* VBIOS parsing. DAL does it. */ .add_connector = NULL, /* VBIOS parsing. DAL does it. */ - .stop_mc_access = dce_v11_0_stop_mc_access, /* called unconditionally */ - .resume_mc_access = dce_v11_0_resume_mc_access, /* called unconditionally */ .notify_freesync = amdgpu_notify_freesync, };
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 11/11 drm/amd/dc/dm: remove redundant display structs
In reply to a message not in the archiveNow that the mc_access functions are gone, we no longer need separate structs for all the different dce families in dm.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 60 ++--------------------- 1 file changed, 4 insertions(+), 56 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -56
@@ -1404,48 +1404,7 @@ static int amdgpu_notify_freesync(struct drm_device *dev, void *data,return r; } -#ifdef CONFIG_DRM_AMDGPU_CIK -static const struct amdgpu_display_funcs dm_dce_v8_0_display_funcs = { - .bandwidth_update = dm_bandwidth_update,/* called unconditionally */ - .vblank_get_counter = dm_vblank_get_counter,/* called unconditionally */ - .vblank_wait =NULL , - .backlight_set_level = - dm_set_backlight_level,/* called unconditionally */ - .backlight_get_level = - dm_get_backlight_level,/* called unconditionally */ - .hpd_sense =NULL ,/* called unconditionally */ - .hpd_set_polarity =NULL ,/* called unconditionally */ - .hpd_get_gpio_reg =NULL ,/* VBIOS parsing. DAL does it. */ - .page_flip = dm_page_flip,/* called unconditionally */ - .page_flip_get_scanoutpos = - dm_crtc_get_scanoutpos,/* called unconditionally */ - .add_encoder =NULL ,/* VBIOS parsing. DAL does it. */ - .add_connector =NULL ,/* VBIOS parsing. DAL does it. */ - .notify_freesync = amdgpu_notify_freesync, -}; -#endif - -static const struct amdgpu_display_funcs dm_dce_v10_0_display_funcs = { - .bandwidth_update = dm_bandwidth_update,/* called unconditionally */ - .vblank_get_counter = dm_vblank_get_counter,/* called unconditionally */ - .vblank_wait =NULL , - .backlight_set_level = - dm_set_backlight_level,/* called unconditionally */ - .backlight_get_level = - dm_get_backlight_level,/* called unconditionally */ - .hpd_sense =NULL ,/* called unconditionally */ - .hpd_set_polarity =NULL ,/* called unconditionally */ - .hpd_get_gpio_reg =NULL ,/* VBIOS parsing. DAL does it. */ - .page_flip = dm_page_flip,/* called unconditionally */ - .page_flip_get_scanoutpos = - dm_crtc_get_scanoutpos,/* called unconditionally */ - .add_encoder =NULL ,/* VBIOS parsing. DAL does it. */ - .add_connector =NULL ,/* VBIOS parsing. DAL does it. */ - .notify_freesync = amdgpu_notify_freesync, - -}; - -static const struct amdgpu_display_funcs dm_dce_v11_0_display_funcs = { +static const struct amdgpu_display_funcs dm_display_funcs = { .bandwidth_update = dm_bandwidth_update,/* called unconditionally */ .vblank_get_counter = dm_vblank_get_counter,/* called unconditionally */ .vblank_wait =NULL ,
@@ -1509,53 +1468,42 @@ static int dm_early_init(void *handle) adev->mode_info.num_crtc =6 ; adev->mode_info.num_hpd =6 ; adev->mode_info.num_dig =6 ; -#ifdef CONFIG_DRM_AMDGPU_CIK -if (adev->mode_info.funcs ==NULL ) - adev->mode_info.funcs = &dm_dce_v8_0_display_funcs; -#endif break ;case CHIP_FIJI :case CHIP_TONGA : adev->mode_info.num_crtc =6 ; adev->mode_info.num_hpd =6 ; adev->mode_info.num_dig =7 ; -if (adev->mode_info.funcs ==NULL ) - adev->mode_info.funcs = &dm_dce_v10_0_display_funcs;break ;case CHIP_CARRIZO : adev->mode_info.num_crtc =3 ; adev->mode_info.num_hpd =6 ; adev->mode_info.num_dig =9 ; -if (adev->mode_info.funcs ==NULL ) - adev->mode_info.funcs = &dm_dce_v11_0_display_funcs;break ;case CHIP_STONEY : adev->mode_info.num_crtc =2 ; adev->mode_info.num_hpd =6 ; adev->mode_info.num_dig =9 ; -if (adev->mode_info.funcs ==NULL ) - adev->mode_info.funcs = &dm_dce_v11_0_display_funcs;break ;case CHIP_POLARIS11 :case CHIP_POLARIS12 : adev->mode_info.num_crtc =5 ; adev->mode_info.num_hpd =5 ; adev->mode_info.num_dig =5 ; -if (adev->mode_info.funcs ==NULL ) - adev->mode_info.funcs = &dm_dce_v11_0_display_funcs;break ;case CHIP_POLARIS10 : adev->mode_info.num_crtc =6 ; adev->mode_info.num_hpd =6 ; adev->mode_info.num_dig =6 ; -if (adev->mode_info.funcs ==NULL ) - adev->mode_info.funcs = &dm_dce_v11_0_display_funcs;break ;default :DRM_ERROR ("Usupported ASIC type: 0x%X\n" , adev->asic_type);return -EINVAL ; } +if (adev->mode_info.funcs ==NULL ) + adev->mode_info.funcs = &dm_display_funcs; +/* Note: Do NOT change adev->audio_endpt_rreg and * adev->audio_endpt_wreg because they are initialised in * amdgpu_device_init() */
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 4 lines · Alex Deucher
Since evergreen, the vbios has programmed the
FB_LOCATIONto the proper size duringasic_init, so there is no need to reprogram them in the driver. We can safely leave the location as set by the vbios. This simplifies the driver significantly.
Tested this on CI and VI. Works fine with DAL/DC. With the legacy display path, VCE fails to initialize (ECPU won't come out of reset). Any ideas?
Alex
Quoted 32 lines
Alex Deucher (11):
drm/amdgpu/vce2: fix vce bar programming
drm/amdgpu: put gtt at 0 in the internal address space drm/amdgpu/gmc8: use the vram location programmed by the vbios drm/amdgpu/gmc7: use the vram location programmed by the vbios drm/amdgpu/gmc6: use the vram location programmed by the vbios drm/amdgpu/gmc8: drop fb location programming drm/amdgpu/gmc7: drop fb location programming drm/amdgpu/gmc6: drop fb location programming drm/amdgpu: dropset_vga_render_statefrom display funcs (v2) drm/amdgpu: remove*_mc_accessfrom display funcs (v2) drm/amd/dc/dm: remove redundant display structsdrivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 12 -- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 135 +--------------------- drivers/gpu/drm/amd/amdgpu/dce_v10_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 80 +------------ drivers/gpu/drm/amd/amdgpu/dce_v11_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 115 ------------------ drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 82 +------------ drivers/gpu/drm/amd/amdgpu/dce_v8_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 97 +++++++--------- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 38 ++---- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 35 ++---- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 34 ++---- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 17 +-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 75 +----------- 16 files changed, 83 insertions(+), 667 deletions(-)
Quoted 3 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): CADnq5_MtWkhrZtDc+8CJG62wzNpMnAmpWPTW=cURLRTLsuTXZg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Am 18.02.2017 um 00:08 schrieb Alex Deucher:
Quoted 8 lines · Alex Deucher
Quoted 4 lines
Since evergreen, the vbios has programmed the
FB_LOCATIONto the proper size duringasic_init, so there is no need to reprogram them in the driver. We can safely leave the location as set by the vbios. This simplifies the driver significantly.Tested this on CI and VI. Works fine with DAL/DC. With the legacy display path, VCE fails to initialize (ECPU won't come out of reset). Any ideas?
Mhm, unfortunately not really. VCE has some interactions with the display path for frame grabbing, but as far as I know we haven't implemented any of that.
Maybe patch #9 has some relation with that. Does it work when you only leave the VRAM at the location programmed by the BIOS but keep the rest?
Anyway in the meantime patch #1 is Reviewed-by: Christian König <[email protected]> and patches #10 and #11 are Acked-by: Christian König <[email protected]>.
Regards,
Christian.
Quoted 34 lines
Alex
Quoted 31 lines
Alex Deucher (11):
drm/amdgpu/vce2: fix vce bar programming
drm/amdgpu: put gtt at 0 in the internal address space drm/amdgpu/gmc8: use the vram location programmed by the vbios drm/amdgpu/gmc7: use the vram location programmed by the vbios drm/amdgpu/gmc6: use the vram location programmed by the vbios drm/amdgpu/gmc8: drop fb location programming drm/amdgpu/gmc7: drop fb location programming drm/amdgpu/gmc6: drop fb location programming drm/amdgpu: dropset_vga_render_statefrom display funcs (v2) drm/amdgpu: remove*_mc_accessfrom display funcs (v2) drm/amd/dc/dm: remove redundant display structsdrivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 12 -- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 135 +--------------------- drivers/gpu/drm/amd/amdgpu/dce_v10_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 80 +------------ drivers/gpu/drm/amd/amdgpu/dce_v11_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 115 ------------------ drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 82 +------------ drivers/gpu/drm/amd/amdgpu/dce_v8_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 97 +++++++--------- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 38 ++---- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 35 ++---- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 34 ++---- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 17 +-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 75 +----------- 16 files changed, 83 insertions(+), 667 deletions(-)
Quoted 7 lines
Quoted 3 lines
--
2.5.5_______________________________________________
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
Hi Alex,
The series of patch is Reviewed-by: Junwei Zhang <[email protected]>
Quoted 3 lines
Tested this on CI and VI. Works fine with DAL/DC. With the legacy display path, VCE fails to initialize (ECPU won't come out of reset).
Any ideas?
Did you met the issue in VI?
It looks that you're missing vce v3.0 changes for mc_resume. Please confirm it.
Regards,
Jerry (Junwei Zhang)
Linux Base Graphics
SRDC Software Development
_____________________________________
Quoted 52 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Alex Deucher
Sent: Saturday, February 18, 2017 7:08
To: amd-gfx list
Cc: Deucher, Alexander
Subject: Re: [PATCH 00/11] removefb_locationprogrammingQuoted 4 lines · Alex Deucher
Since evergreen, the vbios has programmed the
FB_LOCATIONto the proper size duringasic_init, so there is no need to reprogram them in the driver. We can safely leave the location as set by the vbios. This simplifies the driver significantly.Tested this on CI and VI. Works fine with DAL/DC. With the legacy display path, VCE fails to initialize (ECPU won't come out of reset).
Any ideas?Alex
Quoted 32 lines
Alex Deucher (11):
drm/amdgpu/vce2: fix vce bar programming
drm/amdgpu: put gtt at 0 in the internal address space drm/amdgpu/gmc8: use the vram location programmed by the vbios drm/amdgpu/gmc7: use the vram location programmed by the vbios drm/amdgpu/gmc6: use the vram location programmed by the vbios drm/amdgpu/gmc8: drop fb location programming drm/amdgpu/gmc7: drop fb location programming drm/amdgpu/gmc6: drop fb location programming drm/amdgpu: dropset_vga_render_statefrom display funcs (v2) drm/amdgpu: remove*_mc_accessfrom display funcs (v2) drm/amd/dc/dm: remove redundant display structsdrivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 12 -- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 135 +--------------------- drivers/gpu/drm/amd/amdgpu/dce_v10_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 80 +------------ drivers/gpu/drm/amd/amdgpu/dce_v11_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 115 ------------------ drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 82 +------------ drivers/gpu/drm/amd/amdgpu/dce_v8_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 97 +++++++--------- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 38 ++---- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 35 ++---- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 34 ++---- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 17 +-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 75 +----------- 16 files changed, 83 insertions(+), 667 deletions(-)
Quoted 7 lines
Quoted 3 lines
--
2.5.5_______________________________________________
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): DM5PR12MB18183DEE2684DD37531744CCFF510-2J9CzHegvk+QhrfEZJlvtAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Quoted 9 lines · Jerry
Hi Alex,
The series of patch is Reviewed-by: Junwei Zhang <[email protected]>
Quoted 3 lines
Tested this on CI and VI. Works fine with DAL/DC. With the legacy display path, VCE fails to initialize (ECPU won't come out of reset).
Any ideas?Did you met the issue in VI?
Yes.
Quoted 2 lines
It looks that you're missing vce v3.0 changes for
mc_resume. Please confirm it.
What changes did you have in mind? The changes for vce2.0 are not necessary for vce3.0 since it was programmed properly from the beginning as far as I understand it.
Alex
Quoted 68 lines
Regards,
Jerry (Junwei Zhang)Linux Base Graphics
SRDC Software Development
_____________________________________Quoted 59 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Alex Deucher
Sent: Saturday, February 18, 2017 7:08
To: amd-gfx list
Cc: Deucher, Alexander
Subject: Re: [PATCH 00/11] removefb_locationprogrammingQuoted 4 lines · Alex Deucher
Since evergreen, the vbios has programmed the
FB_LOCATIONto the proper size duringasic_init, so there is no need to reprogram them in the driver. We can safely leave the location as set by the vbios. This simplifies the driver significantly.Tested this on CI and VI. Works fine with DAL/DC. With the legacy display path, VCE fails to initialize (ECPU won't come out of reset).
Any ideas?Alex
Quoted 32 lines
Alex Deucher (11):
drm/amdgpu/vce2: fix vce bar programming
drm/amdgpu: put gtt at 0 in the internal address space drm/amdgpu/gmc8: use the vram location programmed by the vbios drm/amdgpu/gmc7: use the vram location programmed by the vbios drm/amdgpu/gmc6: use the vram location programmed by the vbios drm/amdgpu/gmc8: drop fb location programming drm/amdgpu/gmc7: drop fb location programming drm/amdgpu/gmc6: drop fb location programming drm/amdgpu: dropset_vga_render_statefrom display funcs (v2) drm/amdgpu: remove*_mc_accessfrom display funcs (v2) drm/amd/dc/dm: remove redundant display structsdrivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 12 -- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 135 +--------------------- drivers/gpu/drm/amd/amdgpu/dce_v10_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 80 +------------ drivers/gpu/drm/amd/amdgpu/dce_v11_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 115 ------------------ drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 82 +------------ drivers/gpu/drm/amd/amdgpu/dce_v8_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 97 +++++++--------- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 38 ++---- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 35 ++---- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 34 ++---- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 17 +-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 75 +----------- 16 files changed, 83 insertions(+), 667 deletions(-)Quoted 3 lines
--
2.5.5_______________________________________________
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): CADnq5_MUV6qaqUjsWQajWYh9kkGc0aDLDe_oL-WOwwzmdFwCng-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 18 lines
-----Original Message-----
From: Alex Deucher [mailto:[email protected]]
Sent: Tuesday, February 21, 2017 22:38
To: Zhang, Jerry
Cc: amd-gfx list; Deucher, Alexander
Subject: Re: [PATCH 00/11] removefb_locationprogrammingQuoted 9 lines · Jerry
Hi Alex,
The series of patch is Reviewed-by: Junwei Zhang <[email protected]>
Quoted 3 lines
Tested this on CI and VI. Works fine with DAL/DC. With the legacy display path, VCE fails to initialize (ECPU won't come out of reset). Any ideas?
Did you met the issue in VI?
Quoted 8 lines
Yes.
Quoted 2 lines
It looks that you're missing vce v3.0 changes for
mc_resume. Please confirm it.What changes did you have in mind? The changes for vce2.0 are not necessary for vce3.0 since it was programmed properly from the beginning as far as I understand it.
Hi Alex,
I thought vce3.0 had similar issue about BAR programming. After checking, only vce2.0 needs this change indeed. Sorry for misleading.
Quoted 20 lines
Alex
Quoted 17 lines
Regards,
Jerry (Junwei Zhang)Linux Base Graphics
SRDC Software Development
_____________________________________Quoted 8 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Alex Deucher
Sent: Saturday, February 18, 2017 7:08
To: amd-gfx list
Cc: Deucher, Alexander
Subject: Re: [PATCH 00/11] removefb_locationprogramming
Quoted 54 lines
Quoted 1 line
Quoted 1 line
On Fri, Feb 17, 2017 at 3:38 PM, Alex Deucher <[email protected]>
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Since evergreen, the vbios has programmed the
FB_LOCATIONto the proper size duringasic_init, so there is no need to reprogram them in thedriver.
Quoted 49 lines
Quoted 49 lines
Quoted 2 lines
We can safely leave the location as set by the vbios. This simplifies the driver significantly.
Tested this on CI and VI. Works fine with DAL/DC. With the legacy display path, VCE fails to initialize (ECPU won't come out of reset). Any ideas?
Alex
Quoted 33 lines
Alex Deucher (11):
drm/amdgpu/vce2: fix vce bar programming
drm/amdgpu: put gtt at 0 in the internal address space drm/amdgpu/gmc8: use the vram location programmed by the vbios drm/amdgpu/gmc7: use the vram location programmed by the vbios drm/amdgpu/gmc6: use the vram location programmed by the vbios drm/amdgpu/gmc8: drop fb location programming drm/amdgpu/gmc7: drop fb location programming drm/amdgpu/gmc6: drop fb location programming drm/amdgpu: dropset_vga_render_statefrom display funcs (v2) drm/amdgpu: remove*_mc_accessfrom display funcs (v2) drm/amd/dc/dm: remove redundant display structsdrivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 12 -- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 135 +--------------------- drivers/gpu/drm/amd/amdgpu/dce_v10_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 80 +------------ drivers/gpu/drm/amd/amdgpu/dce_v11_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 115 ------------------ drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 82 +------------ drivers/gpu/drm/amd/amdgpu/dce_v8_0.h | 6 - drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 97 +++++++--------- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 38 ++---- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 35 ++---- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 34 ++---- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 17 +-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 75 +----------- 16 files changed, 83 insertions(+), 667 deletions(-)Quoted 3 lines
--
2.5.5_______________________________________________
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