Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /**************************************************************************
0003  * Copyright (c) 2007-2008, Intel Corporation.
0004  * All Rights Reserved.
0005  *
0006  **************************************************************************/
0007 
0008 #ifndef _PSB_GTT_H_
0009 #define _PSB_GTT_H_
0010 
0011 #include <drm/drm_gem.h>
0012 
0013 struct drm_psb_private;
0014 
0015 /* This wants cleaning up with respect to the psb_dev and un-needed stuff */
0016 struct psb_gtt {
0017     uint32_t gatt_start;
0018     uint32_t mmu_gatt_start;
0019     uint32_t gtt_start;
0020     uint32_t gtt_phys_start;
0021     unsigned gtt_pages;
0022     unsigned gatt_pages;
0023     unsigned long stolen_size;
0024     unsigned long vram_stolen_size;
0025 };
0026 
0027 /* Exported functions */
0028 int psb_gtt_init(struct drm_device *dev);
0029 void psb_gtt_fini(struct drm_device *dev);
0030 int psb_gtt_resume(struct drm_device *dev);
0031 
0032 int psb_gtt_allocate_resource(struct drm_psb_private *pdev, struct resource *res,
0033                   const char *name, resource_size_t size, resource_size_t align,
0034                   bool stolen, u32 *offset);
0035 
0036 uint32_t psb_gtt_mask_pte(uint32_t pfn, int type);
0037 void psb_gtt_insert_pages(struct drm_psb_private *pdev, const struct resource *res,
0038               struct page **pages);
0039 void psb_gtt_remove_pages(struct drm_psb_private *pdev, const struct resource *res);
0040 
0041 #endif