Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (204 commits) agp: intel-agp: do not use PCI resources before pci_enable_device() agp: efficeon-agp: do not use PCI resources before pci_enable_device() drm: kill BKL from common code drm/kms: Simplify setup of the initial I2C encoder config. drm,io-mapping: Specify slot to use for atomic mappings drm/radeon/kms: only expose underscan on avivo chips drm/radeon: add new pci ids drm: Cleanup after failing to create master->unique and dev->name drm/radeon: tone down overchatty acpi debug messages. drm/radeon/kms: enable underscan option for digital connectors drm/radeon/kms: fix calculation of h/v scaling factors drm/radeon/kms/igp: sideport is AMD only drm/radeon/kms: handle the case of no active displays properly in the bandwidth code drm: move ttm global code to core drm drm/i915: Clear the Ironlake dithering flags when the pipe doesn't want it. drm/radeon/kms: make sure HPD is set to NONE on analog-only connectors drm/radeon/kms: make sure rio_mem is valid before unmapping it drm/agp/i915: trim stolen space to 32M drm/i915: Unset cursor if out-of-bounds upon mode change (v4) drm/i915: Unreference object not handle on creation ...
This commit is contained in:
@@ -764,7 +764,7 @@ static struct drm_driver driver = {
|
||||
|
||||
static int vmw_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
{
|
||||
return drm_get_dev(pdev, ent, &driver);
|
||||
return drm_get_pci_dev(pdev, ent, &driver);
|
||||
}
|
||||
|
||||
static int __init vmwgfx_init(void)
|
||||
|
@@ -164,7 +164,7 @@ struct vmw_vga_topology_state {
|
||||
struct vmw_private {
|
||||
struct ttm_bo_device bdev;
|
||||
struct ttm_bo_global_ref bo_global_ref;
|
||||
struct ttm_global_reference mem_global_ref;
|
||||
struct drm_global_reference mem_global_ref;
|
||||
|
||||
struct vmw_fifo_state fifo;
|
||||
|
||||
|
@@ -528,7 +528,7 @@ int vmw_fb_init(struct vmw_private *vmw_priv)
|
||||
* Dirty & Deferred IO
|
||||
*/
|
||||
par->dirty.x1 = par->dirty.x2 = 0;
|
||||
par->dirty.y1 = par->dirty.y1 = 0;
|
||||
par->dirty.y1 = par->dirty.y2 = 0;
|
||||
par->dirty.active = true;
|
||||
spin_lock_init(&par->dirty.lock);
|
||||
info->fbdefio = &vmw_defio;
|
||||
|
@@ -44,29 +44,29 @@ int vmw_mmap(struct file *filp, struct vm_area_struct *vma)
|
||||
return ttm_bo_mmap(filp, vma, &dev_priv->bdev);
|
||||
}
|
||||
|
||||
static int vmw_ttm_mem_global_init(struct ttm_global_reference *ref)
|
||||
static int vmw_ttm_mem_global_init(struct drm_global_reference *ref)
|
||||
{
|
||||
DRM_INFO("global init.\n");
|
||||
return ttm_mem_global_init(ref->object);
|
||||
}
|
||||
|
||||
static void vmw_ttm_mem_global_release(struct ttm_global_reference *ref)
|
||||
static void vmw_ttm_mem_global_release(struct drm_global_reference *ref)
|
||||
{
|
||||
ttm_mem_global_release(ref->object);
|
||||
}
|
||||
|
||||
int vmw_ttm_global_init(struct vmw_private *dev_priv)
|
||||
{
|
||||
struct ttm_global_reference *global_ref;
|
||||
struct drm_global_reference *global_ref;
|
||||
int ret;
|
||||
|
||||
global_ref = &dev_priv->mem_global_ref;
|
||||
global_ref->global_type = TTM_GLOBAL_TTM_MEM;
|
||||
global_ref->global_type = DRM_GLOBAL_TTM_MEM;
|
||||
global_ref->size = sizeof(struct ttm_mem_global);
|
||||
global_ref->init = &vmw_ttm_mem_global_init;
|
||||
global_ref->release = &vmw_ttm_mem_global_release;
|
||||
|
||||
ret = ttm_global_item_ref(global_ref);
|
||||
ret = drm_global_item_ref(global_ref);
|
||||
if (unlikely(ret != 0)) {
|
||||
DRM_ERROR("Failed setting up TTM memory accounting.\n");
|
||||
return ret;
|
||||
@@ -75,11 +75,11 @@ int vmw_ttm_global_init(struct vmw_private *dev_priv)
|
||||
dev_priv->bo_global_ref.mem_glob =
|
||||
dev_priv->mem_global_ref.object;
|
||||
global_ref = &dev_priv->bo_global_ref.ref;
|
||||
global_ref->global_type = TTM_GLOBAL_TTM_BO;
|
||||
global_ref->global_type = DRM_GLOBAL_TTM_BO;
|
||||
global_ref->size = sizeof(struct ttm_bo_global);
|
||||
global_ref->init = &ttm_bo_global_init;
|
||||
global_ref->release = &ttm_bo_global_release;
|
||||
ret = ttm_global_item_ref(global_ref);
|
||||
ret = drm_global_item_ref(global_ref);
|
||||
|
||||
if (unlikely(ret != 0)) {
|
||||
DRM_ERROR("Failed setting up TTM buffer objects.\n");
|
||||
@@ -88,12 +88,12 @@ int vmw_ttm_global_init(struct vmw_private *dev_priv)
|
||||
|
||||
return 0;
|
||||
out_no_bo:
|
||||
ttm_global_item_unref(&dev_priv->mem_global_ref);
|
||||
drm_global_item_unref(&dev_priv->mem_global_ref);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void vmw_ttm_global_release(struct vmw_private *dev_priv)
|
||||
{
|
||||
ttm_global_item_unref(&dev_priv->bo_global_ref.ref);
|
||||
ttm_global_item_unref(&dev_priv->mem_global_ref);
|
||||
drm_global_item_unref(&dev_priv->bo_global_ref.ref);
|
||||
drm_global_item_unref(&dev_priv->mem_global_ref);
|
||||
}
|
||||
|
Reference in New Issue
Block a user