Skip to content
Snippets Groups Projects
Select Git revision
  • 977a7a15231f6c510229f616dd0c24632fcbee4d
  • master default protected
  • android-msm-bullhead-3.10-nougat_kgdb_less_changes
  • android-msm-bullhead-3.10-nougat_kgdb
  • android-msm-bullhead-3.10-nougat_klist
  • android-4.4
  • android-msm-vega-4.4-oreo-daydream
  • android-msm-wahoo-4.4-p-preview-5
  • android-msm-wahoo-4.4-pie
  • android-msm-marlin-3.18-p-preview-5
  • android-msm-marlin-3.18-pie
  • android-msm-wahoo-2018.07-oreo-m2
  • android-msm-wahoo-2018.07-oreo-m4
  • android-msm-wahoo-4.4-p-preview-4
  • android-msm-bullhead-3.10-oreo-m6
  • android-msm-angler-3.10-oreo-m6
  • android-msm-marlin-3.18-p-preview-4
  • android-msm-stargazer-3.18-oreo-wear-dr
  • android-msm-catshark-3.18-oreo-wear-dr
  • android-msm-wahoo-4.4-oreo-m2
  • android-msm-wahoo-4.4-oreo-m4
  • android-daydreamos-8.0.0_r0.5
  • android-8.1.0_r0.92
  • android-8.1.0_r0.91
  • android-daydreamos-8.0.0_r0.4
  • android-p-preview-5_r0.2
  • android-p-preview-5_r0.1
  • android-9.0.0_r0.5
  • android-9.0.0_r0.4
  • android-9.0.0_r0.2
  • android-9.0.0_r0.1
  • android-8.1.0_r0.81
  • android-8.1.0_r0.80
  • android-8.1.0_r0.78
  • android-8.1.0_r0.76
  • android-8.1.0_r0.75
  • android-8.1.0_r0.72
  • android-8.1.0_r0.70
  • android-p-preview-4_r0.2
  • android-p-preview-4_r0.1
  • android-wear-8.0.0_r0.30
41 results

agp_backend.h

Blame
  • user avatar
    Daniel Vetter authored and Chris Wilson committed
    Its only user, intel-gtt.c is now gone.
    
    Cc: Dave Airlie <airlied@gmail.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    cb16b67b
    History
    agp_backend.h 3.45 KiB
    /*
     * AGPGART backend specific includes. Not for userspace consumption.
     *
     * Copyright (C) 2004 Silicon Graphics, Inc.
     * Copyright (C) 2002-2003 Dave Jones
     * Copyright (C) 1999 Jeff Hartmann
     * Copyright (C) 1999 Precision Insight, Inc.
     * Copyright (C) 1999 Xi Graphics, Inc.
     *
     * 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, sublicense,
     * 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 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 NONINFRINGEMENT.  IN NO EVENT SHALL
     * JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS 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.
     *
     */
    
    #ifndef _AGP_BACKEND_H
    #define _AGP_BACKEND_H 1
    
    #include <linux/list.h>
    
    enum chipset_type {
    	NOT_SUPPORTED,
    	SUPPORTED,
    };
    
    struct agp_version {
    	u16 major;
    	u16 minor;
    };
    
    struct agp_kern_info {
    	struct agp_version version;
    	struct pci_dev *device;
    	enum chipset_type chipset;
    	unsigned long mode;
    	unsigned long aper_base;
    	size_t aper_size;
    	int max_memory;		/* In pages */
    	int current_memory;
    	bool cant_use_aperture;
    	unsigned long page_mask;
    	const struct vm_operations_struct *vm_ops;
    };
    
    /*
     * The agp_memory structure has information about the block of agp memory
     * allocated.  A caller may manipulate the next and prev pointers to link
     * each allocated item into a list.  These pointers are ignored by the backend.
     * Everything else should never be written to, but the caller may read any of
     * the items to determine the status of this block of agp memory.
     */
    
    struct agp_bridge_data;
    
    struct agp_memory {
    	struct agp_memory *next;
    	struct agp_memory *prev;
    	struct agp_bridge_data *bridge;
    	struct page **pages;
    	size_t page_count;
    	int key;
    	int num_scratch_pages;
    	off_t pg_start;
    	u32 type;
    	u32 physical;
    	bool is_bound;
    	bool is_flushed;
    	/* list of agp_memory mapped to the aperture */
    	struct list_head mapped_list;
    	/* DMA-mapped addresses */
    	struct scatterlist *sg_list;
    	int num_sg;
    };
    
    #define AGP_NORMAL_MEMORY 0
    
    #define AGP_USER_TYPES (1 << 16)
    #define AGP_USER_MEMORY (AGP_USER_TYPES)
    #define AGP_USER_CACHED_MEMORY (AGP_USER_TYPES + 1)
    
    extern struct agp_bridge_data *agp_bridge;
    extern struct list_head agp_bridges;
    
    extern struct agp_bridge_data *(*agp_find_bridge)(struct pci_dev *);
    
    extern void agp_free_memory(struct agp_memory *);
    extern struct agp_memory *agp_allocate_memory(struct agp_bridge_data *, size_t, u32);
    extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *);
    extern int agp_bind_memory(struct agp_memory *, off_t);
    extern int agp_unbind_memory(struct agp_memory *);
    extern void agp_enable(struct agp_bridge_data *, u32);
    extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *);
    extern void agp_backend_release(struct agp_bridge_data *);
    
    #endif				/* _AGP_BACKEND_H */