[Intel-gfx] [PATCH 1/2] drm/i915/guc: Simplify code by keeping kmap of guc_client object

Dave Gordon david.s.gordon at intel.com
Mon Feb 15 15:23:55 UTC 2016

On 12/02/16 13:03, Tvrtko Ursulin wrote:
> On 11/02/16 23:09, yu.dai at intel.com wrote:
>> From: Alex Dai <yu.dai at intel.com>
>> GuC client object is always pinned during its life cycle. We cache
>> the kmap of its first page, which includes guc_process_desc and
>> doorbell. By doing so, we can simplify the code where we read from
>> this page to get where GuC is progressing on work queue; and the
>> code where driver program doorbell to send work queue item to GuC.

There's still one k(un)map_atomic() pair, in guc_add_workqueue_item(). 
Maybe we could get rid of that one too? So instead of kmapping only the 
first page of the client, we could vmap() all three pages and so not 
need to kmap_atomic() the WQ pages on the fly.

There's a handy vmap_obj() function we might use, except it's currently 
static ...


More information about the Intel-gfx mailing list