/* i915_drv.h -- Private header for the I915 driver -*- linux-c -*-
*/ /* * * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sub license, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice (including the * next paragraph) shall be included in all copies or substantial portions * of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
*/
/* Data Stolen Memory (DSM) aka "i915 stolen memory" */ struct i915_dsm { /* * The start and end of DSM which we can optionally use to create GEM * objects backed by stolen memory. * * Note that usable_size tells us exactly how much of this we are * actually allowed to use, given that some portion of it is in fact * reserved for use by hardware functions.
*/ struct resource stolen;
/* * Reserved portion of DSM.
*/ struct resource reserved;
/* * Total size minus reserved ranges. * * DSM is segmented in hardware with different portions offlimits to * certain functions. * * The drm_mm is initialised to the total accessible range, as found * from the PCI config. On Broadwell+, this is further restricted to * avoid the first page! The upper end of DSM is reserved for hardware * functions and similarly removed from the accessible range.
*/
resource_size_t usable_size;
};
struct i915_gem_mm { /* * Shortcut for the stolen region. This points to either * INTEL_REGION_STOLEN_SMEM for integrated platforms, or * INTEL_REGION_STOLEN_LMEM for discrete, or NULL if the device doesn't * support stolen.
*/ struct intel_memory_region *stolen_region; /** Memory allocator for GTT stolen memory */ struct drm_mm stolen; /** Protects the usage of the GTT stolen memory allocator. This is
* always the inner lock when overlapping with struct_mutex. */ struct mutex stolen_lock;
/* Protects bound_list/unbound_list and #drm_i915_gem_object.mm.link */
spinlock_t obj_lock;
/** * List of objects which are purgeable.
*/ struct list_head purge_list;
/** * List of objects which have allocated pages and are shrinkable.
*/ struct list_head shrink_list;
/** * List of objects which are pending destruction.
*/ struct llist_head free_list; struct work_struct free_work; /** * Count of objects pending destructions. Used to skip needlessly * waiting on an RCU barrier if no objects are waiting to be freed.
*/
atomic_t free_count;
/** * tmpfs instance used for shmem backed objects
*/ struct vfsmount *gemfs;
/* * Chaining user engines happens in multiple stages, starting with a * simple lock-less linked list created by intel_engine_add_user(), * which later gets sorted and converted to an intermediate regular * list, just to be converted once again to its final rb tree structure * in intel_engines_driver_register(). * * Make sure to use the right iterator helper, depending on if the code * in question runs before or after intel_engines_driver_register() -- * for_each_uabi_engine() can only be used afterwards!
*/ union { struct llist_head uabi_engines_llist; struct list_head uabi_engines_list; struct rb_root uabi_engines;
}; unsignedint engine_uabi_class_count[I915_LAST_UABI_ENGINE_CLASS + 1];
/** Cached value of IMR to avoid reads in updating the bitfield */
u32 irq_mask;
bool preserve_bios_swizzle;
unsignedint fsb_freq, mem_freq, is_ddr3;
unsignedint hpll_freq; unsignedint czclk_freq;
/** * wq - Driver workqueue for GEM. * * NOTE: Work items scheduled here are not allowed to grab any modeset * locks, for otherwise the flushing done in the pageflip code will * result in deadlocks.
*/ struct workqueue_struct *wq;
/** * unordered_wq - internal workqueue for unordered work * * This workqueue should be used for all unordered work * scheduling within i915, which used to be scheduled on the * system_wq before moving to a driver instance due * deprecation of flush_scheduled_work().
*/ struct workqueue_struct *unordered_wq;
/* * We replace the local file with a global mappings as the * backing storage for the mmap is on the device and not * on the struct file, and we do not want to prolong the * lifetime of the local fd. To minimise the number of * anonymous inodes we create, we use a global singleton to * share the global mapping.
*/ struct file *mmap_singleton;
} gem;
struct intel_pxp *pxp;
struct i915_pmu pmu;
/* The TTM device structure. */ struct ttm_device bdev;
/* * The Gen7 cmdparser copies the scanned buffer to the ggtt for execution * All later gens can run the final buffer from the ppgtt
*/ #define CMDPARSER_USES_GGTT(i915) (GRAPHICS_VER(i915) == 7)
/* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte * rows, which changed the alignment requirements and fence programming.
*/ #define HAS_128_BYTE_Y_TILING(i915) (GRAPHICS_VER(i915) != 2 && \
!(IS_I915G(i915) || IS_I915GM(i915)))
#define HAS_RC6(i915) (INTEL_INFO(i915)->has_rc6) #define HAS_RC6p(i915) (INTEL_INFO(i915)->has_rc6p) #define HAS_RC6pp(i915) (false) /* HW was never validated */
/* * Set this flag, when platform requires 64K GTT page sizes or larger for * device local memory access.
*/ #define HAS_64K_PAGES(i915) (INTEL_INFO(i915)->has_64k_pages)
/* * Platform has the dedicated compression control state for each lmem surfaces * stored in lmem to support the 3D and media compression formats.
*/ #define HAS_FLAT_CCS(i915) (INTEL_INFO(i915)->has_flat_ccs)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.