Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 307369
b: refs/heads/master
c: 218c872
h: refs/heads/master
i:
  307367: da057c0
v: v3
  • Loading branch information
Dave Airlie committed May 11, 2012
1 parent 14e724c commit 5f6f749
Show file tree
Hide file tree
Showing 48 changed files with 1,903 additions and 2,082 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e13a0c5ec05d382b488a691dfb8af015b1dea1e
refs/heads/master: 218c872bf8285af7aaa50f1f83312020e05451bf
6 changes: 3 additions & 3 deletions trunk/drivers/gpu/drm/drm_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ void drm_gem_vm_open(struct vm_area_struct *vma)
drm_gem_object_reference(obj);

mutex_lock(&obj->dev->struct_mutex);
drm_vm_open_locked(vma);
drm_vm_open_locked(obj->dev, vma);
mutex_unlock(&obj->dev->struct_mutex);
}
EXPORT_SYMBOL(drm_gem_vm_open);
Expand All @@ -637,7 +637,7 @@ void drm_gem_vm_close(struct vm_area_struct *vma)
struct drm_device *dev = obj->dev;

mutex_lock(&dev->struct_mutex);
drm_vm_close_locked(vma);
drm_vm_close_locked(obj->dev, vma);
drm_gem_object_unreference(obj);
mutex_unlock(&dev->struct_mutex);
}
Expand Down Expand Up @@ -710,7 +710,7 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
*/
drm_gem_object_reference(obj);

drm_vm_open_locked(vma);
drm_vm_open_locked(dev, vma);

out_unlock:
mutex_unlock(&dev->struct_mutex);
Expand Down
18 changes: 8 additions & 10 deletions trunk/drivers/gpu/drm/drm_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,9 @@ static const struct vm_operations_struct drm_vm_sg_ops = {
* Create a new drm_vma_entry structure as the \p vma private data entry and
* add it to drm_device::vmalist.
*/
void drm_vm_open_locked(struct vm_area_struct *vma)
void drm_vm_open_locked(struct drm_device *dev,
struct vm_area_struct *vma)
{
struct drm_file *priv = vma->vm_file->private_data;
struct drm_device *dev = priv->minor->dev;
struct drm_vma_entry *vma_entry;

DRM_DEBUG("0x%08lx,0x%08lx\n",
Expand All @@ -430,14 +429,13 @@ static void drm_vm_open(struct vm_area_struct *vma)
struct drm_device *dev = priv->minor->dev;

mutex_lock(&dev->struct_mutex);
drm_vm_open_locked(vma);
drm_vm_open_locked(dev, vma);
mutex_unlock(&dev->struct_mutex);
}

void drm_vm_close_locked(struct vm_area_struct *vma)
void drm_vm_close_locked(struct drm_device *dev,
struct vm_area_struct *vma)
{
struct drm_file *priv = vma->vm_file->private_data;
struct drm_device *dev = priv->minor->dev;
struct drm_vma_entry *pt, *temp;

DRM_DEBUG("0x%08lx,0x%08lx\n",
Expand Down Expand Up @@ -467,7 +465,7 @@ static void drm_vm_close(struct vm_area_struct *vma)
struct drm_device *dev = priv->minor->dev;

mutex_lock(&dev->struct_mutex);
drm_vm_close_locked(vma);
drm_vm_close_locked(dev, vma);
mutex_unlock(&dev->struct_mutex);
}

Expand Down Expand Up @@ -519,7 +517,7 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma)
vma->vm_flags |= VM_RESERVED; /* Don't swap */
vma->vm_flags |= VM_DONTEXPAND;

drm_vm_open_locked(vma);
drm_vm_open_locked(dev, vma);
return 0;
}

Expand Down Expand Up @@ -670,7 +668,7 @@ int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
vma->vm_flags |= VM_RESERVED; /* Don't swap */
vma->vm_flags |= VM_DONTEXPAND;

drm_vm_open_locked(vma);
drm_vm_open_locked(dev, vma);
return 0;
}

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/gpu/drm/gma500/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ gma500_gfx-y += gem_glue.o \
intel_i2c.o \
intel_gmbus.o \
mmu.o \
opregion.o \
power.o \
psb_drv.o \
psb_intel_display.o \
Expand All @@ -25,6 +24,8 @@ gma500_gfx-y += gem_glue.o \
psb_device.o \
mid_bios.o

gma500_gfx-$(CONFIG_ACPI) += opregion.o \

gma500_gfx-$(CONFIG_DRM_GMA3600) += cdv_device.o \
cdv_intel_crt.o \
cdv_intel_display.o \
Expand Down
60 changes: 59 additions & 1 deletion trunk/drivers/gpu/drm/gma500/cdv_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static int cdv_save_display_registers(struct drm_device *dev)
struct psb_save_area *regs = &dev_priv->regs;
struct drm_connector *connector;

dev_info(dev->dev, "Saving GPU registers.\n");
dev_dbg(dev->dev, "Saving GPU registers.\n");

pci_read_config_byte(dev->pdev, 0xF4, &regs->cdv.saveLBB);

Expand Down Expand Up @@ -485,10 +485,68 @@ static void cdv_hotplug_enable(struct drm_device *dev, bool on)
}
}

/* Cedarview */
static const struct psb_offset cdv_regmap[2] = {
{
.fp0 = FPA0,
.fp1 = FPA1,
.cntr = DSPACNTR,
.conf = PIPEACONF,
.src = PIPEASRC,
.dpll = DPLL_A,
.dpll_md = DPLL_A_MD,
.htotal = HTOTAL_A,
.hblank = HBLANK_A,
.hsync = HSYNC_A,
.vtotal = VTOTAL_A,
.vblank = VBLANK_A,
.vsync = VSYNC_A,
.stride = DSPASTRIDE,
.size = DSPASIZE,
.pos = DSPAPOS,
.base = DSPABASE,
.surf = DSPASURF,
.addr = DSPABASE,
.status = PIPEASTAT,
.linoff = DSPALINOFF,
.tileoff = DSPATILEOFF,
.palette = PALETTE_A,
},
{
.fp0 = FPB0,
.fp1 = FPB1,
.cntr = DSPBCNTR,
.conf = PIPEBCONF,
.src = PIPEBSRC,
.dpll = DPLL_B,
.dpll_md = DPLL_B_MD,
.htotal = HTOTAL_B,
.hblank = HBLANK_B,
.hsync = HSYNC_B,
.vtotal = VTOTAL_B,
.vblank = VBLANK_B,
.vsync = VSYNC_B,
.stride = DSPBSTRIDE,
.size = DSPBSIZE,
.pos = DSPBPOS,
.base = DSPBBASE,
.surf = DSPBSURF,
.addr = DSPBBASE,
.status = PIPEBSTAT,
.linoff = DSPBLINOFF,
.tileoff = DSPBTILEOFF,
.palette = PALETTE_B,
}
};

static int cdv_chip_setup(struct drm_device *dev)
{
struct drm_psb_private *dev_priv = dev->dev_private;
INIT_WORK(&dev_priv->hotplug_work, cdv_hotplug_work_func);

if (pci_enable_msi(dev->pdev))
dev_warn(dev->dev, "Enabling MSI failed!\n");
dev_priv->regmap = cdv_regmap;
cdv_get_core_freq(dev);
psb_intel_opregion_init(dev);
psb_intel_init_bios(dev);
Expand Down
Loading

0 comments on commit 5f6f749

Please sign in to comment.