mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-11 20:36:45 +07:00
drm/i915: Use fb modifiers in intel_check_cursor_plane
Also drop the mutex since with universal planes there is always a proper framebuffer around which wraps the underlying bo. Which means tiling is locked down. This was different in the old code which directly took gem handles. The looking though was always cargo-cult since races where not prevented in any way. v2: Unconditionally enforce untiled, because cursors are always untiled. The check for physical or gtt cursor is irrelevant. Also clarify the commit message a bit Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v1) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
66ebf56714
commit
6a418fcd84
@ -12173,13 +12173,10 @@ intel_check_cursor_plane(struct drm_plane *plane,
|
||||
if (fb == crtc->cursor->fb)
|
||||
return 0;
|
||||
|
||||
/* we only need to pin inside GTT if cursor is non-phy */
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
if (!INTEL_INFO(dev)->cursor_needs_physical && obj->tiling_mode) {
|
||||
if (fb->modifier[0] != DRM_FORMAT_MOD_NONE) {
|
||||
DRM_DEBUG_KMS("cursor cannot be tiled\n");
|
||||
ret = -EINVAL;
|
||||
}
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
|
||||
finish:
|
||||
if (intel_crtc->active) {
|
||||
|
Loading…
Reference in New Issue
Block a user