Skip to content

Commit

Permalink
drm/i915: Use simplest form for flushing the single cacheline in the HWS
Browse files Browse the repository at this point in the history
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@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1460195877-20520-4-git-send-email-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Apr 9, 2016
1 parent 12471ba commit 0d317ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/gpu/drm/i915/intel_ringbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,9 @@ intel_ring_sync_index(struct intel_engine_cs *engine,
static inline void
intel_flush_status_page(struct intel_engine_cs *engine, int reg)
{
drm_clflush_virt_range(&engine->status_page.page_addr[reg],
sizeof(uint32_t));
mb();
clflush(&engine->status_page.page_addr[reg]);
mb();
}

static inline u32
Expand Down

0 comments on commit 0d317ce

Please sign in to comment.