Re: [PATCH 4/5] drm/i915: Use simplest form for flushing the single cacheline in the HWS

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

 



On Tue, Feb 16, 2016 at 02:58:56PM +0200, Mika Kuoppala wrote:
> Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes:
> 
> > Rather than call a function to compute the matching cachelines and
> > clflush them, just call the clflush *instruction* directly. We also know
> > that we can use the unpatched plain clflush rather than the clflushopt
> > alternative.
> >
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
> > Cc: Imre Deak <imre.deak@xxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/intel_ringbuffer.h | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
> > index dfb14bfe5bc8..e2b2dc2c2f49 100644
> > --- a/drivers/gpu/drm/i915/intel_ringbuffer.h
> > +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
> > @@ -393,8 +393,9 @@ intel_ring_sync_index(struct intel_engine_cs *ring,
> >  static inline void
> >  intel_flush_status_page(struct intel_engine_cs *ring, int reg)
> >  {
> > -	drm_clflush_virt_range(&ring->status_page.page_addr[reg],
> > -			       sizeof(uint32_t));
> > +	mb();
> 
> Checkpatch complains about memory barrier without comments.
> 
> Don't we need to check cpu_has_clflush?

No, these are only called when we know we have clflush.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
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