[PATCH xf86-video-ati 1/2] Use EventCallback to avoid flushing every time in the FlushCallback

2016-08-01 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> We only need to flush for XDamageNotify events. Significantly reduces compositing slowdown due to flushing overhead, in particular with glamor. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/radeon.h | 2 ++ src/radeo

[PATCH xf86-video-ati] Wait for pending flips to complete before turning off an output or CRTC

2016-08-03 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> At least with older kernels, the flip may never complete otherwise, which can result in us hanging in drmmode_set_mode_major. Fixes: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/1577170 Signed-off-by: Michel

Re: 答复: [PATCH] drm/amd/amdgpu: S3 resume fail

2016-08-10 Thread Michel Dänzer
ging into the console and interacting with the shell work? -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ amd-gfx mailing list amd-gfx@lists.

Re: [PATCH] drm/amd/amdgpu: S3 resume fail

2016-08-09 Thread Michel Dänzer
On 10/08/16 12:24 PM, Michel Dänzer wrote: > On 10/08/16 12:04 PM, jimqu wrote: >> Doing S3 stress test, sometimes, driver can not get console lock. So use >> console_trylock() to instead it. > > This raises some questions: > > >> diff --git a/drivers/gpu/drm

Re: [PATCH] drm/amd/amdgpu: S3 resume fail

2016-08-09 Thread Michel Dänzer
> if (fbcon) { > + if (!console_trylock()) > + return 0; > amdgpu_fbdev_set_suspend(adev, 0); > console_unlock(); > } Do virtual terminals controlled by fbcon actually work if we don't call amdgpu_fbdev_set_suspend(a

[PATCH 2/6] drm/amdgpu: Provide page_flip_target hook

2016-08-03 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Now we can program a flip during a vertical blank period, if it's the one targeted by the flip (or a later one). This allows simplifying amdgpu_flip_work_func considerably. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- drivers

[PATCH 5/6] drm/radeon: Set MASTER_UPDATE_MODE to 0 again

2016-08-03 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> With the previous change, it's safe to let page flips take effect anytime during a vertical blank period. This can avoid delaying a flip by a frame in some cases where we get to radeon_flip_work_func -> adev->mode_info.funcs->p

[PATCH 6/6] drm: Add DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags

2016-08-03 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> These flags allow userspace to explicitly specify the target vertical blank period when a flip should take effect. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- Note that the previous patches in this series can avoid delayin

[PATCH 3/6] drm/amdgpu: Set MASTER_UPDATE_MODE to 0 again

2016-08-03 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> With the previous change, it's safe to let page flips take effect anytime during a vertical blank period. This can avoid delaying a flip by a frame in some cases where we get to amdgpu_flip_work_func -> adev->mode_info.funcs->p

[PATCH 0/6] drm: Explicit target vblank seqno for page flips

2016-08-03 Thread Michel Dänzer
The purpose of this series is to allow drivers to avoid unnecessarily delaying page flips, by explicitly telling the driver which vblank seqno a flip is supposed to take effect in. Patch 1 sets the target to the vblank seqno after the current one when the DRM_IOCTL_MODE_PAGE_FLIP ioctl is called,

[PATCH 1/6] drm: Add page_flip_target CRTC hook

2016-08-03 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Mostly the same as the existing page_flip hook, but takes an additional parameter specifying the target vertical blank period when the flip should take effect. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- drivers/gpu/drm/drm

Re: [PATCH 0/6] drm: Explicit target vblank seqno for page flips

2016-08-04 Thread Michel Dänzer
On 04.08.2016 18:51, Daniel Stone wrote: > On 4 August 2016 at 04:39, Michel Dänzer <mic...@daenzer.net> wrote: >> Patch 6 extends the ioctl with new flags, which allow userspace to >> explicitly specify the target vblank seqno. This can also avoid delaying >> f

Re: [PATCH] drm/ttm: partial revert "cleanup ttm_tt_(unbind|destroy)" v2

2016-08-04 Thread Michel Dänzer
On 04.08.2016 19:18, Christian König wrote: > Am 27.07.2016 um 04:26 schrieb Michel Dänzer: >> On 22.07.2016 22:10, Christian König wrote: >>> From: Christian König <christian.koe...@amd.com> >>> >>> We still need to unbind explicitely during a move. >&

Re: [PATCH 00/13] drm/amdgpu: Add virtual display feature.

2016-08-04 Thread Michel Dänzer
ntroller. We might be getting into semantics territory here, but I'd say the virtual KMS output still goes "nowhere" in that case, since it's not involved in the remote display. I'm afraid this kind of setup might not be useful for proprietary OpenGL driver bringup though, as l

[PATCH] drm/ttm: Wait for a BO to become idle before unbinding it from GTT

2016-08-05 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Fixes hangs under memory pressure, e.g. running the piglit test tex3d-maxsize concurrently with other tests. Fixes: 17d33bc9d6ef ("drm/ttm: drop waiting for idle in ttm_bo_evict.") Signed-off-by: Michel Dänzer <michel.daen...@amd.co

Re: [PATCH] Add freesync ioctl interface

2016-08-09 Thread Michel Dänzer
On 09/08/16 06:31 PM, Christian König wrote: > Am 09.08.2016 um 10:27 schrieb Michel Dänzer: >> On 09/08/16 05:12 PM, Christian König wrote: >>> Am 09.08.2016 um 04:44 schrieb Michel Dänzer: >>> >>>> I was basically thinking out loud that doing this via diff

Re: [PATCH v2] drm/amdgpu: Change the virtual_display type from int to char*.

2016-08-09 Thread Michel Dänzer
play:%d\n", > amdgpu_virtual_display, pci_address_name, adev->enable_virtual_display); BTW, this line is too long, please break it up into multiple lines. Might also be worth checking that checkpatch.pl doesn't complain about any other style issues. -- Earthling Michel Dänzer

Re: [PATCH] drm/amdgpu: Change the virtual_display type from int to char*.

2016-08-09 Thread Michel Dänzer
ddname, > sizeof(pci_address_name))) { Please use strcmp instead of strncmp here, otherwise it will match different strings which contain the PCI address as a prefix. Other than that, looks good to me. -- Earthling Michel Dänzer | http://www.amd.com

Re: [PATCH 1/6] drm: Add page_flip_target CRTC hook

2016-08-07 Thread Michel Dänzer
On 04.08.2016 20:01, Daniel Vetter wrote: > On Thu, Aug 04, 2016 at 12:47:38PM +0200, Daniel Vetter wrote: >> On Thu, Aug 04, 2016 at 12:39:36PM +0900, Michel Dänzer wrote: >>> >>> @@ -5434,6 +5435,18 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev, >>>

Re: [PATCH 0/6] drm: Explicit target vblank seqno for page flips

2016-08-07 Thread Michel Dänzer
On 04.08.2016 19:12, Daniel Stone wrote: > On 4 August 2016 at 11:01, Michel Dänzer <mic...@daenzer.net> wrote: >> On 04.08.2016 18:51, Daniel Stone wrote: >>> On 4 August 2016 at 04:39, Michel Dänzer <mic...@daenzer.net> wrote: >>>> Patch 6 extends the i

Re: [PATCH 1/6] drm: Add page_flip_target CRTC hook

2016-08-07 Thread Michel Dänzer
On 05.08.2016 00:13, Alex Deucher wrote: > On Wed, Aug 3, 2016 at 11:39 PM, Michel Dänzer <mic...@daenzer.net> wrote: >> >> @@ -5434,6 +5435,18 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev, >> if (!crtc) >> return -ENOE

Re: [PATCH 6/6] drm: Add DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags

2016-08-08 Thread Michel Dänzer
On 04.08.2016 19:56, Daniel Vetter wrote: > On Thu, Aug 04, 2016 at 12:39:41PM +0900, Michel Dänzer wrote: >> From: Michel Dänzer <michel.daen...@amd.com> >> >> @@ -543,15 +549,25 @@ struct drm_color_lut { >> * 'as soon as possible', meaning that it not delay wa

[PATCH 6/6] drm: Add DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags v2

2016-08-08 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> These flags allow userspace to explicitly specify the target vertical blank period when a flip should take effect. v2: * Add new struct drm_mode_crtc_page_flip_target instead of modifying struct drm_mode_crtc_page_flip, to make sure all ex

Re: [PATCH] Add freesync ioctl interface

2016-08-08 Thread Michel Dänzer
On 04.08.2016 17:22, Christian König wrote: > Am 04.08.2016 um 08:41 schrieb Michel Dänzer: >> On 03.08.2016 10:04, Dave Airlie wrote: >>> On 2 August 2016 at 12:26, Hawking Zhang <hawking.zh...@amd.com> wrote: >>>> >>>> @@ -706,4 +708,17 @@ struct d

Re: [PATCH] Add freesync ioctl interface

2016-08-01 Thread Michel Dänzer
This cannot go upstream without an implementation making use of it. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ amd-gfx mailing list amd-gfx

[PATCH xf86-video-ati] Keep track of damage event related flushes per-client v2

2016-08-02 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> This further reduces the compositing slowdown due to flushing overhead, by only flushing when the X server actually sends XDamageNotify events to a client, and there hasn't been a flush yet in the meantime. v2: Use ScreenPrivateKey, fixes i

Re: [PATCH] drm/amdgpu: For virtual_display feature, define a variable for vblank count of cpu vsync timer.

2016-08-15 Thread Michel Dänzer
er and timing even in the virtual DCE case, when we really don't. We should stop pretending and instead communicate the lack of these hardware facilities in the virtual DCE case as intended, otherwise we'll probably run into issues sooner or later. -- Earthling Michel Dänzer |

Re: [PATCH] drm/amdgpu: For virtual_display feature, define a variable for vblank count of cpu vsync timer.

2016-08-16 Thread Michel Dänzer
On 16/08/16 03:28 PM, Deng, Emily wrote: >> From: Michel Dänzer [mailto:mic...@daenzer.net] >> Sent: Tuesday, August 16, 2016 12:01 PM >> On 16/08/16 12:49 PM, Deng, Emily wrote: >>> Hi Michel, Thanks, I still couldn't see the issue that use a variable >>> to c

Re: [PATCH] drm/amdgpu: For virtual_display feature, the vblank_get_counter hook is always return 0 when there's no hardware frame counter which can be used.

2016-08-16 Thread Michel Dänzer
_crtc_scanoutpos and amdgpu_get_vblank_counter_kms, so they don't do any unnecessary work, and remove dce_virtual_vblank_get_counter and dce_virtual_crtc_get_scanoutpos? -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer

[PATCH xf86-video-ati] Don't handle Option "SwapbuffersWait" at all with glamor

2017-01-30 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> It never had any effect with glamor. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/radeon_kms.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/radeon_kms.c b/src/radeon_kms.c ind

[PATCH xf86-video-ati 2/2] Don't destroy current FB if drmModeAddFB fails

2017-02-07 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> It would probably result in a black screen. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/drmmode_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drmmode_display.c b/src/drmmode_dis

[PATCH xf86-video-ati 1/2] Fix flip event data leak if calloc or drmModeAddFB fails

2017-02-07 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/drmmode_display.c | 4 +++- src/radeon_dri2.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c ind

Re: 答复: [PATCH] drm/amdgpu:fix amdgpu_sa_bo_new error

2017-02-08 Thread Michel Dänzer
initely. [0] We don't have any other hardware acceleration for fbcon, so its BO is only accessed by the CPU and display hardware after this, and has to be pinned in the CPU visible area of VRAM at all times anyway. -- Earthling Michel Dänzer | http://www.amd.co

Re: [PATCH] drm/amdgpu:fix amdgpu_sa_bo_new error

2017-02-08 Thread Michel Dänzer
); >> if (r) { >> dev_err(adev->dev, "IB initialization failed (%d).\n", r); >> goto failed; >> } >> +amdgpu_fbdev_init(adev); >> + > > As noted internally as well, please more that one more further down > behi

Re: [PATCH] Autodetect libdrm path (v2)

2017-02-07 Thread Michel Dänzer
hat AMD has > re-enabled imap support FWIW, I've always used IMAP for AMD e-mail, it was never disabled per se. > and I can now use a more sensible client... > > :-) Anyway, that's great. -- Earthling Michel Dänzer | http://www.am

Re: [PATCH 2/2] drm/amdgpu: report the number of bytes moved at buffer creation

2017-02-08 Thread Michel Dänzer
amdgpu_cs_report_moved_bytes(adev, > + initial_bytes_moved - atomic64_read(>num_bytes_moved)); This looks backwards, should be atomic64_read(>num_bytes_moved) - initial_bytes_moved); ? -- Earthling Michel Dänzer | http://

Re: [PATCH 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-08 Thread Michel Dänzer
sv, > _ttm_bo_destroy); > - if (unlikely(r != 0)) > + if (unlikely(r != 0)) { > + ww_mutex_unlock(>tbo.resv->lock); > return r; > + } This must only be done if (!resv). -- Earthling Michel Dänzer | http://www.amd.c

Re: [PATCH] drm/amdgpu: shut up #warning for compile testing

2017-02-02 Thread Michel Dänzer
ch > shuts it up for me, but not people that may actually want to run the kernel > as a compromize. This is fine with me as well. Whichever way we end up going for this, it should be applied to the radeon driver as well. -- Earthling Michel Dänzer |

Re: [PATCH 01/11] drm/amdgpu:use MACRO like other places

2017-02-08 Thread Michel Dänzer
single line in both cases (or fix the indentation of the second lines to align with the opening parens). -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___

Re: [RFC]: More robust build sys for UMR

2017-02-05 Thread Michel Dänzer
On 06/02/17 12:16 AM, StDenis, Tom wrote: > > $ pkg-config libdrm --cflags > -I/usr/include/libdrm > > So we could in theory include "drm.h" and then just add that to the head > of our CFLAGS. Make that , but yes, that's the correct way, not just in theory. :)

Re: 答复: [PATCH 05/21] drm/amdgpu:BUG if gpu_reste and asic_reset from VF

2017-02-05 Thread Michel Dänzer
On 06/02/17 11:39 AM, Liu, Monk wrote: > yeah, there are 21 patches totally, but no need to expose all in one time Then please edit the numbers in the mail subjects accordingly in the future. :) -- Earthling Michel Dänzer | http://www.amd.com Libre softw

Re: [PATCH] drm/amdgpu: shut up #warning for compile testing

2017-02-03 Thread Michel Dänzer
On 02/02/17 06:36 PM, Christian König wrote: > Am 02.02.2017 um 07:09 schrieb Michel Dänzer: >> [SNIP] >> OTOH the people running the kernel aren't always the same people >> building it, so the downside is that this would potentially delay >> getting X86_PA

Re: [PATCH] drm/amdgpu: Bring bo creation in line with radeon driver

2017-01-22 Thread Michel Dänzer
t;nholl...@tisys.org> Looks great, thanks Nils! Reviewed-by: Michel Dänzer <michel.daen...@amd.com> -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _

Re: [PATCH] drm/amdgpu: Fix error in amdgpu_bo_create_restricted()

2017-01-23 Thread Michel Dänzer
ge. > > Signed-off-by: Nils Holland <nholl...@tisys.org> Reviewed-by: Michel Dänzer <michel.daen...@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/am

[PATCH xf86-video-ati] Add 10-radeon.conf xorg.conf.d snippet

2017-01-25 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> This instructs Xorg >= 1.16 to try loading the radeon driver for devices managed by the radeon kernel driver, even if the ati wrapper driver isn't available. Copied from the amdgpu driver. Signed-off-by: Michel Dänzer <michel.dae

[PATCH] drm/radeon: Fix vram_size/visible values in DRM_RADEON_GEM_INFO ioctl

2017-01-30 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> vram_size is supposed to be the total amount of VRAM that can be used by userspace, which corresponds to the TTM VRAM manager size (which is normally the full amount of VRAM, but can be just the visible VRAM when DMA can't be used for BO mig

[PATCH] winsys/radeon: Allow visible VRAM size > 256MB with kernel driver >= 2.49

2017-01-30 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> The kernel driver reports correct values now. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ga

[PATCH xf86-video-ati] Enable tiling by default with glamor on PALM

2017-01-26 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> The DFS check is only relevant for EXA. The lack of tiling prevented DRI3 clients from using page flipping, resulting in tearing. Bugzilla: https://bugs.freedesktop.org/99491 Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/

[PATCH xf86-video-ati 2/3] present: Only call drmModeRmFB after setting modes for unflip

2017-02-21 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Fixes display intermittently blanking when a modeset is used for unflip. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/radeon_present.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/radeon_pre

[PATCH xf86-video-ati 1/3] Use drmmode_crtc_scanout_free in drmmode_fini

2017-02-21 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> We were leaking drmmode_crtc->scanout_damage, which caused trouble on server reset. Fixes server reset with active separate scanout pixmaps. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/drmmode_display.c | 9 ++---

[PATCH xf86-video-ati 3/3] present: Wait for screen pixmap BO idle before setting modes for unflip

2017-02-21 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> To make sure the screen pixmap contents are up to date when it starts being scanned out. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/radeon_present.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/radeon_pre

[PATCH xf86-video-ati 0/3] Misc fixes

2017-02-21 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Miscellaneous fixes for minor problems I stumbled across while working on the previous series. Michel Dänzer (3): Use drmmode_crtc_scanout_free in drmmode_fini present: Only call drmModeRmFB after setting modes for unflip present

Re: [PATCH] drm/radeon: Use mode h/vdisplay fields to hide out of bounds HW cursor

2017-02-15 Thread Michel Dänzer
On 15/02/17 11:47 AM, Alex Deucher wrote: > On Tue, Feb 14, 2017 at 9:30 PM, Michel Dänzer <mic...@daenzer.net> wrote: >> From: Michel Dänzer <michel.daen...@amd.com> >> >> The crtc_h/vdisplay fields may not match the CRTC viewport dimensions >> wit

Re: [PATCH] drm/radeon: Use mode h/vdisplay fields to hide out of bounds HW cursor

2017-02-16 Thread Michel Dänzer
On 17/02/17 12:10 AM, Deucher, Alexander wrote: >> From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf >> On 15/02/17 11:47 AM, Alex Deucher wrote: >>> On Tue, Feb 14, 2017 at 9:30 PM, Michel Dänzer <mic...@daenzer.net> >> wrote: >>>>

[PATCH v2 xf86-video-ati 3/3] Allow toggling TearFree at runtime via output property

2017-02-21 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Option "TearFree" now sets the default value of the output property. See the manpage update for details. TearFree is now enabled by default for outputs using rotation or other RandR transforms, and for RandR 1.4 slave outputs. Signe

[PATCH xf86-video-ati 1/3] Factor out radeon_prime_dirty_to_crtc helper

2017-02-20 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Cleanup in preparation for the following change, no functional change intended. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/radeon_kms.c | 62 ++-- 1 file changed, 3

[PATCH xf86-video-ati 2/3] Factor out drmmode_crtc_scanout_update helper

2017-02-20 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Cleanup in preparation for following change, no functional change intended. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/drmmode_display.c | 85 +-- 1 file changed, 49 inser

[PATCH xf86-video-ati 3/3] Allow toggling TearFree at runtime via output property

2017-02-20 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Option "TearFree" now sets the default value of the output property. See the manpage update for details. TearFree is now enabled by default for outputs using rotation or other RandR transforms, and for RandR 1.4 slave outputs. Signe

[PATCH] drm/radeon: Use mode h/vdisplay fields to hide out of bounds HW cursor

2017-02-14 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> The crtc_h/vdisplay fields may not match the CRTC viewport dimensions with special modes such as interlaced ones. Fixes the HW cursor disappearing in the bottom half of the screen with interlaced modes. Fixes: 6b16cf7785a4 ("drm/radeon:

Re: [PATCH] drm/amdgpu: add more cases to DCE11 possible crtc mask setup

2017-02-09 Thread Michel Dänzer
case 1: case 3: case 4: case 5: case 6: encoder->possible_crtcs = (1 << adev->mode_info.num_crtc) - 1; break; } Either way, Reviewed-by: Michel Dänzer <michel.daen...@amd.com>

Re: How to catch wild writes to system memory, and IOMMU errors

2017-02-15 Thread Michel Dänzer
On 15/02/17 06:42 PM, Christian König wrote: > > IOMMU might not help here, cause when it would be the GPU we would have > made a mapping once and then the page in question is never unmapped (IIRC). That sounds like something which should be fixed if possible. -- Earthling Mich

Re: [PATCH v2 3/3] drm/amdgpu: fix lock cleanup during buffer creation

2017-02-15 Thread Michel Dänzer
atomic64_read(>num_bytes_moved) - initial_bytes_moved); > > - if (unlikely(r != 0)) > - return r; > + if (!(bo->tbo.mem.placement & TTM_PL_FLAG_NO_EVICT)) { > + spin_lock(>tbo.glob->lru_lock); > + ttm_bo_add_to_lru(&g

Re: [PATCH 3/4] drm/amd/display: Switch to using atomic_helper for flip.

2017-01-18 Thread Michel Dänzer
On 19/01/17 07:18 AM, Grodzovsky, Andrey wrote: >> From: Michel Dänzer [mailto:mic...@daenzer.net] >> On 17/01/17 07:16 AM, Laurent Pinchart wrote: >>> On Monday 16 Jan 2017 10:44:57 Andrey Grodzovsky wrote: >>>> Change-Id: Iad3e0b9b3546e4e4dc79be9233daf4fe4d

Re: [PATCH 3/4] drm/amd/display: Switch to using atomic_helper for flip.

2017-01-17 Thread Michel Dänzer
t; * 2. This commit is a page flip, and targets are > created. >> */ >> -if (!page_flip_needed(plane_state, old_plane_state, >> - true) || >> +if (!page_flip_needed(plane_state, o

Re: amdgpu: Corrupted video on 32 bit systems (possible fix)

2017-01-19 Thread Michel Dänzer
er works fine for me on my 32 bit > kernel: All graphics output looks the way it's supposed to, even with > full acceleration enabled - great! > > I'd suggest that it might be a good idea to put to apply the above > patch or something similar to the official sources. Indeed. Do y

Re: amdgpu: Corrupted video on 32 bit systems (possible fix)

2017-01-20 Thread Michel Dänzer
On 20/01/17 04:44 PM, Nils Holland wrote: > On Fri, Jan 20, 2017 at 11:47:53AM +0900, Michel Dänzer wrote: >> On 20/01/17 04:35 AM, Nils Holland wrote: >>> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c2016-12-11 >>> 20:17:54.0 +0100

Re: [PATCH v2 xserver 0/5] modesetting: add DRI2 page flip support

2016-08-21 Thread Michel Dänzer
hare with DRI2 > modesetting: move ms_do_pageflip to pageflip.c > modesetting: move common page flip handle to pageflip.c > modesetting: add DRI2 page flip support > modesetting: exclude DRI2 and prensent page flip Please squash patch 5 into patch 4. -- Earthling Michel Dänzer

Re: [PATCH xf86-video-amdgpu] Fix cursor size for SI

2016-08-21 Thread Michel Dänzer
On 19/08/16 07:43 PM, Marek Olšák wrote: > From: Marek Olšák <marek.ol...@amd.com> > > This doesn't fix the missing cursor, which seems to be a kernel issue, > because it's missing with modesetting as well. With this sentence removed from the commit log, Reviewed-by: Michel D

Re: [PATCH v3 xserver 3/4] modesetting: move common page flip handle to pageflip.c

2016-08-22 Thread Michel Dänzer
;\t\tms:fa %lld c %d\n", (long long) > flipdata->event->event_id, flipdata->flip_count)); Please preserve this DebugPresent call (minus flipdata->flip_count). With that (and the copy & paste issue Daniel Martin pointed out fixed, patches 3 & 4 are Reviewed-by: Mich

Re: [PATCH v3 xserver 1/4] modesetting: make ms_do_pageflip generic for share with DRI2

2016-08-22 Thread Michel Dänzer
On 22/08/16 12:53 PM, Qiang Yu wrote: > Signed-off-by: Qiang Yu <qiang...@amd.com> > Reviewed-by: Michel Dänzer <michel.daen...@amd.com> [...] > @@ -588,8 +594,11 @@ ms_present_flip(RRCrtcPtr crtc, > if (!event) > return FALSE; > > +DebugPres

Re: [PATCH xserver 0/6] modesetting: add DRI2 page flip support

2016-08-18 Thread Michel Dänzer
the issues fixed by patch 4. So maybe patch 4 should be squashed into patch 3. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ amd-gfx mailing list am

[PATCH xf86-video-ati 2/3] Handle RandR 1.4 slave dirty updates via radeon_drm_queue

2016-08-19 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> This reduces PCIe bandwidth usage and tearing. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/radeon_kms.c | 94 +--- 1 file changed, 90 insertions(+), 4 deletions(-)

[PATCH xf86-video-ati 3/3] Track damage accurately for RandR 1.4 slave scanout

2016-08-19 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> This further reduces the PCIe bandwidth usage. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/radeon_kms.c | 82 1 file changed, 71 insertions(+), 11 deletions(-)

Re: [PATCH 0/1] AMDGPU SI support almost fixed

2016-08-19 Thread Michel Dänzer
On 19/08/16 07:00 PM, Marek Olšák wrote: > On Fri, Aug 19, 2016 at 11:45 AM, Michel Dänzer <mic...@daenzer.net> wrote: >> On 19/08/16 06:24 PM, Marek Olšák wrote: >>> I've added this. The dmesg message is gone, but the cursor is still missing. >>> >&g

Re: [PATCH 6/6] drm: Add DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags v2

2016-08-15 Thread Michel Dänzer
already includes support for specifying a target time instead of a target refresh cycle. This isn't implemented yet though, but it should be relatively straightforward to implement using the kind of kernel API you describe. -- Earthling Michel Dänzer |

Re: [PATCH 4/6] drm/radeon: Provide page_flip_target hook

2016-08-15 Thread Michel Dänzer
the > ati/amdgpu-ddx patches and libdrm patches in your freedesktop home are > all i need for testing? Yes, although it would also be nice to test with unmodified userspace and make sure there are no regressions with that. -- Earthling Michel Dänzer | http://www.amd.com

Re: [PATCH] drm/amdgpu: For virtual_display feature, define a variable for vblank count of cpu vsync timer.

2016-08-15 Thread Michel Dänzer
On 15/08/16 03:45 PM, Deng, Emily wrote: >> From: Michel Dänzer [mailto:mic...@daenzer.net] >> Sent: Monday, August 15, 2016 9:46 AM >> On 11/08/16 12:46 PM, Emily Deng wrote: >>> The adev->ddev->vblank[crtc].count couldn't be used here, so define >>> an

[PATCH xf86-video-ati 3/3] present: Flush before flipping

2017-02-28 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> This isn't necessary for DRI clients, but the Present extension can also be used for presenting normal pixmaps rendered to via the X11 protocol. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/radeon_present.c | 2 ++ 1 fil

[PATCH xf86-video-ati 2/3] present: Use async flip for unflip if possible

2017-02-28 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> In that case, unflip operations should finish faster in general. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/radeon_present.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/radeon_pre

[PATCH xf86-video-ati 2/3] Fold drmmode_crtc_scanout_allocate into drmmode_crtc_scanout_create

2017-02-28 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Not used anywhere else anymore. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/drmmode_display.c | 65 +++ 1 file changed, 19 insertions(+), 46 deletions(-) diff

[PATCH xf86-video-ati 1/3] Call drmmode_crtc_scanout_create in drmmode_crtc_shadow_allocate as well

2017-02-28 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Calling drmmode_crtc_scanout_allocate in drmmode_crtc_shadow_allocate resulted in drmmode_crtc_scanout_create called from drmmode_crtc_shadow_create passing an uninitialized pitch value to drmmode_create_bo_pixmap. Fixes issues such as f

[PATCH xf86-video-ati 3/3] Handle rotation in the driver also with Xorg 1.12-1.18

2017-02-28 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> We cannot use the HW cursor in that case, but in turn we get more efficient and less teary updates of rotated outputs. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/drmmode_display.c | 13 + 1 file changed,

Re: [PATCH 1/2] drm/amd/amdgpu: fix console deadlock if late init failed

2017-03-01 Thread Michel Dänzer
list_for_each_entry(crtc, >mode_config.crtc_list, head) { > Reviewed-by: Michel Dänzer <michel.daen...@amd.com> -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___

Re: [PATCH 14/15] drm/amd/display: Enable warnings as errors

2017-02-28 Thread Michel Dänzer
> --- a/drivers/gpu/drm/amd/display/Makefile > +++ b/drivers/gpu/drm/amd/display/Makefile > @@ -5,6 +5,8 @@ > > AMDDALPATH = $(RELATIVE_AMD_DISPLAY_PATH) > > +subdir-ccflags-y += -Werror Please don't. This will result in compile failures for people with differe

Re: [PATCH 05/15] drm/amd/display: Fix gamma colour corruption for 10 bit surfaces

2017-02-28 Thread Michel Dänzer
80/Makefile | 3 +- > .../gpu/drm/amd/display/dc/dce80/dce80_ipp_gamma.c | 71 > -- The removal of dce80_ipp_gamma.c and corresponding Makefile change looks unrelated and should be a separate change. -- Earthling Michel Dänzer | http://www.amd.

[PATCH xf86-video-amdgpu 4/6] Factor out amdgpu_prime_dirty_to_crtc helper

2017-03-02 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Cleanup in preparation for the following change, no functional change intended. (Ported from radeon commit 649644a88347a6d03de68f8c41db03a82deeb23b) Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/amdgp

[PATCH xf86-video-amdgpu 5/6] Factor out drmmode_crtc_scanout_update helper

2017-03-02 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Cleanup in preparation for following change, no functional change intended. (Ported from radeon commit 305e2cbf335837a2ab6a24e9ff65815afe038296) Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/drmmode_di

[PATCH xf86-video-amdgpu 6/6] Allow toggling TearFree at runtime via output property

2017-03-02 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Option "TearFree" now sets the default value of the output property. See the manpage update for details. TearFree is now enabled by default for outputs using rotation or other RandR transforms, and for RandR 1.4 slave outputs. (Po

[PATCH xf86-video-amdgpu 2/6] Fix flip event data leak if calloc or drmModeAddFB fails

2017-03-02 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> (Ported from radeon commit 481394e3c9f9f7d88bb66fe9ae8834c87952a8ab) Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/amdgpu_dri2.c | 4 ++-- src/drmmode_display.c | 4 +++- 2 files changed, 5 insertions(+), 3 deleti

[PATCH xf86-video-amdgpu 3/6] Don't destroy current FB if drmModeAddFB fails

2017-03-02 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> It would probably result in a black screen. (Ported from radeon commit 1351e48efe7a2c28eab447e16f36a00fbd02ae48) Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/drmmode_display.c | 3 ++- 1 file changed, 2 insertions(+)

[PATCH xf86-video-amdgpu 1/6] autogen: add default patch prefix

2017-03-02 Thread Michel Dänzer
From: Mihail Konev <k@ya.ru> (Ported from radeon commit 8e6a4e96b7b27559e186f71b5547abb0a80b96dd) Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- autogen.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autogen.sh b/autogen.sh index 0006de8a..c81

[PATCH xf86-video-amdgpu 1/3] Call drmmode_crtc_scanout_create in drmmode_crtc_shadow_allocate as well

2017-03-02 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Calling drmmode_crtc_scanout_allocate in drmmode_crtc_shadow_allocate resulted in drmmode_crtc_scanout_create called from drmmode_crtc_shadow_create passing an uninitialized pitch value to drmmode_create_bo_pixmap. Fixes issues such as f

[PATCH xf86-video-amdgpu 3/3] Handle rotation in the driver also with Xorg 1.12-1.18

2017-03-02 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> We cannot use the HW cursor in that case, but in turn we get more efficient and less teary updates of rotated outputs. (Ported from radeon commit f2bc882f1c1082bed9f496cfab6c8f07a76bc122) Signed-off-by: Michel Dänzer <michel.daen...@amd.com&

[PATCH xf86-video-amdgpu 2/3] Fold drmmode_crtc_scanout_allocate into drmmode_crtc_scanout_create

2017-03-02 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Not used anywhere else anymore. (Ported from radeon commit ae921a3150f69c38b5b3c88a9e37d54fdf0d5093) Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/drmmode_display.c | 71 ---

[PATCH xf86-video-ati] Don't call radeon_cs_flush_indirect & radeon_bo_wait in drmmode_copy_fb

2017-03-01 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> RADEONWindowExposures_oneshot takes care of it. Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/drmmode_display.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c ind

Re: [PATCH] drm/amd/amdgpu: add atomit helper function into suspend/resume functions

2017-02-28 Thread Michel Dänzer
in */ > if (fbcon) { > - if (!amdgpu_device_has_dc_support(adev)) { > + if (amdgpu_device_has_dc_support(adev)) { > + drm_atomic_helper_resume(adev->ddev, > adev->atomic_state); > + amdgpu_dm_display_

[PATCH xf86-video-ati 2/2] Don't override crtc parameter value in drmmode_flip_handler/abort

2016-08-25 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> When overriding the crtc parameter value of the last pending CRTC, drmmode_clear_pending_flip would work on the wrong CRTC, and the last pending CRTC's flip_pending flag might never get cleared. This would prevent that CRTC from properly turni

[PATCH xf86-video-ati 1/2] Also call drmmode_clear_pending_flip from radeon_scanout_flip_abort

2016-08-25 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Not doing so could break DPMS with TearFree. Reported-and-Tested-by: furkan on IRC Fixes: 9090309e057d ("Wait for pending flips to complete before turning off an output or CRTC") Signed-off-by: Michel Dänzer <michel.daen..

Re: [PATCH 01/10] drm/amdgpu: handle runtime pm in drm pre/post close

2016-08-31 Thread Michel Dänzer
dgpu_driver_preclose_kms(struct drm_device *dev, > struct drm_file *file_priv) > { > + pm_runtime_get_sync(dev->dev); > } What if pm_runtime_get_sync returns an error? Same for patch 6. -- Earthling Michel Dänzer |

Re: [PATCH 04/10] drm/amdgpu: skip suspend/resume on DRM_SWITCH_POWER_DYNAMIC_OFF

2016-08-31 Thread Michel Dänzer
ruct drm_crtc *crtc; > int r; > > - if (dev->switch_power_state == DRM_SWITCH_POWER_OFF) > + if (dev->switch_power_state == DRM_SWITCH_POWER_OFF || > + dev->switch_power_state == DRM_SWITCH_POWER_DYNAMIC_OFF) > return 0; > > i

  1   2   3   4   5   6   7   8   9   10   >