Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358331
b: refs/heads/master
c: 50fdaae
h: refs/heads/master
i:
  358329: b3a271c
  358327: 59ac6ce
v: v3
  • Loading branch information
Daniel Vetter authored and Rob Clark committed Feb 17, 2013
1 parent dea9822 commit c9fcf43
Show file tree
Hide file tree
Showing 226 changed files with 3,334 additions and 8,159 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: 74e1697478ffdee0e12e48db024a9b3677fd8cee
refs/heads/master: 50fdaae79abbfc4f04b5380ac5abf00fd448c5a5
81 changes: 0 additions & 81 deletions trunk/Documentation/thermal/nouveau_thermal

This file was deleted.

42 changes: 3 additions & 39 deletions trunk/drivers/char/agp/intel-gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,40 +572,6 @@ static void intel_gtt_cleanup(void)
intel_gtt_teardown_scratch_page();
}

/* Certain Gen5 chipsets require require idling the GPU before
* unmapping anything from the GTT when VT-d is enabled.
*/
static inline int needs_ilk_vtd_wa(void)
{
#ifdef CONFIG_INTEL_IOMMU
const unsigned short gpu_devid = intel_private.pcidev->device;

/* Query intel_iommu to see if we need the workaround. Presumably that
* was loaded first.
*/
if ((gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB ||
gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG) &&
intel_iommu_gfx_mapped)
return 1;
#endif
return 0;
}

static bool intel_gtt_can_wc(void)
{
if (INTEL_GTT_GEN <= 2)
return false;

if (INTEL_GTT_GEN >= 6)
return false;

/* Reports of major corruption with ILK vt'd enabled */
if (needs_ilk_vtd_wa())
return false;

return true;
}

static int intel_gtt_init(void)
{
u32 gma_addr;
Expand Down Expand Up @@ -635,7 +601,7 @@ static int intel_gtt_init(void)
gtt_map_size = intel_private.gtt_total_entries * 4;

intel_private.gtt = NULL;
if (intel_gtt_can_wc())
if (INTEL_GTT_GEN < 6 && INTEL_GTT_GEN > 2)
intel_private.gtt = ioremap_wc(intel_private.gtt_bus_addr,
gtt_map_size);
if (intel_private.gtt == NULL)
Expand Down Expand Up @@ -1106,6 +1072,7 @@ static void i965_write_entry(dma_addr_t addr,
writel(addr | pte_flags, intel_private.gtt + entry);
}


static int i9xx_setup(void)
{
u32 reg_addr, gtt_addr;
Expand Down Expand Up @@ -1404,13 +1371,10 @@ int intel_gmch_probe(struct pci_dev *bridge_pdev, struct pci_dev *gpu_pdev,
}
EXPORT_SYMBOL(intel_gmch_probe);

void intel_gtt_get(size_t *gtt_total, size_t *stolen_size,
phys_addr_t *mappable_base, unsigned long *mappable_end)
void intel_gtt_get(size_t *gtt_total, size_t *stolen_size)
{
*gtt_total = intel_private.gtt_total_entries << PAGE_SHIFT;
*stolen_size = intel_private.stolen_size;
*mappable_base = intel_private.gma_bus_addr;
*mappable_end = intel_private.gtt_mappable_entries << PAGE_SHIFT;
}
EXPORT_SYMBOL(intel_gtt_get);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/Makefile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
obj-y += drm/ vga/
obj-y += drm/ vga/ stub/
2 changes: 0 additions & 2 deletions trunk/drivers/gpu/drm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -215,5 +215,3 @@ source "drivers/gpu/drm/cirrus/Kconfig"
source "drivers/gpu/drm/shmobile/Kconfig"

source "drivers/gpu/drm/tegra/Kconfig"

source "drivers/gpu/drm/omapdrm/Kconfig"
1 change: 0 additions & 1 deletion trunk/drivers/gpu/drm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,4 @@ obj-$(CONFIG_DRM_UDL) += udl/
obj-$(CONFIG_DRM_AST) += ast/
obj-$(CONFIG_DRM_SHMOBILE) +=shmobile/
obj-$(CONFIG_DRM_TEGRA) += tegra/
obj-$(CONFIG_DRM_OMAP) += omapdrm/
obj-y += i2c/
5 changes: 2 additions & 3 deletions trunk/drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1996,9 +1996,9 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
plane_req->src_w, plane_req->src_h);
if (!ret) {
old_fb = plane->fb;
fb = NULL;
plane->crtc = crtc;
plane->fb = fb;
fb = NULL;
}
drm_modeset_unlock_all(dev);

Expand Down Expand Up @@ -2267,7 +2267,7 @@ uint32_t drm_mode_legacy_fb_format(uint32_t bpp, uint32_t depth)

switch (bpp) {
case 8:
fmt = DRM_FORMAT_C8;
fmt = DRM_FORMAT_RGB332;
break;
case 16:
if (depth == 15)
Expand Down Expand Up @@ -3870,7 +3870,6 @@ void drm_fb_get_bpp_depth(uint32_t format, unsigned int *depth,
int *bpp)
{
switch (format) {
case DRM_FORMAT_C8:
case DRM_FORMAT_RGB332:
case DRM_FORMAT_BGR233:
*depth = 8;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/gpu/drm/drm_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -2054,8 +2054,7 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
num_modes += add_cvt_modes(connector, edid);
num_modes += add_standard_modes(connector, edid);
num_modes += add_established_modes(connector, edid);
if (edid->features & DRM_EDID_FEATURE_DEFAULT_GTF)
num_modes += add_inferred_modes(connector, edid);
num_modes += add_inferred_modes(connector, edid);
num_modes += add_cea_modes(connector, edid);

if (quirks & (EDID_QUIRK_PREFER_LARGE_60 | EDID_QUIRK_PREFER_LARGE_75))
Expand Down
9 changes: 4 additions & 5 deletions trunk/drivers/gpu/drm/drm_fb_cma_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,12 @@ EXPORT_SYMBOL_GPL(drm_fbdev_cma_fini);
*/
void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma)
{
if (fbdev_cma) {
struct drm_device *dev = fbdev_cma->fb_helper.dev;
struct drm_device *dev = fbdev_cma->fb_helper.dev;

drm_modeset_lock_all(dev);
drm_modeset_lock_all(dev);
if (fbdev_cma)
drm_fb_helper_restore_fbdev_mode(&fbdev_cma->fb_helper);
drm_modeset_unlock_all(dev);
}
drm_modeset_unlock_all(dev);
}
EXPORT_SYMBOL_GPL(drm_fbdev_cma_restore_mode);

Expand Down
13 changes: 2 additions & 11 deletions trunk/drivers/gpu/drm/i915/i915_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ static int i915_error_state(struct seq_file *m, void *unused)

seq_printf(m, "Time: %ld s %ld us\n", error->time.tv_sec,
error->time.tv_usec);
seq_printf(m, "Kernel: " UTS_RELEASE "\n");
seq_printf(m, "Kernel: " UTS_RELEASE);
seq_printf(m, "PCI ID: 0x%04x\n", dev->pci_device);
seq_printf(m, "EIR: 0x%08x\n", error->eir);
seq_printf(m, "IER: 0x%08x\n", error->ier);
Expand Down Expand Up @@ -1484,8 +1484,7 @@ static int i915_context_status(struct seq_file *m, void *unused)
struct drm_info_node *node = (struct drm_info_node *) m->private;
struct drm_device *dev = node->minor->dev;
drm_i915_private_t *dev_priv = dev->dev_private;
struct intel_ring_buffer *ring;
int ret, i;
int ret;

ret = mutex_lock_interruptible(&dev->mode_config.mutex);
if (ret)
Expand All @@ -1503,14 +1502,6 @@ static int i915_context_status(struct seq_file *m, void *unused)
seq_printf(m, "\n");
}

for_each_ring(ring, dev_priv, i) {
if (ring->default_context) {
seq_printf(m, "HW default context %s ring ", ring->name);
describe_obj(m, ring->default_context->obj);
seq_printf(m, "\n");
}
}

mutex_unlock(&dev->mode_config.mutex);

return 0;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,6 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
mutex_init(&dev_priv->dpio_lock);

mutex_init(&dev_priv->rps.hw_lock);
mutex_init(&dev_priv->modeset_restore_lock);

if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev))
dev_priv->num_pipe = 3;
Expand Down
13 changes: 5 additions & 8 deletions trunk/drivers/gpu/drm/i915/i915_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,11 +470,6 @@ static int i915_drm_freeze(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;

/* ignore lid events during suspend */
mutex_lock(&dev_priv->modeset_restore_lock);
dev_priv->modeset_restore = MODESET_SUSPENDED;
mutex_unlock(&dev_priv->modeset_restore_lock);

intel_set_power_well(dev, true);

drm_kms_helper_poll_disable(dev);
Expand All @@ -501,6 +496,9 @@ static int i915_drm_freeze(struct drm_device *dev)

intel_opregion_fini(dev);

/* Modeset on resume, not lid events */
dev_priv->modeset_on_lid = 0;

console_lock();
intel_fbdev_set_suspend(dev, 1);
console_unlock();
Expand Down Expand Up @@ -576,6 +574,8 @@ static int __i915_drm_thaw(struct drm_device *dev)

intel_opregion_init(dev);

dev_priv->modeset_on_lid = 0;

/*
* The console lock can be pretty contented on resume due
* to all the printk activity. Try to keep it out of the hot
Expand All @@ -588,9 +588,6 @@ static int __i915_drm_thaw(struct drm_device *dev)
schedule_work(&dev_priv->console_resume_work);
}

mutex_lock(&dev_priv->modeset_restore_lock);
dev_priv->modeset_restore = MODESET_DONE;
mutex_unlock(&dev_priv->modeset_restore_lock);
return error;
}

Expand Down
24 changes: 12 additions & 12 deletions trunk/drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,7 @@ struct i915_gtt {

/* global gtt ops */
int (*gtt_probe)(struct drm_device *dev, size_t *gtt_total,
size_t *stolen, phys_addr_t *mappable_base,
unsigned long *mappable_end);
size_t *stolen);
void (*gtt_remove)(struct drm_device *dev);
void (*gtt_clear_range)(struct drm_device *dev,
unsigned int first_entry,
Expand Down Expand Up @@ -847,12 +846,6 @@ struct i915_gpu_error {
unsigned int stop_rings;
};

enum modeset_restore {
MODESET_ON_LID_OPEN,
MODESET_DONE,
MODESET_SUSPENDED,
};

typedef struct drm_i915_private {
struct drm_device *dev;
struct kmem_cache *slab;
Expand Down Expand Up @@ -926,7 +919,7 @@ typedef struct drm_i915_private {

/* overlay */
struct intel_overlay *overlay;
unsigned int sprite_scaling_enabled;
bool sprite_scaling_enabled;

/* LVDS info */
int backlight_level; /* restore backlight to this value */
Expand Down Expand Up @@ -974,8 +967,8 @@ typedef struct drm_i915_private {

unsigned long quirks;

enum modeset_restore modeset_restore;
struct mutex modeset_restore_lock;
/* Register state */
bool modeset_on_lid;

struct i915_gtt gtt;

Expand Down Expand Up @@ -1040,7 +1033,7 @@ typedef struct drm_i915_private {
bool hw_contexts_disabled;
uint32_t hw_context_size;

u32 fdi_rx_config;
bool fdi_rx_polarity_reversed;

struct i915_suspend_saved_registers regfile;

Expand Down Expand Up @@ -1215,6 +1208,13 @@ struct drm_i915_gem_object {

/** for phy allocated objects */
struct drm_i915_gem_phys_object *phys_obj;

/**
* Number of crtcs where this object is currently the fb, but
* will be page flipped away on the next vblank. When it
* reaches 0, dev_priv->pending_flip_queue will be woken up.
*/
atomic_t pending_flip;
};
#define to_gem_object(obj) (&((struct drm_i915_gem_object *)(obj))->base)

Expand Down
Loading

0 comments on commit c9fcf43

Please sign in to comment.