From: Alan Cox <alan@linux.intel.com>
To: greg@kroah.com, linux-kernel@vger.kernel.org
Subject: [PATCH 12/18] gma500: delete the RAR handling
Date: Wed, 30 Mar 2011 10:00:54 +0100 [thread overview]
Message-ID: <20110330090048.5897.6720.stgit@localhost.localdomain> (raw)
In-Reply-To: <20110330085539.5897.67919.stgit@localhost.localdomain>
RAR registers are used on MID platforms for various protected video
playback activities using video playback engines we don't support.
So Rasputin can keep his Rars
Signed-off-by: Alan Cox <alan@linux.intel.com>
---
drivers/staging/gma500/psb_buffer.c | 16 +---------------
drivers/staging/gma500/psb_drv.c | 29 +----------------------------
drivers/staging/gma500/psb_drv.h | 6 ------
drivers/staging/gma500/psb_gtt.c | 22 ----------------------
4 files changed, 2 insertions(+), 71 deletions(-)
diff --git a/drivers/staging/gma500/psb_buffer.c b/drivers/staging/gma500/psb_buffer.c
index 3077f6a..a921f89 100644
--- a/drivers/staging/gma500/psb_buffer.c
+++ b/drivers/staging/gma500/psb_buffer.c
@@ -76,14 +76,6 @@ static int psb_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
man->available_caching = TTM_PL_FLAG_UNCACHED;
man->default_caching = TTM_PL_FLAG_UNCACHED;
break;
- case TTM_PL_RAR: /* Unmappable RAR memory */
- man->func = &ttm_bo_manager_func;
- man->flags = TTM_MEMTYPE_FLAG_MAPPABLE |
- TTM_MEMTYPE_FLAG_FIXED;
- man->available_caching = TTM_PL_FLAG_UNCACHED;
- man->default_caching = TTM_PL_FLAG_UNCACHED;
- man->gpu_offset = pg->mmu_gatt_start + (pg->rar_start);
- break;
case TTM_PL_TT: /* Mappable GATT memory */
man->func = &ttm_bo_manager_func;
#ifdef PSB_WORKING_HOST_MMU_ACCESS
@@ -95,8 +87,7 @@ static int psb_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
man->available_caching = TTM_PL_FLAG_CACHED |
TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_WC;
man->default_caching = TTM_PL_FLAG_WC;
- man->gpu_offset = pg->mmu_gatt_start +
- (pg->rar_start + dev_priv->rar_region_size);
+ man->gpu_offset = pg->mmu_gatt_start;
break;
default:
DRM_ERROR("Unsupported memory type %u\n", (unsigned) type);
@@ -387,11 +378,6 @@ static int psb_ttm_io_mem_reserve(struct ttm_bo_device *bdev,
mem->bus.base = dev_priv->ci_region_start;;
mem->bus.is_iomem = true;
break;
- case TTM_PL_RAR:
- mem->bus.offset = mm_node->start << PAGE_SHIFT;
- mem->bus.base = dev_priv->rar_region_start;;
- mem->bus.is_iomem = true;
- break;
default:
return -EINVAL;
}
diff --git a/drivers/staging/gma500/psb_drv.c b/drivers/staging/gma500/psb_drv.c
index b9256e3..84bcfeb 100644
--- a/drivers/staging/gma500/psb_drv.c
+++ b/drivers/staging/gma500/psb_drv.c
@@ -321,11 +321,6 @@ static void psb_do_takedown(struct drm_device *dev)
ttm_bo_clean_mm(bdev, TTM_PL_CI);
dev_priv->have_camera = 0;
}
- if (dev_priv->have_rar) {
- ttm_bo_clean_mm(bdev, TTM_PL_RAR);
- dev_priv->have_rar = 0;
- }
-
}
void mrst_get_fuse_settings(struct drm_device *dev)
@@ -647,7 +642,7 @@ static int psb_do_init(struct drm_device *dev)
if (!ttm_bo_init_mm(bdev, TTM_PL_TT,
pg->gatt_pages -
(pg->ci_start >> PAGE_SHIFT) -
- ((dev_priv->ci_region_size + dev_priv->rar_region_size)
+ ((dev_priv->ci_region_size)
>> PAGE_SHIFT))) {
dev_priv->have_tt = 1;
@@ -707,12 +702,6 @@ static int psb_driver_unload(struct drm_device *dev)
(dev_priv->mmu),
pg->ci_start,
pg->ci_stolen_size >> PAGE_SHIFT);
- if (pg->rar_stolen_size != 0)
- psb_mmu_remove_pfn_sequence(
- psb_mmu_get_default_pd
- (dev_priv->mmu),
- pg->rar_start,
- pg->rar_stolen_size >> PAGE_SHIFT);
up_read(&pg->sem);
psb_mmu_driver_takedown(dev_priv->mmu);
dev_priv->mmu = NULL;
@@ -883,7 +872,6 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset)
/* CI/RAR use the lower half of TT. */
pg->ci_start = (tt_pages / 2) << PAGE_SHIFT;
- pg->rar_start = pg->ci_start + pg->ci_stolen_size;
/*
@@ -901,21 +889,6 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset)
goto out_err;
}
- /*
- * Make MSVDX/TOPAZ MMU aware of the rar stolen memory area.
- */
- if (dev_priv->pg->rar_stolen_size != 0) {
- down_read(&pg->sem);
- ret = psb_mmu_insert_pfn_sequence(
- psb_mmu_get_default_pd(dev_priv->mmu),
- dev_priv->rar_region_start >> PAGE_SHIFT,
- pg->mmu_gatt_start + pg->rar_start,
- pg->rar_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)
goto out_err;
diff --git a/drivers/staging/gma500/psb_drv.h b/drivers/staging/gma500/psb_drv.h
index dbb3fbb..2aa7abc 100644
--- a/drivers/staging/gma500/psb_drv.h
+++ b/drivers/staging/gma500/psb_drv.h
@@ -606,12 +606,6 @@ struct drm_psb_private {
unsigned int ci_region_size;
/*
- * RAR share buffer;
- */
- unsigned int rar_region_start;
- unsigned int rar_region_size;
-
- /*
*Memory managers
*/
diff --git a/drivers/staging/gma500/psb_gtt.c b/drivers/staging/gma500/psb_gtt.c
index 53c1e1e..0e5ee6c 100644
--- a/drivers/staging/gma500/psb_gtt.c
+++ b/drivers/staging/gma500/psb_gtt.c
@@ -76,7 +76,6 @@ int psb_gtt_init(struct psb_gtt *pg, int resume)
struct drm_psb_private *dev_priv = dev->dev_private;
unsigned gtt_pages;
unsigned long stolen_size, vram_stolen_size, ci_stolen_size;
- unsigned long rar_stolen_size;
unsigned i, num_pages;
unsigned pfn_base;
uint32_t ci_pages, vram_pages;
@@ -118,8 +117,6 @@ int psb_gtt_init(struct psb_gtt *pg, int resume)
* managed by TTM to stolen_size */
stolen_size = vram_stolen_size;
- rar_stolen_size = dev_priv->rar_region_size;
-
printk(KERN_INFO"GMMADR(region 0) start: 0x%08x (%dM).\n",
pg->gatt_start, pg->gatt_pages/256);
printk(KERN_INFO"GTTADR(region 3) start: 0x%08x (can map %dM RAM), and actual RAM base 0x%08x.\n",
@@ -136,10 +133,6 @@ int psb_gtt_init(struct psb_gtt *pg, int resume)
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 (rar_stolen_size > 0)
- printk(KERN_INFO "RAR Stole memory: RAM base = 0x%08x, size = %lu M\n",
- dev_priv->rar_region_start,
- rar_stolen_size / 1024 / 1024);
if (resume && (gtt_pages != pg->gtt_pages) &&
(stolen_size != pg->stolen_size)) {
@@ -152,7 +145,6 @@ int psb_gtt_init(struct psb_gtt *pg, int resume)
pg->stolen_size = stolen_size;
pg->vram_stolen_size = vram_stolen_size;
pg->ci_stolen_size = ci_stolen_size;
- pg->rar_stolen_size = rar_stolen_size;
pg->gtt_map =
ioremap_nocache(pg->gtt_phys_start, gtt_pages << PAGE_SHIFT);
if (!pg->gtt_map) {
@@ -210,20 +202,6 @@ int psb_gtt_init(struct psb_gtt *pg, int resume)
}
/*
- * insert RAR stolen pages
- */
- if (rar_stolen_size != 0) {
- pfn_base = dev_priv->rar_region_start >> PAGE_SHIFT;
- num_pages = rar_stolen_size >> PAGE_SHIFT;
- printk(KERN_INFO"Set up %d RAR stolen pages starting at 0x%08x, GTT offset %dK\n",
- num_pages, pfn_base,
- (ttm_gtt_map - pg->gtt_map + i) * 4);
- for (; i < num_pages + ci_pages; ++i) {
- pte = psb_gtt_mask_pte(pfn_base + i - ci_pages, 0);
- iowrite32(pte, ttm_gtt_map + i);
- }
- }
- /*
* Init rest of gtt managed by TTM.
*/
next prev parent reply other threads:[~2011-03-30 9:19 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-30 8:58 [PATCH 00/18] GMA500 updates Alan Cox
2011-03-30 8:59 ` [PATCH 01/18] gma500: begin adding Moorestown support Alan Cox
2011-03-30 8:59 ` [PATCH 02/18] gma500: Add moorestown lvds driver code Alan Cox
2011-03-30 8:59 ` [PATCH 03/18] gma500: Make some of the lvds operations non-static Alan Cox
2011-03-30 8:59 ` [PATCH 04/18] gma500: Add moorestown config structures Alan Cox
2011-03-30 8:59 ` [PATCH 05/18] gma500: Add moorestown specific data to the device structure Alan Cox
2011-03-30 8:59 ` [PATCH 06/18] gma500: Makefiles Alan Cox
2011-03-30 9:00 ` [PATCH 07/18] gma500: Add Moorestown backlight support Alan Cox
2011-03-30 10:33 ` Matthew Garrett
2011-03-30 9:00 ` [PATCH 08/18] gma500: add framebuffer setup Alan Cox
2011-03-30 9:00 ` [PATCH 09/18] gma500: enable Moorestown CRTC handling Alan Cox
2011-03-30 9:00 ` [PATCH 10/18] gma500: Moorestown does its setup differently Alan Cox
2011-03-30 9:00 ` [PATCH 11/18] gma500: Add Moorestown identifiers Alan Cox
2011-03-30 9:00 ` Alan Cox [this message]
2011-03-30 9:01 ` [PATCH 13/18] gma500: We don't support the CI either Alan Cox
2011-03-30 9:01 ` [PATCH 14/18] gma500: Clean up more unused structures and code Alan Cox
2011-03-30 9:01 ` [PATCH 15/18] gma500: pull mrst firmware stuff into its own header Alan Cox
2011-03-30 9:01 ` [PATCH 16/18] gma500; kill off TTM Alan Cox
2011-03-30 9:01 ` [PATCH 17/18] drivers:staging:gma500 Remove extra semi-colon Alan Cox
2011-03-30 9:01 ` [PATCH 18/18] gma500: turn on psb SDVO Alan Cox
2011-03-30 10:35 ` [PATCH 00/18] GMA500 updates Matthew Garrett
2011-03-30 10:23 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110330090048.5897.6720.stgit@localhost.localdomain \
--to=alan@linux.intel.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.