[PATCH] drm/radeon: avoid kernel segfault in vce when gpu fails to resume

2017-02-06 Thread j . glisse
From: Jérôme Glisse When GPU fails to resume we can not trust that value we write to GPU memory will post and we might get garbage (more like 0x on x86) when reading them back. This trigger out of range memory access in the kernel inside the vce resume code path.

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

2013-06-19 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com Tested-by:

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

2013-06-06 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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] drm/radeon: fix write back suspend regression with uvd

2013-06-06 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 and

[PATCH] radeon: add bo tracking debugfs

2013-04-25 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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. Signed-off-by:

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

2013-04-10 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com --- include/drm/radeon_drm.h | 81 1 file changed,

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

2013-04-10 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com ---

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

2013-04-08 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com Signed-off-by: Jerome Glisse jgli...@redhat.com --- 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

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

2013-04-08 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com --- radeon/radeon_surface.c | 658

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

2013-04-05 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com

[PATCH] radeon: add si tiling support v3

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

[PATCH] radeon: add si tiling support v2

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

[PATCH] radeon: add si tiling support

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

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

2013-04-03 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com --- drivers/gpu/drm/radeon/radeon.h | 1 +

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

2013-02-13 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 v2

2013-02-13 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 . glisse
From: Jerome Glisse jgli...@redhat.com 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 sending

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

2013-02-08 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 GPU

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

2013-02-04 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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/ttm: avoid allocation memory while spinlock is held v2

2013-02-04 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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/radeon: fix cursor corruption on aruba and newer

2013-01-21 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com --- drivers/gpu/drm/radeon/radeon_cursor.c | 2 +- 1 file changed, 1 insertion(+), 1

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

2013-01-11 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com Signed-off-by: Jerome Glisse jgli...@redhat.com --- 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 1/2] radeon/kms: fix dma relocation checking

2013-01-09 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com ---

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

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

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

2013-01-08 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com --- drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 8

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

2013-01-02 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com Signed-off-by: Jerome Glisse jgli...@redhat.com --- 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 2/2] drm/radeon: print dma status reg on lockup

2013-01-02 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com To help debug dma related lockup. Signed-off-by: Jerome Glisse jgli...@redhat.com --- 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

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

2013-01-02 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com --- drivers/gpu/drm/radeon/radeon_ring.c | 20 +--- 1 file

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

2013-01-02 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com --- drivers/gpu/drm/radeon/evergreen.c | 30 +-

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

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

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

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

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

2012-12-17 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 where

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

2012-12-14 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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: restore modeset late in GPU reset path

2012-12-14 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com --- drivers/gpu/drm/radeon/radeon_device.c | 3 ++- 1

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

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

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

2012-12-12 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com --- drivers/gpu/drm/radeon/r600.c

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

2012-12-11 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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] drm/radeon: fix rare segfault after gpu lockup on r7xx

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

[RFC] improve memory placement for radeon

2012-11-29 Thread j . glisse
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 1/2] drm/radeon: do not move bo to different placement at each cs

2012-11-29 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com ---

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

2012-11-29 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com --- drivers/gpu/drm/radeon/radeon.h| 13

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

2012-11-28 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com ---

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

2012-11-28 Thread j . glisse
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: add minimum residency constraint for bo eviction

2012-11-28 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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. Signed-off-by:

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

2012-11-28 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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] radeon: fix pll/ctrc mapping on dce2 and dce3 hardware

2012-11-27 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com ---

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

2012-11-27 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 2/2] drm/radeon: fix deadlock when bo is associated to different handle

2012-11-27 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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] drm/radeon: track global bo name and always return the same

2012-11-27 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 to

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

2012-08-28 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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: avoid turning off spread spectrum for used pll

2012-08-17 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com ---

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

2012-08-09 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 Glisse

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

2012-08-08 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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] v3

2012-08-06 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 . glisse
From: Jerome Glisse jgli...@redhat.com 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] v4

2012-08-06 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 v2

2012-08-03 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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: fence virtual address and free it once idle v3

2012-08-03 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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: fix virtual memory locking in case of reset

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

Fix GPU triggering random system read after VRAM start change

2012-07-27 Thread j . glisse
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 1/3] drm/radeon: do not reenable crtc after moving vram start address

2012-07-27 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 same

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

2012-07-27 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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. Signed-off-by:

[PATCH] drm/radeon: cleanup and fix crtc while programming mc

2012-07-26 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com When we change start address of vram for the GPU memory controller we need to make sure that nothing in the GPU still use the old vram address. This patch cleanup and fix crtc address. However there is still someissue somewhere if we reenable the crtc after

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

2012-07-24 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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: sta...@kernel.org Signed-off-by: Jerome Glisse jgli...@redhat.com ---

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

2012-07-24 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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: sta...@kernel.org Signed-off-by: Jerome Glisse

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

2012-07-19 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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: sta...@vger.kernel.org Signed-off-by: Jerome Glisse jgli...@redhat.com --- drivers/gpu/drm/radeon/radeon_connectors.c | 22

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

2012-07-17 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 off

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

2012-07-17 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 failure

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

2012-07-12 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com Retry label was at wrong place in function leading to memory leak. Cc: sta...@vger.kernel.org Signed-off-by: Jerome Glisse jgli...@redhat.com --- 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

2012-07-02 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com

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

2012-07-02 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 v2

2012-06-27 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 . glisse
From: Jerome Glisse jgli...@redhat.com Print various CP register that have valuable informations regarding GPU lockup. Signed-off-by: Jerome Glisse jgli...@redhat.com --- drivers/gpu/drm/radeon/evergreen.c | 16 drivers/gpu/drm/radeon/evergreend.h |4

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

2012-06-27 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 . glisse
From: Jerome Glisse jgli...@redhat.com 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 v5

2012-06-27 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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: fix tiling and command stream checking on evergreen v3

2012-06-09 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 page

GPU lockup dumping

2012-05-17 Thread j . glisse
So here is improved patchset, where i splited ground work necessary for the dumping into their own patch. The debugfs improvement could probably be usefull to intel instead of having i915 have it's own debugfs file stuff. The lockup dumping public api have been move into radeon_drm.h Stressing

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

2012-05-17 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com --- drivers/gpu/drm/drm_debugfs.c | 19 ---

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

2012-05-17 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com ---

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

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

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

2012-05-17 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 5/5] drm/radeon: restore consistant whitespace indentation

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

GPU lockup dumping

2012-05-17 Thread j . glisse
Make the format more future proof reliable by adding a total chunk size field that allow old userspace to skip over potentialy new chunk. Not sure this is really needed but hey. Jerome ___ dri-devel mailing list dri-devel@lists.freedesktop.org

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

2012-05-17 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com --- drivers/gpu/drm/drm_debugfs.c | 19 ---

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

2012-05-17 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com ---

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

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

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

2012-05-17 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 5/5] drm/radeon: restore consistant whitespace indentation

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

GPU lockup dumping

2012-05-17 Thread j . glisse
Ok this time is final version, i added a bunch of flags to cmd buffer to make the userspace tools life easier. Cheers, Jerome ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

2012-05-17 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com --- drivers/gpu/drm/drm_debugfs.c | 19 ---

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

2012-05-17 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com ---

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

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

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

2012-05-17 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 5/5] drm/radeon: restore consistant whitespace indentation

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

[RFC] radeon faulty command stream dumping

2012-05-16 Thread j . glisse
Attached is 2 patch for dumping everything needed to replay faulty command stream. I haven't add a module option in the radeon patch but the idea would be to enable the dumping only if it's requested. I know AMD folks would like to reuse AMD internal format, but unless we can quickly get ACK to

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

2012-05-16 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com 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 jgli...@redhat.com --- drivers/gpu/drm/drm_debugfs.c | 19 ---

[PATCH 2/2] drm/radeon: add lockup faulty command recording

2012-05-16 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com This try to identify the faulty user command stream that caused lockup. If it finds one it create big blob that contains all information needed to replay the faulty command stream. Signed-off-by: Jerome Glisse jgli...@redhat.com ---

[PATCH] drm/radeon: don't mess with hot plug detect for eDP or LVDS connector

2012-05-04 Thread j . glisse
From: Jerome Glisse jgli...@redhat.com It seems imac pannel doesn't like whe we change the hot plug setup and then refuse to work. This should fix : https://bugzilla.redhat.com/show_bug.cgi?id=726143 Signed-off-by: Matthew Garrett m...@redhat.com Signed-off-by: Jerome Glisse jgli...@redhat.com

  1   2   3   4   >