[PATCH xf86-video-amdgpu 1/2] Call drmmode_do_crtc_dpms from drmmode_crtc_dpms as well

2018-05-18 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Leo pointed out that drmmode_do_crtc_dpms wasn't getting called when turning off an output with xrandr --output --off This meant that the vblank sequence number and timestamp wouldn't be saved before turning off the CRTC in this case. Re

[PATCH xf86-video-amdgpu] Replace 'foo == NULL' with '!foo'

2018-05-16 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Shorter and sweeter. :) Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/amdgpu_bo_helper.c | 10 -- src/amdgpu_dri2.c| 10 +- src/amdgpu_glamor.c | 2 +- src/amdgpu_glamor_wra

Re: [PATCH] drm/amdgpu/display: remove VEGAM config option

2018-05-16 Thread Michel Dänzer
On 2018-05-16 04:12 PM, Alex Deucher wrote: > Leftover from bringup. No need to keep it around for > upstream. > > Signed-off-by: Alex Deucher <alexander.deuc...@amd.com> Nice, thanks. Reviewed-by: Michel Dänzer <michel.daen...@amd.com> --

Re: [PATCH xf86-video-amdgpu 00/13] Enabling Color Management - Round 2

2018-05-16 Thread Michel Dänzer
ing this format corrupts the data once it gets to xserver. On > first glance, it may be the cast to long within XRRChangeOutputProperty, in > addition to compiling 64 bit (shouldn't it use int32_t instead?). For historical reasons, Xlib uses long for 32-bit values, so you have to pad each 32-b

Re: [PATCH xf86-video-amdgpu 08/13] Set driver-private CRTC's dpms mode on disable

2018-05-16 Thread Michel Dänzer
crtc->x, crtc->y); > drmmode_crtc->dpms_mode is updated in drmmode_do_crtc_dpms. I'm a bit worried that doing it here as well might cause subtle breakage. Is this related to patches 10 & 11, or can you describe the scenario that prompted you to make this change? -- Earth

Re: [PATCH xf86-video-amdgpu 10/13] Push staged color properties when DPMS state toggles On

2018-05-16 Thread Michel Dänzer
values regardless of DPMS state. This probably explains something I just discovered: the legacy gamma LUT becomes ineffective after turning a CRTC off and on again with DC, whereas it's preserved without DC. -- Earthling Michel Dänzer | http://www.amd.com Li

Re: [PATCH xf86-video-amdgpu 03/13] List disabled color properties on RandR outputs without a CRTC

2018-05-16 Thread Michel Dänzer
hange_cm_property could simply handle a NULL crtc more or less the same way it does the fake one? -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer __

Re: [PATCH xf86-video-amdgpu 02/13] Push color properties to kernel DRM on CRTC init

2018-05-16 Thread Michel Dänzer
/* Push properties to initialize them */ > + for (i = 0; i < CM_NUM_PROPS; i++) { > + if (i == CM_DEGAMMA_LUT_SIZE || i == CM_GAMMA_LUT_SIZE) > + continue; > + if (drmmode_crtc_push_cm_prop(crtc, i)) > + return 0; Pe

Re: [PATCH xf86-video-amdgpu 01/13] Add color management properties to driver-private CRTC object

2018-05-16 Thread Michel Dänzer
ing over the properties once, until drmmode_crtc->(de)gamma_lut_size are both non-0? > + drmmode_crtc->ctm = calloc(1, sizeof(*drmmode_crtc->ctm)); > + if (drmmode_crtc->ctm == NULL) if (!drmmode_crtc->ctm) -- Earthling Michel Dänzer |

Re: [PATCH 1/1] drm/amdgpu: Use GTT for dumb buffer if sg display enabled

2018-05-22 Thread Michel Dänzer
On 2018-05-22 12:11 PM, Christian König wrote: > Am 22.05.2018 um 09:09 schrieb Michel Dänzer: >> On 2018-05-22 01:22 AM, Deepak Sharma wrote: >>> When vram size <= THRESHOLD(256M) lets use GTT for dumb buffer >>> allocation. As SG will be enabled with

Re: [PATCH 1/1] drm/amdgpu: Use GTT for dumb buffer if sg display enabled

2018-05-22 Thread Michel Dänzer
On 2018-05-22 12:22 PM, Christian König wrote: > Am 22.05.2018 um 12:14 schrieb Michel Dänzer: >> On 2018-05-22 12:11 PM, Christian König wrote: >>> Am 22.05.2018 um 09:09 schrieb Michel Dänzer: >>>> On 2018-05-22 01:22 AM, Deepak Sharma wrote: >>>>> W

Re: [PATCH] drm/amdgpu: consider user preference when pinning for SG display

2018-05-22 Thread Michel Dänzer
On 2018-05-22 11:11 AM, Christian König wrote: > Am 22.05.2018 um 09:22 schrieb Michel Dänzer: >> On 2018-05-19 05:59 PM, Christian König wrote: >>> Am 18.05.2018 um 21:16 schrieb Alex Deucher: >>>> On Fri, May 18, 2018 at 2:22 PM, Samuel Li <samuel...@amd.com>

Re: [PATCH] drm/amdgpu: consider user preference when pinning for SG display

2018-05-22 Thread Michel Dänzer
On 2018-05-18 09:12 PM, Alex Deucher wrote: > On Fri, May 18, 2018 at 4:21 AM, Michel Dänzer <mic...@daenzer.net> wrote: >> On 2018-05-17 06:55 PM, Alex Deucher wrote: >>> If the pin domain is set to GTT | VRAM, look at the preferred domains >>> for the bo

Re: GPU hang trying to run OpenCL kernels on x86_64

2018-05-24 Thread Michel Dänzer
l-alt-del also doesn't work. I've to do a cold reset. Can you isolate which change introduced this new issue with git bisect? -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer

Re: [PATCH xf86-video-amdgpu 00/13] Enabling Color Management - Round 2

2018-05-25 Thread Michel Dänzer
On 2018-05-24 10:29 PM, Leo Li wrote: > On 2018-05-18 04:10 AM, Michel Dänzer wrote: >> On 2018-05-17 11:43 PM, Leo Li wrote: >>> On 2018-05-16 01:06 PM, Michel Dänzer wrote: >>>> On 2018-05-03 08:31 PM, sunpeng...@amd.com wrote: >>>>> >>>&g

[PATCH xf86-video-ati 1/2] Bail from dri2_create_buffer2 if we can't get a pixmap

2018-05-18 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> We would store the NULL pointer and continue, which would lead to a crash down the road. Bugzilla: https://bugs.freedesktop.org/106293 Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/radeon

[PATCH xf86-video-ati 2/2] glamor: Bail CreatePixmap on unsupported pixmap depth

2018-05-18 Thread Michel Dänzer
From: Michel Dänzer <michel.daen...@amd.com> Fixes crash in that case. Bugzilla: https://bugs.freedesktop.org/106293 Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- src/radeon_glamor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/radeon_glamor.c b/src/rad

Re: [4.17-rc4+ regression] X server does not start anymore with segmentation fault in `r600_dri.so`

2018-05-15 Thread Michel Dänzer
On 2018-05-15 08:38 AM, Paul Menzel wrote: > On 2018-05-14 10:44, Michel Dänzer wrote: >> On 2018-05-13 11:01 AM, Paul Menzel wrote: >>> Dear Linux AMD folks, >>> >>> >>> There is a regression introduced by a commit after Linux 4.17-rc4 >>> ca

Re: [PATCH 1/1] drm/amdgpu: Use GTT for dumb buffer if sg display enabled

2018-05-22 Thread Michel Dänzer
nd then use the same logic as in amdgpu_bo_pin_restricted: if (domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) { domain = AMDGPU_GEM_DOMAIN_VRAM; if (adev->gmc.real_vram_size <= AMDGPU_SG_THRESHOLD)

Re: [PATCH] drm/amdgpu/pp: remove duplicate assignment

2018-05-22 Thread Michel Dänzer
fs_enable, > - .is_dpm_running = vegam_is_dpm_running, > .thermal_setup_fan_table = vegam_thermal_setup_fan_table, > }; > Reviewed-by: Michel Dänzer <michel.daen...@amd.com> -- Earthling Michel Dänzer | http://www.amd.c

Re: [PATCH] drm/amdgpu: consider user preference when pinning for SG display

2018-05-22 Thread Michel Dänzer
On 2018-05-19 05:59 PM, Christian König wrote: > Am 18.05.2018 um 21:16 schrieb Alex Deucher: >> On Fri, May 18, 2018 at 2:22 PM, Samuel Li <samuel...@amd.com> wrote: >>> >>> On 2018-05-18 04:21 AM, Michel Dänzer wrote: >>>> On 2018-05-17 06:55 PM

Re: gitlab migration

2018-06-11 Thread Michel Dänzer
have moved to GitLab for issue tracking, to hopefully allow moving such misfiled issues. Adding the amd-gfx list, in cases somebody there has concerns or other feedback. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast |

Re: [PATCH] Add/update function level documentation and add reference to amdgpu_vm.c in amdgpu.rst

2018-06-11 Thread Michel Dänzer
alue documentation format! :) Other than that, looks good to me, but Christian et al should probably check that the function comments make sense. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X develo

Re: [PATCH] Add/update function level documentation and add reference to amdgpu_vm.c in amdgpu.rst

2018-06-12 Thread Michel Dänzer
On 2018-06-11 05:33 PM, Michel Dänzer wrote: > On 2018-06-11 05:14 PM, Andrey Grodzovsky wrote: >> @@ -94,6 +96,15 @@ struct amdgpu_prt_cb { >> struct dma_fence_cb cb; >> }; >> >> +/** >> + * amdgpu_vm_bo_base_init - Adds bo to the list of bos associ

Re: [PATCH xf86-video-amdgpu 0/7] Enabling Color Management - Round 3

2018-06-08 Thread Michel Dänzer
On 2018-06-08 12:21 AM, Leo Li wrote: > > > On 2018-06-06 01:03 PM, Michel Dänzer wrote: >> On 2018-06-06 06:01 PM, Michel Dänzer wrote: >>> On 2018-06-01 06:03 PM, sunpeng...@amd.com wrote: >>>> From: "Leo (Sunpeng) Li" >>>> >>

Re: [PATCH xf86-video-amdgpu 0/7] Enabling Color Management - Round 3

2018-06-08 Thread Michel Dänzer
On 2018-06-08 04:33 PM, Michel Dänzer wrote: > On 2018-06-08 12:21 AM, Leo Li wrote: >> On 2018-06-06 01:03 PM, Michel Dänzer wrote: >>> On 2018-06-06 06:01 PM, Michel Dänzer wrote: >>>> >>>> Running Xorg in depth 30[0] results in completely wro

Re: [PATCH xf86-video-amdgpu 0/7] Enabling Color Management - Round 3

2018-06-07 Thread Michel Dänzer
On 2018-06-07 03:26 PM, Mike Lothian wrote: > It seems messy having to create a whole xorg.conf just for one parameter Not sure I can agree, anyway it's the same whether the file is called /etc/X11/xorf.conf or /etc/X11/xorg.conf.d/foobar . :) -- Earthling Michel Dän

Re: [PATCH] drm/amd/display: avoid sleeping in atomic context while creating new context or state

2018-06-07 Thread Michel Dänzer
8] vce_v3_0_stop+0x3a/0x170 [amdgpu] [ 6232.140687] amdgpu_device_ip_set_powergating_state+0x150/0x2f0 [amdgpu] [ 6232.142694] smu7_powergate_vce+0x11d/0x1c0 [amdgpu] [ 6232.144336] pp_dpm_powergate_vce+0xf4/0x160 [amdgpu] [ 6232.146283] ? pp_set_clockgating_by_smu+0xe0/0xe0 [amdgpu] [ 6232.14

KASAN: use-after-free in amdgpu_ttm_tt_pte_flags

2018-06-08 Thread Michel Dänzer
KASAN picked up something during today's piglit run on amd-staging-drm-next, see attached. I've never seen this one before. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer [ 386.246490

Re: [PATCH] drm/amdgpu: update documentation for amdgpu_irq.c

2018-06-08 Thread Michel Dänzer
*adev) > > spin_lock_init(>irq.lock); > > - /* enable msi */ > + /* enable msi if not disabled by module parameter */ Acronyms like MSI should be spelled as all capitals in prose. (There are more acronyms in other comments) -- Earthling Michel Dänzer

Re: [PATCH v4] drm/amdgpu/vg20:support new UVD FW version naming convention

2018-06-14 Thread Michel Dänzer
sion_major == 0x01) && (version_minor >= 0x50))) ~~~^~~~ -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH v2 3/4] drm/amdgpu: Make amdgpu_vram_mgr_bo_invisible_size always accurate

2018-06-18 Thread Michel Dänzer
From: Michel Dänzer Even BOs with AMDGPU_GEM_CREATE_NO_CPU_ACCESS may end up at least partially in CPU visible VRAM, in particular when all VRAM is visible. v2: * Don't take VRAM mgr spinlock, not needed (Christian König) * Make loop logic simpler and clearer. Cc: sta...@vger.kernel.org Signed

Re: [PATCH] drm/amdgpu: update documentation for amdgpu_irq.c v2

2018-06-13 Thread Michel Dänzer
ns that may sleep processing is > + * dispatched to work handlers. > + * > + * If MSI functionality is not not disabled by module parameter then MSI Duplicate "not" With that fixed, Reviewed-by: Michel Dänzer > + * This design approach is required in order to defer hotplug event hand

Re: KASAN: use-after-free in amdgpu_ttm_tt_pte_flags

2018-06-13 Thread Michel Dänzer
e on the kernel memory management subsystem created by the latter. Also note that I've only ever seen this once so far. In summary, it may be difficult to reproduce. :) Probably best to look at the KASAN report for now. -- Earthling Michel Dänzer | http://www.

Re: [PATCH v2] Update function level documentation for GPUVM v2

2018-06-13 Thread Michel Dänzer
st_size' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:2465: warning: Function parameter or member 'max_bits' not described in 'amdgpu_vm_adjust_size' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:2536: warning: Function parameter or member 'pasid' not described in 'amdgpu_vm_init'

Re: [PATCH v2] Update function level documentation for GPUVM v2

2018-06-13 Thread Michel Dänzer
ithout cleaning the generated documentation first) again with them applied. The second run should only re-generate things affected by one's patches, so it should be easy to spot any warnings related to them. -- Earthling Michel Dänzer | http://www.amd.com Libre so

Re: gitlab migration

2018-06-12 Thread Michel Dänzer
On 2018-06-12 01:35 PM, Daniel Stone wrote: > On 11 June 2018 at 11:33, Michel Dänzer wrote: >> On 2018-06-08 08:08 PM, Adam Jackson wrote: >>> I'd like us to start moving repos and bug tracking into gitlab. >>> Hopefully everyone's aware that gitlab exists and why fdo

Re: GFXv8/Polaris on big endian

2018-06-12 Thread Michel Dänzer
der drivers... Not sure what kind of compatibility you mean. Anyway, AFAIK all GPUs supported by amdgpu simply don't have these byte swapping capabilities anymore. This will pose a much bigger challenge in the shader related code in Mesa. My advice would be to reconsider whether whatever reasons you

Re: [PATCH xf86-video-amdgpu 2/7] Initialize color properties on CRTC during CRTC init

2018-06-14 Thread Michel Dänzer
continue; This loop and the drmmode_output_set_property change in patch 5 could be simplified by putting CM_(DE)GAMMA_LUT_SIZE at the end of the enum definition and using the first of them as the sentinel instead of CM_NUM_PROPS. -- Earthling Michel Dänzer |

Re: [PATCH xf86-video-amdgpu 0/7] Enabling Color Management - Round 3

2018-06-14 Thread Michel Dänzer
erties could always return the proper values, even if the output currently isn't associated with a CRTC. Other than that, I'm going to send some minor feedback on patches 2 & 3. If you prefer, I could fix up those and other cosmetic issues before pushing the patches. -- Earthling Michel Dä

Re: [PATCH xf86-video-amdgpu 3/7] Configure color properties when creating output resources

2018-06-14 Thread Michel Dänzer
;, > +cm_prop_names[cm_prop_index], err); > + return err; > + } > + > + return 0; > +} Could simply always return err here. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast |

[PATCH] drm/amdgpu: Use kvmalloc_array for allocating VRAM manager nodes array

2018-06-15 Thread Michel Dänzer
From: Michel Dänzer It can be quite big, and there's no need for it to be physically contiguous. This is less likely to fail under memory pressure (has actually happened while running piglit). Cc: sta...@vger.kernel.org Signed-off-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu

Re: [PATCH 3/4] drm/amdgpu: Make amdgpu_vram_mgr_bo_invisible_size always accurate

2018-06-15 Thread Michel Dänzer
On 2018-06-15 05:18 PM, Christian König wrote: > Am 15.06.2018 um 17:14 schrieb Michel Dänzer: >> On 2018-06-15 05:11 PM, Christian König wrote: >>> Am 15.06.2018 um 16:42 schrieb Michel Dänzer: > >>>> + >>>> +    if (mem->start >= adev->gmc.v

[PATCH xf86-video-amdgpu] Check dimensions passed to drmmode_xf86crtc_resize

2018-06-15 Thread Michel Dänzer
From: Michel Dänzer When enabling a secondary GPU output, Xorg can try resizing the screen beyond the limit advertised by the driver, leading to drmModeAddFB failing and primary GPU outputs turning off. Check for this and bail instead. Signed-off-by: Michel Dänzer --- src/drmmode_display.c

[PATCH 0/4] drm/amdgpu: pin_size fixes

2018-06-15 Thread Michel Dänzer
From: Michel Dänzer I came up with the fixes in patches 1 & 3 while looking into https://bugs.freedesktop.org/106872 . It's not clear that these will be enough to fix that, but they are moving in the right direction anyway. Patch 2 is refactoring in preparation for patch 3. Patch 4 is sepa

[PATCH 3/4] drm/amdgpu: Make amdgpu_vram_mgr_bo_invisible_size always accurate

2018-06-15 Thread Michel Dänzer
From: Michel Dänzer Even BOs with AMDGPU_GEM_CREATE_NO_CPU_ACCESS may end up at least partially in CPU visible VRAM, in particular when all VRAM is visible. Cc: sta...@vger.kernel.org Signed-off-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 26 ++-- 1

[PATCH 4/4] drm/amdgpu: Use gmc_vram_full_visible in vram_mgr_bo_invisible_size

2018-06-15 Thread Michel Dänzer
From: Michel Dänzer Signed-off-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c index 9b34df7017f0..9814e9aab317

[PATCH 2/4] drm/amdgpu: Refactor amdgpu_vram_mgr_bo_invisible_size helper

2018-06-15 Thread Michel Dänzer
From: Michel Dänzer Preparation for the following fix, no functional change intended. Cc: sta...@vger.kernel.org Signed-off-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 1 + drivers/gpu/drm/amd/amdgpu

[PATCH 1/4] drm/amdgpu: Update pin_size values before unpinning BO

2018-06-15 Thread Michel Dänzer
From: Michel Dänzer At least in theory, ttm_bo_validate may move the BO, in which case the pin_size accounting would be inconsistent with when the BO was pinned. Cc: sta...@vger.kernel.org Signed-off-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 18 -- 1

Re: [PATCH 3/4] drm/amdgpu: Make amdgpu_vram_mgr_bo_invisible_size always accurate

2018-06-15 Thread Michel Dänzer
On 2018-06-15 05:11 PM, Christian König wrote: > Am 15.06.2018 um 16:42 schrieb Michel Dänzer: >> From: Michel Dänzer >> >> Even BOs with AMDGPU_GEM_CREATE_NO_CPU_ACCESS may end up at least >> partially in CPU visible VRAM, in particular when all VRAM is visible. >&

Re: [PATCH] drm/amdgpu: Use kvmalloc_array for allocating VRAM manager nodes array

2018-06-15 Thread Michel Dänzer
On 2018-06-15 05:05 PM, Christian König wrote: > Am 15.06.2018 um 16:27 schrieb Michel Dänzer: >> From: Michel Dänzer >> >> It can be quite big, and there's no need for it to be physically >> contiguous. This is less likely to fail under memory pressure (has >>

Re: [PATCH xf86-video-amdgpu 0/7] Enabling Color Management - Round 3

2018-06-15 Thread Michel Dänzer
On 2018-06-14 09:49 PM, Leo Li wrote: > On 2018-06-14 12:57 PM, Michel Dänzer wrote: >> On 2018-06-01 06:03 PM, sunpeng...@amd.com wrote: >>> From: "Leo (Sunpeng) Li" >>> >>> This ended up being different enough from v2 to warrant a new >>>

Re: [PATCH v2] drm/amd/display: Fix BUG_ON during CRTC atomic check update

2018-05-29 Thread Michel Dänzer
gt; > Fixes: e277adc5a06c "drm/amd/display: Hookup color management functions" Might also want to add Bugzilla: https://bugs.freedesktop.org/106194 for good measure. > Signed-off-by: Leo (Sunpeng) Li > Reviewed-by: Harry Wentland > Tested-by: Michel Dänzer > --- &g

Re: [PATCH] drm/amdgpu: add kernel DOC for ioctls in amdgpu_cs.c file

2018-05-31 Thread Michel Dänzer
On 2018-05-31 06:49 PM, Leo Liu wrote: > On 05/31/2018 12:47 PM, Michel Dänzer wrote: >> On 2018-05-31 06:39 PM, Leo Liu wrote: >>> On 05/31/2018 12:30 PM, Michel Dänzer wrote: >>>> On 2018-05-30 08:42 PM, Leo Liu wrote: >>>>> diff --git a/drivers/gpu/d

Re: [PATCH 2/2] drm/amdgpu/display: enable CONFIG_DRM_AMD_DC_DCN1_0 by default

2018-05-31 Thread Michel Dänzer
D_DC_DCN1_0 just be replaced by (something like) CONFIG_X86 altogether? -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH] drm/amdgpu: add kernel DOC for ioctls in amdgpu_cs.c file

2018-05-31 Thread Michel Dänzer
> + > /** > * amdgpu_cs_wait_fences_ioctl - wait for multiple command submissions to > finish > * Any reason for not adding the above to the existing function documentation comment here? -- Earthling Michel Dänzer | http://www.amd.c

[PATCH 3/3] drm/amdgpu: Add documentation for PRIME related code

2018-05-31 Thread Michel Dänzer
From: Michel Dänzer Signed-off-by: Michel Dänzer --- Documentation/gpu/amdgpu.rst | 14 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 119 ++ 2 files changed, 133 insertions(+) diff --git a/Documentation/gpu/amdgpu.rst b/Documentation/gpu/amdgpu.rst index

[PATCH 2/3] drm/doc: Add initial amdgpu driver documentation

2018-05-31 Thread Michel Dänzer
From: Michel Dänzer Signed-off-by: Michel Dänzer --- Documentation/gpu/amdgpu.rst | 6 ++ Documentation/gpu/drivers.rst | 1 + 2 files changed, 7 insertions(+) create mode 100644 Documentation/gpu/amdgpu.rst diff --git a/Documentation/gpu/amdgpu.rst b/Documentation/gpu/amdgpu.rst new

[PATCH 1/3] drm/doc: Add a label for the PRIME Buffer Sharing chapter

2018-05-31 Thread Michel Dänzer
From: Michel Dänzer So that it can be referenced from e.g. DOC comments. Signed-off-by: Michel Dänzer --- Documentation/gpu/drm-mm.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/gpu/drm-mm.rst b/Documentation/gpu/drm-mm.rst index 96ebcc2a7b41..21b6b72a9ba8 100644

Re: [PATCH] drm/amdgpu: add kernel DOC for ioctls in amdgpu_cs.c file

2018-05-31 Thread Michel Dänzer
On 2018-05-31 06:39 PM, Leo Liu wrote: > On 05/31/2018 12:30 PM, Michel Dänzer wrote: >> On 2018-05-30 08:42 PM, Leo Liu wrote: > >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c >>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c >>> index 12f0d18c6ee8..34

Re: [PATCH] drm/amdgpu: fix clear_all and replace handling in the VM

2018-06-04 Thread Michel Dänzer
On 2018-06-04 12:59 PM, Christian König wrote: > We need to put the lose ends on the invalid list because it is possible > that we need to split up huge pages for them. > > Signed-off-by: Christian König Does this need to go to stable? -- Earthling M

Re: [PATCH 1/2] drm/doc: Add amdgpu hwmon/power documentation

2018-06-04 Thread Michel Dänzer
and power/thermal controls. Apart from the chapter/section question raised by patch 2, this patch is Reviewed-by: Michel Dänzer -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___

Re: [PATCH 2/2] drm/doc: Make naming consistent for Core Driver Infrastructure

2018-06-04 Thread Michel Dänzer
=== > > -This section covers core driver infrastructure. > +This chapter covers core driver infrastructure. > > PRIME Buffer Sharing > I don't mind either way, but I copied the "section" wording from i915.rst. -- Earthling Michel Dänzer

Re: [PATCH] drm/amdgpu: add kernel DOC for ioctls in amdgpu_cs.c file

2018-06-01 Thread Michel Dänzer
_ID_SYNCOBJ_OUT > + * These will be parsed as fence dependencies in given requirement, > + * and will be remembered and to be synced later. > + * > + * __u32 _pad: > + * > + * __u64 chunks: > + * Point to the CS chunks. BTW, this kind of formatting isn't preserved in the generated

Re: [PATCH] drm/amdgpu: add kernel DOC for ioctls in amdgpu_cs.c file

2018-06-01 Thread Michel Dänzer
On 2018-05-31 08:02 PM, Leo Liu wrote: > On 05/31/2018 01:04 PM, Michel Dänzer wrote: >> On 2018-05-31 06:49 PM, Leo Liu wrote: >>> On 05/31/2018 12:47 PM, Michel Dänzer wrote: >>>> On 2018-05-31 06:39 PM, Leo Liu wrote: >>>>> On 05/31/2018 12:30 PM, Mi

[PATCH 2/3] drm/amdgpu: Fix-ups for amdgpu_object.c documentation

2018-06-01 Thread Michel Dänzer
From: Michel Dänzer * Fix format of return value descriptions * Document all parameters of amdgpu_bo_free_kernel * Document amdgpu_bo_get_preferred_pin_domain Signed-off-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 78 +++--- 1 file changed, 55 insertions

[PATCH 1/3] drm/amdgpu: Hook up documentation about memory domains

2018-06-01 Thread Michel Dänzer
From: Michel Dänzer Signed-off-by: Michel Dänzer --- Documentation/gpu/amdgpu.rst | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/gpu/amdgpu.rst b/Documentation/gpu/amdgpu.rst index f557866f6788..ad3711fd2a28 100644 --- a/Documentation/gpu/amdgpu.rst +++ b

[PATCH 3/3] drm/amdgpu: Hook up amdgpu_object.c documentation

2018-06-01 Thread Michel Dänzer
From: Michel Dänzer Signed-off-by: Michel Dänzer --- Documentation/gpu/amdgpu.rst | 9 + 1 file changed, 9 insertions(+) diff --git a/Documentation/gpu/amdgpu.rst b/Documentation/gpu/amdgpu.rst index ad3711fd2a28..1fbf3876a3d8 100644 --- a/Documentation/gpu/amdgpu.rst +++ b

Re: [PATCH 3/3] drm/amdgpu: Add documentation for PRIME related code

2018-06-01 Thread Michel Dänzer
On 2018-06-01 02:58 PM, Alex Deucher wrote: > On Thu, May 31, 2018 at 12:17 PM, Michel Dänzer wrote: >> From: Michel Dänzer >> >> Signed-off-by: Michel Dänzer > > Series is: > Reviewed-by: Alex Deucher Thanks. Is it okay to merge all of these via the amdgpu tre

Re: [PATCH 3/3] drm/amdgpu: Add documentation for PRIME related code

2018-06-01 Thread Michel Dänzer
On 2018-06-01 03:44 PM, Alex Deucher wrote: > On Fri, Jun 1, 2018 at 9:40 AM, Michel Dänzer wrote: >> On 2018-06-01 02:58 PM, Alex Deucher wrote: >>> On Thu, May 31, 2018 at 12:17 PM, Michel Dänzer wrote: >>>> From: Michel Dänzer >>>> >>

Re: [PATCH 1/5] dma_buf: remove device parameter from attach callback

2018-06-01 Thread Michel Dänzer
ndling in amdgpu. Please rebase this series on top of https://patchwork.freedesktop.org/patch/226311/ and update the documentation in amdgpu_prime.c as needed in each patch. -- Earthling Michel Dänzer | http://www.amd.com Libre softwa

Re: [PATCH 2/2] drm/amdgpu: fix documentation of amdgpu_mn.c

2018-06-05 Thread Michel Dänzer
nt body is missing from the generated documentation. > + * For coherent userptr handling registers an MMU notifier to inform the > driver > + * about updates on a page tables of a process. Something like "updates to page tables" instead of "updates on a page tables"

Re: [PATCH 1/2] drm/amdgpu: rename rmn to amn in the MMU notifier code

2018-06-05 Thread Michel Dänzer
On 2018-06-05 11:48 AM, Christian König wrote: > Just a copy leftover from radeon. > > Signed-off-by: Christian König Reviewed-by: Michel Dänzer -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | M

Re: [PATCH 1/2] drm/scheduler: Rename cleanup functions.

2018-06-06 Thread Michel Dänzer
ke sure to merge this change via a tree which has the v3d driver, and fix it up as well, or don't do the fini => destroy rename. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer __

Re: [PATCH xf86-video-amdgpu 0/7] Enabling Color Management - Round 3

2018-06-07 Thread Michel Dänzer
ng way to do it. :) The xorg.conf.d mechanism is for shipping snippets required for a driver or other Xorg module to work out of the box. xorg.conf is still the place for actual configuration. -- Earthling Michel Dänzer | http://www.amd.com Libre softwar

Re: [PATCH xf86-video-amdgpu 0/7] Enabling Color Management - Round 3

2018-06-07 Thread Michel Dänzer
On 2018-06-06 07:03 PM, Michel Dänzer wrote: > On 2018-06-06 06:01 PM, Michel Dänzer wrote: >> On 2018-06-01 06:03 PM, sunpeng...@amd.com wrote: >>> From: "Leo (Sunpeng) Li" >>> >>> This ended up being different enough from v2 to warrant a new patc

Re: [PATCH xf86-video-amdgpu 0/7] Enabling Color Management - Round 3

2018-06-06 Thread Michel Dänzer
e 4.16 development cycle. [0] You can change Xorg's colour depth either via -depth on its command line, or via the xorg.conf screen section: Section "Screen" Identifier "Screen0" DefaultDepth 30 # or 16 or 8 EndSection -- Earthling Mic

Re: [PATCH xf86-video-amdgpu 0/7] Enabling Color Management - Round 3

2018-06-06 Thread Michel Dänzer
On 2018-06-06 06:01 PM, Michel Dänzer wrote: > On 2018-06-01 06:03 PM, sunpeng...@amd.com wrote: >> From: "Leo (Sunpeng) Li" >> >> This ended up being different enough from v2 to warrant a new patchset. Per >> Michel's suggestions, there have been various

Re: [PATCH] drm/amd/display: Fix BUG_ON during CRTC atomic check update

2018-05-28 Thread Michel Dänzer
the commit log: Fixes: e277adc5a06c "drm/amd/display: Hookup color management functions" Tested-by: Michel Dänzer <michel.daen...@amd.com> -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X d

Re: [PATCH 1/5] dma_buf: remove device parameter from attach callback

2018-06-01 Thread Michel Dänzer
On 2018-06-01 05:17 PM, Christian König wrote: > Am 01.06.2018 um 16:02 schrieb Michel Dänzer: >> On 2018-06-01 02:11 PM, Christian König wrote: >>> Sorry, accidentally send this series without a cover letter. >>> >>> This is a cleanup to the DMA-buf int

DC regression in 4.17 broke suspend to RAM

2018-05-28 Thread Michel Dänzer
0 00 00 e9 e5 fd ff ff <0f> 0b 48 83 bb e0 12 00 00 00 0f 84 f3 fe ff ff 48 83 3c 24 00 [ 783.705152] RIP: dm_update_crtcs_state+0x3b8/0x440 [amdgpu] RSP: b53f884e7ad0 -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast |

Re: [PATCH] drm/amd: Remove errors from sphinx documentation

2018-07-02 Thread Michel Dänzer
commit log should mention that the patch modifies amdgpu_mn.c as well. With that fixed, Reviewed-by: Michel Dänzer > Subject: [PATCH 2/2] drm/amd: Add sphinx documentation for amd_ip_funcs > > [...] > > + /** > + * @name: Name of IP block > + */ >

Re: [PATCH xf86-video-amdgpu 0/7] Enabling Color Management - Round 3

2018-06-26 Thread Michel Dänzer
On 2018-06-22 03:41 PM, Leo Li wrote: > > Ping! > > FYI, all the new patches are v2, with the exception of 6/7, which is a > v3. (On second thought, should have started a new thread :) ) I've pushed the changes (with some minor fix-ups), thanks and sorry it took so long! -- E

[PATCH xf86-video-amdgpu] Don't apply gamma to HW cursor data if colour management is enabled

2018-06-26 Thread Michel Dänzer
From: Michel Dänzer In that case, the display hardware applies gamma to the HW cursor. Bugzilla: https://bugs.freedesktop.org/106578 Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src

Re: [PATCH 1/2] drm/amdgpu: Add module parameter stutter_mode

2018-06-26 Thread Michel Dänzer
sk. That would be better. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesk

[PATCH] dma-buf: Move BUG_ON from _add_shared_fence to _add_shared_inplace

2018-06-26 Thread Michel Dänzer
From: Michel Dänzer Fixes the BUG_ON spuriously triggering under the following circumstances: * ttm_eu_reserve_buffers processes a list containing multiple BOs using the same reservation object, so it calls reservation_object_reserve_shared with that reservation object once for each

[PATCH v2 xf86-video-amdgpu] Don't apply gamma to HW cursor data if colour management is enabled

2018-06-27 Thread Michel Dänzer
From: Michel Dänzer In that case (with DC as of 4.17 kernels), the display hardware applies gamma to the HW cursor. v2: * Also use all 0s when alpha == 0 in the gamma passthrough case. Bugzilla: https://bugs.freedesktop.org/106578 Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 25

Re: [PATCH] dma-buf: Move BUG_ON from _add_shared_fence to _add_shared_inplace

2018-06-27 Thread Michel Dänzer
On 2018-06-27 01:50 PM, Chris Wilson wrote: > Quoting Michel Dänzer (2018-06-26 15:31:47) >> From: Michel Dänzer >> >> Fixes the BUG_ON spuriously triggering under the following >> circumstances: >> >> * ttm_eu_reserve_buffers processes a list cont

[PATCH xf86-video-amdgpu 2/2] Call drmmode_crtc_gamma_do_set from drmmode_setup_colormap

2018-06-27 Thread Michel Dänzer
From: Michel Dänzer Instead of from drmmode_set_mode_major. There's no need to re-set the gamma LUT on every modeset, the kernel should preserve it. Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 29 + 1 file changed, 17 insertions(+), 12 deletions

[PATCH xf86-video-amdgpu 1/2] Remove #if 0'd code

2018-06-27 Thread Michel Dänzer
From: Michel Dänzer This has always been disabled, no need to keep it. Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 12 1 file changed, 12 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 1563417a7..5fe49b607 100644 --- a/src

Re: [PATCH 2/2] drm/amdgpu: allocate gart memory when it's required

2018-06-26 Thread Michel Dänzer
same issue applies to at least some of the other places modified by this patch. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ amd-gfx mailing list a

Re: [PATCH 1/2] drm/amdgpu: separate gpu address from bo pin

2018-06-26 Thread Michel Dänzer
> restrictions This also needs to be removed in the comment before amdgpu_bo_pin_restricted. With that fixed, Reviewed-by: Michel Dänzer -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___

Re: DCN/PP regression

2018-06-26 Thread Michel Dänzer
I'm not seeing either issue with my Tonga. P.S. By default, KASAN only reports the first issue it finds and then disables itself. One has to pass kasan_multi_shot on the kernel command line to make it keep reporting issues. -- Earthling Michel Dänzer | http://ww

Re: [PATCH 1/2] drm/amdgpu: separate gpu address from bo pin

2018-06-26 Thread Michel Dänzer
On 2018-06-26 10:28 AM, Zhang, Jerry (Junwei) wrote: > On 06/26/2018 03:46 PM, Michel Dänzer wrote: >> On 2018-06-26 08:00 AM, Junwei Zhang wrote: >>> It could be got by amdgpu_bo_gpu_offset() if need >>> >>> Signed-off-by: Junwei Zhang >>&

Re: DCN/PP regression

2018-06-26 Thread Michel Dänzer
On 2018-06-26 10:39 AM, Michel Dänzer wrote: > On 2018-06-25 03:58 PM, Tom St Denis wrote: >> With a Tonga dGPU installed in a Raven1 system I see (attached) dmesg >> warning from init. >> >> Also, every warm reboot results in my Tonga failing to init (also >>

[PATCH] drm/amdgpu: Reserve shared fence slot in amdgpu_vm_update_directories

2018-06-22 Thread Michel Dänzer
From: Michel Dänzer Without this, there could not be enough slots, which could trigger the BUG_ON in reservation_object_add_shared_fence. Cc: sta...@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/106418 Reported-by: mikhail.v.gavri...@gmail.com Signed-off-by: Michel Dänzer --- drivers

[PATCH] drm/amdgpu: Add AMDGPU_GPU_PAGES_IN_CPU_PAGE define

2018-06-22 Thread Michel Dänzer
From: Michel Dänzer To hopefully make the code dealing with GPU vs CPU pages a little clearer. Suggested-by: Christian König Signed-off-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h | 2 ++ drivers/gpu/drm/amd/amdgpu

Re: [PATCH] drm/amdgpu: Reserve shared fence slot in amdgpu_vm_update_directories

2018-06-25 Thread Michel Dänzer
On 2018-06-25 04:15 AM, Zhang, Jerry (Junwei) wrote: > On 06/23/2018 12:42 AM, Michel Dänzer wrote: >> From: Michel Dänzer >> >> Without this, there could not be enough slots, which could trigger the >> BUG_ON in reservation_object_add_shared_fence. >> >>

[PATCH v2] drm/amdgpu: Reserve shared fence slot in amdgpu_vm_update_directories

2018-06-25 Thread Michel Dänzer
From: Michel Dänzer Without this, there could not be enough slots, which could trigger the BUG_ON in reservation_object_add_shared_fence. v2: * Jump to the error label instead of returning directly (Jerry Zhang) Cc: sta...@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/106418 Reported

Re: [PATCH] drm/amdgpu: Add AMDGPU_GPU_PAGES_IN_CPU_PAGE define

2018-06-25 Thread Michel Dänzer
On 2018-06-25 03:56 AM, zhoucm1 wrote: > one question to you: > > Did you consider the case that GPU_PAGE_SIZE > CPU_PAGE_SIZE? That is never the case: AMDGPU_GPU_PAGE_SIZE is always 4096, and PAGE_SIZE is always >= 4096 (an integer multiple of it). -- Earthlin

<    4   5   6   7   8   9   10   11   12   13   >