Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255035
b: refs/heads/master
c: 2cebaa5
h: refs/heads/master
i:
  255033: f784e2f
  255031: 3a0fbec
v: v3
  • Loading branch information
Pavel Shilovsky authored and Steve French committed Jul 21, 2011
1 parent 4583b08 commit 7c4f466
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 79 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: 57a6fa9acd6b4a479a6ede4d6d2258f04afd3a6f
refs/heads/master: 2cebaa58b7de775386732bbd6cd11c3f5b73faf0
16 changes: 0 additions & 16 deletions trunk/arch/x86/kernel/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,22 +427,6 @@ static struct dmi_system_id __initdata pci_reboot_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6320"),
},
},
{ /* Handle problems with rebooting on the Latitude E5420. */
.callback = set_pci_reboot,
.ident = "Dell Latitude E5420",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E5420"),
},
},
{ /* Handle problems with rebooting on the Latitude E6420. */
.callback = set_pci_reboot,
.ident = "Dell Latitude E6420",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6420"),
},
},
{ }
};

Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ enum intel_pch {
};

#define QUIRK_PIPEA_FORCE (1<<0)
#define QUIRK_LVDS_SSC_DISABLE (1<<1)

struct intel_fbdev;

Expand Down Expand Up @@ -1195,9 +1194,7 @@ void i915_gem_free_all_phys_object(struct drm_device *dev);
void i915_gem_release(struct drm_device *dev, struct drm_file *file);

uint32_t
i915_gem_get_unfenced_gtt_alignment(struct drm_device *dev,
uint32_t size,
int tiling_mode);
i915_gem_get_unfenced_gtt_alignment(struct drm_i915_gem_object *obj);

/* i915_gem_gtt.c */
void i915_gem_restore_gtt_mappings(struct drm_device *dev);
Expand Down
71 changes: 36 additions & 35 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1374,24 +1374,25 @@ i915_gem_free_mmap_offset(struct drm_i915_gem_object *obj)
}

static uint32_t
i915_gem_get_gtt_size(struct drm_device *dev, uint32_t size, int tiling_mode)
i915_gem_get_gtt_size(struct drm_i915_gem_object *obj)
{
uint32_t gtt_size;
struct drm_device *dev = obj->base.dev;
uint32_t size;

if (INTEL_INFO(dev)->gen >= 4 ||
tiling_mode == I915_TILING_NONE)
return size;
obj->tiling_mode == I915_TILING_NONE)
return obj->base.size;

/* Previous chips need a power-of-two fence region when tiling */
if (INTEL_INFO(dev)->gen == 3)
gtt_size = 1024*1024;
size = 1024*1024;
else
gtt_size = 512*1024;
size = 512*1024;

while (gtt_size < size)
gtt_size <<= 1;
while (size < obj->base.size)
size <<= 1;

return gtt_size;
return size;
}

/**
Expand All @@ -1402,52 +1403,59 @@ i915_gem_get_gtt_size(struct drm_device *dev, uint32_t size, int tiling_mode)
* potential fence register mapping.
*/
static uint32_t
i915_gem_get_gtt_alignment(struct drm_device *dev,
uint32_t size,
int tiling_mode)
i915_gem_get_gtt_alignment(struct drm_i915_gem_object *obj)
{
struct drm_device *dev = obj->base.dev;

/*
* Minimum alignment is 4k (GTT page size), but might be greater
* if a fence register is needed for the object.
*/
if (INTEL_INFO(dev)->gen >= 4 ||
tiling_mode == I915_TILING_NONE)
obj->tiling_mode == I915_TILING_NONE)
return 4096;

/*
* Previous chips need to be aligned to the size of the smallest
* fence register that can contain the object.
*/
return i915_gem_get_gtt_size(dev, size, tiling_mode);
return i915_gem_get_gtt_size(obj);
}

/**
* i915_gem_get_unfenced_gtt_alignment - return required GTT alignment for an
* unfenced object
* @dev: the device
* @size: size of the object
* @tiling_mode: tiling mode of the object
* @obj: object to check
*
* Return the required GTT alignment for an object, only taking into account
* unfenced tiled surface requirements.
*/
uint32_t
i915_gem_get_unfenced_gtt_alignment(struct drm_device *dev,
uint32_t size,
int tiling_mode)
i915_gem_get_unfenced_gtt_alignment(struct drm_i915_gem_object *obj)
{
struct drm_device *dev = obj->base.dev;
int tile_height;

/*
* Minimum alignment is 4k (GTT page size) for sane hw.
*/
if (INTEL_INFO(dev)->gen >= 4 || IS_G33(dev) ||
tiling_mode == I915_TILING_NONE)
obj->tiling_mode == I915_TILING_NONE)
return 4096;

/* Previous hardware however needs to be aligned to a power-of-two
* tile height. The simplest method for determining this is to reuse
* the power-of-tile object size.
/*
* Older chips need unfenced tiled buffers to be aligned to the left
* edge of an even tile row (where tile rows are counted as if the bo is
* placed in a fenced gtt region).
*/
return i915_gem_get_gtt_size(dev, size, tiling_mode);
if (IS_GEN2(dev))
tile_height = 16;
else if (obj->tiling_mode == I915_TILING_Y && HAS_128_BYTE_Y_TILING(dev))
tile_height = 32;
else
tile_height = 8;

return tile_height * obj->stride * 2;
}

int
Expand Down Expand Up @@ -2736,16 +2744,9 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj,
return -EINVAL;
}

fence_size = i915_gem_get_gtt_size(dev,
obj->base.size,
obj->tiling_mode);
fence_alignment = i915_gem_get_gtt_alignment(dev,
obj->base.size,
obj->tiling_mode);
unfenced_alignment =
i915_gem_get_unfenced_gtt_alignment(dev,
obj->base.size,
obj->tiling_mode);
fence_size = i915_gem_get_gtt_size(obj);
fence_alignment = i915_gem_get_gtt_alignment(obj);
unfenced_alignment = i915_gem_get_unfenced_gtt_alignment(obj);

if (alignment == 0)
alignment = map_and_fenceable ? fence_alignment :
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/gpu/drm/i915/i915_gem_tiling.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,7 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
/* Rebind if we need a change of alignment */
if (!obj->map_and_fenceable) {
u32 unfenced_alignment =
i915_gem_get_unfenced_gtt_alignment(dev,
obj->base.size,
args->tiling_mode);
i915_gem_get_unfenced_gtt_alignment(obj);
if (obj->gtt_offset & (unfenced_alignment - 1))
ret = i915_gem_object_unbind(obj);
}
Expand Down
15 changes: 1 addition & 14 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -4305,8 +4305,7 @@ static void intel_update_watermarks(struct drm_device *dev)

static inline bool intel_panel_use_ssc(struct drm_i915_private *dev_priv)
{
return dev_priv->lvds_use_ssc && i915_panel_use_ssc
&& !(dev_priv->quirks & QUIRK_LVDS_SSC_DISABLE);
return dev_priv->lvds_use_ssc && i915_panel_use_ssc;
}

static int i9xx_crtc_mode_set(struct drm_crtc *crtc,
Expand Down Expand Up @@ -7811,15 +7810,6 @@ static void quirk_pipea_force (struct drm_device *dev)
DRM_DEBUG_DRIVER("applying pipe a force quirk\n");
}

/*
* Some machines (Lenovo U160) do not work with SSC on LVDS for some reason
*/
static void quirk_ssc_force_disable(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
dev_priv->quirks |= QUIRK_LVDS_SSC_DISABLE;
}

struct intel_quirk {
int device;
int subsystem_vendor;
Expand Down Expand Up @@ -7848,9 +7838,6 @@ struct intel_quirk intel_quirks[] = {
/* 855 & before need to leave pipe A & dpll A up */
{ 0x3582, PCI_ANY_ID, PCI_ANY_ID, quirk_pipea_force },
{ 0x2562, PCI_ANY_ID, PCI_ANY_ID, quirk_pipea_force },

/* Lenovo U160 cannot use SSC on LVDS */
{ 0x0046, 0x17aa, 0x3920, quirk_ssc_force_disable },
};

static void intel_init_quirks(struct drm_device *dev)
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1737,7 +1737,7 @@ cifs_iovec_read(struct file *file, const struct iovec *iov,
io_parms.pid = pid;
io_parms.tcon = pTcon;
io_parms.offset = *poffset;
io_parms.length = len;
io_parms.length = cur_len;
rc = CIFSSMBRead(xid, &io_parms, &bytes_read,
&read_data, &buf_type);
pSMBr = (struct smb_com_read_rsp *)read_data;
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1813,6 +1813,8 @@ struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name,
tname = dentry->d_name.name;
i = dentry->d_inode;
prefetch(tname);
if (i)
prefetch(i);
/*
* This seqcount check is required to ensure name and
* len are loaded atomically, so as not to walk off the
Expand Down
14 changes: 9 additions & 5 deletions trunk/fs/fscache/page.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,20 +976,24 @@ void __fscache_uncache_all_inode_pages(struct fscache_cookie *cookie,

pagevec_init(&pvec, 0);
next = 0;
do {
if (!pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE))
break;
while (next <= (loff_t)-1 &&
pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)
) {
for (i = 0; i < pagevec_count(&pvec); i++) {
struct page *page = pvec.pages[i];
next = page->index;
pgoff_t page_index = page->index;

ASSERTCMP(page_index, >=, next);
next = page_index + 1;

if (PageFsCache(page)) {
__fscache_wait_on_page_write(cookie, page);
__fscache_uncache_page(cookie, page);
}
}
pagevec_release(&pvec);
cond_resched();
} while (++next);
}

_leave("");
}
Expand Down

0 comments on commit 7c4f466

Please sign in to comment.