404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.14.135.249: ~ $
#ifndef _DRM_DEVICE_H_
#define _DRM_DEVICE_H_

#include <linux/list.h>
#include <linux/kref.h>
#include <linux/mutex.h>
#include <linux/idr.h>

#include <drm/drm_hashtab.h>
#include <drm/drm_mode_config.h>

struct drm_driver;
struct drm_minor;
struct drm_master;
struct drm_device_dma;
struct drm_vblank_crtc;
struct drm_sg_mem;
struct drm_local_map;
struct drm_vma_offset_manager;

struct inode;

struct pci_dev;
struct pci_controller;

/**
 * DRM device structure. This structure represent a complete card that
 * may contain multiple heads.
 */
struct drm_device {
	struct list_head legacy_dev_list;/**< list of devices per driver for stealth attach cleanup */
	int if_version;			/**< Highest interface version set */

	/** \name Lifetime Management */
	/*@{ */
	struct kref ref;		/**< Object ref-count */
	struct device *dev;		/**< Device structure of bus-device */
	struct drm_driver *driver;	/**< DRM driver managing the device */
	void *dev_private;		/**< DRM driver private data */
	struct drm_minor *control;		/**< Control node */
	struct drm_minor *primary;		/**< Primary node */
	struct drm_minor *render;		/**< Render node */
	bool registered;

	/* currently active master for this device. Protected by master_mutex */
	struct drm_master *master;

	atomic_t unplugged;			/**< Flag whether dev is dead */
	struct inode *anon_inode;		/**< inode for private address-space */
	char *unique;				/**< unique name of the device */
	/*@} */

	/** \name Locks */
	/*@{ */
	struct mutex struct_mutex;	/**< For others */
	struct mutex master_mutex;      /**< For drm_minor::master and drm_file::is_master */
	/*@} */

	/** \name Usage Counters */
	/*@{ */
	int open_count;			/**< Outstanding files open, protected by drm_global_mutex. */
	spinlock_t buf_lock;		/**< For drm_device::buf_use and a few other things. */
	int buf_use;			/**< Buffers in use -- cannot alloc */
	atomic_t buf_alloc;		/**< Buffer allocation in progress */
	/*@} */

	struct mutex filelist_mutex;
	struct list_head filelist;

	/** \name Memory management */
	/*@{ */
	struct list_head maplist;	/**< Linked list of regions */
	struct drm_open_hash map_hash;	/**< User token hash table for maps */

	/** \name Context handle management */
	/*@{ */
	struct list_head ctxlist;	/**< Linked list of context handles */
	struct mutex ctxlist_mutex;	/**< For ctxlist */

	struct idr ctx_idr;

	struct list_head vmalist;	/**< List of vmas (for debugging) */

	/*@} */

	/** \name DMA support */
	/*@{ */
	struct drm_device_dma *dma;		/**< Optional pointer for DMA support */
	/*@} */

	/** \name Context support */
	/*@{ */

	__volatile__ long context_flag;	/**< Context swapping flag */
	int last_context;		/**< Last current context */
	/*@} */

	/**
	 * @irq_enabled:
	 *
	 * Indicates that interrupt handling is enabled, specifically vblank
	 * handling. Drivers which don't use drm_irq_install() need to set this
	 * to true manually.
	 */
	bool irq_enabled;
	int irq;

	/**
	 * @vblank_disable_immediate:
	 *
	 * If true, vblank interrupt will be disabled immediately when the
	 * refcount drops to zero, as opposed to via the vblank disable
	 * timer.
	 *
	 * This can be set to true it the hardware has a working vblank counter
	 * with high-precision timestamping (otherwise there are races) and the
	 * driver uses drm_crtc_vblank_on() and drm_crtc_vblank_off()
	 * appropriately. See also @max_vblank_count and
	 * &drm_crtc_funcs.get_vblank_counter.
	 */
	bool vblank_disable_immediate;

	/**
	 * @vblank:
	 *
	 * Array of vblank tracking structures, one per &struct drm_crtc. For
	 * historical reasons (vblank support predates kernel modesetting) this
	 * is free-standing and not part of &struct drm_crtc itself. It must be
	 * initialized explicitly by calling drm_vblank_init().
	 */
	struct drm_vblank_crtc *vblank;

	spinlock_t vblank_time_lock;    /**< Protects vblank count and time updates during vblank enable/disable */
	spinlock_t vbl_lock;

	/**
	 * @max_vblank_count:
	 *
	 * Maximum value of the vblank registers. This value +1 will result in a
	 * wrap-around of the vblank register. It is used by the vblank core to
	 * handle wrap-arounds.
	 *
	 * If set to zero the vblank core will try to guess the elapsed vblanks
	 * between times when the vblank interrupt is disabled through
	 * high-precision timestamps. That approach is suffering from small
	 * races and imprecision over longer time periods, hence exposing a
	 * hardware vblank counter is always recommended.
	 *
	 * This is the statically configured device wide maximum. The driver
	 * can instead choose to use a runtime configurable per-crtc value
	 * &drm_vblank_crtc.max_vblank_count, in which case @max_vblank_count
	 * must be left at zero. See drm_crtc_set_max_vblank_count() on how
	 * to use the per-crtc value.
	 *
	 * If non-zero, &drm_crtc_funcs.get_vblank_counter must be set.
	 */
	u32 max_vblank_count;           /**< size of vblank counter register */

	/**
	 * List of events
	 */
	struct list_head vblank_event_list;
	spinlock_t event_lock;

	/*@} */

	struct drm_agp_head *agp;	/**< AGP data */

	struct pci_dev *pdev;		/**< PCI device structure */
#ifdef __alpha__
	struct pci_controller *hose;
#endif

	struct drm_sg_mem *sg;	/**< Scatter gather memory */
	unsigned int num_crtcs;                  /**< Number of CRTCs on this device */

	struct {
		int context;
		struct drm_hw_lock *lock;
	} sigdata;

	struct drm_local_map *agp_buffer_map;
	unsigned int agp_buffer_token;

	struct drm_mode_config mode_config;	/**< Current mode config */

	/** \name GEM information */
	/*@{ */
	struct mutex object_name_lock;
	struct idr object_name_idr;
	struct drm_vma_offset_manager *vma_offset_manager;
	/*@} */
	int switch_power_state;
};

#endif

Filemanager

Name Type Size Permission Actions
bridge Folder 0755
i2c Folder 0755
tinydrm Folder 0755
ttm Folder 0755
amd_asic_type.h File 1.54 KB 0644
ati_pcigart.h File 731 B 0644
drmP.h File 10.84 KB 0644
drm_agpsupport.h File 3.81 KB 0644
drm_atomic.h File 30.49 KB 0644
drm_atomic_helper.h File 10.7 KB 0644
drm_auth.h File 3.4 KB 0644
drm_blend.h File 2.05 KB 0644
drm_bridge.h File 10.06 KB 0644
drm_cache.h File 2.81 KB 0644
drm_color_mgmt.h File 1.55 KB 0644
drm_connector.h File 34.96 KB 0644
drm_crtc.h File 32.42 KB 0644
drm_crtc_helper.h File 3.27 KB 0644
drm_debugfs.h File 3.36 KB 0644
drm_debugfs_crc.h File 2.66 KB 0644
drm_device.h File 5.58 KB 0644
drm_displayid.h File 3.24 KB 0644
drm_dp_dual_mode_helper.h File 4.43 KB 0644
drm_dp_helper.h File 44.09 KB 0644
drm_dp_mst_helper.h File 16.83 KB 0644
drm_drv.h File 20.51 KB 0644
drm_edid.h File 15.33 KB 0644
drm_encoder.h File 7.99 KB 0644
drm_encoder_slave.h File 6.46 KB 0644
drm_fb_cma_helper.h File 1.38 KB 0644
drm_fb_helper.h File 14.95 KB 0644
drm_file.h File 10.59 KB 0644
drm_fixed.h File 4.71 KB 0644
drm_flip_work.h File 3.01 KB 0644
drm_fourcc.h File 2.85 KB 0644
drm_framebuffer.h File 9.86 KB 0644
drm_gem.h File 9.83 KB 0644
drm_gem_cma_helper.h File 3.41 KB 0644
drm_gem_framebuffer_helper.h File 1.17 KB 0644
drm_global.h File 1.94 KB 0644
drm_hashtab.h File 3.01 KB 0644
drm_ioctl.h File 6.26 KB 0644
drm_irq.h File 1.29 KB 0644
drm_lease.h File 1.43 KB 0644
drm_legacy.h File 6.77 KB 0644
drm_mipi_dsi.h File 10.08 KB 0644
drm_mm.h File 16.48 KB 0644
drm_mode_config.h File 25.93 KB 0644
drm_mode_object.h File 5.77 KB 0644
drm_modes.h File 17.8 KB 0644
drm_modeset_helper.h File 1.57 KB 0644
drm_modeset_helper_vtables.h File 48.62 KB 0644
drm_modeset_lock.h File 4.02 KB 0644
drm_of.h File 3.17 KB 0644
drm_os_linux.h File 2.04 KB 0644
drm_panel.h File 7.03 KB 0644
drm_pci.h File 2.45 KB 0644
drm_pciids.h File 66.48 KB 0644
drm_plane.h File 20.38 KB 0644
drm_plane_helper.h File 3.2 KB 0644
drm_prime.h File 3.06 KB 0644
drm_print.h File 3.58 KB 0644
drm_property.h File 12.03 KB 0644
drm_rect.h File 5.87 KB 0644
drm_scdc_helper.h File 4.34 KB 0644
drm_simple_kms_helper.h File 3.99 KB 0644
drm_syncobj.h File 4.13 KB 0644
drm_sysfs.h File 287 B 0644
drm_vblank.h File 7.23 KB 0644
drm_vma_manager.h File 7.65 KB 0644
gma_drm.h File 1.01 KB 0644
i915_component.h File 4.11 KB 0644
i915_drm.h File 3.47 KB 0644
i915_pciids.h File 15.55 KB 0644
intel-gtt.h File 987 B 0644
intel_lpe_audio.h File 1.72 KB 0644