[PATCH 2/2] drm/ttm: improve uncached page deallocation.

2015-07-09 Thread j.gli...@gmail.com
From: Jérôme Glisse Calls to set_memory_wb() incure heavy TLB flush and IPI cost. To minimize those wait until pool grow beyond batch size before draining the pool. Signed-off-by: Jérôme Glisse Reviewed-by: Mario Kleiner Reviewed-and-Tested-by: Michel Dänzer

[PATCH 1/2] drm/ttm: fix uncached page deallocation to properly fill page pool v3.

2015-07-09 Thread j.gli...@gmail.com
From: Jérôme Glisse Current code never allowed the page pool to actualy fill in anyway. This fix it, so that we only start freeing page from the pool when we go over the pool size. Changed since v1: - Move the page batching optimization to its separate patch. Changed

[PATCH 2/2] drm/ttm: improve uncached page deallocation.

2015-07-08 Thread j.gli...@gmail.com
From: Jérôme Glisse Calls to set_memory_wb() incure heavy TLB flush and IPI cost. To minimize those wait until pool grow beyond batch size before draining the pool. Signed-off-by: Jérôme Glisse Reviewed-by: Mario Kleiner Cc: Michel Dänzer Cc: Thomas Hellstrom Cc:

[PATCH 1/2] drm/ttm: fix object deallocation to properly fill in the page pool.

2015-07-08 Thread j.gli...@gmail.com
From: Jérôme Glisse Current code never allowed the page pool to actualy fill in anyway. This fix it, so that we only start freeing page from the pool when we go over the pool size. Signed-off-by: Jérôme Glisse Reviewed-by: Mario Kleiner Tested-by: Michel Dänzer Cc:

[PATCH 2/2] drm/radeon: SDMA fix hibernation (CI GPU family).

2015-06-19 Thread j.gli...@gmail.com
From: Jérôme Glisse In order for hibernation to reliably work we need to properly turn off the SDMA block, sadly after numerous attemps i haven't not found proper sequence for clean and full shutdown. So simply reset both SDMA block, this makes hibernation works reliably on

[PATCH 1/2] drm/radeon: compute ring fix hibernation (CI GPU family) v2.

2015-06-19 Thread j.gli...@gmail.com
From: Jérôme Glisse In order for hibernation to reliably work we need to cleanup more thoroughly the compute ring. Hibernation is different from suspend resume as when we resume from hibernation the hardware is first fully initialize by regular kernel then freeze callback

[PATCH 2/2] drm/radeon: SDMA fix hibernation (CI GPU family).

2015-06-18 Thread j.gli...@gmail.com
From: Jérôme Glisse In order for hibernation to reliably work we need to properly turn off the SDMA block, sadly after numerous attemps i haven't not found proper sequence for clean and full shutdown. So simply reset both SDMA block, this makes hibernation works reliably on

[PATCH 1/2] drm/radeon: compute ring fix hibernation (CI GPU family).

2015-06-18 Thread j.gli...@gmail.com
From: Jérôme Glisse In order for hibernation to reliably work we need to cleanup more thoroughly the compute ring. Hibernation is different from suspend resume as when we resume from hibernation the hardware is first fully initialize by regular kernel then freeze callback

[PATCH] drm/radeon: fix freeze for laptop with Turks/Thames GPU.

2015-06-05 Thread j.gli...@gmail.com
From: Jérôme Glisse Laptop with Turks/Thames GPU will freeze if dpm is enabled. It seems the SMC engine is relying on some state inside the CP engine. CP needs to chew at least one packet for it to get in good state for dynamic power management. This patch simply disabled

[PATCH] drm/radeon: fix cut and paste issue for hawaii.

2014-07-24 Thread j.gli...@gmail.com
From: Jerome Glisse This is a halfway fix for hawaii acceleration. More fixes to come but hopefully isolated to userspace. Signed-off-by: J?r?me Glisse Cc: stable at vger.kernel.org --- drivers/gpu/drm/radeon/cik.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH] exynos: Put a stop to the userptr heresy.

2014-06-30 Thread j.gli...@gmail.com
From: Jerome Glisse get_user_pages gives no garanty that page it returns are still the one backing the vma by the time it returns. Thus any ioctl that rely on this behavior is broken and rely on pure luck. To avoid any false hope from userspace stop such useage by simply flat

[PATCH] i915: purify user ptr ioctl through the fire of truth.

2014-06-30 Thread j.gli...@gmail.com
From: Jerome Glisse Heresy should not be tolerated, any ioctl that rely on pure luck should die. Violating memory pining kernel policy and all the reasonable expection kernel have about user of mmu_notifier api is not tolerable. Because we can neither broke old userspace the

[PATCH] drm/radeon: avoid segfault on device open when accel is not working.

2014-05-07 Thread j.gli...@gmail.com
From: J?r?me Glisse When accel is not working on device with virtual address space radeon segfault because the ib buffer is NULL and trying to map it inside the virtual address space trigger segfault. This patch only map the ib buffer if accel is working. Cc: Signed-off-by:

[PATCH] drm/radeon: free uvd ring on unload

2014-02-26 Thread j.gli...@gmail.com
From: Jerome Glisse Need to free the uvd ring. Also reshuffle gart tear down to happen after uvd tear down. Signed-off-by: J?r?me Glisse Cc: stable at vger.kernel.org --- drivers/gpu/drm/radeon/evergreen.c | 2 +- drivers/gpu/drm/radeon/radeon_uvd.c | 2 ++

[PATCH] radeon: workaround pining failure on low ram gpu

2013-11-12 Thread j.gli...@gmail.com
From: Jerome Glisse GPU with low amount of ram can fails at pining new framebuffer before unpining old one. On such failure, retry with unping old one before pining new one allowing to work around the issue. This is somewhat ugly but only affect those old GPU we care about.

[PATCH] drm/radeon: use radeon device for request firmware

2013-07-11 Thread j.gli...@gmail.com
From: Jerome Glisse Avoid creating temporary platform device that will lead to issue when several radeon gpu are in same computer. Instead directly use the radeon device for requesting firmware. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/cik.c| 25

[PATCH] drm/radeon: update lockup tracking when scheduling in empty ring

2013-06-19 Thread j.gli...@gmail.com
From: Jerome Glisse There might be issue with lockup detection when scheduling on an empty ring that have been sitting idle for a while. Thus update the lockup tracking data when scheduling new work in an empty ring. Signed-off-by: Jerome Glisse Tested-by: Andy Lutomirski

[PATCH] drm/radeon: fix write back suspend regression with uvd

2013-06-06 Thread j.gli...@gmail.com
From: Jerome Glisse UVD ring can't use scratch thus it does need writeback buffer to keep a valid address or radeon_ring_backup will trigger a kernel fault. It's ok to not unpin the write back buffer on suspend as it leave in gtt and thus does not need eviction. Reported

[PATCH] drm/radeon: do not try to uselessly update virtual memory pagetable

2013-06-06 Thread j.gli...@gmail.com
From: Jerome Glisse If a buffer is never bind to a virtual memory pagetable than don't try to unbind it. Only drawback is that we don't update the pagetable when unbinding the ib pool buffer which is fine because it only happens at suspend or module unload/shutdown. Cc:

[PATCH] radeon: add bo tracking debugfs

2013-04-25 Thread j.gli...@gmail.com
From: Jerome Glisse This is to allow debugging of userspace program not freeing buffer after, which is basicly a memory leak. This print the list of all gem object along with their size and placement (VRAM,GTT,CPU) and with the pid of the task that created them.

[PATCH 2/2] radeon: add si tiling support v5

2013-04-10 Thread j.gli...@gmail.com
From: Jerome Glisse v2: Only writte tile index if flags for it is set v3: Remove useless allow2d scanout flags v4: Split radeon_drm.h update to its own patch v5: update against lastest next tree for radeon Signed-off-by: Jerome Glisse --- radeon/radeon_surface.c | 658

[PATCH 1/2] radeon: update radeon_drm.h to kernel last API additions v2

2013-04-10 Thread j.gli...@gmail.com
From: Jerome Glisse v2: sync with radeon-next tree for 3.10 http://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next-3.10-wip Signed-off-by: Jerome Glisse --- include/drm/radeon_drm.h | 81 1 file changed, 81 insertions(+)

[PATCH 2/2] radeon: add si tiling support v4

2013-04-08 Thread j.gli...@gmail.com
From: Jerome Glisse v2: Only writte tile index if flags for it is set v3: Remove useless allow2d scanout flags v4: Split radeon_drm.h update to its own patch Signed-off-by: Jerome Glisse --- radeon/radeon_surface.c | 658

[PATCH 1/2] radeon: update radeon_drm.h to kernel last API additions

2013-04-08 Thread j.gli...@gmail.com
From: Jerome Glisse Signed-off-by: Jerome Glisse --- include/drm/radeon_drm.h | 61 1 file changed, 61 insertions(+) diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 00d66b3..ff3ce3a 100644 ---

[PATCH] radeon: add si tiling support v3

2013-04-05 Thread j.gli...@gmail.com
From: Jerome Glisse v2: Only writte tile index if flags for it is set v3: Remove useless allow2d scanout flags Signed-off-by: Jerome Glisse --- include/drm/radeon_drm.h | 61 + radeon/radeon_surface.c | 658 +++

[PATCH] drm/radeon: add si tile mode array query v2

2013-04-05 Thread j.gli...@gmail.com
From: Jerome Glisse Allow userspace to query for the tile mode array so userspace can properly compute surface pitch and alignment requirement depending on tiling. v2: Make strict aliasing safer by casting to char when copying Signed-off-by: Jerome Glisse ---

[PATCH] radeon: add si tiling support v2

2013-04-04 Thread j.gli...@gmail.com
From: Jerome Glisse v2: Only writte tile index if flags for it is set Signed-off-by: Jerome Glisse --- include/drm/radeon_drm.h | 61 + radeon/radeon_surface.c | 664 +++ radeon/radeon_surface.h | 31 +++ 3 files changed,

[PATCH] drm/radeon: add si tile mode array query

2013-04-03 Thread j.gli...@gmail.com
From: Jerome Glisse Allow userspace to query for the tile mode array so userspace can properly compute surface pitch and alignment requirement depending on tiling. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon.h | 1 +

[PATCH] radeon: add si tiling support

2013-04-03 Thread j.gli...@gmail.com
From: Jerome Glisse Signed-off-by: Jerome Glisse --- include/drm/radeon_drm.h | 61 + radeon/radeon_surface.c | 663 +++ radeon/radeon_surface.h | 30 +++ 3 files changed, 709 insertions(+), 45 deletions(-) diff --git

[PATCH] drm/radeon: Catch reservation deadlock on same buffer with different handle v2

2013-02-13 Thread j.gli...@gmail.com
From: Jerome Glisse This patch print a warning message when trying to reserve same buffer twice in same cs ioctl (because the buffer is known by userspace under 2 different handle). It does not try to fix the issue like : https://patchwork.kernel.org/patch/1812991/ Just to

[PATCH] drm/radeon: Catch reservation deadlock on same buffer with different handle

2013-02-13 Thread j.gli...@gmail.com
From: Jerome Glisse This patch print a warning message when trying to reserve same buffer twice in same cs ioctl (because the buffer is known by userspace under 2 different handle). It does not try to fix the issue like : https://patchwork.kernel.org/patch/1812991/ Just to

[PATCH] drm/radeon: enforce use of radeon_get_ib_value when reading user cmd

2013-02-11 Thread j.gli...@gmail.com
From: Jerome Glisse When ever parsing cmd buffer supplied by userspace we need to use radeon_get_ib_value rather than directly accessing the ib as the user cmd might not yet be copied into the ib thus the parser might read value that does not correspond to what user is

[PATCH] drm/radeon: copy userspace cmd to local copy before processing it v3

2013-02-08 Thread j.gli...@gmail.com
From: Jerome Glisse In some rare case were packet is big enough to go over page boundary we might not have copied yet the userspace data into the local copy resulting in kernel reading garbage data. Without this patch kernel might submit unprocessed/unrelocated cmd to the

[PATCH] drm/ttm: avoid allocation memory while spinlock is held v2

2013-02-04 Thread j.gli...@gmail.com
From: Jerome Glisse We need to take reference on the sync object while holding the fence spinlock but at the same time we don't want to allocate memory while holding the spinlock. This patch make sure we enforce both of this constraint. v2: actually test build it Fix

[PATCH] drm/ttm: avoid allocation memory while spinlock is held

2013-02-04 Thread j.gli...@gmail.com
From: Jerome Glisse We need to take reference on the sync object while holding the fence spinlock but at the same time we don't want to allocate memory while holding the spinlock. This patch make sure we enforce both of this constraint. Fix

[PATCH] drm/radeon: fix cursor corruption on aruba and newer

2013-01-21 Thread j.gli...@gmail.com
From: Jerome Glisse Aruba and newer gpu does not need the avivo cursor work around, quite the opposite this work around lead to corruption. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon_cursor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] drm/radeon: improve semaphore debugging on lockup

2013-01-11 Thread j.gli...@gmail.com
From: Jerome Glisse Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon.h | 2 ++ drivers/gpu/drm/radeon/radeon_ring.c | 2 ++ drivers/gpu/drm/radeon/radeon_semaphore.c | 4 3 files changed, 8 insertions(+) diff --git

[PATCH 2/2] radeon/kms: cleanup async dma packet checking

2013-01-09 Thread j.gli...@gmail.com
From: Jerome Glisse This simplify and cleanup the async dma checking. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/evergreen.c| 16 +- drivers/gpu/drm/radeon/evergreen_cs.c | 807 +- drivers/gpu/drm/radeon/evergreend.h |

[PATCH 1/2] radeon/kms: fix dma relocation checking

2013-01-09 Thread j.gli...@gmail.com
From: Jerome Glisse We were checking the index against the size of the relocation buffer instead of against the last index. This fix kernel segfault when userspace submit ill formated command stream/relocation buffer pair. Signed-off-by: Jerome Glisse ---

[PATCH] radeon/kms: force rn50 chip to always report connected on analog output

2013-01-08 Thread j.gli...@gmail.com
From: Jerome Glisse Those rn50 chip are often connected to console remoting hw and load detection often fails with those. Just don't try to load detect and report connect. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 8 1 file

[PATCH 2/2] drm/radeon: reset dma engine on gpu reset

2013-01-02 Thread j.gli...@gmail.com
From: Jerome Glisse This try to reset the dma engine when performing gpu reset. Hopefully bringing back the gpu dma engine in sane state. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/evergreen.c | 30 +-

[PATCH 1/2] drm/radeon: improve ring debugfs printing

2013-01-02 Thread j.gli...@gmail.com
From: Jerome Glisse Print 32dword before last know rptr as problem most likely comes from previous command. Also small cosmetic change to the printing. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon_ring.c | 20 +--- 1 file changed, 13

[PATCH 2/2] drm/radeon: print dma status reg on lockup

2013-01-02 Thread j.gli...@gmail.com
From: Jerome Glisse To help debug dma related lockup. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/evergreen.c | 4 drivers/gpu/drm/radeon/evergreend.h | 3 +++ drivers/gpu/drm/radeon/ni.c | 4 drivers/gpu/drm/radeon/nid.h| 1 -

[PATCH 1/2] drm/radeon: add debugfs file for dma rings

2013-01-02 Thread j.gli...@gmail.com
From: Jerome Glisse Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon_ring.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index ebd6956..9410e43 100644 ---

[PATCH] drm/radeon: add support for MEM_WRITE packet

2012-12-19 Thread j.gli...@gmail.com
From: Jerome Glisse To make it easier to debug some lockup from userspace add support to MEM_WRITE packet. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/evergreen_cs.c | 29 + drivers/gpu/drm/radeon/r600_cs.c | 29

[PATCH] drm/radeon: avoid deadlock in pm path when waiting for fence

2012-12-17 Thread j.gli...@gmail.com
From: Jerome Glisse radeon_fence_wait_empty_locked should not trigger GPU reset as no place where it's call from would benefit from such thing and it actually lead to a kernel deadlock in case the reset is triggered from pm codepath. Instead force ring completion in place

[PATCH] drm/radeon: don't leave fence blocked process on failed GPU reset

2012-12-17 Thread j.gli...@gmail.com
From: Jerome Glisse Force all fence to signal if GPU reset failed so no process get stuck on waiting fence. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon.h| 1 + drivers/gpu/drm/radeon/radeon_device.c | 1 + drivers/gpu/drm/radeon/radeon_fence.c

[PATCH] drm/radeon: restore modeset late in GPU reset path

2012-12-14 Thread j.gli...@gmail.com
From: Jerome Glisse Modeset path seems to conflict sometimes with the memory management leading to kernel deadlock. This move modesetting reset after GPU acceleration reset. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon_device.c | 3 ++- 1 file changed, 2

[PATCH] drm/radeon: resume fence driver to last sync sequence on lockup

2012-12-14 Thread j.gli...@gmail.com
From: Jerome Glisse After lockup we need to resume fence to last sync sequence and not last received sequence so that all thread waiting on command stream that lockedup resume. Otherwise GPU reset will be ineffective in most cases. Signed-off-by: Jerome Glisse ---

[PATCH] drm/radeon: fix htile buffer size computation for command stream checker

2012-12-13 Thread j.gli...@gmail.com
From: Jerome Glisse Fix the size computation of the htile buffer. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/evergreen_cs.c | 17 +-- drivers/gpu/drm/radeon/r600_cs.c | 92 --- drivers/gpu/drm/radeon/radeon_drv.c | 3

[PATCH] drm/radeon: fix fence driver for dma ring when wb is disabled

2012-12-12 Thread j.gli...@gmail.com
From: Jerome Glisse The dma ring can't write to register thus have to write to memory its fence value. This ensure that it doesn't try to use scratch register for dma ring fence driver. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/r600.c | 3 ++-

[PATCH] drm/radeon: fix amd afusion gpu setup aka sumo v2

2012-12-11 Thread j.gli...@gmail.com
From: Jerome Glisse Set the proper number of tile pipe that should be a multiple of pipe depending on the number of se engine. Fix: https://bugs.freedesktop.org/show_bug.cgi?id=56405 https://bugs.freedesktop.org/show_bug.cgi?id=56720 v2: Don't change sumo2 Signed-off-by:

[PATCH 2/2] drm/radeon: buffer memory placement work thread WIP

2012-11-29 Thread j.gli...@gmail.com
From: Jerome Glisse Use delayed work thread to move buffer out of vram if they haven't been use over some period of time. This allow to make room for buffer that are actively use. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon.h| 13 ++

[PATCH 1/2] drm/radeon: do not move bo to different placement at each cs

2012-11-29 Thread j.gli...@gmail.com
From: Jerome Glisse The bo creation placement is where the bo will be. Instead of trying to move bo at each command stream let this work to another worker thread that will use more advance heuristic. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon.h|

[RFC] improve memory placement for radeon

2012-11-29 Thread j.gli...@gmail.com
So as a followup is 2 patch. The first one just stop trying to move object at each cs ioctl i believe it could be included in 3.7 as it improve performances (especialy with vram change from userspace). The second one implement a vram eviction policy. It's a simple one, buffer used for write

[PATCH] drm/radeon: fix rare segfault after gpu lockup on r7xx

2012-11-29 Thread j.gli...@gmail.com
From: Jerome Glisse If GPU reset fails the gart table ptr might be NULL avoid a kernel segfault in this rare event. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/r600.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH] drm/radeon: use cached memory when evicting for vram on non agp

2012-11-28 Thread j.gli...@gmail.com
From: Jerome Glisse Force the use of cached memory when evicting from vram on non agp hardware. Also force write combine on agp hw. This is to insure the minimum cache type change when allocating memory and improving memory eviction especialy on pci/pcie hw. Signed-off-by:

[PATCH] drm/ttm: add minimum residency constraint for bo eviction

2012-11-28 Thread j.gli...@gmail.com
From: Jerome Glisse This patch add a minimum residency time configurable for each memory pool (VRAM, GTT, ...). Intention is to avoid having a lot of memory eviction from VRAM up to a point where the GPU pretty much spend all it's time moving things in and out.

[RFC] drm/ttm: add minimum residency constraint for bo eviction

2012-11-28 Thread j.gli...@gmail.com
So i spend the day looking at ttm and eviction. The first patch i sent earlier is i believe something that should be merged. This patch however is more about discussing if other people are interested in similar mecanism to be share among driver through ttm. I could otherwise just move its logic to

[PATCH] drm/ttm: do not try to preserve caching state

2012-11-28 Thread j.gli...@gmail.com
From: Jerome Glisse It make no sense to preserve caching state especialy when moving from vram to system. It burden the page allocator to match the vram caching (often WC) which just burn CPU cycle for no good reasons. Signed-off-by: Jerome Glisse ---

[PATCH] radeon: fix pll/ctrc mapping on dce2 and dce3 hardware

2012-11-27 Thread j.gli...@gmail.com
From: Jerome Glisse This fix black screen on resume issue that some people are experiencing. There is a bug in the atombios code regarding pll/crtc mapping. The atombios code reverse the logic for the pll and crtc mapping. Signed-off-by: Jerome Glisse ---

[PATCH] drm/radeon: track global bo name and always return the same

2012-11-27 Thread j.gli...@gmail.com
From: Jerome Glisse To avoid kernel rejecting cs if we return different global name for same bo keep track of global name and always return the same. Seems to fix issue with suspend/resume failing and repeatly printing following message : [drm:radeon_cs_ioctl] *ERROR* Failed

[PATCH 2/2] drm/radeon: fix deadlock when bo is associated to different handle

2012-11-27 Thread j.gli...@gmail.com
From: Jerome Glisse There is a rare case, that seems to only happen accross suspend/resume cycle, where a bo is associated with several different handle. This lead to a deadlock in ttm buffer reservation path. This could only happen with flinked(globaly exported) object.

[PATCH 1/2] radeon: fix pll/ctrc mapping on dce2 and dce3 hardware v2

2012-11-27 Thread j.gli...@gmail.com
From: Jerome Glisse This fix black screen on resume issue that some people are experiencing. There is a bug in the atombios code regarding pll/crtc mapping. The atombios code reverse the logic for the pll and crtc mapping. v2: DCE3 or DCE2 only have 2 crtc Signed-off-by:

[PATCH] drm/radeon: force dma32 to fix regression rs4xx,rs6xx,rs740

2012-08-28 Thread j.gli...@gmail.com
From: Jerome Glisse It seems some of those IGP dislike non dma32 page despite what documentation says. Fix regression since we allowed non dma32 pages. It seems it only affect some revision of those IGP chips as we don't know which one just force dma32 for all of them.

[PATCH] drm/radeon: force dma32 on rs400, rs690, rs740 IGP

2012-08-28 Thread j.gli...@gmail.com
From: Jerome Glisse It seems some of those IGP dislike non dma32 page. https://bugzilla.redhat.com/show_bug.cgi?id=785375 Signed-off-by: Jerome Glisse Cc: --- drivers/gpu/drm/radeon/radeon_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] drm/radeon: avoid turning off spread spectrum for used pll

2012-08-17 Thread j.gli...@gmail.com
From: Jerome Glisse If spread spectrum is enabled and in use for a given pll we should not turn it off as it will lead to turning off display for crtc that use the pll (this behavior was observed on chelsea edp). Signed-off-by: Jerome Glisse ---

[PATCH] drm/edid: limit printk when facing bad edid

2012-08-09 Thread j.gli...@gmail.com
From: Jerome Glisse Limit printing bad edid information at one time per connector. Connector that are connected to a bad monitor/kvm will likely stay connected to the same bad monitor/kvm and it makes no sense to keep printing the bad edid message. Signed-off-by: Jerome

[PATCH] drm/radeon: delay virtual address destruction to bo destruction

2012-08-08 Thread j.gli...@gmail.com
From: Jerome Glisse Use the ttm bo delayed destruction queue so that we don't block userspace when destroying bo. The virtual address destruction will happen at same time as the real bo destruction when everythings using the bo is done. Signed-off-by: Jerome Glisse ---

[PATCH] drm/radeon: fence virtual address and free it once idle [3.5] v4

2012-08-06 Thread j.gli...@gmail.com
From: Jerome Glisse Virtual address need to be fenced to know when we can safely remove it. This patch also properly clear the pagetable. Previously it was serouisly broken. v2: For to update pagetable when unbinding bo (don't bailout if bo_va->valid is true). v3: Fix

[PATCH] drm/radeon: fence virtual address and free it once idle v4

2012-08-06 Thread j.gli...@gmail.com
From: Jerome Glisse Virtual address need to be fenced to know when we can safely remove it. This patch also properly clear the pagetable. Previously it was serouisly broken. Kernel 3.5/3.4 need a similar patch but adapted for difference in mutex locking. v2: For to update

[PATCH] drm/radeon: fence virtual address and free it once idle [3.5] v3

2012-08-06 Thread j.gli...@gmail.com
From: Jerome Glisse Virtual address need to be fenced to know when we can safely remove it. This patch also properly clear the pagetable. Previously it was serouisly broken. v2: For to update pagetable when unbinding bo (don't bailout if bo_va->valid is true). v3: Fix

[PATCH] drm/radeon: fence virtual address and free it once idle v3

2012-08-03 Thread j.gli...@gmail.com
From: Jerome Glisse Virtual address need to be fenced to know when we can safely remove it. This patch also properly clear the pagetable. Previously it was serouisly broken. Kernel 3.5/3.4 need a similar patch but adapted for difference in mutex locking. v2: For to update

[PATCH] drm/radeon: fence virtual address and free it once idle [3.5] v2

2012-08-03 Thread j.gli...@gmail.com
From: Jerome Glisse Virtual address need to be fenced to know when we can safely remove it. This patch also properly clear the pagetable. Previously it was serouisly broken. v2: For to update pagetable when unbinding bo (don't bailout if bo_va->valid is true). This

[PATCH] drm/radeon: fence virtual address and free it once idle v2

2012-08-03 Thread j.gli...@gmail.com
From: Jerome Glisse Virtual address need to be fenced to know when we can safely remove it. This patch also properly clear the pagetable. Previously it was serouisly broken. v2: For to update pagetable when unbinding bo (don't bailout if bo_va->valid is true).

[PATCH] drm/radeon: fix virtual memory locking in case of reset

2012-08-02 Thread j.gli...@gmail.com
From: Jerome Glisse Lock/unlock mutex in proper order to avoid deadlock in case of GPU reset triggered from VM code path. Cc: stable at vger.kernel.org [3.5] Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon_gart.c | 11 +-- 1 file changed, 9

[PATCH 2/3] drm/radeon: try to keep current vram GPU address

2012-07-27 Thread j.gli...@gmail.com
From: Jerome Glisse It seems we can't move the VRAM GPU address without disabling CRTC. Thus if we want to support flicker free boot from UEFI to X, we need to keep the VRAM GPU address UEFI programmed. So far on all UEFI checked this address was something sane.

[PATCH 1/3] drm/radeon: do not reenable crtc after moving vram start address

2012-07-27 Thread j.gli...@gmail.com
From: Jerome Glisse It seems we can not update the crtc scanout address. After disabling crtc, update to base address do not take effect after crtc being reenable leading to at least frame being scanout from the old crtc base address. Disabling crtc display request lead to

Fix GPU triggering random system read after VRAM start change

2012-07-27 Thread j.gli...@gmail.com
So first patch is a fix in itself, smallest possible and should go to stable. Second patch is an improvement as a first step to flicker free boot. I have yet extensively tested second patch, especialy not on AGP but so far on few GPU/motherboard it looks good. It can probably wait 3.7. Will test

[PATCH] drm/radeon: fix dpms on/off on trinity/aruba v2

2012-07-24 Thread j.gli...@gmail.com
From: Jerome Glisse The external encoder need to be setup again before enabling the transmiter. This seems to be only needed on some trinity/aruba to fix dpms on. v2: Add comment, only setup again on dce6 ie aruba or newer. Cc: Signed-off-by: Jerome Glisse ---

[PATCH] drm/radeon: fix dpms on/off on trinity/aruba

2012-07-24 Thread j.gli...@gmail.com
From: Jerome Glisse The external encoder need to be setup again before enabling the transmiter. This seems to be only needed on some trinity/aruba to fix dpms on. Cc: Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/atombios_encoders.c |6 -- 1 file

[PATCH] drm/radeon: hotplug of passive dp to dvi|hdmi|vga adaptor

2012-07-19 Thread j.gli...@gmail.com
From: Jerome Glisse We should not turn off the connector neither try to retrain DP link if a passive DP adaptor is connected to a DP port. Cc: Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon_connectors.c | 22 -- 1 file changed, 20

[PATCH] drm/radeon: fix non revealent error message

2012-07-17 Thread j.gli...@gmail.com
From: Jerome Glisse We want to print link status query failed only if it's an unexepected fail. If we query to see if we need link training it might be because there is nothing connected and thus link status query have the right to fail in that case. To avoid printing

[PATCH] drm/radeon: on hotplug force link training to happen

2012-07-17 Thread j.gli...@gmail.com
From: Jerome Glisse To have kernel behave like VGA/DVI we need to retrain link on hotplug. For this to happen with need to report that we need to link training to happen if we fail to get link status and we need to force link training to happen by setting connector dpms to

[PATCH] drm/radeon: fix bo creation retry path

2012-07-12 Thread j.gli...@gmail.com
From: Jerome Glisse Retry label was at wrong place in function leading to memory leak. Cc: Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon_object.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH] drm/radeon: add an exclusive lock for GPU reset v2

2012-07-02 Thread j.gli...@gmail.com
From: Jerome Glisse GPU reset need to be exclusive, one happening at a time. For this add a rw semaphore so that any path that trigger GPU activities have to take the semaphore as a reader thus allowing concurency. The GPU reset path take the semaphore as a writer ensuring

[PATCH] drm/radeon: fix rare segfault

2012-07-02 Thread j.gli...@gmail.com
From: Jerome Glisse In gem idle/busy ioctl the radeon object was derefenced after drm_gem_object_unreference_unlocked which in case the object have been destroyed lead to use of a possibly free pointer with possibly wrong data. Signed-off-by: Jerome Glisse ---

[PATCH] drm/radeon: add an exclusive lock for GPU reset

2012-07-02 Thread j.gli...@gmail.com
From: Jerome Glisse GPU reset need to be exclusive, one happening at a time. For this add a rw semaphore so that any path that trigger GPU activities have to take the semaphore as a reader thus allowing concurency. The GPU reset path take the semaphore as a writer ensuring

[PATCH] drm/radeon: disable any GPU activity after unrecovered lockup v5

2012-06-27 Thread j.gli...@gmail.com
From: Jerome Glisse After unrecovered GPU lockup avoid any GPU activities to avoid things like kernel segfault and alike to happen in any of the path that assume hw is working. The segfault is due to PCIE vram gart table being unmapped after suspend in the GPU reset path. To

[PATCH] drm/radeon: disable any GPU activity after unrecovered lockup v4

2012-06-27 Thread j.gli...@gmail.com
From: Jerome Glisse After unrecovered GPU lockup avoid any GPU activities to avoid things like kernel segfault and alike to happen in any of the path that assume hw is working. The segfault is due to PCIE vram gart table being unmapped after suspend in the GPU reset path. To

[PATCH] drm/radeon: disable any GPU activity after unrecovered lockup v3

2012-06-27 Thread j.gli...@gmail.com
From: Jerome Glisse After unrecovered GPU lockup avoid any GPU activities to avoid things like kernel segfault and alike to happen in any of the path that assume hw is working. The segfault is due to PCIE vram gart table being unmapped after suspend in the GPU reset path. To

[PATCH] drm/radeon: improve GPU lockup debugging info on r6xx/r7xx/r8xx/r9xx

2012-06-27 Thread j.gli...@gmail.com
From: Jerome Glisse Print various CP register that have valuable informations regarding GPU lockup. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/evergreen.c | 16 drivers/gpu/drm/radeon/evergreend.h |4 drivers/gpu/drm/radeon/ni.c

[PATCH] drm/radeon: disable any GPU activity after unrecovered lockup v2

2012-06-27 Thread j.gli...@gmail.com
From: Jerome Glisse After unrecovered GPU lockup avoid any GPU activities to avoid things like kernel segfault and alike to happen in any of the path that assume hw is working. The segfault is due to PCIE vram gart table being unmapped after suspend in the GPU reset path. To

[PATCH] drm/radeon: disable any GPU activity after unrecovered lockup

2012-06-26 Thread j.gli...@gmail.com
From: Jerome Glisse After unrecovered GPU lockup avoid any GPU activities to avoid things like kernel segfault and alike to happen in any of the path that assume hw is working. cc: stable at vger.kernel.org Signed-off-by: Jerome Glisse ---

[PATCH] drm/radeon: fix tiling and command stream checking on evergreen v3

2012-06-09 Thread j.gli...@gmail.com
From: Jerome Glisse Fix regresson since the introduction of command stream checking on evergreen (thread referenced below). Issue is cause by ddx allocating bo with formula width*height*bpp while programming the GPU command stream with ALIGN(height, 8). In some case (where

[PATCH 5/5] drm/radeon: restore consistant whitespace & indentation

2012-05-17 Thread j.gli...@gmail.com
From: Jerome Glisse Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon.h | 528 +- drivers/gpu/drm/radeon/radeon_ring.c |3 +- 2 files changed, 267 insertions(+), 264 deletions(-) diff --git

[PATCH 4/5] drm/radeon: add lockup faulty command recording v4

2012-05-17 Thread j.gli...@gmail.com
From: Jerome Glisse This try to identify the faulty user command stream that caused lockup. If it finds one it create big blob that contains all information, this include packet stream but also snapshot of all bo used by the faulty packet stream. This means that the blod is

[PATCH 3/5] drm/radeon: allow radeon_vm_bo_update_pte caller to get bo virtual offset

2012-05-17 Thread j.gli...@gmail.com
From: Jerome Glisse Allow caller of radeon_vm_bo_update_pte to get the virtual bo offset. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon.h |3 ++- drivers/gpu/drm/radeon/radeon_cs.c |2 +- drivers/gpu/drm/radeon/radeon_gart.c | 11

[PATCH 2/5] drm/radeon: allow radeon debugfs helper to provide custom read

2012-05-17 Thread j.gli...@gmail.com
From: Jerome Glisse Allow radeon debugfs file to provide a custom read function. This is usefull in case you don't want to double buffer with seq_file, or simply in case the buffer data is too big to be buffered by seq_file. Signed-off-by: Jerome Glisse ---

[PATCH 1/5] drm/debugfs: allow driver to provide a custom read callback

2012-05-17 Thread j.gli...@gmail.com
From: Jerome Glisse Allow driver to provide a custom read callback for debugfs file. Usefull if driver try to dump big buffer, avoid double buffering. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/drm_debugfs.c | 19 ---

  1   2   3   4   >