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

2017-06-22 Thread axie
Hi Marek, So do you agree that spinlock disables CPU preemption, contrary to your original idea? If you have new reason that this patch does not improve, please speak out. Many patches in GPU driver aim at improving performance and power efficiency. Does most patches submitted in AMDGPU

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

2017-06-22 Thread Marek Olšák
That's all nice, but does it improve performance? Have you been able to measure some performance difference with that code? Were you targeting a specific inefficiency you had seen e.g. with a CPU profiler? Marek On Thu, Jun 22, 2017 at 8:19 PM, axie wrote: > To clarify, local IRQ

[PATCH] drm/amdgpu/psp: upper_32_bits/lower_32_bits for address setup

2017-06-22 Thread Alex Deucher
Rather than casting and shifting. Fixes sparse case warnings. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 12 ++-- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 12 ++-- 3

[PATCH] drm/amd/powerplay/cz: print message if smc message fails

2017-06-22 Thread Alex Deucher
Helpful in debugging. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c

Re: [RFC PATCH linux-next] drm/amdgpu/gfx9: gfx_v9_0_enable_gfx_static_mg_power_gating() can be static

2017-06-22 Thread Alex Deucher
On Thu, Jun 22, 2017 at 4:28 PM, kbuild test robot wrote: > > Signed-off-by: Fengguang Wu Applied. thanks! > --- > gfx_v9_0.c |6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git

[PATCH] Add PCI device based GPU selection with --pci

2017-06-22 Thread Jean-Francois Thibert
This allows selecting the GPU by its PCI device both with and without kernel mode support. The instance is populated automatically so that the proper corresponding debugfs files are used if present. Signed-off-by: Jean-Francois Thibert --- src/app/main.c | 9 ++

[RFC PATCH linux-next] drm/amdgpu/gfx9: gfx_v9_0_enable_gfx_static_mg_power_gating() can be static

2017-06-22 Thread kbuild test robot
Signed-off-by: Fengguang Wu --- gfx_v9_0.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index a1e1b7aa..f2ae6f3 100644 ---

[linux-next:master 2278/9292] drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:1995:6: sparse: symbol 'gfx_v9_0_enable_gfx_static_mg_power_gating' was not declared. Should it be static?

2017-06-22 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 09c17284731e42dbe4c6d334603e9c05ba1219ae commit: 18924c719e1d2b194f93ef757584b814421f22a5 [2278/9292] drm/amdgpu/gfx9: allow updating gfx mgpg state reproduce: # apt-get install sparse git

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

2017-06-22 Thread axie
Hi Marek, Spin lock and spin unlock is fast. But it is not so fast compared with atomic, which is a single CPU instruction in x86. 1. spinlock does NOT allow preemption at local CPU. Let us have a look at how spin lock was implemented. static inline void __raw_spin_lock(raw_spinlock_t

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

2017-06-22 Thread Marek Olšák
On Thu, Jun 22, 2017 at 5:33 PM, Xie, AlexBin wrote: > Hi Christian, > > > In fact, the change from spinlock to atomic is quite painful. When I > started, I thought it was easy but later I found there might be race > condition here and there. Now I think the change looks more

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

2017-06-22 Thread Christian König
Hi Alex, yeah, the change looks totally ok to me. The problem is just that I'm not familiar with that part of the source. Marek came up with that, so he should at least take a look and nod. Regards, Christian. Am 22.06.2017 um 17:33 schrieb Xie, AlexBin: Hi Christian, In fact, the

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

2017-06-22 Thread Xie, AlexBin
Hi Christian, In fact, the change from spinlock to atomic is quite painful. When I started, I thought it was easy but later I found there might be race condition here and there. Now I think the change looks more robust. In kernel source, there are several other drivers used the same trick.

RE: [PATCH umr] Fix copy/paste error in error message

2017-06-22 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Tom St Denis > Sent: Thursday, June 22, 2017 9:38 AM > To: amd-gfx@lists.freedesktop.org > Cc: StDenis, Tom > Subject: [PATCH umr] Fix copy/paste error in error message > > Also fix a couple

[PATCH umr] Fix copy/paste error in error message

2017-06-22 Thread Tom St Denis
Also fix a couple of error message style deviations. Signed-off-by: Tom St Denis --- src/lib/mmio.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/mmio.c b/src/lib/mmio.c index f0737c43913a..987704cb9944 100644 --- a/src/lib/mmio.c +++

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

2017-06-22 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Michel Dänzer > Sent: Wednesday, June 21, 2017 11:56 PM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH xf86-video-amdgpu] Increase reference count of FB > assigned to

RE: [PATCH xf86-video-amdgpu] Improve drmmode_fb_reference debugging code

2017-06-22 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Michel Dänzer > Sent: Thursday, June 22, 2017 4:03 AM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH xf86-video-amdgpu] Improve drmmode_fb_reference > debugging code > > From: Michel

[PATCH v2 01/14] drm/fb-helper: keep the .gamma_store updated in drm_fb_helper_setcmap

2017-06-22 Thread Peter Rosin
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 should this pesky legacy fbdev stuff be any better? Signed-off-by: Peter Rosin --- drivers/gpu/drm/drm_fb_helper.c | 27

[PATCH v2 03/14] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set

2017-06-22 Thread Peter Rosin
This makes the redundant fb helpers .load_lut, .gamma_set and .gamma_get totally obsolete. Signed-off-by: Peter Rosin --- drivers/gpu/drm/drm_fb_helper.c | 151 +--- 1 file changed, 63 insertions(+), 88 deletions(-) This is an alternative

[PATCH v2 09/14] drm: i915: remove dead code and pointless local lut storage

2017-06-22 Thread Peter Rosin
The driver stores lut values from the fbdev interface, and is able to give them back, but does not appear to do anything with these lut values. The generic fb helpers have replaced this function, and may even have made the driver work for the C8 mode from the fbdev interface. But that is untested.

[PATCH v2 12/14] drm: radeon: remove dead code and pointless local lut storage

2017-06-22 Thread Peter Rosin
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. Signed-off-by: Peter Rosin ---

[PATCH v2 01/14] drm/fb-helper: keep the .gamma_store updated in drm_fb_helper_setcmap

2017-06-22 Thread Peter Rosin
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 should this pesky legacy fbdev stuff be any better? Signed-off-by: Peter Rosin --- drivers/gpu/drm/drm_fb_helper.c | 27

[PATCH v2 03/14] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set

2017-06-22 Thread Peter Rosin
This makes the redundant fb helpers .load_lut, .gamma_set and .gamma_get totally obsolete. Signed-off-by: Peter Rosin --- drivers/gpu/drm/drm_fb_helper.c | 154 1 file changed, 63 insertions(+), 91 deletions(-) diff --git

[PATCH v2 06/14] drm: ast: remove dead code and pointless local lut storage

2017-06-22 Thread Peter Rosin
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. Signed-off-by: Peter Rosin --- drivers/gpu/drm/ast/ast_drv.h |

[PATCH v2 02/14] drm/fb-helper: remove drm_fb_helper_save_lut_atomic

2017-06-22 Thread Peter Rosin
drm_fb_helper_save_lut_atomic is redundant since the .gamma_store is now always kept up to date by drm_fb_helper_setcmap. Signed-off-by: Peter Rosin --- drivers/gpu/drm/drm_fb_helper.c | 17 - 1 file changed, 17 deletions(-) diff --git

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

2017-06-22 Thread Peter Rosin
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. Signed-off-by: Peter Rosin ---

[PATCH v2 04/14] drm: amd: remove dead code and pointless local lut storage

2017-06-22 Thread Peter Rosin
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. Signed-off-by: Peter Rosin ---

[PATCH v2 05/14] drm: armada: remove dead empty functions

2017-06-22 Thread Peter Rosin
The redundant fb helpers .gamma_set and .gamma_get are no longer used. Remove the dead code. Signed-off-by: Peter Rosin --- drivers/gpu/drm/armada/armada_crtc.c | 10 -- drivers/gpu/drm/armada/armada_crtc.h | 2 -- drivers/gpu/drm/armada/armada_fbdev.c | 2 -- 3

[PATCH v2 13/14] drm: stm: remove dead code and pointless local lut storage

2017-06-22 Thread Peter Rosin
The redundant fb helper .load_lut is no longer used, and can not work right without also providing the fb helpers .gamma_set and .gamma_get thus rendering the code in this driver suspect. Just remove the dead code. Signed-off-by: Peter Rosin --- drivers/gpu/drm/stm/ltdc.c | 12

[PATCH v2 07/14] drm: cirrus: remove dead code and pointless local lut storage

2017-06-22 Thread Peter Rosin
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. Signed-off-by: Peter Rosin ---

[PATCH v2 10/14] drm: mgag200: remove dead code and pointless local lut storage

2017-06-22 Thread Peter Rosin
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. Signed-off-by: Peter Rosin ---

[PATCH v2 00/14] improve the fb_setcmap helper

2017-06-22 Thread Peter Rosin
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 to do it right. I have obviously not tested all of this with more than

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

2017-06-22 Thread Peter Rosin
On 2017-06-22 08:36, Daniel Vetter wrote: > On Wed, Jun 21, 2017 at 11:40:52AM +0200, Peter Rosin wrote: >> 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

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

2017-06-22 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 11:13 PM > To: amd-gfx@lists.freedesktop.org > Cc: Cui, Flora > Subject: [PATCH v2] drm/amdgpu: export gpu always on cu bitmap Tweak the subject

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

2017-06-22 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Michel Dänzer > Sent: Wednesday, June 21, 2017 11:41 PM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH xf86-video-ati] Only call drmmode_scanout_free for non- > GPU screens in LeaveVT

Re: [PATCH v2 13/14] drm: stm: remove dead code and pointless local lut storage

2017-06-22 Thread Philippe CORNU
On 06/22/2017 08:06 AM, Peter Rosin wrote: > The redundant fb helper .load_lut is no longer used, and can not > work right without also providing the fb helpers .gamma_set and > .gamma_get thus rendering the code in this driver suspect. > Hi Peter, STM32 chipsets supports 8-bit CLUT mode but

[PATCH xf86-video-amdgpu] Improve drmmode_fb_reference debugging code

2017-06-22 Thread Michel Dänzer
From: Michel Dänzer If a reference count is <= 0, call FatalError with the call location (in case it doesn't get resolved in the backtrace printed by FatalError). Signed-off-by: Michel Dänzer --- src/drmmode_display.h | 28

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

2017-06-22 Thread Christian König
Am 22.06.2017 um 05:13 schrieb Flora Cui: v2: keep cu_ao_mask for backward compatibility. Change-Id: I056d8af23340d46e5140bd10cc38dfb887cc78ab Signed-off-by: Flora Cui I can't judge the technical correctness, but at least it looks backward compatible now. Patch is

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

2017-06-22 Thread Christian König
Am 22.06.2017 um 04:42 schrieb Alex Xie: Signed-off-by: Alex Xie With the commit message fixed as Michel suggested patches #1 and #2 are Reviewed-by: Christian König as well. On patch #3 Marek needs to take a look, cause I don't know the

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

2017-06-22 Thread Boris Brezillon
On Thu, 22 Jun 2017 08:37:55 +0200 Daniel Vetter wrote: > On Thu, Jun 22, 2017 at 12:34:36AM +0800, kbuild test robot wrote: > > 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

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

2017-06-22 Thread Daniel Vetter
On Thu, Jun 22, 2017 at 12:34:36AM +0800, kbuild test robot wrote: > 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

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

2017-06-22 Thread Daniel Vetter
On Wed, Jun 21, 2017 at 11:40:52AM +0200, Peter Rosin wrote: > 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