[PATCH 14/14] drm: kill agp indirection mess
There's no point in jumping through two indirections. So kill one and call the kernels agp functions directly. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_agpsupport.c | 40 +++-- drivers/gpu/drm/drm_memory.c | 12 ++ include/drm/drmP.h |5 3 files changed, 7 insertions(+), 50 deletions(-) diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c index ba38e01..252fdb9 100644 --- a/drivers/gpu/drm/drm_agpsupport.c +++ b/drivers/gpu/drm/drm_agpsupport.c @@ -193,7 +193,7 @@ int drm_agp_enable_ioctl(struct drm_device *dev, void *data, * \return zero on success or a negative number on failure. * * Verifies the AGP device is present and has been acquired, allocates the - * memory via alloc_agp() and creates a drm_agp_mem entry for it. + * memory via agp_allocate_memory() and creates a drm_agp_mem entry for it. */ int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request) { @@ -211,7 +211,7 @@ int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request) pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE; type = (u32) request->type; - if (!(memory = drm_alloc_agp(dev, pages, type))) { + if (!(memory = agp_allocate_memory(dev->agp->bridge, pages, type))) { kfree(entry); return -ENOMEM; } @@ -423,38 +423,6 @@ struct drm_agp_head *drm_agp_init(struct drm_device *dev) return head; } -/** Calls agp_allocate_memory() */ -DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data * bridge, -size_t pages, u32 type) -{ - return agp_allocate_memory(bridge, pages, type); -} - -/** Calls agp_free_memory() */ -int drm_agp_free_memory(DRM_AGP_MEM * handle) -{ - if (!handle) - return 0; - agp_free_memory(handle); - return 1; -} - -/** Calls agp_bind_memory() */ -int drm_agp_bind_memory(DRM_AGP_MEM * handle, off_t start) -{ - if (!handle) - return -EINVAL; - return agp_bind_memory(handle, start); -} - -/** Calls agp_unbind_memory() */ -int drm_agp_unbind_memory(DRM_AGP_MEM * handle) -{ - if (!handle) - return -EINVAL; - return agp_unbind_memory(handle); -} - /** * Binds a collection of pages into AGP memory at the given offset, returning * the AGP memory structure containing them. @@ -474,7 +442,7 @@ drm_agp_bind_pages(struct drm_device *dev, DRM_DEBUG("\n"); - mem = drm_agp_allocate_memory(dev->agp->bridge, num_pages, + mem = agp_allocate_memory(dev->agp->bridge, num_pages, type); if (mem == NULL) { DRM_ERROR("Failed to allocate memory for %ld pages\n", @@ -487,7 +455,7 @@ drm_agp_bind_pages(struct drm_device *dev, mem->page_count = num_pages; mem->is_flushed = true; - ret = drm_agp_bind_memory(mem, gtt_offset / PAGE_SIZE); + ret = agp_bind_memory(mem, gtt_offset / PAGE_SIZE); if (ret != 0) { DRM_ERROR("Failed to bind AGP memory: %d\n", ret); agp_free_memory(mem); diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c index 70ca27e..c9b8050 100644 --- a/drivers/gpu/drm/drm_memory.c +++ b/drivers/gpu/drm/drm_memory.c @@ -99,29 +99,23 @@ static void *agp_remap(unsigned long offset, unsigned long size, return addr; } -/** Wrapper around agp_allocate_memory() */ -DRM_AGP_MEM *drm_alloc_agp(struct drm_device * dev, int pages, u32 type) -{ - return drm_agp_allocate_memory(dev->agp->bridge, pages, type); -} - /** Wrapper around agp_free_memory() */ void drm_free_agp(DRM_AGP_MEM * handle, int pages) { - drm_agp_free_memory(handle); + agp_free_memory(handle); } EXPORT_SYMBOL(drm_free_agp); /** Wrapper around agp_bind_memory() */ int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start) { - return drm_agp_bind_memory(handle, start); + return agp_bind_memory(handle, start); } /** Wrapper around agp_unbind_memory() */ int drm_unbind_agp(DRM_AGP_MEM * handle) { - return drm_agp_unbind_memory(handle); + return agp_unbind_memory(handle); } EXPORT_SYMBOL(drm_unbind_agp); diff --git a/include/drm/drmP.h b/include/drm/drmP.h index eb80d54..30e827a 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1168,7 +1168,6 @@ extern int drm_mem_info(char *buf, char **start, off_t offset, extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area); extern void drm_free_agp(DRM_AGP_MEM * handle, int pages); -extern DRM_AGP_MEM *drm_alloc_agp(struct drm_device *dev, int pages, u32 type); extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start); extern DRM_AGP_MEM *drm_agp_bind_pages(struct drm_device *dev, struct page **pages, @@ -1328,10 +1327,6 @@ extern int drm_agp_unbind_ioctl(struct
[PATCH 13/14] drm: drop return value of drm_free_agp
No caller (rightly) cares about it, so drop it. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_memory.c |4 ++-- include/drm/drmP.h |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c index 7732268..70ca27e 100644 --- a/drivers/gpu/drm/drm_memory.c +++ b/drivers/gpu/drm/drm_memory.c @@ -106,9 +106,9 @@ DRM_AGP_MEM *drm_alloc_agp(struct drm_device * dev, int pages, u32 type) } /** Wrapper around agp_free_memory() */ -int drm_free_agp(DRM_AGP_MEM * handle, int pages) +void drm_free_agp(DRM_AGP_MEM * handle, int pages) { - return drm_agp_free_memory(handle) ? 0 : -EINVAL; + drm_agp_free_memory(handle); } EXPORT_SYMBOL(drm_free_agp); diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 0798ec5..eb80d54 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1167,8 +1167,8 @@ extern int drm_mem_info(char *buf, char **start, off_t offset, int request, int *eof, void *data); extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area); +extern void drm_free_agp(DRM_AGP_MEM * handle, int pages); extern DRM_AGP_MEM *drm_alloc_agp(struct drm_device *dev, int pages, u32 type); -extern int drm_free_agp(DRM_AGP_MEM * handle, int pages); extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start); extern DRM_AGP_MEM *drm_agp_bind_pages(struct drm_device *dev, struct page **pages, -- 1.7.1
[PATCH 12/14] drm: don't export dri1 locking functions
Only used by ioctl, not by any in-tree drivers. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_lock.c | 10 +++--- include/drm/drmP.h |1 - 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_lock.c b/drivers/gpu/drm/drm_lock.c index 1973d75..4b9007e 100644 --- a/drivers/gpu/drm/drm_lock.c +++ b/drivers/gpu/drm/drm_lock.c @@ -37,6 +37,8 @@ static int drm_notifier(void *priv); +static int drm_lock_take(struct drm_lock_data *lock_data, unsigned int context); + /** * Lock ioctl. * @@ -170,6 +172,7 @@ int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv) * * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction. */ +static int drm_lock_take(struct drm_lock_data *lock_data, unsigned int context) { @@ -206,7 +209,6 @@ int drm_lock_take(struct drm_lock_data *lock_data, } return 0; } -EXPORT_SYMBOL(drm_lock_take); /** * This takes a lock forcibly and hands it to context. Should ONLY be used @@ -274,7 +276,6 @@ int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context) wake_up_interruptible(_data->lock_queue); return 0; } -EXPORT_SYMBOL(drm_lock_free); /** * If we get here, it means that the process has called DRM_IOCTL_LOCK @@ -337,7 +338,6 @@ void drm_idlelock_take(struct drm_lock_data *lock_data) } spin_unlock_bh(_data->spinlock); } -EXPORT_SYMBOL(drm_idlelock_take); void drm_idlelock_release(struct drm_lock_data *lock_data) { @@ -357,8 +357,6 @@ void drm_idlelock_release(struct drm_lock_data *lock_data) } spin_unlock_bh(_data->spinlock); } -EXPORT_SYMBOL(drm_idlelock_release); - int drm_i_have_hw_lock(struct drm_device *dev, struct drm_file *file_priv) { @@ -367,5 +365,3 @@ int drm_i_have_hw_lock(struct drm_device *dev, struct drm_file *file_priv) _DRM_LOCK_IS_HELD(master->lock.hw_lock->lock) && master->lock.file_priv == file_priv); } - -EXPORT_SYMBOL(drm_i_have_hw_lock); diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 07514bf..0798ec5 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1234,7 +1234,6 @@ extern int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv); extern int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv); -extern int drm_lock_take(struct drm_lock_data *lock_data, unsigned int context); extern int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context); extern void drm_idlelock_take(struct drm_lock_data *lock_data); extern void drm_idlelock_release(struct drm_lock_data *lock_data); -- 1.7.1
[PATCH 11/14] drm: kill gem_free_object_unlocked driver callback
Not used by any current driver. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_gem.c |4 +--- include/drm/drmP.h|1 - 2 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index bf92d07..cff7317 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -474,9 +474,7 @@ drm_gem_object_free_unlocked(struct kref *kref) struct drm_gem_object *obj = (struct drm_gem_object *) kref; struct drm_device *dev = obj->dev; - if (dev->driver->gem_free_object_unlocked != NULL) - dev->driver->gem_free_object_unlocked(obj); - else if (dev->driver->gem_free_object != NULL) { + if (dev->driver->gem_free_object != NULL) { mutex_lock(>struct_mutex); dev->driver->gem_free_object(obj); mutex_unlock(>struct_mutex); diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 29e3df8..07514bf 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -799,7 +799,6 @@ struct drm_driver { */ int (*gem_init_object) (struct drm_gem_object *obj); void (*gem_free_object) (struct drm_gem_object *obj); - void (*gem_free_object_unlocked) (struct drm_gem_object *obj); /* vga arb irq handler */ void (*vgaarb_irq)(struct drm_device *dev, bool state); -- 1.7.1
[PATCH 10/14] drm: kill dev->timer
Totally unused. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_drv.c |2 -- drivers/gpu/drm/drm_stub.c |1 - include/drm/drmP.h |1 - 3 files changed, 0 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index a35a410..5ff75a3 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -180,8 +180,6 @@ int drm_lastclose(struct drm_device * dev) mutex_lock(>struct_mutex); - del_timer(>timer); - /* Clear AGP information */ if (drm_core_has_AGP(dev) && dev->agp && !drm_core_check_feature(dev, DRIVER_MODESET)) { diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index f797ae9..cdc89ee 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c @@ -241,7 +241,6 @@ int drm_fill_in_dev(struct drm_device *dev, spin_lock_init(>count_lock); spin_lock_init(>event_lock); - init_timer(>timer); mutex_init(>struct_mutex); mutex_init(>ctxlist_mutex); diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 2cf102d..29e3df8 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -964,7 +964,6 @@ struct drm_device { __volatile__ long context_flag; /**< Context swapping flag */ __volatile__ long interrupt_flag; /**< Interruption handler flag */ __volatile__ long dma_flag; /**< DMA dispatch flag */ - struct timer_list timer;/**< Timer for delaying ctx switch */ wait_queue_head_t context_wait; /**< Processes waiting on ctx switch */ int last_checked; /**< Last context checked for DMA */ int last_context; /**< Last current context */ -- 1.7.1
[PATCH 09/14] drm: replace drawable ioctl by noops
The information supplied by userspace through these ioctls is only accessible by dev->drw_idr. But there's no in-tree user of that. Also userspace does not really care about return values of these ioctls, either. Only hw/xfree86/dri/dri.c from the xserver actually checks the return from adddraw and keeps on trying to create a kernel drawable every time somebody creates a dri drawable. But since that's now a noop, who cares. Therefore it's safe to replace these three ioctls with noops and rip out the implementation. Signed-off-by: Daniel Vetter Reviewed-by: Kristian H?gsberg Reviewed-by: Michel D?nzer --- drivers/gpu/drm/Makefile |2 +- drivers/gpu/drm/drm_drawable.c | 197 drivers/gpu/drm/drm_drv.c |8 +- drivers/gpu/drm/drm_stub.c |3 - include/drm/drmP.h | 15 --- 5 files changed, 4 insertions(+), 221 deletions(-) delete mode 100644 drivers/gpu/drm/drm_drawable.c diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index f3a23a3..997c43d 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -5,7 +5,7 @@ ccflags-y := -Iinclude/drm drm-y := drm_auth.o drm_buffer.o drm_bufs.o drm_cache.o \ - drm_context.o drm_dma.o drm_drawable.o \ + drm_context.o drm_dma.o \ drm_drv.o drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \ drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \ drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \ diff --git a/drivers/gpu/drm/drm_drawable.c b/drivers/gpu/drm/drm_drawable.c deleted file mode 100644 index 170e531..000 --- a/drivers/gpu/drm/drm_drawable.c +++ /dev/null @@ -1,197 +0,0 @@ -/** - * \file drm_drawable.c - * IOCTLs for drawables - * - * \author Rickard E. (Rik) Faith - * \author Gareth Hughes - * \author Michel D?nzer - */ - -/* - * Created: Tue Feb 2 08:37:54 1999 by faith at valinux.com - * - * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. - * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. - * Copyright 2006 Tungsten Graphics, Inc., Bismarck, North Dakota. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "drmP.h" - -/** - * Allocate drawable ID and memory to store information about it. - */ -int drm_adddraw(struct drm_device *dev, void *data, struct drm_file *file_priv) -{ - unsigned long irqflags; - struct drm_draw *draw = data; - int new_id = 0; - int ret; - -again: - if (idr_pre_get(>drw_idr, GFP_KERNEL) == 0) { - DRM_ERROR("Out of memory expanding drawable idr\n"); - return -ENOMEM; - } - - spin_lock_irqsave(>drw_lock, irqflags); - ret = idr_get_new_above(>drw_idr, NULL, 1, _id); - if (ret == -EAGAIN) { - spin_unlock_irqrestore(>drw_lock, irqflags); - goto again; - } - - spin_unlock_irqrestore(>drw_lock, irqflags); - - draw->handle = new_id; - - DRM_DEBUG("%d\n", draw->handle); - - return 0; -} - -/** - * Free drawable ID and memory to store information about it. - */ -int drm_rmdraw(struct drm_device *dev, void *data, struct drm_file *file_priv) -{ - struct drm_draw *draw = data; - unsigned long irqflags; - struct drm_drawable_info *info; - - spin_lock_irqsave(>drw_lock, irqflags); - - info = drm_get_drawable_info(dev, draw->handle); - if (info == NULL) { - spin_unlock_irqrestore(>drw_lock, irqflags); - return -EINVAL; - } - kfree(info->rects); - kfree(info); - - idr_remove(>drw_idr, draw->handle); - - spin_unlock_irqrestore(>drw_lock, irqflags); - DRM_DEBUG("%d\n", draw->handle); - return 0; -} - -int drm_update_drawable_info(struct drm_device *dev, void *data, struct drm_file
[PATCH 06/14] drm: kill get_reg_ofs callback
Every driver used the default implementation. Fold that one into the only callsite and drop the callback. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_vm.c |6 ++ drivers/gpu/drm/i810/i810_drv.c |1 - drivers/gpu/drm/i830/i830_drv.c |1 - drivers/gpu/drm/i915/i915_drv.c |1 - drivers/gpu/drm/mga/mga_drv.c |1 - drivers/gpu/drm/nouveau/nouveau_drv.c |1 - drivers/gpu/drm/r128/r128_drv.c |1 - drivers/gpu/drm/radeon/radeon_drv.c |2 -- drivers/gpu/drm/savage/savage_drv.c |1 - drivers/gpu/drm/sis/sis_drv.c |1 - drivers/gpu/drm/tdfx/tdfx_drv.c |1 - drivers/gpu/drm/via/via_drv.c |1 - drivers/gpu/drm/vmwgfx/vmwgfx_drv.c |1 - include/drm/drmP.h|2 -- 14 files changed, 2 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index 2fea2e6..ee879d6 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -515,7 +515,7 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma) return 0; } -resource_size_t drm_core_get_reg_ofs(struct drm_device *dev) +static resource_size_t drm_core_get_reg_ofs(struct drm_device *dev) { #ifdef __alpha__ return dev->hose->dense_mem_base - dev->hose->mem_space->start; @@ -524,8 +524,6 @@ resource_size_t drm_core_get_reg_ofs(struct drm_device *dev) #endif } -EXPORT_SYMBOL(drm_core_get_reg_ofs); - /** * mmap DMA memory. * @@ -612,7 +610,7 @@ int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) #endif case _DRM_FRAME_BUFFER: case _DRM_REGISTERS: - offset = dev->driver->get_reg_ofs(dev); + offset = drm_core_get_reg_ofs(dev); vma->vm_flags |= VM_IO; /* not in core dump */ vma->vm_page_prot = drm_io_prot(map->type, vma); #if !defined(__arm__) diff --git a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c index 084a85c..1c73b0c 100644 --- a/drivers/gpu/drm/i810/i810_drv.c +++ b/drivers/gpu/drm/i810/i810_drv.c @@ -52,7 +52,6 @@ static struct drm_driver driver = { .device_is_agp = i810_driver_device_is_agp, .reclaim_buffers_locked = i810_driver_reclaim_buffers_locked, .dma_quiescent = i810_driver_dma_quiescent, - .get_reg_ofs = drm_core_get_reg_ofs, .ioctls = i810_ioctls, .fops = { .owner = THIS_MODULE, diff --git a/drivers/gpu/drm/i830/i830_drv.c b/drivers/gpu/drm/i830/i830_drv.c index 1635295..7140ffc 100644 --- a/drivers/gpu/drm/i830/i830_drv.c +++ b/drivers/gpu/drm/i830/i830_drv.c @@ -57,7 +57,6 @@ static struct drm_driver driver = { .device_is_agp = i830_driver_device_is_agp, .reclaim_buffers_locked = i830_driver_reclaim_buffers_locked, .dma_quiescent = i830_driver_dma_quiescent, - .get_reg_ofs = drm_core_get_reg_ofs, #if USE_IRQS .irq_preinstall = i830_driver_irq_preinstall, .irq_postinstall = i830_driver_irq_postinstall, diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 6d7e4cd..f627380 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -523,7 +523,6 @@ static struct drm_driver driver = { .irq_uninstall = i915_driver_irq_uninstall, .irq_handler = i915_driver_irq_handler, .reclaim_buffers = drm_core_reclaim_buffers, - .get_reg_ofs = drm_core_get_reg_ofs, .master_create = i915_master_create, .master_destroy = i915_master_destroy, #if defined(CONFIG_DEBUG_FS) diff --git a/drivers/gpu/drm/mga/mga_drv.c b/drivers/gpu/drm/mga/mga_drv.c index e9c0cbc..65ea42c 100644 --- a/drivers/gpu/drm/mga/mga_drv.c +++ b/drivers/gpu/drm/mga/mga_drv.c @@ -60,7 +60,6 @@ static struct drm_driver driver = { .irq_uninstall = mga_driver_irq_uninstall, .irq_handler = mga_driver_irq_handler, .reclaim_buffers = drm_core_reclaim_buffers, - .get_reg_ofs = drm_core_get_reg_ofs, .ioctls = mga_ioctls, .dma_ioctl = mga_dma_buffers, .fops = { diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c index 0d64259..209912a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.c +++ b/drivers/gpu/drm/nouveau/nouveau_drv.c @@ -379,7 +379,6 @@ static struct drm_driver driver = { .irq_uninstall = nouveau_irq_uninstall, .irq_handler = nouveau_irq_handler, .reclaim_buffers = drm_core_reclaim_buffers, - .get_reg_ofs = drm_core_get_reg_ofs, .ioctls = nouveau_ioctls, .fops = { .owner = THIS_MODULE, diff --git a/drivers/gpu/drm/r128/r128_drv.c b/drivers/gpu/drm/r128/r128_drv.c index 42ec20a..67309f8 100644 --- a/drivers/gpu/drm/r128/r128_drv.c +++ b/drivers/gpu/drm/r128/r128_drv.c @@ -56,7 +56,6 @@ static struct drm_driver driver = { .irq_uninstall = r128_driver_irq_uninstall,
[PATCH 05/14] drm: kill drm_map_ofs callbacks
All drivers happily copy the default implementation without checking whether this callback is used at all. It's not. Sigh. Kill it. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_vm.c |7 --- drivers/gpu/drm/i810/i810_drv.c |1 - drivers/gpu/drm/i830/i830_drv.c |1 - drivers/gpu/drm/i915/i915_drv.c |1 - drivers/gpu/drm/mga/mga_drv.c |1 - drivers/gpu/drm/nouveau/nouveau_drv.c |1 - drivers/gpu/drm/r128/r128_drv.c |1 - drivers/gpu/drm/radeon/radeon_drv.c |2 -- drivers/gpu/drm/savage/savage_drv.c |1 - drivers/gpu/drm/sis/sis_drv.c |1 - drivers/gpu/drm/tdfx/tdfx_drv.c |1 - drivers/gpu/drm/via/via_drv.c |1 - drivers/gpu/drm/vmwgfx/vmwgfx_drv.c |1 - include/drm/drmP.h|2 -- 14 files changed, 0 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index fda6746..2fea2e6 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -515,13 +515,6 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma) return 0; } -resource_size_t drm_core_get_map_ofs(struct drm_local_map * map) -{ - return map->offset; -} - -EXPORT_SYMBOL(drm_core_get_map_ofs); - resource_size_t drm_core_get_reg_ofs(struct drm_device *dev) { #ifdef __alpha__ diff --git a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c index b4250b2..084a85c 100644 --- a/drivers/gpu/drm/i810/i810_drv.c +++ b/drivers/gpu/drm/i810/i810_drv.c @@ -52,7 +52,6 @@ static struct drm_driver driver = { .device_is_agp = i810_driver_device_is_agp, .reclaim_buffers_locked = i810_driver_reclaim_buffers_locked, .dma_quiescent = i810_driver_dma_quiescent, - .get_map_ofs = drm_core_get_map_ofs, .get_reg_ofs = drm_core_get_reg_ofs, .ioctls = i810_ioctls, .fops = { diff --git a/drivers/gpu/drm/i830/i830_drv.c b/drivers/gpu/drm/i830/i830_drv.c index a5c66aa..1635295 100644 --- a/drivers/gpu/drm/i830/i830_drv.c +++ b/drivers/gpu/drm/i830/i830_drv.c @@ -57,7 +57,6 @@ static struct drm_driver driver = { .device_is_agp = i830_driver_device_is_agp, .reclaim_buffers_locked = i830_driver_reclaim_buffers_locked, .dma_quiescent = i830_driver_dma_quiescent, - .get_map_ofs = drm_core_get_map_ofs, .get_reg_ofs = drm_core_get_reg_ofs, #if USE_IRQS .irq_preinstall = i830_driver_irq_preinstall, diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 5044f65..6d7e4cd 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -523,7 +523,6 @@ static struct drm_driver driver = { .irq_uninstall = i915_driver_irq_uninstall, .irq_handler = i915_driver_irq_handler, .reclaim_buffers = drm_core_reclaim_buffers, - .get_map_ofs = drm_core_get_map_ofs, .get_reg_ofs = drm_core_get_reg_ofs, .master_create = i915_master_create, .master_destroy = i915_master_destroy, diff --git a/drivers/gpu/drm/mga/mga_drv.c b/drivers/gpu/drm/mga/mga_drv.c index 26d0d8c..e9c0cbc 100644 --- a/drivers/gpu/drm/mga/mga_drv.c +++ b/drivers/gpu/drm/mga/mga_drv.c @@ -60,7 +60,6 @@ static struct drm_driver driver = { .irq_uninstall = mga_driver_irq_uninstall, .irq_handler = mga_driver_irq_handler, .reclaim_buffers = drm_core_reclaim_buffers, - .get_map_ofs = drm_core_get_map_ofs, .get_reg_ofs = drm_core_get_reg_ofs, .ioctls = mga_ioctls, .dma_ioctl = mga_dma_buffers, diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c index 1de5eb5..0d64259 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.c +++ b/drivers/gpu/drm/nouveau/nouveau_drv.c @@ -379,7 +379,6 @@ static struct drm_driver driver = { .irq_uninstall = nouveau_irq_uninstall, .irq_handler = nouveau_irq_handler, .reclaim_buffers = drm_core_reclaim_buffers, - .get_map_ofs = drm_core_get_map_ofs, .get_reg_ofs = drm_core_get_reg_ofs, .ioctls = nouveau_ioctls, .fops = { diff --git a/drivers/gpu/drm/r128/r128_drv.c b/drivers/gpu/drm/r128/r128_drv.c index 1e2971f..42ec20a 100644 --- a/drivers/gpu/drm/r128/r128_drv.c +++ b/drivers/gpu/drm/r128/r128_drv.c @@ -56,7 +56,6 @@ static struct drm_driver driver = { .irq_uninstall = r128_driver_irq_uninstall, .irq_handler = r128_driver_irq_handler, .reclaim_buffers = drm_core_reclaim_buffers, - .get_map_ofs = drm_core_get_map_ofs, .get_reg_ofs = drm_core_get_reg_ofs, .ioctls = r128_ioctls, .dma_ioctl = r128_cce_buffers, diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 795403b..8fd89bb 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -203,7 +203,6 @@ static struct drm_driver
[PATCH 04/14] drm: kill procfs callbacks
Not used by any driver (rightly so!). Kill them. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_proc.c | 13 - include/drm/drmP.h |2 -- 2 files changed, 0 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/drm_proc.c b/drivers/gpu/drm/drm_proc.c index a9ba6b6..e571de5 100644 --- a/drivers/gpu/drm/drm_proc.c +++ b/drivers/gpu/drm/drm_proc.c @@ -151,7 +151,6 @@ fail: int drm_proc_init(struct drm_minor *minor, int minor_id, struct proc_dir_entry *root) { - struct drm_device *dev = minor->dev; char name[64]; int ret; @@ -172,14 +171,6 @@ int drm_proc_init(struct drm_minor *minor, int minor_id, return ret; } - if (dev->driver->proc_init) { - ret = dev->driver->proc_init(minor); - if (ret) { - DRM_ERROR("DRM: Driver failed to initialize " - "/proc/dri.\n"); - return ret; - } - } return 0; } @@ -216,15 +207,11 @@ int drm_proc_remove_files(struct drm_info_list *files, int count, */ int drm_proc_cleanup(struct drm_minor *minor, struct proc_dir_entry *root) { - struct drm_device *dev = minor->dev; char name[64]; if (!root || !minor->proc_root) return 0; - if (dev->driver->proc_cleanup) - dev->driver->proc_cleanup(minor); - drm_proc_remove_files(drm_proc_list, DRM_PROC_ENTRIES, minor); sprintf(name, "%d", minor->index); diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 3dd8796..d5a2b88 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -791,8 +791,6 @@ struct drm_driver { void (*master_drop)(struct drm_device *dev, struct drm_file *file_priv, bool from_release); - int (*proc_init)(struct drm_minor *minor); - void (*proc_cleanup)(struct drm_minor *minor); int (*debugfs_init)(struct drm_minor *minor); void (*debugfs_cleanup)(struct drm_minor *minor); -- 1.7.1
[PATCH 02/14] drm: kill kernel_context_switch callbacks
Not used by any in-kernel driver. So drop it. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_lock.c | 18 -- include/drm/drmP.h |3 --- 2 files changed, 0 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/drm_lock.c b/drivers/gpu/drm/drm_lock.c index e2f70a5..566d203 100644 --- a/drivers/gpu/drm/drm_lock.c +++ b/drivers/gpu/drm/drm_lock.c @@ -134,12 +134,6 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv) } } - if (dev->driver->kernel_context_switch && - dev->last_context != lock->context) { - dev->driver->kernel_context_switch(dev, dev->last_context, - lock->context); - } - return 0; } @@ -157,7 +151,6 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv) int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_lock *lock = data; - struct drm_master *master = file_priv->master; if (lock->context == DRM_KERNEL_CONTEXT) { DRM_ERROR("Process %d using kernel context %d\n", @@ -167,17 +160,6 @@ int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv) atomic_inc(>counts[_DRM_STAT_UNLOCKS]); - /* kernel_context_switch isn't used by any of the x86 drm -* modules but is required by the Sparc driver. -*/ - if (dev->driver->kernel_context_switch_unlock) - dev->driver->kernel_context_switch_unlock(dev); - else { - if (drm_lock_free(>lock, lock->context)) { - /* FIXME: Should really bail out here. */ - } - } - unblock_all_signals(); return 0; } diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 7809d23..15ea8c4 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -703,9 +703,6 @@ struct drm_driver { int (*dma_quiescent) (struct drm_device *); int (*context_ctor) (struct drm_device *dev, int context); int (*context_dtor) (struct drm_device *dev, int context); - int (*kernel_context_switch) (struct drm_device *dev, int old, - int new); - void (*kernel_context_switch_unlock) (struct drm_device *dev); /** * get_vblank_counter - get raw hardware vblank counter -- 1.7.1
[patch] i915: signedness bugs in i915 ring buffer
"ring->space" is unsigned so it's never less than zero. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 51e9c9e..a331898 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -208,9 +208,10 @@ static int init_ring_common(struct drm_device *dev, else { ring->head = ring->get_head(dev, ring); ring->tail = ring->get_tail(dev, ring); - ring->space = ring->head - (ring->tail + 8); - if (ring->space < 0) - ring->space += ring->size; + if (ring->head >= ring->tail + 8) + ring->space = ring->head - (ring->tail + 8); + else + ring->space = ring->head - (ring->tail + 8) + ring->size; } return 0; } @@ -666,9 +667,10 @@ int intel_init_ring_buffer(struct drm_device *dev, else { ring->head = ring->get_head(dev, ring); ring->tail = ring->get_tail(dev, ring); - ring->space = ring->head - (ring->tail + 8); - if (ring->space < 0) - ring->space += ring->size; + if (ring->head >= ring->tail + 8) + ring->space = ring->head - (ring->tail + 8); + else + ring->space = ring->head - (ring->tail + 8) + ring->size; } INIT_LIST_HEAD(>active_list); INIT_LIST_HEAD(>request_list); @@ -735,9 +737,10 @@ int intel_wait_ring_buffer(struct drm_device *dev, end = jiffies + 3 * HZ; do { ring->head = ring->get_head(dev, ring); - ring->space = ring->head - (ring->tail + 8); - if (ring->space < 0) - ring->space += ring->size; + if (ring->head >= ring->tail + 8) + ring->space = ring->head - (ring->tail + 8); + else + ring->space = ring->head - (ring->tail + 8) + ring->size; if (ring->space >= n) { trace_i915_ring_wait_end (dev); return 0; diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 44af317..707f32f 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -109,9 +109,10 @@ void i915_kernel_lost_context(struct drm_device * dev) ring->head = I915_READ(PRB0_HEAD) & HEAD_ADDR; ring->tail = I915_READ(PRB0_TAIL) & TAIL_ADDR; - ring->space = ring->head - (ring->tail + 8); - if (ring->space < 0) - ring->space += ring->size; + if (ring->head >= ring->tail + 8) + ring->space = ring->head - (ring->tail + 8); + else + ring->space = ring->head - (ring->tail + 8) + ring->size; if (!dev->primary->master) return;
[now bisected] i915: 2.6.36-rc2 hoses my Intel display
On Tue, 24 Aug 2010 00:37:52 +0100 Chris Wilson wrote: > drm.debug=0x4 should print the right information for this bug. That doesn't seem to give me any output at all. One thing I noticed, though, is that I occasionally get something like: Aug 23 17:43:14 bike kernel: [ 142.920185] [drm:intel_calculate_wm] *ERROR* Insufficient FIFO for plane, expect flickering: entries required = 51, available = 28. They seem to come in threes, for whatever that's worth. Thanks, jon
PROBLEM: oops in nouveau driver in 2.6.36-rc*
Hi, Since 2.6.36-rc1 I have an oops when loading the nouveau driver. The system woks ok expect for the nouveau driver and the console gets corrupted :( I attach relevant informations in attached files : o dmesg output for 2.6.36-rc2-git1 o ksymoops output for the above file If you need more informations please let me know. If you want me to test patches let me know. If you want me to run a git bissect let me know. thanx for your help. Other relevant informations: Output of ver_linux : Linux flocon 2.6.36-rc2-git1 #81 SMP PREEMPT Mon Aug 23 15:14:05 CEST 2010 i686 GNU/Linux Gnu C 4.4.5 Gnu make 3.81 binutils 2.20.1 util-linux 2.17.2 mount support module-init-tools 3.12 e2fsprogs 1.41.12 jfsutils 1.1.12 xfsprogs 3.1.2 pcmciautils015 Linux C Library2.11.2 Dynamic linker (ldd) 2.11.2 Procps 3.2.8 Net-tools 1.60 Console-tools 0.2.3 Sh-utils 8.5 wireless-tools 30 Modules Loaded nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs fuse snd_intel8x0 snd_ac97_codec nouveau ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm ttm firewire_ohci snd_seq sg cb710_mmc uhci_hcd snd_timer firewire_core mmc_core drm_kms_helper sr_mod 8139too ehci_hcd snd_seq_device snd crc_itu_t usbcore cb710 ohci1394 cdrom 8139cp soundcore cfbcopyarea snd_page_alloc cfbimgblt ieee1394 intel_agp cfbfillrect battery ac btrfs crc32c libcrc32c sd_mod Output of lspci : 00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02) Subsystem: Hewlett-Packard Company NX9500 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- Capabilities: [a0] AGP version 3.0 Status: RQ=32 Iso- ArqSz=2 Cal=2 SBA+ ITACoh- GART64- HTrans- 64bit- FW+ AGP3+ Rate=x4,x8 Command: RQ=1 ArqSz=0 Cal=2 SBA- AGP+ GART64- 64bit- FW- Rate= Kernel driver in use: agpgart-intel 00:01.0 PCI bridge: Intel Corporation 82865G/PE/P PCI to AGP Controller (rev 02) (prog-if 00 [Normal decode]) Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- Status: Cap- 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B- PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- 00:06.0 System peripheral: Intel Corporation 82865G/PE/P Processor to I/O Memory Interface (rev ff) (prog-if ff) !!! Unknown header type 7f 00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02) (prog-if 00 [UHCI]) Subsystem: Hewlett-Packard Company NX9500 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B- PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- 00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02) Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- [disabled] Capabilities: [60] Power Management version 2 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- Capabilities: [44] AGP version 3.0 Status: RQ=32 Iso- ArqSz=0 Cal=3 SBA+ ITACoh- GART64- HTrans- 64bit- FW+ AGP3+ Rate=x4,x8 Command: RQ=1 ArqSz=0 Cal=0 SBA- AGP- GART64- 64bit- FW- Rate= Kernel driver in use: nouveau 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10) Subsystem: Hewlett-Packard Company NX9500 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- Reset+ 16bInt- PostWrite- 16-bit legacy interface ports at 0001 02:01.1 FLASH memory: ENE Technology Inc CB710 Memory Card Reader Controller Subsystem: Hewlett-Packard Company NX9500 Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- http://logidee.com -- next part -- one start PFN for each node early_node_map[2] active PFN ranges 0: 0x0001 -> 0x009f
[now bisected] i915: 2.6.36-rc2 hoses my Intel display
On Mon, 23 Aug 2010 23:36:55 +0100 Chris Wilson wrote: > Taking the patch at face value, the cause should be a mistake in error > handling. So the first step would be to identify which i2c_transfer() > failed. OK, I tried it, but neither warning triggers. Don't know if it helps or not, but I tried booting with drm.debug=0x05. The result was truly vast amounts of stuff like this: Aug 23 17:20:59 bike kernel: m:drm_ioctl], pid=2032, cmd=0x6458 nm:drm_ioctl], pid=2032, cmd=0x6458, nm:drm_ioctl], pid=2032, cmd=0x645 m:drm_ioctl], pid=2032, cmd=0x6458 m:drm_ioctl], pid=2032, cmd=0x6458, m:drm_ioctl], pid=2032, cmd=0x6458, nm:drm_ioctl], pid=2032, cmd=0x6458 nm:drm_ioctl], pid=2032, cmd=0x6458 m:drm_ioctl], pid=2032, cmd=0x6458 nm:drm_ioctl], pid=2032, cmd=0x6458 nm:drm_ioctl], pid=2032, cmd=0x6458, nm:drm_ioctl], pid=2032, cmd=0x6458, nm:drm_ioctl], pid=2032, cmd=0x6458 nm:drm_ioctl], pid=2032, cmd=0x6458 m:drm_ioctl], pid=2032, cmd=0x6458 nm:drm_ioctl], pid=2032, cmd=0x6458, nm:drm_ioctl], pid=2032, cmd=0x6458 m:drm_ioctl], pid=2032, cmd=0x6458 nm:drm_ioctl], pid=2032, cmd=0x6458, nm:drm_ioctl], pid=2032, cmd=0x6458 m:drm_ioctl], pid=2032, cmd=0x6458 nm:drm_ioctl], pid=2032, cmd=0x6458 nm:drm_ioctl], pid=2032, cmd=0x6458, nm:drm_ioctl], pid=2032, cmd=0x6458, m:drm_ioctl], pid=2032, cmd=0x6458, nm:drm_ioctl], pid=2032, cmd=0x6458 nm:drm_ioctl], pid=2032, cmd=0x6458 nm:drm_ioctl], pid=2032, c The above is one line from the system log; I took the liberty of wrapping it for readability. jon
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
https://bugs.freedesktop.org/show_bug.cgi?id=28294 Bug 28294 depends on bug 29722, which changed state. Bug 29722 Summary: [glsl] Unigine Sanctuary v2.2 assertion failed https://bugs.freedesktop.org/show_bug.cgi?id=29722 What|Old Value |New Value Status|NEW |ASSIGNED Resolution||FIXED Status|ASSIGNED|RESOLVED -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 29738] SIGBUS after upgrade to 2.6.36-rc1-git4 [full stacktrace]
https://bugs.freedesktop.org/show_bug.cgi?id=29738 --- Comment #5 from Till Matthiesen 2010-08-23 17:17:27 PDT --- All I can tell so far is that it looks like this behaviour was introduced somewhere between 2.6.35-git2 and 2.6.35-git3. As Alexandre said, it is not straight forward to trigger. I might (don't think so) have missed it in 2.6.35-git2 but X crashed with 2.6.35-git3 shortly after a few resizes of the mplayer window. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 29738] SIGBUS after upgrade to 2.6.36-rc1-git4 [full stacktrace]
https://bugs.freedesktop.org/show_bug.cgi?id=29738 --- Comment #4 from Alexandre 2010-08-23 16:37:19 PDT --- I will try to bisect. It will take a while because I still have not found a consistent a way to trigger the bug. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[now bisected] i915: 2.6.36-rc2 hoses my Intel display
On Mon, 23 Aug 2010 11:01:45 -0600 Jonathan Corbet wrote: > So I decided to fire up -rc2 today to see what would happen...the > results are best described by the attached images. Something is > clearly scrambled between my hardware and the i915 driver. Display with X > is hosed, but things go weird before X gets a chance to run (it is worth > noting that the initial output from the kernel is legible). I went ahead and bisected the problem, which was added between -rc1 and -rc2. The end result is this: 32aad86fe88e7323d4fc5e9e423abcee0d55a03d is the first bad commit commit 32aad86fe88e7323d4fc5e9e423abcee0d55a03d Author: Chris Wilson Date: Wed Aug 4 13:50:25 2010 +0100 drm/i915/sdvo: Propagate errors from reading/writing control bus. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt I don't know the driver or the hardware and can't begin to guess what went wrong in that patch, but, hopefully, the information is useful to somebody. Please let me know if there's anything else I can do to help track this down. Thanks, jon
[PATCH] agp/intel: Fix dma mask for Sandybridge
On 2010.08.23 08:31:42 +0200, Takashi Iwai wrote: > > bit 31 bit 11 bit 4 > > bit 0 > >|<-physical addr 31:12->|<-physical addr 39:32->|<-cache ctl 3:1->|valid| > > Then I really don't understand why it works. > You shift 28bit and mask with 0xff. Obviously it overwrite bits 0:3 > with original 28:31 bits. Masking 0xff0 fixes the issue. > ah, sorry, my stupid. Thanks for catching this! Subject: [PATCH] agp/intel: fix physical address mask bits for sandybridge It should shift bit 39-32 into pte's bit 11-4. Reported-by: Takashi Iwai Signed-off-by: Zhenyu Wang --- drivers/char/agp/intel-gtt.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index d22ffb8..0edfc87 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c @@ -1333,8 +1333,8 @@ static unsigned long intel_i965_mask_memory(struct agp_bridge_data *bridge, static unsigned long intel_gen6_mask_memory(struct agp_bridge_data *bridge, dma_addr_t addr, int type) { - /* Shift high bits down */ - addr |= (addr >> 28) & 0xff; + /* gen6 has bit11-4 for physical addr bit39-32 */ + addr |= (addr >> 28) & 0xff0; /* Type checking must be done elsewhere */ return addr | bridge->driver->masks[type].mask; -- 1.7.0.4 -- Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20100823/d3e38890/attachment.pgp>
[PATCH] agp/intel: Fix dma mask for Sandybridge
On 2010.08.23 07:29:29 +0200, Takashi Iwai wrote: > > Sandybridge can do 40-bit dma mask. This has been fixed upstream now. > > Could you point where is the upstream GIT tree and the corresponding > commit id? > Linus's tree: commit 877fdacf8291d7627f339885b5ae52c2f6061734 Author: Zhenyu Wang Date: Thu Aug 19 09:46:13 2010 +0800 agp/intel: set 40-bit dma mask on Sandybridge Signed-off-by: Zhenyu Wang Signed-off-by: Eric Anholt -- Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20100823/f0dc7e14/attachment.pgp>
[PATCH] fix i915 compile in 2.6.36-rc2
Commit 6ef3d4278034982c13df87c4a51e0445f762d316 introduces seq_file usage in intel_overlay.c but does not include the header and now compilation fails on i386. Fix it by including the necessary header. Signed-off-by: Meelis Roos diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index 4f00390..7e4b378 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c @@ -25,6 +25,7 @@ * * Derived from Xorg ddx, xf86-video-intel, src/i830_video.c */ +#include #include "drmP.h" #include "drm.h" #include "i915_drm.h" -- Meelis Roos (mroos at linux.ee)
[patch] i915: remove unneed NULL checks
On Wed, Jun 23, 2010 at 07:06:22PM +0200, Dan Carpenter wrote: > We don't need to check the list cursor in a list_for_each_entry(). It's > always non-null. > Here is another one that never got applied. I has a sad face. :( regards, dan carpenter > Signed-off-by: Dan Carpenter > > diff --git a/drivers/gpu/drm/i915/intel_display.c > b/drivers/gpu/drm/i915/intel_display.c > index cc8131f..8a2bdfc 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -745,7 +745,7 @@ bool intel_pipe_has_type (struct drm_crtc *crtc, int type) > struct drm_encoder *l_entry; > > list_for_each_entry(l_entry, _config->encoder_list, head) { > - if (l_entry && l_entry->crtc == crtc) { > + if (l_entry->crtc == crtc) { > struct intel_encoder *intel_encoder = > enc_to_intel_encoder(l_entry); > if (intel_encoder->type == type) > return true; > @@ -3322,7 +3322,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, > > list_for_each_entry(encoder, _config->encoder_list, head) { > > - if (!encoder || encoder->crtc != crtc) > + if (encoder->crtc != crtc) > continue; > > intel_encoder = enc_to_intel_encoder(encoder);
[patch] i915: return -EFAULT if copy_to_user fails
On Wed, Jun 23, 2010 at 07:03:01PM +0200, Dan Carpenter wrote: > copy_to_user() returns the number of bytes remaining to be copied and > I'm pretty sure we want to return a negative error code here. > This patch wasn't applied either. regards, dan carpenter > Signed-off-by: Dan Carpenter > > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index 9ded3da..22691b4 100644 > --- a/drivers/gpu/drm/i915/i915_gem.c > +++ b/drivers/gpu/drm/i915/i915_gem.c > @@ -3707,6 +3707,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void > *data, > if (ret != 0) { > DRM_ERROR("copy %d cliprects failed: %d\n", > args->num_cliprects, ret); > + ret = -EFAULT; > goto pre_mutex_err; > } > }
[patch] i915: return -EFAULT if copy_to_user fails
On Sat, Jun 19, 2010 at 03:12:51PM +0200, Dan Carpenter wrote: > copy_to_user returns the number of bytes remaining to be copied, but we > want to return a negative error code here. These are returned to > userspace. > I didn't get a response on this patch. regards, dan carpenter > Signed-off-by: Dan Carpenter > > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c > index 59a2bf8..5fd876e 100644 > --- a/drivers/gpu/drm/i915/i915_dma.c > +++ b/drivers/gpu/drm/i915/i915_dma.c > @@ -608,8 +608,10 @@ static int i915_batchbuffer(struct drm_device *dev, void > *data, > ret = copy_from_user(cliprects, batch->cliprects, >batch->num_cliprects * >sizeof(struct drm_clip_rect)); > - if (ret != 0) > + if (ret != 0) { > + ret = -EFAULT; > goto fail_free; > + } > } > > mutex_lock(>struct_mutex); > @@ -650,8 +652,10 @@ static int i915_cmdbuffer(struct drm_device *dev, void > *data, > return -ENOMEM; > > ret = copy_from_user(batch_data, cmdbuf->buf, cmdbuf->sz); > - if (ret != 0) > + if (ret != 0) { > + ret = -EFAULT; > goto fail_batch_free; > + } > > if (cmdbuf->num_cliprects) { > cliprects = kcalloc(cmdbuf->num_cliprects, > @@ -664,8 +668,10 @@ static int i915_cmdbuffer(struct drm_device *dev, void > *data, > ret = copy_from_user(cliprects, cmdbuf->cliprects, >cmdbuf->num_cliprects * >sizeof(struct drm_clip_rect)); > - if (ret != 0) > + if (ret != 0) { > + ret = -EFAULT; > goto fail_clip_free; > + } > } > > mutex_lock(>struct_mutex);
[patch] i915: return -EFAULT if copy_to_user fails
On Sat, 19 Jun 2010 15:12:51 +0200, Dan Carpenter wrote: > copy_to_user returns the number of bytes remaining to be copied, but we > want to return a negative error code here. These are returned to > userspace. > > Signed-off-by: Dan Carpenter Reviewed-by: Chris Wilson -- Chris Wilson, Intel Open Source Technology Centre
[patch] i915: return -EFAULT if copy_to_user fails
On Wed, 23 Jun 2010 19:03:01 +0200, Dan Carpenter wrote: > copy_to_user() returns the number of bytes remaining to be copied and > I'm pretty sure we want to return a negative error code here. > > Signed-off-by: Dan Carpenter Reviewed-by: Chris Wilson -- Chris Wilson, Intel Open Source Technology Centre
[PATCH] fix i915 compile in 2.6.36-rc2
On Mon, 23 Aug 2010 13:38:27 +0300 (EEST), Meelis Roos wrote: > Commit 6ef3d4278034982c13df87c4a51e0445f762d316 introduces seq_file > usage in intel_overlay.c but does not include the header and now > compilation fails on i386. Fix it by including the necessary header. > > Signed-off-by: Meelis Roos Acked-by: Chris Wilson I have a pending patch to compile out this code when DEBUG_FS is not used which is the root cause of the compilation failure. That is a little more invasive than this simple patch... -- Chris Wilson, Intel Open Source Technology Centre
[Bug 29762] New: [r300g] Coldest: Buffer too small for color buffer 0 (need 3407872 have 2023424) !
https://bugs.freedesktop.org/show_bug.cgi?id=29762 Summary: [r300g] Coldest: Buffer too small for color buffer 0 (need 3407872 have 2023424) ! Product: Mesa Version: git Platform: Other URL: http://www.coldestgame.com/site/ OS/Version: All Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/r300 AssignedTo: dri-devel at lists.freedesktop.org ReportedBy: sa at whiz.se Hi, The game "Coldest" isn't rendering properly when run with r300g, quite a lot of objects seems to be missing. This error is logged: "The kernel rejected CS, see dmesg for more information." and dmesg reveals: [ 60.158478] [drm:r100_cs_track_check] *ERROR* [drm] Buffer too small for color buffer 0 (need 3407872 have 2023424) ! [ 60.158482] [drm:r100_cs_track_check] *ERROR* [drm] color buffer 0 (832 4 0 1024) [ 60.158483] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream ! Coldest is FLOSS, so source is available if that's helpful to figure this out. System environment: -- system architecture: 32-bit -- Linux distribution: Debian unstable -- GPU: RV570 -- Model: Asus EAX1950Pro 256MB -- Display connector: DVI -- xf86-video-ati: fd686668289258ffaf6b81057545e50612aac6a8 -- xserver: 1.8.99.904 (1.9.0 RC 5) -- mesa: 4b2b5f8e30347ce0a1818524f8825335d47eb5ca -- drm: b61e81a191d3a5c269c5f7c40199aebc9ebc034c -- kernel: 2.6.35 -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
i915: 2.6.36-rc2 hoses my Intel display
So I decided to fire up -rc2 today to see what would happen...the results are best described by the attached images. Something is clearly scrambled between my hardware and the i915 driver. Display with X is hosed, but things go weird before X gets a chance to run (it is worth noting that the initial output from the kernel is legible). FWIW, my hardware is: 00:02.1 Display controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02) Subsystem: Dell OptiPlex 755 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- http://lists.freedesktop.org/archives/dri-devel/attachments/20100823/7d120849/attachment-0002.jpg> -- next part -- A non-text attachment was scrubbed... Name: x.jpg Type: image/jpeg Size: 57467 bytes Desc: not available URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20100823/7d120849/attachment-0003.jpg>
2.6.36-rc2 build failure: implicit declaration of function 'seq_printf'
Commit 6ef3d4278034982c13df87c4a51e0445f762d316 causes a build failure for me: , | CC [M] drivers/gpu/drm/i915/intel_overlay.o | drivers/gpu/drm/i915/intel_overlay.c: In function 'intel_overlay_print_error_state': | drivers/gpu/drm/i915/intel_overlay.c:1467: error: implicit declaration of function 'seq_printf' | make[4]: *** [drivers/gpu/drm/i915/intel_overlay.o] Error 1 ` Adding a line with #include to intel_overlay.c fixes this. Looking at include/drm/*.h, I notice that is only #included if CONFIG_DEBUG_FS is set, which is not the case in my configuration. Sven
[PATCH] agp/intel: Fix dma mask for Sandybridge
On 2010.08.20 17:36:08 +0200, Takashi Iwai wrote: > Sandybridge requires 36bit dma mask, but the current code checks only > against i965, thus it gives Oops with i915 probing on 32bit machine: > >nommu_map_sg: overflow 14a00+4096 of device mask >[drm:drm_agp_bind_pages] *ERROR* Failed to bind AGP memory: -12 >BUG: unable to handle kernel paging request at fff8 >IP: [] i915_gem_evict_something+0xef/0x230 [i915] >... Sandybridge can do 40-bit dma mask. This has been fixed upstream now. -- Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20100823/a91208c5/attachment.pgp>
[Bug 29754] [r300g, glsl] Heroes of Newerth lockup GPU
https://bugs.freedesktop.org/show_bug.cgi?id=29754 Pavel Ondra?ka changed: What|Removed |Added URL||http://www.heroesofnewerth. ||com/download.php -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 29754] New: [r300g, glsl] Heroes of Newerth lockup GPU
https://bugs.freedesktop.org/show_bug.cgi?id=29754 Summary: [r300g, glsl] Heroes of Newerth lockup GPU Product: Mesa Version: git Platform: x86 (IA32) OS/Version: Linux (All) Status: NEW Severity: major Priority: medium Component: Drivers/DRI/r300 AssignedTo: dri-devel at lists.freedesktop.org ReportedBy: drakkk at centrum.cz Created an attachment (id=38099) --> (https://bugs.freedesktop.org/attachment.cgi?id=38099) dmesg With latest mesa git when starting HoN it lockup my GPU. This behavior was introduced with glsl2 merge. radeon: The kernel rejected CS, see dmesg for more information. this is printed into terminal many times, no more helpful info, dmesg attached. To reproduce this just download the game and run it. It isn't free but it doesn't matter since you won't get as far as the login screen. BTW I'm not sure if the component should be mesa core or Drivers/DRI/r300, feel free to change it if it is wrong. My system: Kernel: 2.6.35 mesa: c907b947130c884de09e48e1ecbeecc9afc9f75b GPU: rv530 -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 29738] SIGBUS after upgrade to 2.6.36-rc1-git4 [full stacktrace]
https://bugs.freedesktop.org/show_bug.cgi?id=29738 --- Comment #3 from Alex Deucher 2010-08-23 09:00:46 PDT --- can you bisect the kernel to see what commit is causing the problem? -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
drm/radeon/kms: Expose backlight class device for legacy LVDS encoder.
Allows e.g. power management daemons to control the backlight level. Inspired by the corresponding code in radeonfb. (Updated to add backlight type and make the connector the parent device - mjg) Signed-off-by: Michel D?nzer Signed-off-by: Matthew Garrett --- drivers/gpu/drm/radeon/Kconfig |1 + drivers/gpu/drm/radeon/radeon_connectors.c | 15 ++ drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 257 ++- drivers/gpu/drm/radeon/radeon_mode.h| 10 + 4 files changed, 277 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/radeon/Kconfig b/drivers/gpu/drm/radeon/Kconfig index 1c02d23..9746fee 100644 --- a/drivers/gpu/drm/radeon/Kconfig +++ b/drivers/gpu/drm/radeon/Kconfig @@ -1,6 +1,7 @@ config DRM_RADEON_KMS bool "Enable modesetting on radeon by default - NEW DRIVER" depends on DRM_RADEON + select BACKLIGHT_CLASS_DEVICE help Choose this option if you want kernel modesetting enabled by default. diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 31a09cd..9a9ba97 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -40,6 +40,10 @@ radeon_atombios_connected_scratch_regs(struct drm_connector *connector, struct drm_encoder *encoder, bool connected); +extern void +radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder, +struct drm_connector *drm_connector); + void radeon_connector_hotplug(struct drm_connector *connector) { struct drm_device *dev = connector->dev; @@ -1389,6 +1393,17 @@ radeon_add_legacy_connector(struct drm_device *dev, connector->polled = DRM_CONNECTOR_POLL_HPD; connector->display_info.subpixel_order = subpixel_order; drm_sysfs_connector_add(connector); + if (connector_type == DRM_MODE_CONNECTOR_LVDS) { + struct drm_encoder *drm_encoder; + + list_for_each_entry(drm_encoder, >mode_config.encoder_list, head) { + struct radeon_encoder *radeon_encoder; + + radeon_encoder = to_radeon_encoder(drm_encoder); + if (radeon_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_LVDS) + radeon_legacy_backlight_init(radeon_encoder, connector); + } + } return; failed: diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index 0b83970..bdca317 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c @@ -28,6 +28,10 @@ #include "radeon_drm.h" #include "radeon.h" #include "atom.h" +#include +#ifdef CONFIG_PMAC_BACKLIGHT +#include +#endif static void radeon_legacy_encoder_disable(struct drm_encoder *encoder) { @@ -39,7 +43,7 @@ static void radeon_legacy_encoder_disable(struct drm_encoder *encoder) radeon_encoder->active_device = 0; } -static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode) +static void radeon_legacy_lvds_update(struct drm_encoder *encoder, int mode) { struct drm_device *dev = encoder->dev; struct radeon_device *rdev = dev->dev_private; @@ -47,15 +51,23 @@ static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode) uint32_t lvds_gen_cntl, lvds_pll_cntl, pixclks_cntl, disp_pwr_man; int panel_pwr_delay = 2000; bool is_mac = false; + uint8_t backlight_level; DRM_DEBUG_KMS("\n"); + lvds_gen_cntl = RREG32(RADEON_LVDS_GEN_CNTL); + backlight_level = (lvds_gen_cntl >> RADEON_LVDS_BL_MOD_LEVEL_SHIFT) & 0xff; + if (radeon_encoder->enc_priv) { if (rdev->is_atom_bios) { struct radeon_encoder_atom_dig *lvds = radeon_encoder->enc_priv; panel_pwr_delay = lvds->panel_pwr_delay; + if (lvds->bl_dev) + backlight_level = lvds->backlight_level; } else { struct radeon_encoder_lvds *lvds = radeon_encoder->enc_priv; panel_pwr_delay = lvds->panel_pwr_delay; + if (lvds->bl_dev) + backlight_level = lvds->backlight_level; } } @@ -82,11 +94,13 @@ static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode) lvds_pll_cntl &= ~RADEON_LVDS_PLL_RESET; WREG32(RADEON_LVDS_PLL_CNTL, lvds_pll_cntl); - lvds_gen_cntl = RREG32(RADEON_LVDS_GEN_CNTL); - lvds_gen_cntl |= (RADEON_LVDS_ON | RADEON_LVDS_EN | RADEON_LVDS_DIGON | RADEON_LVDS_BLON); + lvds_gen_cntl &= ~(RADEON_LVDS_DISPLAY_DIS | +
[PATCH] agp/intel: Fix dma mask for Sandybridge
At Mon, 23 Aug 2010 14:19:22 +0800, Zhenyu Wang wrote: > > On 2010.08.23 08:02:42 +0200, Takashi Iwai wrote: > > > > Also, I don't understand the logic of 40bit addr calculation: > > > > > static unsigned long intel_gen6_mask_memory(struct agp_bridge_data > > > *bridge, > > > dma_addr_t addr, int type) > > > { > > > /* Shift high bits down */ > > >addr |= (addr >> 28) & 0xff; > > > > Isn't it 0xff0? > > > > No. This depends on hw 32bit PTE format for sandybridge. > > bit 31 bit 11 bit 4 > bit 0 >|<-physical addr 31:12->|<-physical addr 39:32->|<-cache ctl 3:1->|valid| Then I really don't understand why it works. You shift 28bit and mask with 0xff. Obviously it overwrite bits 0:3 with original 28:31 bits. Masking 0xff0 fixes the issue. And, the information like above would be greatly helpful if put into either changelog or comment... thanks, Takashi
[PATCH] agp/intel: Fix dma mask for Sandybridge
At Mon, 23 Aug 2010 08:02:42 +0200, I wrote: > > At Mon, 23 Aug 2010 13:43:03 +0800, > Zhenyu Wang wrote: > > > > On 2010.08.23 07:29:29 +0200, Takashi Iwai wrote: > > > > Sandybridge can do 40-bit dma mask. This has been fixed upstream now. > > > > > > Could you point where is the upstream GIT tree and the corresponding > > > commit id? > > > > > > > Linus's tree: > > > > commit 877fdacf8291d7627f339885b5ae52c2f6061734 > > Author: Zhenyu Wang > > Date: Thu Aug 19 09:46:13 2010 +0800 > > > > agp/intel: set 40-bit dma mask on Sandybridge > > > > Signed-off-by: Zhenyu Wang > > Signed-off-by: Eric Anholt > > Thanks. > > But, isn't it better to add .dma_mask field to struct > agp_bridge_driver? > > Also, I don't understand the logic of 40bit addr calculation: > > > static unsigned long intel_gen6_mask_memory(struct agp_bridge_data *bridge, > > dma_addr_t addr, int type) > > { > > /* Shift high bits down */ > >addr |= (addr >> 28) & 0xff; > > Isn't it 0xff0? Or, it's rather meant (addr >> 32) & 0xff? If so, better to be upper_32_bits(addr) & 0xff... thanks, Takashi
[PATCH] agp/intel: Fix dma mask for Sandybridge
At Mon, 23 Aug 2010 13:43:03 +0800, Zhenyu Wang wrote: > > On 2010.08.23 07:29:29 +0200, Takashi Iwai wrote: > > > Sandybridge can do 40-bit dma mask. This has been fixed upstream now. > > > > Could you point where is the upstream GIT tree and the corresponding > > commit id? > > > > Linus's tree: > > commit 877fdacf8291d7627f339885b5ae52c2f6061734 > Author: Zhenyu Wang > Date: Thu Aug 19 09:46:13 2010 +0800 > > agp/intel: set 40-bit dma mask on Sandybridge > > Signed-off-by: Zhenyu Wang > Signed-off-by: Eric Anholt Thanks. But, isn't it better to add .dma_mask field to struct agp_bridge_driver? Also, I don't understand the logic of 40bit addr calculation: > static unsigned long intel_gen6_mask_memory(struct agp_bridge_data *bridge, > dma_addr_t addr, int type) > { > /* Shift high bits down */ >addr |= (addr >> 28) & 0xff; Isn't it 0xff0? Takashi
[PATCH] agp/intel: Fix dma mask for Sandybridge
At Mon, 23 Aug 2010 09:35:07 +0800, Zhenyu Wang wrote: > > On 2010.08.20 17:36:08 +0200, Takashi Iwai wrote: > > Sandybridge requires 36bit dma mask, but the current code checks only > > against i965, thus it gives Oops with i915 probing on 32bit machine: > > > >nommu_map_sg: overflow 14a00+4096 of device mask > >[drm:drm_agp_bind_pages] *ERROR* Failed to bind AGP memory: -12 > >BUG: unable to handle kernel paging request at fff8 > >IP: [] i915_gem_evict_something+0xef/0x230 [i915] > >... > > Sandybridge can do 40-bit dma mask. This has been fixed upstream now. Could you point where is the upstream GIT tree and the corresponding commit id? thanks, Takashi
[PATCH] agp/intel: Fix dma mask for Sandybridge
On Mon, 23 Aug 2010 14:48:54 +0800, Zhenyu Wang wrote: > On 2010.08.23 08:31:42 +0200, Takashi Iwai wrote: > > > bit 31 bit 11 bit 4 > > > bit 0 > > >|<-physical addr 31:12->|<-physical addr 39:32->|<-cache ctl > > > 3:1->|valid| > > > > Then I really don't understand why it works. > > You shift 28bit and mask with 0xff. Obviously it overwrite bits 0:3 > > with original 28:31 bits. Masking 0xff0 fixes the issue. > > > > ah, sorry, my stupid. Thanks for catching this! > > Subject: [PATCH] agp/intel: fix physical address mask bits for sandybridge > > It should shift bit 39-32 into pte's bit 11-4. Applied. Thanks! -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20100823/9cce1ca1/attachment.pgp>
[Bug 29680] [r600g] oolite segfaults on initialization
https://bugs.freedesktop.org/show_bug.cgi?id=29680 Nicolas Kaiser changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #1 from Nicolas Kaiser 2010-08-23 06:17:43 PDT --- Fixed with mesa: 8a878c266a8bf50b49d3ef8c5984790581e33133 (r600g: Don't blindly unmap NULL->size.) -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 29363] [r300g] Starcraft 2: "r300 VP: Compiler error"
https://bugs.freedesktop.org/show_bug.cgi?id=29363 --- Comment #16 from Pavel Ondra?ka 2010-08-23 06:01:16 PDT --- With glsl2 merged into master things are looking much better now, terrain is rendered properly and most of units and buildings too, however there are some effects which are wrong and some effects are too big. I wasn't able to test much because the big slowdown is still present and it's not easy to play game at 1-3 fps. Any more logs and/or screenshots needed? -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 29384] Slow switch between TTY1-TTY6 with /dev/fb0 or X11 involved
https://bugs.freedesktop.org/show_bug.cgi?id=29384 --- Comment #32 from peterle at hottemptation.org 2010-08-23 05:22:51 PDT --- Linus didn't included the patch in rc2. Typicall delay? -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 29137] [r300g] troubles with wine and "r300: Max size of the constant buffer is 256*4 floats."
https://bugs.freedesktop.org/show_bug.cgi?id=29137 --- Comment #16 from Rub?n Fern?ndez 2010-08-23 04:43:33 PDT --- If it is of any help, aplyint that wined3d hack makes all the wine applications I have tested render correctly except for two games: One of them still complains about "r300: Max size of the constant buffer is 256*4 floats." The other fails when a shader attempts to access the elements #30 and #31 in a 29-element array; presumably, without the patch, said array would be 32 elements long. As far as I can see, this bug is the only thing preventing wine+glsl to work perfectly with mesa+r300g. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[git pull] drm fixes
Hi Linus, Mostly radeon and nouveau regression fixes + one AGP regression fix, along with the information leak + not possible but should be checked for corruption. Dave. The following changes since commit 31ce4bfdfd10bf5db9bf85c92bbe0cf2edbdcad8: io-mapping: move asm include inside the config option (2010-08-12 11:47:50 +1000) are available in the git repository at: ssh://master.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git drm-core-next Alex Deucher (15): drm/radeon/kms: DCE3/4 AdjustPixelPll updates drm/radeon/kms: rework encoder handling drm/radeon/kms: DCE3/4 transmitter fixes drm/radeon/kms/atom: clean up dig atom handling drm/radeon/kms/pm: bail early if nothing's changing drm/radeon/kms/DCE3+: switch pads to ddc mode when going i2c drm/radeon/kms: add missing asic callback assignment for evergreen drm/radeon/kms: rework radeon_dp_detect() logic drm/radeon/kms: fix agp mode setup on cards that use pcie bridges drm/radeon/kms: don't enable MSIs on AGP boards drm/radeon/kms: add back missing break in info ioctl drm/radeon/kms: set encoder type to DVI for HDMI on evergreen drm/radeon/kms: fix sideport detection on newer rs880 boards drm/radeon/kms: try to detect tv vs monitor for underscan drm/radeon/kms: fix typo in radeon_compute_pll_gain Ben Skeggs (8): drm/nv50: fix minor thinko from nvc0 changes drm/nouveau: fix race condition when under memory pressure drm/nouveau: check for error when allocating/mapping dummy page drm/nouveau: remove warning about unknown tmds table revisions drm/nouveau: punt some more log messages to debug level drm/nv50-nvc0: ramht_size is meant to be in bytes, not entries drm/nvc0: fix thinko in instmem suspend/resume drm/nouveau: fix earlier mistake when fixing merge conflict Dan Carpenter (2): drm: fix end of loop test drm: move dereference below check Dave Airlie (4): drm: stop information leak of old kernel stack. drm: block userspace under allocating buffer and having drivers overwrite it (v2) drm/radeon: fix passing wrong type to gem object create. Merge remote branch 'nouveau/for-airlied' of /ssd/git/drm-nouveau-next into drm-core-next Francisco Jerez (3): drm/nouveau: Don't try DDC on the dummy I2C channel. drm/nouveau: Add TV-out quirk for an MSI nForce2 IGP. drm/nouveau: Workaround missing GPIO tables on an Apple iMac G4 NV18. Jean Delvare (1): drm/radeon: Fix stack data leak Jerome Glisse (1): drm/radeon/kms: fix GTT/VRAM overlapping test drivers/gpu/drm/drm_drv.c | 25 ++- drivers/gpu/drm/drm_fb_helper.c |3 +- drivers/gpu/drm/drm_vm.c|2 +- drivers/gpu/drm/i810/i810_dma.c | 30 ++-- drivers/gpu/drm/i830/i830_dma.c | 28 ++-- drivers/gpu/drm/i915/i915_dma.c | 80 drivers/gpu/drm/mga/mga_state.c | 26 ++-- drivers/gpu/drm/nouveau/nouveau_bios.c | 42 +++-- drivers/gpu/drm/nouveau/nouveau_bo.c| 15 ++ drivers/gpu/drm/nouveau/nouveau_channel.c | 24 ++-- drivers/gpu/drm/nouveau/nouveau_connector.c |6 +- drivers/gpu/drm/nouveau/nouveau_drv.h |1 + drivers/gpu/drm/nouveau/nouveau_gem.c | 36 +++- drivers/gpu/drm/nouveau/nouveau_i2c.c |2 +- drivers/gpu/drm/nouveau/nouveau_sgdma.c | 12 +- drivers/gpu/drm/nouveau/nv17_tv.c |8 + drivers/gpu/drm/nouveau/nv50_instmem.c |2 +- drivers/gpu/drm/nouveau/nvc0_instmem.c | 13 +- drivers/gpu/drm/r128/r128_state.c | 35 ++-- drivers/gpu/drm/radeon/atombios_crtc.c | 51 +- drivers/gpu/drm/radeon/atombios_dp.c|2 +- drivers/gpu/drm/radeon/radeon_agp.c |8 +- drivers/gpu/drm/radeon/radeon_asic.c|1 + drivers/gpu/drm/radeon/radeon_atombios.c| 39 +++-- drivers/gpu/drm/radeon/radeon_combios.c | 104 ++-- drivers/gpu/drm/radeon/radeon_connectors.c | 26 +-- drivers/gpu/drm/radeon/radeon_device.c |2 +- drivers/gpu/drm/radeon/radeon_display.c | 15 ++- drivers/gpu/drm/radeon/radeon_encoders.c| 223 --- drivers/gpu/drm/radeon/radeon_fb.c |2 +- drivers/gpu/drm/radeon/radeon_i2c.c |7 + drivers/gpu/drm/radeon/radeon_irq_kms.c |5 +- drivers/gpu/drm/radeon/radeon_kms.c | 79 drivers/gpu/drm/radeon/radeon_legacy_crtc.c |2 +- drivers/gpu/drm/radeon/radeon_legacy_encoders.c |7 +- drivers/gpu/drm/radeon/radeon_mode.h|3 +- drivers/gpu/drm/radeon/radeon_pm.c |5 + drivers/gpu/drm/radeon/radeon_state.c | 56 +++---
Re: [PATCH] agp/intel: Fix dma mask for Sandybridge
On 2010.08.23 08:02:42 +0200, Takashi Iwai wrote: Also, I don't understand the logic of 40bit addr calculation: static unsigned long intel_gen6_mask_memory(struct agp_bridge_data *bridge, dma_addr_t addr, int type) { /* Shift high bits down */ addr |= (addr 28) 0xff; Isn't it 0xff0? No. This depends on hw 32bit PTE format for sandybridge. bit 31 bit 11 bit 4 bit 0 |-physical addr 31:12-|-physical addr 39:32-|-cache ctl 3:1-|valid| -- Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 signature.asc Description: Digital signature ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] agp/intel: Fix dma mask for Sandybridge
On 2010.08.23 08:31:42 +0200, Takashi Iwai wrote: bit 31 bit 11 bit 4 bit 0 |-physical addr 31:12-|-physical addr 39:32-|-cache ctl 3:1-|valid| Then I really don't understand why it works. You shift 28bit and mask with 0xff. Obviously it overwrite bits 0:3 with original 28:31 bits. Masking 0xff0 fixes the issue. ah, sorry, my stupid. Thanks for catching this! Subject: [PATCH] agp/intel: fix physical address mask bits for sandybridge It should shift bit 39-32 into pte's bit 11-4. Reported-by: Takashi Iwai ti...@suse.de Signed-off-by: Zhenyu Wang zhen...@linux.intel.com --- drivers/char/agp/intel-gtt.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index d22ffb8..0edfc87 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c @@ -1333,8 +1333,8 @@ static unsigned long intel_i965_mask_memory(struct agp_bridge_data *bridge, static unsigned long intel_gen6_mask_memory(struct agp_bridge_data *bridge, dma_addr_t addr, int type) { - /* Shift high bits down */ - addr |= (addr 28) 0xff; + /* gen6 has bit11-4 for physical addr bit39-32 */ + addr |= (addr 28) 0xff0; /* Type checking must be done elsewhere */ return addr | bridge-driver-masks[type].mask; -- 1.7.0.4 -- Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 signature.asc Description: Digital signature ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
2.6.36-rc2 build failure: implicit declaration of function 'seq_printf'
Commit 6ef3d4278034982c13df87c4a51e0445f762d316 causes a build failure for me: , | CC [M] drivers/gpu/drm/i915/intel_overlay.o | drivers/gpu/drm/i915/intel_overlay.c: In function 'intel_overlay_print_error_state': | drivers/gpu/drm/i915/intel_overlay.c:1467: error: implicit declaration of function 'seq_printf' | make[4]: *** [drivers/gpu/drm/i915/intel_overlay.o] Error 1 ` Adding a line with #include linux/seq_file.h to intel_overlay.c fixes this. Looking at include/drm/*.h, I notice that linux/seq_file.h is only #included if CONFIG_DEBUG_FS is set, which is not the case in my configuration. Sven ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] agp/intel: Fix dma mask for Sandybridge
Sandybridge requires 36bit dma mask, but the current code checks only against i965, thus it gives Oops with i915 probing on 32bit machine: nommu_map_sg: overflow 14a00+4096 of device mask [drm:drm_agp_bind_pages] *ERROR* Failed to bind AGP memory: -12 BUG: unable to handle kernel paging request at fff8 IP: [f7fac57f] i915_gem_evict_something+0xef/0x230 [i915] ... Signed-off-by: Takashi Iwai ti...@suse.de --- drivers/char/agp/intel-agp.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index ddf5def..c563a60 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c @@ -845,7 +845,8 @@ static int __devinit intel_gmch_probe(struct pci_dev *pdev, dev_info(pdev-dev, Intel %s Chipset\n, intel_agp_chipsets[i].name); - if (bridge-driver-mask_memory == intel_i965_mask_memory) { + if (bridge-driver-mask_memory == intel_i965_mask_memory || + bridge-driver-mask_memory == intel_gen6_mask_memory) { if (pci_set_dma_mask(intel_private.pcidev, DMA_BIT_MASK(36))) dev_err(intel_private.pcidev-dev, set gfx device dma mask 36bit failed!\n); -- 1.7.2.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] agp/intel: Fix dma mask for Sandybridge
At Mon, 23 Aug 2010 09:35:07 +0800, Zhenyu Wang wrote: On 2010.08.20 17:36:08 +0200, Takashi Iwai wrote: Sandybridge requires 36bit dma mask, but the current code checks only against i965, thus it gives Oops with i915 probing on 32bit machine: nommu_map_sg: overflow 14a00+4096 of device mask [drm:drm_agp_bind_pages] *ERROR* Failed to bind AGP memory: -12 BUG: unable to handle kernel paging request at fff8 IP: [f7fac57f] i915_gem_evict_something+0xef/0x230 [i915] ... Sandybridge can do 40-bit dma mask. This has been fixed upstream now. Could you point where is the upstream GIT tree and the corresponding commit id? thanks, Takashi ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] agp/intel: Fix dma mask for Sandybridge
At Mon, 23 Aug 2010 13:43:03 +0800, Zhenyu Wang wrote: On 2010.08.23 07:29:29 +0200, Takashi Iwai wrote: Sandybridge can do 40-bit dma mask. This has been fixed upstream now. Could you point where is the upstream GIT tree and the corresponding commit id? Linus's tree: commit 877fdacf8291d7627f339885b5ae52c2f6061734 Author: Zhenyu Wang zhen...@linux.intel.com Date: Thu Aug 19 09:46:13 2010 +0800 agp/intel: set 40-bit dma mask on Sandybridge Signed-off-by: Zhenyu Wang zhen...@linux.intel.com Signed-off-by: Eric Anholt e...@anholt.net Thanks. But, isn't it better to add .dma_mask field to struct agp_bridge_driver? Also, I don't understand the logic of 40bit addr calculation: static unsigned long intel_gen6_mask_memory(struct agp_bridge_data *bridge, dma_addr_t addr, int type) { /* Shift high bits down */ addr |= (addr 28) 0xff; Isn't it 0xff0? Takashi ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] agp/intel: Fix dma mask for Sandybridge
At Mon, 23 Aug 2010 08:02:42 +0200, I wrote: At Mon, 23 Aug 2010 13:43:03 +0800, Zhenyu Wang wrote: On 2010.08.23 07:29:29 +0200, Takashi Iwai wrote: Sandybridge can do 40-bit dma mask. This has been fixed upstream now. Could you point where is the upstream GIT tree and the corresponding commit id? Linus's tree: commit 877fdacf8291d7627f339885b5ae52c2f6061734 Author: Zhenyu Wang zhen...@linux.intel.com Date: Thu Aug 19 09:46:13 2010 +0800 agp/intel: set 40-bit dma mask on Sandybridge Signed-off-by: Zhenyu Wang zhen...@linux.intel.com Signed-off-by: Eric Anholt e...@anholt.net Thanks. But, isn't it better to add .dma_mask field to struct agp_bridge_driver? Also, I don't understand the logic of 40bit addr calculation: static unsigned long intel_gen6_mask_memory(struct agp_bridge_data *bridge, dma_addr_t addr, int type) { /* Shift high bits down */ addr |= (addr 28) 0xff; Isn't it 0xff0? Or, it's rather meant (addr 32) 0xff? If so, better to be upper_32_bits(addr) 0xff... thanks, Takashi ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] agp/intel: Fix dma mask for Sandybridge
At Mon, 23 Aug 2010 14:19:22 +0800, Zhenyu Wang wrote: On 2010.08.23 08:02:42 +0200, Takashi Iwai wrote: Also, I don't understand the logic of 40bit addr calculation: static unsigned long intel_gen6_mask_memory(struct agp_bridge_data *bridge, dma_addr_t addr, int type) { /* Shift high bits down */ addr |= (addr 28) 0xff; Isn't it 0xff0? No. This depends on hw 32bit PTE format for sandybridge. bit 31 bit 11 bit 4 bit 0 |-physical addr 31:12-|-physical addr 39:32-|-cache ctl 3:1-|valid| Then I really don't understand why it works. You shift 28bit and mask with 0xff. Obviously it overwrite bits 0:3 with original 28:31 bits. Masking 0xff0 fixes the issue. And, the information like above would be greatly helpful if put into either changelog or comment... thanks, Takashi ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [patch] i915: return -EFAULT if copy_to_user fails
On Sat, Jun 19, 2010 at 03:12:51PM +0200, Dan Carpenter wrote: copy_to_user returns the number of bytes remaining to be copied, but we want to return a negative error code here. These are returned to userspace. I didn't get a response on this patch. regards, dan carpenter Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 59a2bf8..5fd876e 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -608,8 +608,10 @@ static int i915_batchbuffer(struct drm_device *dev, void *data, ret = copy_from_user(cliprects, batch-cliprects, batch-num_cliprects * sizeof(struct drm_clip_rect)); - if (ret != 0) + if (ret != 0) { + ret = -EFAULT; goto fail_free; + } } mutex_lock(dev-struct_mutex); @@ -650,8 +652,10 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data, return -ENOMEM; ret = copy_from_user(batch_data, cmdbuf-buf, cmdbuf-sz); - if (ret != 0) + if (ret != 0) { + ret = -EFAULT; goto fail_batch_free; + } if (cmdbuf-num_cliprects) { cliprects = kcalloc(cmdbuf-num_cliprects, @@ -664,8 +668,10 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data, ret = copy_from_user(cliprects, cmdbuf-cliprects, cmdbuf-num_cliprects * sizeof(struct drm_clip_rect)); - if (ret != 0) + if (ret != 0) { + ret = -EFAULT; goto fail_clip_free; + } } mutex_lock(dev-struct_mutex); ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] fix i915 compile in 2.6.36-rc2
On Mon, 23 Aug 2010 13:38:27 +0300 (EEST), Meelis Roos mr...@linux.ee wrote: Commit 6ef3d4278034982c13df87c4a51e0445f762d316 introduces seq_file usage in intel_overlay.c but does not include the header and now compilation fails on i386. Fix it by including the necessary header. Signed-off-by: Meelis Roos mr...@linux.ee Acked-by: Chris Wilson ch...@chris-wilson.co.uk I have a pending patch to compile out this code when DEBUG_FS is not used which is the root cause of the compilation failure. That is a little more invasive than this simple patch... -- Chris Wilson, Intel Open Source Technology Centre ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [patch] i915: return -EFAULT if copy_to_user fails
On Wed, Jun 23, 2010 at 07:03:01PM +0200, Dan Carpenter wrote: copy_to_user() returns the number of bytes remaining to be copied and I'm pretty sure we want to return a negative error code here. This patch wasn't applied either. regards, dan carpenter Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 9ded3da..22691b4 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3707,6 +3707,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, if (ret != 0) { DRM_ERROR(copy %d cliprects failed: %d\n, args-num_cliprects, ret); + ret = -EFAULT; goto pre_mutex_err; } } ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [patch] i915: remove unneed NULL checks
On Wed, Jun 23, 2010 at 07:06:22PM +0200, Dan Carpenter wrote: We don't need to check the list cursor in a list_for_each_entry(). It's always non-null. Here is another one that never got applied. I has a sad face. :( regards, dan carpenter Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index cc8131f..8a2bdfc 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -745,7 +745,7 @@ bool intel_pipe_has_type (struct drm_crtc *crtc, int type) struct drm_encoder *l_entry; list_for_each_entry(l_entry, mode_config-encoder_list, head) { - if (l_entry l_entry-crtc == crtc) { + if (l_entry-crtc == crtc) { struct intel_encoder *intel_encoder = enc_to_intel_encoder(l_entry); if (intel_encoder-type == type) return true; @@ -3322,7 +3322,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, list_for_each_entry(encoder, mode_config-encoder_list, head) { - if (!encoder || encoder-crtc != crtc) + if (encoder-crtc != crtc) continue; intel_encoder = enc_to_intel_encoder(encoder); ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 29363] [r300g] Starcraft 2: r300 VP: Compiler error
https://bugs.freedesktop.org/show_bug.cgi?id=29363 --- Comment #16 from Pavel Ondračka dra...@centrum.cz 2010-08-23 06:01:16 PDT --- With glsl2 merged into master things are looking much better now, terrain is rendered properly and most of units and buildings too, however there are some effects which are wrong and some effects are too big. I wasn't able to test much because the big slowdown is still present and it's not easy to play game at 1-3 fps. Any more logs and/or screenshots needed? -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 29680] [r600g] oolite segfaults on initialization
https://bugs.freedesktop.org/show_bug.cgi?id=29680 Nicolas Kaiser ni...@nikai.net changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #1 from Nicolas Kaiser ni...@nikai.net 2010-08-23 06:17:43 PDT --- Fixed with mesa: 8a878c266a8bf50b49d3ef8c5984790581e33133 (r600g: Don't blindly unmap NULL-size.) -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] agp/intel: Fix dma mask for Sandybridge
On Mon, 23 Aug 2010 14:48:54 +0800, Zhenyu Wang zhen...@linux.intel.com wrote: On 2010.08.23 08:31:42 +0200, Takashi Iwai wrote: bit 31 bit 11 bit 4 bit 0 |-physical addr 31:12-|-physical addr 39:32-|-cache ctl 3:1-|valid| Then I really don't understand why it works. You shift 28bit and mask with 0xff. Obviously it overwrite bits 0:3 with original 28:31 bits. Masking 0xff0 fixes the issue. ah, sorry, my stupid. Thanks for catching this! Subject: [PATCH] agp/intel: fix physical address mask bits for sandybridge It should shift bit 39-32 into pte's bit 11-4. Applied. Thanks! pgpWc8PQqR3W4.pgp Description: PGP signature ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 29384] Slow switch between TTY1-TTY6 with /dev/fb0 or X11 involved
https://bugs.freedesktop.org/show_bug.cgi?id=29384 --- Comment #33 from Alex Deucher ag...@yahoo.com 2010-08-23 07:08:16 PDT --- (In reply to comment #32) Linus didn't included the patch in rc2. Typicall delay? The pull request just went out today, so it should show up as soon as Linus pulls it. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm/modes: Fix CVT-R modeline generation
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16651 Signed-off-by: Adam Jackson a...@redhat.com --- drivers/gpu/drm/drm_modes.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index f1f473e..949326d 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -251,7 +251,10 @@ struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, int hdisplay, drm_mode-htotal = drm_mode-hdisplay + CVT_RB_H_BLANK; /* Fill in HSync values */ drm_mode-hsync_end = drm_mode-hdisplay + CVT_RB_H_BLANK / 2; - drm_mode-hsync_start = drm_mode-hsync_end = CVT_RB_H_SYNC; + drm_mode-hsync_start = drm_mode-hsync_end - CVT_RB_H_SYNC; + /* Fill in VSync values */ + drm_mode-vsync_start = drm_mode-vdisplay + CVT_RB_VFPORCH; + drm_mode-vsync_end = drm_mode-vsync_start + vsync; } /* 15/13. Find pixel clock frequency (kHz for xf86) */ drm_mode-clock = drm_mode-htotal * HV_FACTOR * 1000 / hperiod; -- 1.7.2.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: GPU lockup+blackout on 2.6.35 with r600...
On 17 August 2010 23:37, Alex Deucher alexdeuc...@gmail.com wrote: On Tue, Aug 17, 2010 at 6:12 PM, Daniel J Blueman daniel.blue...@gmail.com wrote: Hi chaps, On 9 August 2010 14:41, Daniel J Blueman daniel.blue...@gmail.com wrote: On 8 August 2010 17:36, Daniel J Blueman daniel.blue...@gmail.com wrote: On 5 August 2010 16:23, Alex Deucher alexdeuc...@gmail.com wrote: On Thu, Aug 5, 2010 at 9:50 AM, Jerome Glisse gli...@freedesktop.org wrote: On 08/05/2010 06:52 AM, Daniel J Blueman wrote: After around 10-30 mins of typical usage (ie cairo rendering to surfaces + compiz) on my Dell Studio 15 (model 1557), my R600 radeon locks up, giving a blank screen. The only information I have is a backtrace [1]. 'radeontool regs' doesn't give anything - what information, /sys files etc would be useful here, and would it be useful to log a freedesktop.org bug report at this stage, assuming I haven't found a reliable reproducer? OS is Ubuntu 10.10 development release, mesa 7.8.2, libdrm2 2.4.21. Thanks, Daniel --- [1] radeon :02:00.0: GPU lockup CP stall for more than 1000msec [ cut here ] WARNING: at /home/kernel-ppa/COD/linux/drivers/gpu/drm/radeon/radeon_fence.c:235 radeon_fence_wait+0x2b7/0x320 [radeon]() Hardware name: Studio 1557 GPU lockup (waiting for 0x8C35 last fence id 0x8C33) Modules linked in: binfmt_misc parport_pc ppdev kvm_intel kvm microcode snd_hda_codec_atihdmi joydev ipt_REJECT xt_limit xt_tcpudp ipt_addrtype xt_state snd_hda_codec_idt ip6table_filter ip6_tables snd_hda_intel nf_nat_irc nf_conntrack_irc snd_hda_codec nf_nat_ftp nf_nat snd_hwdep nf_conntrack_ipv4 snd_seq_midi arc4 snd_pcm snd_rawmidi nf_defrag_ipv4 radeon nf_conntrack_ftp nf_conntrack iptable_filter snd_seq_midi_event snd_seq ip_tables ttm iwlagn video snd_timer uvcvideo x_tables snd_seq_device output drm_kms_helper lp dell_laptop iwlcore drm videodev dcdbas dell_wmi v4l1_compat mac80211 i7core_edac parport v4l2_compat_ioctl32 snd psmouse edac_core i2c_algo_bit soundcore cfg80211 snd_page_alloc serio_raw sdhci_pci sdhci ahci libahci led_class r8169 mii btrfs zlib_deflate crc32c libcrc32c Pid: 1624, comm: Xorg Tainted: G D 2.6.35-020635-generic #020635 Call Trace: ? radeon_fence_wait+0x2b7/0x320 [radeon] warn_slowpath_common+0x90/0xc0 warn_slowpath_fmt+0x6e/0x70 ? schedule_timeout+0x15a/0x2e0 ? r600_irq_set+0x27d/0xc00 [radeon] ? radeon_ring_commit+0xa3/0xb0 [radeon] ? r100_gpu_cp_is_lockup+0xc2/0xd0 [radeon] ? r600_gpu_is_lockup+0x1cb/0x220 [radeon] radeon_fence_wait+0x2b7/0x320 [radeon] ? autoremove_wake_function+0x0/0x40 radeon_sync_obj_wait+0x11/0x20 [radeon] ttm_bo_wait+0x102/0x1b0 [ttm] ttm_bo_move_accel_cleanup+0x19e/0x230 [ttm] radeon_move_blit+0x124/0x170 [radeon] radeon_bo_move+0xda/0x1a0 [radeon] ttm_bo_handle_move_mem+0xec/0x370 [ttm] ttm_bo_evict+0x1cc/0x270 [ttm] ? drm_mm_split_at_start+0x1d/0x80 [drm] ttm_mem_evict_first+0xed/0x180 [ttm] ? ttm_bo_man_get_node+0xd5/0xe0 [ttm] ttm_bo_mem_force_space+0xab/0x110 [ttm] ttm_bo_mem_space+0x305/0x370 [ttm] ttm_bo_move_buffer+0xcf/0x140 [ttm] ? drm_mm_split_at_start+0x1d/0x80 [drm] ttm_bo_validate+0xd5/0x100 [ttm] ttm_bo_init+0x1f2/0x240 [ttm] radeon_bo_create+0x121/0x240 [radeon] ? radeon_ttm_bo_destroy+0x0/0x80 [radeon] radeon_gem_object_create+0x89/0x100 [radeon] ? drm_gem_handle_create+0x8b/0xa0 [drm] radeon_gem_create_ioctl+0x58/0xe0 [radeon] drm_ioctl+0x283/0x460 [drm] ? radeon_gem_create_ioctl+0x0/0xe0 [radeon] ? do_readv_writev+0x16b/0x1e0 vfs_ioctl+0x3a/0xc0 do_vfs_ioctl+0x6d/0x1f0 sys_ioctl+0x87/0xa0 ? sys_writev+0x55/0xb0 system_call_fastpath+0x16/0x1b ---[ end trace c0bc12025fa8386c ]--- radeon :02:00.0: GPU softreset radeon :02:00.0: R_008010_GRBM_STATUS=0xA0003028 radeon :02:00.0: R_008014_GRBM_STATUS2=0x0002 radeon :02:00.0: R_000E50_SRBM_STATUS=0x20C0 radeon :02:00.0: R_008020_GRBM_SOFT_RESET=0x7FEE radeon :02:00.0: R_008020_GRBM_SOFT_RESET=0x0001 radeon :02:00.0: R_008010_GRBM_STATUS=0x3028 radeon :02:00.0: R_008014_GRBM_STATUS2=0x0002 radeon :02:00.0: R_000E50_SRBM_STATUS=0x20C0 radeon :02:00.0: GPU reset succeed Clocks initialized ! ring test succeeded in 1 usecs ib test succeeded in 1 usecs SO it keep reseting ? According to log there is a GPU lockup but then a successfull GPU reset so GPU should resume fine (that's what log says) Best is to open a bug and attach full dmesg + lspci -vv and context in which the lockup happen Perhaps the lockup timeout is too short or interrupts are being delivered late or something? There's a fdo or kernel bugzilla entry where removing the lockup timeout fixed the issue. Does something like this: --- a/drivers/gpu/drm/radeon/radeon_fence.c +++ b/drivers/gpu/drm/radeon/radeon_fence.c @@ -237,9 +237,11 @@ retry: * as signaled for now
[Bug 29738] SIGBUS after upgrade to 2.6.36-rc1-git4 [full stacktrace]
https://bugs.freedesktop.org/show_bug.cgi?id=29738 --- Comment #3 from Alex Deucher ag...@yahoo.com 2010-08-23 09:00:46 PDT --- can you bisect the kernel to see what commit is causing the problem? -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 29384] Slow switch between TTY1-TTY6 with /dev/fb0 or X11 involved
https://bugs.freedesktop.org/show_bug.cgi?id=29384 --- Comment #34 from pete...@hottemptation.org 2010-08-23 09:12:16 PDT --- Great! This bug has one good side, I learned much stuff. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 29754] New: [r300g, glsl] Heroes of Newerth lockup GPU
https://bugs.freedesktop.org/show_bug.cgi?id=29754 Summary: [r300g, glsl] Heroes of Newerth lockup GPU Product: Mesa Version: git Platform: x86 (IA32) OS/Version: Linux (All) Status: NEW Severity: major Priority: medium Component: Drivers/DRI/r300 AssignedTo: dri-devel@lists.freedesktop.org ReportedBy: dra...@centrum.cz Created an attachment (id=38099) -- (https://bugs.freedesktop.org/attachment.cgi?id=38099) dmesg With latest mesa git when starting HoN it lockup my GPU. This behavior was introduced with glsl2 merge. radeon: The kernel rejected CS, see dmesg for more information. this is printed into terminal many times, no more helpful info, dmesg attached. To reproduce this just download the game and run it. It isn't free but it doesn't matter since you won't get as far as the login screen. BTW I'm not sure if the component should be mesa core or Drivers/DRI/r300, feel free to change it if it is wrong. My system: Kernel: 2.6.35 mesa: c907b947130c884de09e48e1ecbeecc9afc9f75b GPU: rv530 -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[patch] i915: signedness bugs in i915 ring buffer
ring-space is unsigned so it's never less than zero. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 51e9c9e..a331898 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -208,9 +208,10 @@ static int init_ring_common(struct drm_device *dev, else { ring-head = ring-get_head(dev, ring); ring-tail = ring-get_tail(dev, ring); - ring-space = ring-head - (ring-tail + 8); - if (ring-space 0) - ring-space += ring-size; + if (ring-head = ring-tail + 8) + ring-space = ring-head - (ring-tail + 8); + else + ring-space = ring-head - (ring-tail + 8) + ring-size; } return 0; } @@ -666,9 +667,10 @@ int intel_init_ring_buffer(struct drm_device *dev, else { ring-head = ring-get_head(dev, ring); ring-tail = ring-get_tail(dev, ring); - ring-space = ring-head - (ring-tail + 8); - if (ring-space 0) - ring-space += ring-size; + if (ring-head = ring-tail + 8) + ring-space = ring-head - (ring-tail + 8); + else + ring-space = ring-head - (ring-tail + 8) + ring-size; } INIT_LIST_HEAD(ring-active_list); INIT_LIST_HEAD(ring-request_list); @@ -735,9 +737,10 @@ int intel_wait_ring_buffer(struct drm_device *dev, end = jiffies + 3 * HZ; do { ring-head = ring-get_head(dev, ring); - ring-space = ring-head - (ring-tail + 8); - if (ring-space 0) - ring-space += ring-size; + if (ring-head = ring-tail + 8) + ring-space = ring-head - (ring-tail + 8); + else + ring-space = ring-head - (ring-tail + 8) + ring-size; if (ring-space = n) { trace_i915_ring_wait_end (dev); return 0; diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 44af317..707f32f 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -109,9 +109,10 @@ void i915_kernel_lost_context(struct drm_device * dev) ring-head = I915_READ(PRB0_HEAD) HEAD_ADDR; ring-tail = I915_READ(PRB0_TAIL) TAIL_ADDR; - ring-space = ring-head - (ring-tail + 8); - if (ring-space 0) - ring-space += ring-size; + if (ring-head = ring-tail + 8) + ring-space = ring-head - (ring-tail + 8); + else + ring-space = ring-head - (ring-tail + 8) + ring-size; if (!dev-primary-master) return; ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 29754] [r300g, glsl] Heroes of Newerth lockup GPU
https://bugs.freedesktop.org/show_bug.cgi?id=29754 Pavel Ondračka dra...@centrum.cz changed: What|Removed |Added URL||http://www.heroesofnewerth. ||com/download.php -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 29762] New: [r300g] Coldest: Buffer too small for color buffer 0 (need 3407872 have 2023424) !
https://bugs.freedesktop.org/show_bug.cgi?id=29762 Summary: [r300g] Coldest: Buffer too small for color buffer 0 (need 3407872 have 2023424) ! Product: Mesa Version: git Platform: Other URL: http://www.coldestgame.com/site/ OS/Version: All Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/r300 AssignedTo: dri-devel@lists.freedesktop.org ReportedBy: s...@whiz.se Hi, The game Coldest isn't rendering properly when run with r300g, quite a lot of objects seems to be missing. This error is logged: The kernel rejected CS, see dmesg for more information. and dmesg reveals: [ 60.158478] [drm:r100_cs_track_check] *ERROR* [drm] Buffer too small for color buffer 0 (need 3407872 have 2023424) ! [ 60.158482] [drm:r100_cs_track_check] *ERROR* [drm] color buffer 0 (832 4 0 1024) [ 60.158483] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream ! Coldest is FLOSS, so source is available if that's helpful to figure this out. System environment: -- system architecture: 32-bit -- Linux distribution: Debian unstable -- GPU: RV570 -- Model: Asus EAX1950Pro 256MB -- Display connector: DVI -- xf86-video-ati: fd686668289258ffaf6b81057545e50612aac6a8 -- xserver: 1.8.99.904 (1.9.0 RC 5) -- mesa: 4b2b5f8e30347ce0a1818524f8825335d47eb5ca -- drm: b61e81a191d3a5c269c5f7c40199aebc9ebc034c -- kernel: 2.6.35 -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 01/14] drm: don't export drm_sg_alloc
It's not used internally by any driver, only by some generic ioctls. So don't export it. Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/drm_scatter.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_scatter.c b/drivers/gpu/drm/drm_scatter.c index 9034c4c..d15e09b 100644 --- a/drivers/gpu/drm/drm_scatter.c +++ b/drivers/gpu/drm/drm_scatter.c @@ -184,8 +184,6 @@ int drm_sg_alloc(struct drm_device *dev, struct drm_scatter_gather * request) drm_sg_cleanup(entry); return -ENOMEM; } -EXPORT_SYMBOL(drm_sg_alloc); - int drm_sg_alloc_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) -- 1.7.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 14/14] drm: kill agp indirection mess
There's no point in jumping through two indirections. So kill one and call the kernels agp functions directly. Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/drm_agpsupport.c | 40 +++-- drivers/gpu/drm/drm_memory.c | 12 ++ include/drm/drmP.h |5 3 files changed, 7 insertions(+), 50 deletions(-) diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c index ba38e01..252fdb9 100644 --- a/drivers/gpu/drm/drm_agpsupport.c +++ b/drivers/gpu/drm/drm_agpsupport.c @@ -193,7 +193,7 @@ int drm_agp_enable_ioctl(struct drm_device *dev, void *data, * \return zero on success or a negative number on failure. * * Verifies the AGP device is present and has been acquired, allocates the - * memory via alloc_agp() and creates a drm_agp_mem entry for it. + * memory via agp_allocate_memory() and creates a drm_agp_mem entry for it. */ int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request) { @@ -211,7 +211,7 @@ int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request) pages = (request-size + PAGE_SIZE - 1) / PAGE_SIZE; type = (u32) request-type; - if (!(memory = drm_alloc_agp(dev, pages, type))) { + if (!(memory = agp_allocate_memory(dev-agp-bridge, pages, type))) { kfree(entry); return -ENOMEM; } @@ -423,38 +423,6 @@ struct drm_agp_head *drm_agp_init(struct drm_device *dev) return head; } -/** Calls agp_allocate_memory() */ -DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data * bridge, -size_t pages, u32 type) -{ - return agp_allocate_memory(bridge, pages, type); -} - -/** Calls agp_free_memory() */ -int drm_agp_free_memory(DRM_AGP_MEM * handle) -{ - if (!handle) - return 0; - agp_free_memory(handle); - return 1; -} - -/** Calls agp_bind_memory() */ -int drm_agp_bind_memory(DRM_AGP_MEM * handle, off_t start) -{ - if (!handle) - return -EINVAL; - return agp_bind_memory(handle, start); -} - -/** Calls agp_unbind_memory() */ -int drm_agp_unbind_memory(DRM_AGP_MEM * handle) -{ - if (!handle) - return -EINVAL; - return agp_unbind_memory(handle); -} - /** * Binds a collection of pages into AGP memory at the given offset, returning * the AGP memory structure containing them. @@ -474,7 +442,7 @@ drm_agp_bind_pages(struct drm_device *dev, DRM_DEBUG(\n); - mem = drm_agp_allocate_memory(dev-agp-bridge, num_pages, + mem = agp_allocate_memory(dev-agp-bridge, num_pages, type); if (mem == NULL) { DRM_ERROR(Failed to allocate memory for %ld pages\n, @@ -487,7 +455,7 @@ drm_agp_bind_pages(struct drm_device *dev, mem-page_count = num_pages; mem-is_flushed = true; - ret = drm_agp_bind_memory(mem, gtt_offset / PAGE_SIZE); + ret = agp_bind_memory(mem, gtt_offset / PAGE_SIZE); if (ret != 0) { DRM_ERROR(Failed to bind AGP memory: %d\n, ret); agp_free_memory(mem); diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c index 70ca27e..c9b8050 100644 --- a/drivers/gpu/drm/drm_memory.c +++ b/drivers/gpu/drm/drm_memory.c @@ -99,29 +99,23 @@ static void *agp_remap(unsigned long offset, unsigned long size, return addr; } -/** Wrapper around agp_allocate_memory() */ -DRM_AGP_MEM *drm_alloc_agp(struct drm_device * dev, int pages, u32 type) -{ - return drm_agp_allocate_memory(dev-agp-bridge, pages, type); -} - /** Wrapper around agp_free_memory() */ void drm_free_agp(DRM_AGP_MEM * handle, int pages) { - drm_agp_free_memory(handle); + agp_free_memory(handle); } EXPORT_SYMBOL(drm_free_agp); /** Wrapper around agp_bind_memory() */ int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start) { - return drm_agp_bind_memory(handle, start); + return agp_bind_memory(handle, start); } /** Wrapper around agp_unbind_memory() */ int drm_unbind_agp(DRM_AGP_MEM * handle) { - return drm_agp_unbind_memory(handle); + return agp_unbind_memory(handle); } EXPORT_SYMBOL(drm_unbind_agp); diff --git a/include/drm/drmP.h b/include/drm/drmP.h index eb80d54..30e827a 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1168,7 +1168,6 @@ extern int drm_mem_info(char *buf, char **start, off_t offset, extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area); extern void drm_free_agp(DRM_AGP_MEM * handle, int pages); -extern DRM_AGP_MEM *drm_alloc_agp(struct drm_device *dev, int pages, u32 type); extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start); extern DRM_AGP_MEM *drm_agp_bind_pages(struct drm_device *dev, struct page **pages, @@ -1328,10 +1327,6 @@ extern int
[PATCH 00/14] various drm core cleanups
Hi all, The following patch-pile contains various cleanups in the drm core. All but patch 12 are resends. I've gone ahead and added the two reviewed-bys that patch 9 scored on the first submission to the patch. Patches apply on top of latest drm-core-next. Tested on my agp rv570 (kms and ums) i945gm and ironlake (both kms only). Other drivers compile-tested. Forward-porting these already a few months old patches only resulted in one trivial conflict. Hence I think that merging this early won't cause a merging headache. Please review and (re)consider for merging to -next. Thanks, Daniel Daniel Vetter (14): drm: don't export drm_sg_alloc drm: kill kernel_context_switch callbacks drm: kill dma_ready callbacks drm: kill procfs callbacks drm: kill drm_map_ofs callbacks drm: kill get_reg_ofs callback drm: kill context_ctor callback drm: don't export drm_get_drawable_info drm: replace drawable ioctl by noops drm: kill dev-timer drm: kill gem_free_object_unlocked driver callback drm: don't export dri1 locking functions drm: drop return value of drm_free_agp drm: kill agp indirection mess drivers/gpu/drm/Makefile |2 +- drivers/gpu/drm/drm_agpsupport.c | 40 +-- drivers/gpu/drm/drm_context.c |8 -- drivers/gpu/drm/drm_drawable.c| 198 - drivers/gpu/drm/drm_drv.c | 10 +- drivers/gpu/drm/drm_gem.c |4 +- drivers/gpu/drm/drm_lock.c| 31 +- drivers/gpu/drm/drm_memory.c | 14 +-- drivers/gpu/drm/drm_proc.c| 13 -- drivers/gpu/drm/drm_scatter.c |2 - drivers/gpu/drm/drm_stub.c|4 - drivers/gpu/drm/drm_vm.c | 13 +-- drivers/gpu/drm/i810/i810_drv.c |2 - drivers/gpu/drm/i830/i830_drv.c |2 - drivers/gpu/drm/i915/i915_drv.c |2 - drivers/gpu/drm/mga/mga_drv.c |2 - drivers/gpu/drm/nouveau/nouveau_drv.c |2 - drivers/gpu/drm/r128/r128_drv.c |2 - drivers/gpu/drm/radeon/radeon_drv.c |4 - drivers/gpu/drm/savage/savage_drv.c |2 - drivers/gpu/drm/sis/sis_drv.c |3 - drivers/gpu/drm/tdfx/tdfx_drv.c |2 - drivers/gpu/drm/via/via_drv.c |2 - drivers/gpu/drm/vmwgfx/vmwgfx_drv.c |2 - include/drm/drmP.h| 38 +-- 25 files changed, 19 insertions(+), 385 deletions(-) delete mode 100644 drivers/gpu/drm/drm_drawable.c ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 03/14] drm: kill dma_ready callbacks
Not used by any driver. So drop it. Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/drm_lock.c |3 --- include/drm/drmP.h |1 - 2 files changed, 0 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_lock.c b/drivers/gpu/drm/drm_lock.c index 566d203..1973d75 100644 --- a/drivers/gpu/drm/drm_lock.c +++ b/drivers/gpu/drm/drm_lock.c @@ -122,9 +122,6 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv) block_all_signals(drm_notifier, dev-sigdata, dev-sigmask); } - if (dev-driver-dma_ready (lock-flags _DRM_LOCK_READY)) - dev-driver-dma_ready(dev); - if (dev-driver-dma_quiescent (lock-flags _DRM_LOCK_QUIESCENT)) { if (dev-driver-dma_quiescent(dev)) { diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 15ea8c4..3dd8796 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -699,7 +699,6 @@ struct drm_driver { int (*suspend) (struct drm_device *, pm_message_t state); int (*resume) (struct drm_device *); int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv); - void (*dma_ready) (struct drm_device *); int (*dma_quiescent) (struct drm_device *); int (*context_ctor) (struct drm_device *dev, int context); int (*context_dtor) (struct drm_device *dev, int context); -- 1.7.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 07/14] drm: kill context_ctor callback
It's not used by any driver. The destructor callback is unfortunately used by the via driver in a rather convoluted piece of code used to reimplement something resembling broken futexes. I didn't dare to touch this code. But at least kill the needless NULL assignemt in the sis driver. Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/drm_context.c |8 drivers/gpu/drm/sis/sis_drv.c |1 - include/drm/drmP.h|1 - 3 files changed, 0 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/drm_context.c b/drivers/gpu/drm/drm_context.c index 2607753..6d440fb 100644 --- a/drivers/gpu/drm/drm_context.c +++ b/drivers/gpu/drm/drm_context.c @@ -333,14 +333,6 @@ int drm_addctx(struct drm_device *dev, void *data, return -ENOMEM; } - if (ctx-handle != DRM_KERNEL_CONTEXT) { - if (dev-driver-context_ctor) - if (!dev-driver-context_ctor(dev, ctx-handle)) { - DRM_DEBUG(Running out of ctxs or memory.\n); - return -ENOMEM; - } - } - ctx_entry = kmalloc(sizeof(*ctx_entry), GFP_KERNEL); if (!ctx_entry) { DRM_DEBUG(out of memory\n); diff --git a/drivers/gpu/drm/sis/sis_drv.c b/drivers/gpu/drm/sis/sis_drv.c index 39f098a..4d9f311 100644 --- a/drivers/gpu/drm/sis/sis_drv.c +++ b/drivers/gpu/drm/sis/sis_drv.c @@ -67,7 +67,6 @@ static struct drm_driver driver = { .driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR, .load = sis_driver_load, .unload = sis_driver_unload, - .context_dtor = NULL, .dma_quiescent = sis_idle, .reclaim_buffers = NULL, .reclaim_buffers_idlelocked = sis_reclaim_buffers_locked, diff --git a/include/drm/drmP.h b/include/drm/drmP.h index b139de9..4fc2ea2 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -700,7 +700,6 @@ struct drm_driver { int (*resume) (struct drm_device *); int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv); int (*dma_quiescent) (struct drm_device *); - int (*context_ctor) (struct drm_device *dev, int context); int (*context_dtor) (struct drm_device *dev, int context); /** -- 1.7.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 08/14] drm: don't export drm_get_drawable_info
Not used by any in-tree user. So drop it. Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/drm_drawable.c |3 +-- include/drm/drmP.h |2 -- 2 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_drawable.c b/drivers/gpu/drm/drm_drawable.c index c53c976..170e531 100644 --- a/drivers/gpu/drm/drm_drawable.c +++ b/drivers/gpu/drm/drm_drawable.c @@ -173,11 +173,10 @@ error: /** * Caller must hold the drawable spinlock! */ -struct drm_drawable_info *drm_get_drawable_info(struct drm_device *dev, drm_drawable_t id) +static struct drm_drawable_info *drm_get_drawable_info(struct drm_device *dev, drm_drawable_t id) { return idr_find(dev-drw_idr, id); } -EXPORT_SYMBOL(drm_get_drawable_info); static int drm_drawable_free(int idr, void *p, void *data) { diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 4fc2ea2..2357a69 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1235,8 +1235,6 @@ extern int drm_rmdraw(struct drm_device *dev, void *data, struct drm_file *file_priv); extern int drm_update_drawable_info(struct drm_device *dev, void *data, struct drm_file *file_priv); -extern struct drm_drawable_info *drm_get_drawable_info(struct drm_device *dev, - drm_drawable_t id); extern void drm_drawable_free_all(struct drm_device *dev); /* Authentication IOCTL support (drm_auth.h) */ -- 1.7.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 13/14] drm: drop return value of drm_free_agp
No caller (rightly) cares about it, so drop it. Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/drm_memory.c |4 ++-- include/drm/drmP.h |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c index 7732268..70ca27e 100644 --- a/drivers/gpu/drm/drm_memory.c +++ b/drivers/gpu/drm/drm_memory.c @@ -106,9 +106,9 @@ DRM_AGP_MEM *drm_alloc_agp(struct drm_device * dev, int pages, u32 type) } /** Wrapper around agp_free_memory() */ -int drm_free_agp(DRM_AGP_MEM * handle, int pages) +void drm_free_agp(DRM_AGP_MEM * handle, int pages) { - return drm_agp_free_memory(handle) ? 0 : -EINVAL; + drm_agp_free_memory(handle); } EXPORT_SYMBOL(drm_free_agp); diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 0798ec5..eb80d54 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1167,8 +1167,8 @@ extern int drm_mem_info(char *buf, char **start, off_t offset, int request, int *eof, void *data); extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area); +extern void drm_free_agp(DRM_AGP_MEM * handle, int pages); extern DRM_AGP_MEM *drm_alloc_agp(struct drm_device *dev, int pages, u32 type); -extern int drm_free_agp(DRM_AGP_MEM * handle, int pages); extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start); extern DRM_AGP_MEM *drm_agp_bind_pages(struct drm_device *dev, struct page **pages, -- 1.7.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 12/14] drm: don't export dri1 locking functions
Only used by ioctl, not by any in-tree drivers. Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/drm_lock.c | 10 +++--- include/drm/drmP.h |1 - 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_lock.c b/drivers/gpu/drm/drm_lock.c index 1973d75..4b9007e 100644 --- a/drivers/gpu/drm/drm_lock.c +++ b/drivers/gpu/drm/drm_lock.c @@ -37,6 +37,8 @@ static int drm_notifier(void *priv); +static int drm_lock_take(struct drm_lock_data *lock_data, unsigned int context); + /** * Lock ioctl. * @@ -170,6 +172,7 @@ int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv) * * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction. */ +static int drm_lock_take(struct drm_lock_data *lock_data, unsigned int context) { @@ -206,7 +209,6 @@ int drm_lock_take(struct drm_lock_data *lock_data, } return 0; } -EXPORT_SYMBOL(drm_lock_take); /** * This takes a lock forcibly and hands it to context. Should ONLY be used @@ -274,7 +276,6 @@ int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context) wake_up_interruptible(lock_data-lock_queue); return 0; } -EXPORT_SYMBOL(drm_lock_free); /** * If we get here, it means that the process has called DRM_IOCTL_LOCK @@ -337,7 +338,6 @@ void drm_idlelock_take(struct drm_lock_data *lock_data) } spin_unlock_bh(lock_data-spinlock); } -EXPORT_SYMBOL(drm_idlelock_take); void drm_idlelock_release(struct drm_lock_data *lock_data) { @@ -357,8 +357,6 @@ void drm_idlelock_release(struct drm_lock_data *lock_data) } spin_unlock_bh(lock_data-spinlock); } -EXPORT_SYMBOL(drm_idlelock_release); - int drm_i_have_hw_lock(struct drm_device *dev, struct drm_file *file_priv) { @@ -367,5 +365,3 @@ int drm_i_have_hw_lock(struct drm_device *dev, struct drm_file *file_priv) _DRM_LOCK_IS_HELD(master-lock.hw_lock-lock) master-lock.file_priv == file_priv); } - -EXPORT_SYMBOL(drm_i_have_hw_lock); diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 07514bf..0798ec5 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1234,7 +1234,6 @@ extern int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv); extern int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv); -extern int drm_lock_take(struct drm_lock_data *lock_data, unsigned int context); extern int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context); extern void drm_idlelock_take(struct drm_lock_data *lock_data); extern void drm_idlelock_release(struct drm_lock_data *lock_data); -- 1.7.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 09/14] drm: replace drawable ioctl by noops
The information supplied by userspace through these ioctls is only accessible by dev-drw_idr. But there's no in-tree user of that. Also userspace does not really care about return values of these ioctls, either. Only hw/xfree86/dri/dri.c from the xserver actually checks the return from adddraw and keeps on trying to create a kernel drawable every time somebody creates a dri drawable. But since that's now a noop, who cares. Therefore it's safe to replace these three ioctls with noops and rip out the implementation. Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch Reviewed-by: Kristian Høgsberg k...@bitplanet.net Reviewed-by: Michel Dänzer mic...@daenzer.net --- drivers/gpu/drm/Makefile |2 +- drivers/gpu/drm/drm_drawable.c | 197 drivers/gpu/drm/drm_drv.c |8 +- drivers/gpu/drm/drm_stub.c |3 - include/drm/drmP.h | 15 --- 5 files changed, 4 insertions(+), 221 deletions(-) delete mode 100644 drivers/gpu/drm/drm_drawable.c diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index f3a23a3..997c43d 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -5,7 +5,7 @@ ccflags-y := -Iinclude/drm drm-y := drm_auth.o drm_buffer.o drm_bufs.o drm_cache.o \ - drm_context.o drm_dma.o drm_drawable.o \ + drm_context.o drm_dma.o \ drm_drv.o drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \ drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \ drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \ diff --git a/drivers/gpu/drm/drm_drawable.c b/drivers/gpu/drm/drm_drawable.c deleted file mode 100644 index 170e531..000 --- a/drivers/gpu/drm/drm_drawable.c +++ /dev/null @@ -1,197 +0,0 @@ -/** - * \file drm_drawable.c - * IOCTLs for drawables - * - * \author Rickard E. (Rik) Faith fa...@valinux.com - * \author Gareth Hughes gar...@valinux.com - * \author Michel Dänzer mic...@tungstengraphics.com - */ - -/* - * Created: Tue Feb 2 08:37:54 1999 by fa...@valinux.com - * - * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. - * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. - * Copyright 2006 Tungsten Graphics, Inc., Bismarck, North Dakota. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the Software), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include drmP.h - -/** - * Allocate drawable ID and memory to store information about it. - */ -int drm_adddraw(struct drm_device *dev, void *data, struct drm_file *file_priv) -{ - unsigned long irqflags; - struct drm_draw *draw = data; - int new_id = 0; - int ret; - -again: - if (idr_pre_get(dev-drw_idr, GFP_KERNEL) == 0) { - DRM_ERROR(Out of memory expanding drawable idr\n); - return -ENOMEM; - } - - spin_lock_irqsave(dev-drw_lock, irqflags); - ret = idr_get_new_above(dev-drw_idr, NULL, 1, new_id); - if (ret == -EAGAIN) { - spin_unlock_irqrestore(dev-drw_lock, irqflags); - goto again; - } - - spin_unlock_irqrestore(dev-drw_lock, irqflags); - - draw-handle = new_id; - - DRM_DEBUG(%d\n, draw-handle); - - return 0; -} - -/** - * Free drawable ID and memory to store information about it. - */ -int drm_rmdraw(struct drm_device *dev, void *data, struct drm_file *file_priv) -{ - struct drm_draw *draw = data; - unsigned long irqflags; - struct drm_drawable_info *info; - - spin_lock_irqsave(dev-drw_lock, irqflags); - - info = drm_get_drawable_info(dev, draw-handle); - if (info == NULL) { - spin_unlock_irqrestore(dev-drw_lock, irqflags); - return -EINVAL; - } - kfree(info-rects); - kfree(info); - - idr_remove(dev-drw_idr, draw-handle); - - spin_unlock_irqrestore(dev-drw_lock, irqflags); -
Re: [now bisected] i915: 2.6.36-rc2 hoses my Intel display
On Mon, 23 Aug 2010 15:17:08 -0600, Jonathan Corbet cor...@lwn.net wrote: I went ahead and bisected the problem, which was added between -rc1 and -rc2. The end result is this: Taking the patch at face value, the cause should be a mistake in error handling. So the first step would be to identify which i2c_transfer() failed. diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 093e914..6afc7cf 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -269,7 +269,7 @@ static bool intel_sdvo_read_byte(struct intel_sdvo *intel_sdvo, u8 addr, u8 *ch) return true; } - DRM_DEBUG_KMS(i2c transfer returned %d\n, ret); + WARN(1, i2c transfer failed, ret=%d\n, ret); return false; } @@ -284,8 +284,13 @@ static bool intel_sdvo_write_byte(struct intel_sdvo *intel_sdvo, int addr, u8 ch .buf = out_buf, } }; + int ret; + + if ((ret = i2c_transfer(intel_sdvo-base.i2c_bus, msgs, 1)) == 1) + return true; - return i2c_transfer(intel_sdvo-base.i2c_bus, msgs, 1) == 1; + WARN(1, i2c transfer failed, ret=%d\n, ret); + return false; } #define SDVO_CMD_NAME_ENTRY(cmd) {cmd, #cmd} -- Chris Wilson, Intel Open Source Technology Centre ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 29738] SIGBUS after upgrade to 2.6.36-rc1-git4 [full stacktrace]
https://bugs.freedesktop.org/show_bug.cgi?id=29738 --- Comment #4 from Alexandre alexandre...@gmail.com 2010-08-23 16:37:19 PDT --- I will try to bisect. It will take a while because I still have not found a consistent a way to trigger the bug. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [now bisected] i915: 2.6.36-rc2 hoses my Intel display
On Mon, 23 Aug 2010 17:32:25 -0600, Jonathan Corbet cor...@lwn.net wrote: On Mon, 23 Aug 2010 23:36:55 +0100 Chris Wilson ch...@chris-wilson.co.uk wrote: Taking the patch at face value, the cause should be a mistake in error handling. So the first step would be to identify which i2c_transfer() failed. OK, I tried it, but neither warning triggers. Sigh, that sounds like I screwed the patch up instead. Thanks. Don't know if it helps or not, but I tried booting with drm.debug=0x05. The result was truly vast amounts of stuff like this: Aug 23 17:20:59 bike kernel: m:drm_ioctl], pid=2032, cmd=0x6458 nm:drm_ioctl], pid=2032, cmd=0x6458, nm:drm_ioctl], pid=2032, cmd=0x645 [snip] The above is one line from the system log; I took the liberty of wrapping it for readability. Hmm, probably bailing out of the ioctl before hitting the newline. drm.debug=0x4 should print the right information for this bug. -- Chris Wilson, Intel Open Source Technology Centre ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [now bisected] i915: 2.6.36-rc2 hoses my Intel display
On Tue, 24 Aug 2010 00:37:52 +0100 Chris Wilson ch...@chris-wilson.co.uk wrote: drm.debug=0x4 should print the right information for this bug. That doesn't seem to give me any output at all. One thing I noticed, though, is that I occasionally get something like: Aug 23 17:43:14 bike kernel: [ 142.920185] [drm:intel_calculate_wm] *ERROR* Insufficient FIFO for plane, expect flickering: entries required = 51, available = 28. They seem to come in threes, for whatever that's worth. Thanks, jon ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[REGRESSION, i915]: Periodic stalls with 2.6.36-rc2
Hi, With 2.6.36-rc2 I see periodic stalls when running with a stock Ubuntu 10.04 userspace. These stalls were not present in 2.6.36-rc1 on an EeePC 900 with an i915. Attempts to bisect the issue are not successful - most kernels in between rc1 and rc2 just make the system come up with a black screen which takes minutes between showing messages (rather than finishing in two seconds). bc584c5107bfd97e2aa41c798e3b213bcdd4eae7 seems to be good but 45d7f32c7a43cbb9592886d38190e379e2eb2226 is not. Warnings like: [ 64.227046] [drm:intel_calculate_wm] *ERROR* Insufficient FIFO for plane, expect flickering: entries required = 36, available = 31. [ 82.953011] [drm:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed... GPU idle, missed IRQ. appear frequently in the dmesg and the stalls are most visible when playing fullscreen video. The first warning message (Insufficient FIFO...) is present in 2.6.36-rc1 but not 2.6.35. One additional quirk is that a more recent X userspace (xserver-xorg-video-intel 2:2.12.0+git20100810.19c48d3b-0ubuntu0sarvatt2~lucid, libdrm-intel1 2.4.21+git20100804.431f7f00-0ubuntu0sarvatt~lucid, xorg 1:7.5+6ubuntu1) now has major tearing (when watching video) and refresh (in general at least when using compiz) issues which were not seen with 2.6.36-rc1. -- Sitsofe | http://sucs.org/~sits/ ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
https://bugs.freedesktop.org/show_bug.cgi?id=28294 Bug 28294 depends on bug 29722, which changed state. Bug 29722 Summary: [glsl] Unigine Sanctuary v2.2 assertion failed https://bugs.freedesktop.org/show_bug.cgi?id=29722 What|Old Value |New Value Status|NEW |ASSIGNED Resolution||FIXED Status|ASSIGNED|RESOLVED -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel