Re: [PATCH 1/2] drm/i915: Trim struct_mutex usage for kms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Ville Syrjälä (2017-06-08 14:47:27)
> On Thu, Jun 08, 2017 at 10:51:34AM +0100, Chris Wilson wrote:
> > +     ret = i915_gem_object_pin_pages(obj);
> > +     if (ret)
> > +             return ret;
> > +
> > +     ret = mutex_lock_interruptible(&dev_priv->drm.struct_mutex);
> > +     if (ret) {
> > +             i915_gem_object_unpin_pages(obj);
> > +             return ret;
> > +     }
> > +
> > +     i915_gem_object_wait_priority(obj, 0, I915_PRIORITY_DISPLAY);
> 
> Does this guy need struct mutex? Maybe it could use a lockdep assert if
> so.

It does today. One day it could be reduced to a obj->resv->lock and a
global spinlock.
> 
> > +
> > +     if (plane->type == DRM_PLANE_TYPE_CURSOR &&
> > +         INTEL_INFO(dev_priv)->cursor_needs_physical) {
> > +             const int align = intel_cursor_alignment(dev_priv);
> > +
> > +             ret = i915_gem_object_attach_phys(obj, align);
> 
> Isn't this going to fail due to the i915_gem_object_pin_pages() above?

Yes, so I rewrote attach_phys.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux