sna: Tune the inplace cross-over point to be half-cache size
The theory being that we will also require cache space to copy from when uploading into the shadow. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
d53b1b2895
commit
c3a8d77a2b
|
|
@ -467,7 +467,7 @@ void kgem_init(struct kgem *kgem, int fd, struct pci_device *dev, int gen)
|
|||
kgem->wedged = drmCommandNone(kgem->fd, DRM_I915_GEM_THROTTLE) == -EIO;
|
||||
kgem->wedged |= DBG_NO_HW;
|
||||
|
||||
kgem->cpu_cache_pages = cpu_cache_size() >> 12;
|
||||
kgem->half_cpu_cache_pages = cpu_cache_size() >> 13;
|
||||
|
||||
list_init(&kgem->partial);
|
||||
list_init(&kgem->requests);
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ struct kgem {
|
|||
uint32_t has_relaxed_fencing :1;
|
||||
|
||||
uint16_t fence_max;
|
||||
uint16_t cpu_cache_pages;
|
||||
uint16_t half_cpu_cache_pages;
|
||||
uint32_t aperture_high, aperture_low, aperture;
|
||||
uint32_t aperture_fenced, aperture_mappable;
|
||||
uint32_t max_object_size;
|
||||
|
|
|
|||
|
|
@ -621,7 +621,7 @@ static inline bool pixmap_inplace(struct sna *sna,
|
|||
return true;
|
||||
|
||||
return (pixmap->devKind * pixmap->drawable.height >> 12) >
|
||||
sna->kgem.cpu_cache_pages;
|
||||
sna->kgem.half_cpu_cache_pages;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -783,7 +783,7 @@ static inline bool region_inplace(struct sna *sna,
|
|||
return ((region->extents.x2 - region->extents.x1) *
|
||||
(region->extents.y2 - region->extents.y1) *
|
||||
pixmap->drawable.bitsPerPixel >> 15)
|
||||
> sna->kgem.cpu_cache_pages;
|
||||
> sna->kgem.half_cpu_cache_pages;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Reference in New Issue