1450N/A * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 1450N/A * Copyright (c) 2008-2010, 2013, Intel Corporation 1450N/A * Permission is hereby granted, free of charge, to any person obtaining a 1450N/A * copy of this software and associated documentation files (the "Software"), 1450N/A * to deal in the Software without restriction, including without limitation 1450N/A * the rights to use, copy, modify, merge, publish, distribute, sublicense, 1450N/A * and/or sell copies of the Software, and to permit persons to whom the 1450N/A * Software is furnished to do so, subject to the following conditions: 1450N/A * The above copyright notice and this permission notice (including the next 1450N/A * paragraph) shall be included in all copies or substantial portions of the 1450N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1450N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1450N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1450N/A * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1450N/A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1450N/A * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 1450N/A * Eric Anholt <eric@anholt.net> 1450N/A * Zou Nan hai <nanhai.zou@intel.com> 1450N/A * Xiang Hai hao<haihao.xiang@intel.com> 1450N/A * Gen2 BSpec "1. Programming Environment" / 1.4.4.6 "Ring Buffer Use" 1450N/A * Gen3 BSpec "vol1c Memory Interface Functions" / 2.3.4.5 "Ring Buffer Use" 1450N/A * Gen4+ BSpec "vol1c Memory Interface and Command Stream" / 5.3.4.5 "Ring Buffer Use" 1450N/A * "If the Ring Buffer Head Pointer and the Tail Pointer are on the same 1450N/A * cacheline, the Head Pointer must not be greater than the Tail 1450N/A /** We track the position of the requests in the ring buffer, and 1450N/A * when each is retired we increment last_retired_head as the GPU 1450N/A * must have finished processing the request and so we know we 1450N/A * can advance the ringbuffer up to that position. 1450N/A * last_retired_head is set to -1 after the value is consumed so 1450N/A * we can detect new retirements. 1450N/A u32 pm;
/* protected by dev_priv->rps.lock (sucks) */ 1450N/A /* Some chipsets are not quite as coherent as advertised and need 1450N/A * an expensive kick to force a true read of the up-to-date seqno. 1450N/A * However, the up-to-date seqno is not always required and the last 1450N/A * seen value is good enough. Note that the seqno will always be 1450N/A * monotonic, even if not coherent. 1450N/A /* our mbox written by others */ 1450N/A /* mboxes this ring signals to */ 1450N/A * List of objects currently involved in rendering from the 1450N/A * Includes buffers having the contents of their GPU caches 1450N/A * flushed, not necessarily primitives. last_rendering_seqno 1450N/A * represents when the rendering involved will be completed. 1450N/A * A reference is held on the buffer while on this list. 1450N/A * List of breadcrumbs associated with GPU requests currently 1450N/A * Do we have some not yet emitted requests outstanding? 1450N/A * Do an explicit TLB flush before MI_SET_CONTEXT 1450N/A * Reads a dword out of the status page, which is written to from the command 1450N/A * queue by automatic updates, MI_REPORT_HEAD, MI_STORE_DATA_INDEX, or 1450N/A * The following dwords have a reserved meaning: 1450N/A * 0x00: ISR copy, updated when an ISR bit not set in the HWSTAM changes. 1450N/A * 0x04: ring 0 head pointer 1450N/A * 0x05: ring 1 head pointer (915-class) 1450N/A * 0x06: ring 2 head pointer (915-class) 1450N/A * 0x10-0x1b: Context status DWords (GM45) 1450N/A * 0x1f: Last written status offset. (GM45) 1450N/A * The area from dword 0x20 to 0x3ff is available for driver usage. 1450N/A#
endif /* _INTEL_RINGBUFFER_H_ */