[PATCH xf86-video-amdgpu] Increase reference count of FB assigned to drmmode_crtc->flip_pending

2017-06-21 Thread Michel Dänzer
From: Michel Dänzer Otherwise, it could happen that we destroy the FB before the flip completes, resulting in use-after-free and most likely a crash. Signed-off-by: Michel Dänzer --- src/amdgpu_kms.c | 8 src/drmmode_display.c | 8

[PATCH xf86-video-ati] Only call drmmode_scanout_free for non-GPU screens in LeaveVT

2017-06-21 Thread Michel Dänzer
From: Michel Dänzer Destroying the scanout buffers of GPU screens resulted in a crash when switching back to the Xorg VT. Signed-off-by: Michel Dänzer --- src/radeon_kms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v2] drm/amdgpu: export gpu always on cu bitmap

2017-06-21 Thread Flora Cui
v2: keep cu_ao_mask for backward compatibility. Change-Id: I056d8af23340d46e5140bd10cc38dfb887cc78ab Signed-off-by: Flora Cui --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4

Re: [PATCH] drm/amdgpu: optimize out a spin lock (v2)

2017-06-21 Thread Michel Dänzer
On 22/06/17 11:45 AM, Alex Xie wrote: > Use atomic instead of spin lock. > v2: Adjust commit message > > Signed-off-by: Alex Xie The shortlog should be more specific, e.g. something like "drm/amdgpu: Drop spinlock from mm_stats". It's important for the Git commit shortlog

Re: [PATCH 2/3] drm/amdgpu: change a function to static function

2017-06-21 Thread Michel Dänzer
On 22/06/17 11:42 AM, Alex Xie wrote: > The function is called only once inside the .c file. > > Signed-off-by: Alex Xie The shortlog should explicitly say "drm/amdgpu: Make amdgpu_cs_parser_init static". With that, this patch and patch 1 are Reviewed-by: Michel Dänzer

[PATCH] drm/amdgpu: optimize out a spin lock (v2)

2017-06-21 Thread Alex Xie
Use atomic instead of spin lock. v2: Adjust commit message Signed-off-by: Alex Xie --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 110 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - 3

[PATCH 2/3] drm/amdgpu: change a function to static function

2017-06-21 Thread Alex Xie
The function is called only once inside the .c file. Signed-off-by: Alex Xie --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h

[PATCH 3/3] drm/amdgpu: optimize out a spin lock Use atomic instead of spin lock.

2017-06-21 Thread Alex Xie
Signed-off-by: Alex Xie --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 110 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - 3 files changed, 76 insertions(+), 40 deletions(-) diff --git

[PATCH 1/3] drm/amdgpu: fix a typo

2017-06-21 Thread Alex Xie
Signed-off-by: Alex Xie --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 7635f38..94c27fc 100644 ---

Re: [PATCH 3/4] drm/amdgpu: Allow vblank_disable_immediate.

2017-06-21 Thread Alex Deucher
On Wed, Jun 21, 2017 at 3:22 AM, Michel Dänzer wrote: > On 21/06/17 10:44 AM, Mario Kleiner wrote: >> With instantaneous high precision vblank timestamping >> that updates at leading edge of vblank, a cooked hw >> vblank counter which increments at leading edge of >> vblank,

Re: [PATCH] drm/amdgpu: fix typo in amdgpu_debugfs_test_ib_init

2017-06-21 Thread Alex Deucher
On Wed, Jun 21, 2017 at 5:51 PM, Arnd Bergmann wrote: > The debugfs interface has calls a function that was evidently > defined under the wrong name in some configurations: > > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:64:12: error: > 'amdgpu_debugfs_test_ib_ring_init' used but

[PATCH] drm/amdgpu: fix typo in amdgpu_debugfs_test_ib_init

2017-06-21 Thread Arnd Bergmann
The debugfs interface has calls a function that was evidently defined under the wrong name in some configurations: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:64:12: error: 'amdgpu_debugfs_test_ib_ring_init' used but never defined [-Werror] drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3803:12:

Re: [PATCH 1/4] drm/vc4: Allow vblank_disable_immediate on non-fw-kms.

2017-06-21 Thread kbuild test robot
Hi Mario, [auto build test ERROR on drm/drm-next] [also build test ERROR on v4.12-rc6 next-20170621] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Mario-Kleiner/drm-vc4-Allow

Re: [PATCH] drm/amdgpu: use kernel is_power_of_2 rather than local version

2017-06-21 Thread Christian König
Am 21.06.2017 um 18:44 schrieb Alex Deucher: Use the kernel provided version. Signed-off-by: Alex Deucher Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 +++ 1 file changed, 3

[PATCH] drm/amdgpu: use kernel is_power_of_2 rather than local version

2017-06-21 Thread Alex Deucher
Use the kernel provided version. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Re: [PATCH 11/11] drm: remove unused and redundant callbacks

2017-06-21 Thread kbuild test robot
Hi Peter, [auto build test ERROR on drm/drm-next] [also build test ERROR on next-20170621] [cannot apply to v4.12-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Peter-Rosin/improve

Re: [PATCH 1/4] drm/vc4: Allow vblank_disable_immediate on non-fw-kms.

2017-06-21 Thread Eric Anholt
Mario Kleiner writes: > With instantaneous high precision vblank timestamping > that updates at leading edge of vblank, the emulated > "hw vblank counter" from vblank timestamping which > increments at leading edge of vblank, and reliable > page flip execution and

RE: [PATCH] drm/amdgpu: export gpu always on cu bitmap

2017-06-21 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Flora Cui > Sent: Wednesday, June 21, 2017 3:42 AM > To: Alex Deucher > Cc: amd-gfx list > Subject: Re: [PATCH] drm/amdgpu: export gpu always on cu bitmap > > On Tue, Jun 20, 2017 at

Re: [PATCH 01/11] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set

2017-06-21 Thread Peter Rosin
On 2017-06-21 09:38, Daniel Vetter wrote: > On Tue, Jun 20, 2017 at 09:25:25PM +0200, Peter Rosin wrote: >> This makes the redundant fb helpers .load_lut, .gamma_set and .gamma_get >> totally obsolete. >> >> I think the gamma_store can end up invalid on error. But the way I read >> it, that can

Re: [PATCH 08/11] drm: nouveau: remove dead code and pointless local lut storage

2017-06-21 Thread Peter Rosin
On 2017-06-20 21:25, Peter Rosin wrote: > The redundant fb helpers .load_lut, .gamma_set and .gamma_get are > no longer used. Remove the dead code and hook up the crtc .gamma_set > to use the crtc gamma_store directly instead of duplicating that > info locally. [...] > - for (i = 0; i < 256;

Re: [PATCH] drm/amdgpu: export gpu always on cu bitmap

2017-06-21 Thread Christian König
Am 21.06.2017 um 09:42 schrieb Flora Cui: On Tue, Jun 20, 2017 at 10:47:39AM -0400, Alex Deucher wrote: On Tue, Jun 20, 2017 at 4:15 AM, Flora Cui wrote: Change-Id: I056d8af23340d46e5140bd10cc38dfb887cc78ab Signed-off-by: Flora Cui ---

Re: [Nouveau] [PATCH 01/11] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set

2017-06-21 Thread Michel Dänzer
On 21/06/17 05:14 PM, Daniel Vetter wrote: > On Wed, Jun 21, 2017 at 04:59:31PM +0900, Michel Dänzer wrote: >> On 21/06/17 04:38 PM, Daniel Vetter wrote: >>> On Tue, Jun 20, 2017 at 09:25:25PM +0200, Peter Rosin wrote: This makes the redundant fb helpers .load_lut, .gamma_set and .gamma_get

Re: [Nouveau] [PATCH 01/11] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set

2017-06-21 Thread Daniel Vetter
On Wed, Jun 21, 2017 at 04:59:31PM +0900, Michel Dänzer wrote: > On 21/06/17 04:38 PM, Daniel Vetter wrote: > > On Tue, Jun 20, 2017 at 09:25:25PM +0200, Peter Rosin wrote: > >> This makes the redundant fb helpers .load_lut, .gamma_set and .gamma_get > >> totally obsolete. > >> > >> I think the

Re: [PATCH 01/11] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set

2017-06-21 Thread Michel Dänzer
On 21/06/17 04:38 PM, Daniel Vetter wrote: > On Tue, Jun 20, 2017 at 09:25:25PM +0200, Peter Rosin wrote: >> This makes the redundant fb helpers .load_lut, .gamma_set and .gamma_get >> totally obsolete. >> >> I think the gamma_store can end up invalid on error. But the way I read >> it, that can

Re: [PATCH] drm/amdgpu: export gpu always on cu bitmap

2017-06-21 Thread Flora Cui
On Tue, Jun 20, 2017 at 10:47:39AM -0400, Alex Deucher wrote: > On Tue, Jun 20, 2017 at 4:15 AM, Flora Cui wrote: > > Change-Id: I056d8af23340d46e5140bd10cc38dfb887cc78ab > > Signed-off-by: Flora Cui > > --- > > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7

Re: [PATCH 00/11] improve the fb_setcmap helper

2017-06-21 Thread Daniel Vetter
On Tue, Jun 20, 2017 at 09:25:24PM +0200, Peter Rosin wrote: > Hi! > > While trying to get CLUT support for the atmel_hlcdc driver, and > specifically for the emulated fbdev interface, I received some > push-back that my feeble in-driver attempts should be solved > by the core. This is my attempt

Re: [PATCH 01/11] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set

2017-06-21 Thread Daniel Vetter
On Tue, Jun 20, 2017 at 09:25:25PM +0200, Peter Rosin wrote: > This makes the redundant fb helpers .load_lut, .gamma_set and .gamma_get > totally obsolete. > > I think the gamma_store can end up invalid on error. But the way I read > it, that can happen in drm_mode_gamma_set_ioctl as well, so why

Re: [PATCH 2/4] drm/radeon: Allow vblank_disable_immediate.

2017-06-21 Thread Michel Dänzer
On 21/06/17 10:44 AM, Mario Kleiner wrote: > With instantaneous high precision vblank timestamping > that updates at leading edge of vblank, a cooked hw > vblank counter which increments at leading edge of > vblank, and reliable page flip execution and completion > at leading edge of vblank, we

Re: [PATCH 3/4] drm/amdgpu: Allow vblank_disable_immediate.

2017-06-21 Thread Michel Dänzer
On 21/06/17 10:44 AM, Mario Kleiner wrote: > With instantaneous high precision vblank timestamping > that updates at leading edge of vblank, a cooked hw > vblank counter which increments at leading edge of > vblank, and reliable page flip execution and completion > at leading edge of vblank, we

Re: [PATCH libdrm] amdgpu: update always on cu bitmap

2017-06-21 Thread Daniel Vetter
On Wed, Jun 21, 2017 at 10:13:54AM +0800, Flora Cui wrote: > each SE take 16 bit in cu_ao_mask. For ASICs with 4 SE, cu_ao_mask > has invalid value. so I change cu_ao_mask to cu_ao_bitmap[4][4] and increase > kmd driver version. Please read Documentation/ioctl/botching-up-ioctls.txt You cannot