Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'amd-drm-fixes-5.6-2020-03-19' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

amd-drm-fixes-5.6-2020-03-19:

amdgpu:
- Pageflip fix
- VCN clockgating fixes
- GPR debugfs fix for umr
- GPU reset fix
- eDP fix for MBP
- DCN2.x fix

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexdeucher@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200319204054.1036478-1-alexander.deucher@amd.com

+38 -13
+3 -3
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
··· 781 781 ssize_t result = 0; 782 782 uint32_t offset, se, sh, cu, wave, simd, thread, bank, *data; 783 783 784 - if (size & 3 || *pos & 3) 784 + if (size > 4096 || size & 3 || *pos & 3) 785 785 return -EINVAL; 786 786 787 787 /* decode offset */ 788 - offset = *pos & GENMASK_ULL(11, 0); 788 + offset = (*pos & GENMASK_ULL(11, 0)) >> 2; 789 789 se = (*pos & GENMASK_ULL(19, 12)) >> 12; 790 790 sh = (*pos & GENMASK_ULL(27, 20)) >> 20; 791 791 cu = (*pos & GENMASK_ULL(35, 28)) >> 28; ··· 823 823 while (size) { 824 824 uint32_t value; 825 825 826 - value = data[offset++]; 826 + value = data[result >> 2]; 827 827 r = put_user(value, (uint32_t *)buf); 828 828 if (r) { 829 829 result = r;
+4
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 3913 3913 if (r) 3914 3914 goto out; 3915 3915 3916 + amdgpu_fbdev_set_suspend(tmp_adev, 0); 3917 + 3916 3918 /* must succeed. */ 3917 3919 amdgpu_ras_resume(tmp_adev); 3918 3920 ··· 4087 4085 * And add them back after reset completed 4088 4086 */ 4089 4087 amdgpu_unregister_gpu_instance(tmp_adev); 4088 + 4089 + amdgpu_fbdev_set_suspend(adev, 1); 4090 4090 4091 4091 /* disable ras on ALL IPs */ 4092 4092 if (!(in_ras_intr && !use_baco) &&
+1 -1
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
··· 693 693 bool enable = (state == AMD_CG_STATE_GATE); 694 694 695 695 if (enable) { 696 - if (jpeg_v2_0_is_idle(handle)) 696 + if (!jpeg_v2_0_is_idle(handle)) 697 697 return -EBUSY; 698 698 jpeg_v2_0_enable_clock_gating(adev); 699 699 } else {
+1 -1
drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c
··· 477 477 continue; 478 478 479 479 if (enable) { 480 - if (jpeg_v2_5_is_idle(handle)) 480 + if (!jpeg_v2_5_is_idle(handle)) 481 481 return -EBUSY; 482 482 jpeg_v2_5_enable_clock_gating(adev, i); 483 483 } else {
+1 -1
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
··· 1352 1352 1353 1353 if (enable) { 1354 1354 /* wait for STATUS to clear */ 1355 - if (vcn_v1_0_is_idle(handle)) 1355 + if (!vcn_v1_0_is_idle(handle)) 1356 1356 return -EBUSY; 1357 1357 vcn_v1_0_enable_clock_gating(adev); 1358 1358 } else {
+1 -1
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
··· 1217 1217 1218 1218 if (enable) { 1219 1219 /* wait for STATUS to clear */ 1220 - if (vcn_v2_0_is_idle(handle)) 1220 + if (!vcn_v2_0_is_idle(handle)) 1221 1221 return -EBUSY; 1222 1222 vcn_v2_0_enable_clock_gating(adev); 1223 1223 } else {
+1 -1
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
··· 1672 1672 return 0; 1673 1673 1674 1674 if (enable) { 1675 - if (vcn_v2_5_is_idle(handle)) 1675 + if (!vcn_v2_5_is_idle(handle)) 1676 1676 return -EBUSY; 1677 1677 vcn_v2_5_enable_clock_gating(adev); 1678 1678 } else {
+15 -3
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
··· 522 522 523 523 acrtc_state = to_dm_crtc_state(acrtc->base.state); 524 524 525 - DRM_DEBUG_DRIVER("crtc:%d, vupdate-vrr:%d\n", acrtc->crtc_id, 526 - amdgpu_dm_vrr_active(acrtc_state)); 525 + DRM_DEBUG_DRIVER("crtc:%d, vupdate-vrr:%d, planes:%d\n", acrtc->crtc_id, 526 + amdgpu_dm_vrr_active(acrtc_state), 527 + acrtc_state->active_planes); 527 528 528 529 amdgpu_dm_crtc_handle_crc_irq(&acrtc->base); 529 530 drm_crtc_handle_vblank(&acrtc->base); ··· 544 543 &acrtc_state->vrr_params.adjust); 545 544 } 546 545 547 - if (acrtc->pflip_status == AMDGPU_FLIP_SUBMITTED) { 546 + /* 547 + * If there aren't any active_planes then DCH HUBP may be clock-gated. 548 + * In that case, pageflip completion interrupts won't fire and pageflip 549 + * completion events won't get delivered. Prevent this by sending 550 + * pending pageflip events from here if a flip is still pending. 551 + * 552 + * If any planes are enabled, use dm_pflip_high_irq() instead, to 553 + * avoid race conditions between flip programming and completion, 554 + * which could cause too early flip completion events. 555 + */ 556 + if (acrtc->pflip_status == AMDGPU_FLIP_SUBMITTED && 557 + acrtc_state->active_planes == 0) { 548 558 if (acrtc->event) { 549 559 drm_crtc_send_vblank_event(&acrtc->base, acrtc->event); 550 560 acrtc->event = NULL;
-1
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_init.c
··· 108 108 .enable_power_gating_plane = dcn20_enable_power_gating_plane, 109 109 .dpp_pg_control = dcn20_dpp_pg_control, 110 110 .hubp_pg_control = dcn20_hubp_pg_control, 111 - .dsc_pg_control = NULL, 112 111 .update_odm = dcn20_update_odm, 113 112 .dsc_pg_control = dcn20_dsc_pg_control, 114 113 .get_surface_visual_confirm_color = dcn10_get_surface_visual_confirm_color,
-1
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_init.c
··· 116 116 .enable_power_gating_plane = dcn20_enable_power_gating_plane, 117 117 .dpp_pg_control = dcn20_dpp_pg_control, 118 118 .hubp_pg_control = dcn20_hubp_pg_control, 119 - .dsc_pg_control = NULL, 120 119 .update_odm = dcn20_update_odm, 121 120 .dsc_pg_control = dcn20_dsc_pg_control, 122 121 .get_surface_visual_confirm_color = dcn10_get_surface_visual_confirm_color,