]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
staging: gma500: We don't support the CI either
authorAlan Cox <alan@linux.intel.com>
Wed, 30 Mar 2011 09:01:03 +0000 (10:01 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 5 Apr 2011 18:27:47 +0000 (11:27 -0700)
The camera interface is also not covered (and we won't be using TTM anyway
even if it ever re-emerges) so it to can go

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/gma500/psb_buffer.c
drivers/staging/gma500/psb_drv.c
drivers/staging/gma500/psb_drv.h
drivers/staging/gma500/psb_gtt.c
drivers/staging/gma500/psb_gtt.h

index a921f892ea5f52415cb63b579fe467720273b85a..b5d79a589db19b0243cf283492e80b3f82440209 100644 (file)
@@ -68,14 +68,6 @@ static int psb_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
                    TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_WC;
                man->default_caching = TTM_PL_FLAG_WC;
                break;
-       case TTM_PL_CI:
-               man->func = &ttm_bo_manager_func;
-               man->flags = TTM_MEMTYPE_FLAG_MAPPABLE |
-                       TTM_MEMTYPE_FLAG_FIXED;
-               man->gpu_offset = pg->mmu_gatt_start + (pg->ci_start);
-               man->available_caching = TTM_PL_FLAG_UNCACHED;
-               man->default_caching = TTM_PL_FLAG_UNCACHED;
-               break;
        case TTM_PL_TT: /* Mappable GATT memory */
                man->func = &ttm_bo_manager_func;
 #ifdef PSB_WORKING_HOST_MMU_ACCESS
@@ -373,11 +365,6 @@ static int psb_ttm_io_mem_reserve(struct ttm_bo_device *bdev,
                mem->bus.offset = mm_node->start << PAGE_SHIFT;
                mem->bus.base = 0x00000000;
                break;
-       case TTM_PL_CI:
-               mem->bus.offset = mm_node->start << PAGE_SHIFT;
-               mem->bus.base = dev_priv->ci_region_start;;
-               mem->bus.is_iomem = true;
-               break;
        default:
                return -EINVAL;
        }
index 84bcfebf3e8f123144a53cf07c583d68fc2f4ad4..cbb691e8617c5a52ae666a7ee1946a3ea855d339 100644 (file)
@@ -316,11 +316,6 @@ static void psb_do_takedown(struct drm_device *dev)
                ttm_bo_clean_mm(bdev, TTM_PL_TT);
                dev_priv->have_tt = 0;
        }
-
-       if (dev_priv->have_camera) {
-               ttm_bo_clean_mm(bdev, TTM_PL_CI);
-               dev_priv->have_camera = 0;
-       }
 }
 
 void mrst_get_fuse_settings(struct drm_device *dev)
@@ -639,12 +634,7 @@ static int psb_do_init(struct drm_device *dev)
        PSB_WSGX32(pg->mmu_gatt_start, PSB_CR_BIF_TWOD_REQ_BASE);
 
        /* TT region managed by TTM. */
-       if (!ttm_bo_init_mm(bdev, TTM_PL_TT,
-                       pg->gatt_pages -
-                       (pg->ci_start >> PAGE_SHIFT) -
-                       ((dev_priv->ci_region_size)
-                        >> PAGE_SHIFT))) {
-
+       if (!ttm_bo_init_mm(bdev, TTM_PL_TT, pg->gatt_pages)) {
                dev_priv->have_tt = 1;
                dev_priv->sizes.tt_size =
                        (tt_pages << PAGE_SHIFT) / (1024 * 1024) / 2;
@@ -696,12 +686,6 @@ static int psb_driver_unload(struct drm_device *dev)
                                        (dev_priv->mmu),
                                        pg->mmu_gatt_start,
                                        pg->vram_stolen_size >> PAGE_SHIFT);
-                       if (pg->ci_stolen_size != 0)
-                               psb_mmu_remove_pfn_sequence(
-                                       psb_mmu_get_default_pd
-                                       (dev_priv->mmu),
-                                       pg->ci_start,
-                                       pg->ci_stolen_size >> PAGE_SHIFT);
                        up_read(&pg->sem);
                        psb_mmu_driver_takedown(dev_priv->mmu);
                        dev_priv->mmu = NULL;
@@ -870,24 +854,6 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset)
        tt_pages = (pg->gatt_pages < PSB_TT_PRIV0_PLIMIT) ?
                (pg->gatt_pages) : PSB_TT_PRIV0_PLIMIT;
 
-       /* CI/RAR use the lower half of TT. */
-       pg->ci_start = (tt_pages / 2) << PAGE_SHIFT;
-
-
-       /*
-        * Make MSVDX/TOPAZ MMU aware of the CI stolen memory area.
-        */
-       if (dev_priv->pg->ci_stolen_size != 0) {
-               down_read(&pg->sem);
-               ret = psb_mmu_insert_pfn_sequence(psb_mmu_get_default_pd
-                               (dev_priv->mmu),
-                               dev_priv->ci_region_start >> PAGE_SHIFT,
-                               pg->mmu_gatt_start + pg->ci_start,
-                               pg->ci_stolen_size >> PAGE_SHIFT, 0);
-               up_read(&pg->sem);
-               if (ret)
-                       goto out_err;
-       }
 
        dev_priv->pf_pd = psb_mmu_alloc_pd(dev_priv->mmu, 1, 0);
        if (!dev_priv->pf_pd)
index 2aa7abc6c20d0206e88fdd50462c1ba86b64f580..7c83c8de0dca04be519f25969099963b04ac6f4d 100644 (file)
@@ -599,18 +599,10 @@ struct drm_psb_private {
        struct drm_crtc *pipe_to_crtc_mapping[PSB_NUM_PIPE];
        uint32_t num_pipe;
 
-       /*
-        * CI share buffer
-        */
-       unsigned int ci_region_start;
-       unsigned int ci_region_size;
-
        /*
         *Memory managers
         */
 
-       int have_camera;
-       int have_rar;
        int have_tt;
        int have_mem_mmu;
        struct mutex temp_mem;
index 0e5ee6c25d9d5906d3c42ec80612209e6fec3b96..d129b75c4e561ee746ddb5701b0c4b9db6cdf702 100644 (file)
@@ -75,10 +75,10 @@ int psb_gtt_init(struct psb_gtt *pg, int resume)
        struct drm_device *dev = pg->dev;
        struct drm_psb_private *dev_priv = dev->dev_private;
        unsigned gtt_pages;
-       unsigned long stolen_size, vram_stolen_size, ci_stolen_size;
+       unsigned long stolen_size, vram_stolen_size;
        unsigned i, num_pages;
        unsigned pfn_base;
-       uint32_t ci_pages, vram_pages;
+       uint32_t vram_pages;
        uint32_t tt_pages;
        uint32_t *ttm_gtt_map;
        uint32_t dvmt_mode = 0;
@@ -111,10 +111,6 @@ int psb_gtt_init(struct psb_gtt *pg, int resume)
        pci_read_config_dword(dev->pdev, PSB_BSM, &pg->stolen_base);
        vram_stolen_size = pg->gtt_phys_start - pg->stolen_base - PAGE_SIZE;
 
-       /* CI is not included in the stolen size since the TOPAZ MMU bug */
-       ci_stolen_size = dev_priv->ci_region_size;
-       /* Don't add CI & RAR share buffer space
-        * managed by TTM to stolen_size */
        stolen_size = vram_stolen_size;
 
        printk(KERN_INFO"GMMADR(region 0) start: 0x%08x (%dM).\n",
@@ -129,11 +125,6 @@ int psb_gtt_init(struct psb_gtt *pg, int resume)
        printk(KERN_INFO "      the correct size should be: %dM(dvmt mode=%d)\n",
                (dvmt_mode == 1) ? 1 : (2 << (dvmt_mode - 1)), dvmt_mode);
 
-       if (ci_stolen_size > 0)
-               printk(KERN_INFO"CI Stole memory: RAM base = 0x%08x, size = %lu M\n",
-                               dev_priv->ci_region_start,
-                               ci_stolen_size / 1024 / 1024);
-
        if (resume && (gtt_pages != pg->gtt_pages) &&
            (stolen_size != pg->stolen_size)) {
                DRM_ERROR("GTT resume error.\n");
@@ -144,7 +135,6 @@ int psb_gtt_init(struct psb_gtt *pg, int resume)
        pg->gtt_pages = gtt_pages;
        pg->stolen_size = stolen_size;
        pg->vram_stolen_size = vram_stolen_size;
-       pg->ci_stolen_size = ci_stolen_size;
        pg->gtt_map =
            ioremap_nocache(pg->gtt_phys_start, gtt_pages << PAGE_SHIFT);
        if (!pg->gtt_map) {
@@ -188,19 +178,6 @@ int psb_gtt_init(struct psb_gtt *pg, int resume)
        for (; i < tt_pages / 2 - 1; ++i)
                iowrite32(pte, pg->gtt_map + i);
 
-       /*
-        * insert CI stolen pages
-        */
-
-       pfn_base = dev_priv->ci_region_start >> PAGE_SHIFT;
-       ci_pages = num_pages = ci_stolen_size >> PAGE_SHIFT;
-       printk(KERN_INFO"Set up %d CI stolen pages starting at 0x%08x, GTT offset %dK\n",
-              num_pages, pfn_base, (ttm_gtt_map - pg->gtt_map) * 4);
-       for (i = 0; i < num_pages; ++i) {
-               pte = psb_gtt_mask_pte(pfn_base + i, 0);
-               iowrite32(pte, ttm_gtt_map + i);
-       }
-
        /*
         * Init rest of gtt managed by TTM.
         */
index 0272f83b461ebb783fadda40eb0ce40d35c94e4a..8a0ef7783abdaa8f251faab5c6fff817d888b0de 100644 (file)
@@ -29,8 +29,6 @@ struct psb_gtt {
        int initialized;
        uint32_t gatt_start;
        uint32_t mmu_gatt_start;
-       uint32_t ci_start;
-       uint32_t rar_start;
        uint32_t gtt_start;
        uint32_t gtt_phys_start;
        unsigned gtt_pages;
@@ -41,8 +39,6 @@ struct psb_gtt {
        u16 gmch_ctrl;
        unsigned long stolen_size;
        unsigned long vram_stolen_size;
-       unsigned long ci_stolen_size;
-       unsigned long rar_stolen_size;
        uint32_t *gtt_map;
        struct rw_semaphore sem;
 };