Re: [PATCH 1/6] drm/i915: Fail if we can't get a fence for gen2/3 tiled scanout

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

 



Quoting Ville Syrjälä (2018-02-22 14:13:34)
> On Wed, Feb 21, 2018 at 09:52:04PM +0000, Chris Wilson wrote:
> > Ok, I'd like to see INTEL_GEN(dev_priv) < 4 be replaced with say
> > needs_fence (and may be passed in from the caller like wants_fence?).
> 
> I had that earlier, but then I didn't have the uses_fence. Maybe I
> cook up some kind of input flags thing here with PLANE_NEEDS_FENCE
> and PLANE_WANTS_FENCE (maybe with a better naming scheme to
> distinguish from the output flags, or should we just share the
> same namespace?).

It's probably not worth it unless we want some more flexibility in
future.

> And should we then move the gmch check out and instead have something
> like PLANE_NEEDS_MAPPABLE?
> 
> > Then I'm wondering if a 
> >       if (WARN_ON(needs_fence && !(*flags & PLANE_HAS_FENCE))
> > makes sense.
> 
> Just to make sure i915_vma_pin_fence() did its job correctly?

and i915_vma_pin() etc, yes.

At the end we would have something like:

	i915_vma_pin();
	if (uses_fence && i915_vma_pin_fence())
		flags |= HAS_FENCE;
	if (WARN_ON(needs_fence && !(flags & HAS_FENCE))
		...

(with the error checking along the way, it will be even less clear).
I expect the controlling logic to only get more complicated, so having a
few sanity checks between wants and gets seems useful.
-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