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 'drm-fixes-2019-03-01' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
"Three final fixes, one for a feature that is new in this kernel, one
bochs fix for qemu riscv and one atomic modesetting fix.

I've left a few of the other late fixes until next as I didn't want to
throw in anything that wasn't really necessary"

* tag 'drm-fixes-2019-03-01' of git://anongit.freedesktop.org/drm/drm:
drm/bochs: Fix the ID mismatch error
drm: Block fb changes for async plane updates
drm/amd/display: Use vrr friendly pageflip throttling in DC.

+37 -4
+1
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
··· 405 405 struct amdgpu_flip_work *pflip_works; 406 406 enum amdgpu_flip_status pflip_status; 407 407 int deferred_flip_completion; 408 + u64 last_flip_vblank; 408 409 /* pll sharing */ 409 410 struct amdgpu_atom_ss ss; 410 411 bool ss_enabled;
+23 -4
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
··· 303 303 return; 304 304 } 305 305 306 + /* Update to correct count(s) if racing with vblank irq */ 307 + amdgpu_crtc->last_flip_vblank = drm_crtc_accurate_vblank_count(&amdgpu_crtc->base); 306 308 307 309 /* wake up userspace */ 308 310 if (amdgpu_crtc->event) { 309 - /* Update to correct count(s) if racing with vblank irq */ 310 - drm_crtc_accurate_vblank_count(&amdgpu_crtc->base); 311 - 312 311 drm_crtc_send_vblank_event(&amdgpu_crtc->base, amdgpu_crtc->event); 313 312 314 313 /* page flip completed. clean up */ ··· 4827 4828 to_dm_crtc_state(drm_atomic_get_old_crtc_state(state, pcrtc)); 4828 4829 int planes_count = 0; 4829 4830 unsigned long flags; 4831 + u64 last_flip_vblank; 4832 + bool vrr_active = acrtc_state->freesync_config.state == VRR_STATE_ACTIVE_VARIABLE; 4830 4833 4831 4834 /* update planes when needed */ 4832 4835 for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) { ··· 4860 4859 /* In commit tail framework this cannot happen */ 4861 4860 WARN_ON(1); 4862 4861 } 4862 + 4863 + /* For variable refresh rate mode only: 4864 + * Get vblank of last completed flip to avoid > 1 vrr flips per 4865 + * video frame by use of throttling, but allow flip programming 4866 + * anywhere in the possibly large variable vrr vblank interval 4867 + * for fine-grained flip timing control and more opportunity to 4868 + * avoid stutter on late submission of amdgpu_dm_do_flip() calls. 4869 + */ 4870 + last_flip_vblank = acrtc_attach->last_flip_vblank; 4871 + 4863 4872 spin_unlock_irqrestore(&crtc->dev->event_lock, flags); 4864 4873 4865 4874 if (!pflip_needed || plane->type == DRM_PLANE_TYPE_OVERLAY) { ··· 4893 4882 if (plane->type == DRM_PLANE_TYPE_PRIMARY) 4894 4883 drm_crtc_vblank_get(crtc); 4895 4884 4885 + /* Use old throttling in non-vrr fixed refresh rate mode 4886 + * to keep flip scheduling based on target vblank counts 4887 + * working in a backwards compatible way, e.g., clients 4888 + * using GLX_OML_sync_control extension. 4889 + */ 4890 + if (!vrr_active) 4891 + last_flip_vblank = drm_crtc_vblank_count(crtc); 4892 + 4896 4893 amdgpu_dm_do_flip( 4897 4894 crtc, 4898 4895 fb, 4899 - (uint32_t)drm_crtc_vblank_count(crtc) + *wait_for_vblank, 4896 + (uint32_t) last_flip_vblank + *wait_for_vblank, 4900 4897 dc_state); 4901 4898 } 4902 4899
+4
drivers/gpu/drm/bochs/bochs_drv.c
··· 154 154 if (IS_ERR(dev)) 155 155 return PTR_ERR(dev); 156 156 157 + ret = pci_enable_device(pdev); 158 + if (ret) 159 + goto err_free_dev; 160 + 157 161 dev->pdev = pdev; 158 162 pci_set_drvdata(pdev, dev); 159 163
+9
drivers/gpu/drm/drm_atomic_helper.c
··· 1602 1602 old_plane_state->crtc != new_plane_state->crtc) 1603 1603 return -EINVAL; 1604 1604 1605 + /* 1606 + * FIXME: Since prepare_fb and cleanup_fb are always called on 1607 + * the new_plane_state for async updates we need to block framebuffer 1608 + * changes. This prevents use of a fb that's been cleaned up and 1609 + * double cleanups from occuring. 1610 + */ 1611 + if (old_plane_state->fb != new_plane_state->fb) 1612 + return -EINVAL; 1613 + 1605 1614 funcs = plane->helper_private; 1606 1615 if (!funcs->atomic_async_update) 1607 1616 return -EINVAL;