Re: [PATCH v2 0/2] AMDGPU scheduler move, take 2

2017-12-06 Thread Dieter Nützel

For the series:

Tested-by: Dieter Nützel 

on RX580 8GB

with UH, UV, Blender 2.79, smoketest (Vulkan), glmark2 (parallel with 
OpenCL (/opt/opencl-example>./run_tests.sh))


Dieter

Am 06.12.2017 17:49, schrieb Lucas Stach:

Hi all,

second try to move the AMDGPU scheduler into a common location, this
time rebased onto drm-next-4.16-wip.

I've tested my etnaviv series on top of this and things seem to work
fine. I checked that AMDGPU still builds, but I don't have any means
to actually runtime test this currently, so I would be very happy to
receive some tested-bys from the AMD side.

Alex, if this looks good please pull this in so it gets your usual
testing.

Thanks,
Lucas

Lucas Stach (2):
  drm: move amd_gpu_scheduler into common location
  drm/sched: move fence slab handling to module init/exit

 drivers/gpu/drm/Kconfig|   5 +
 drivers/gpu/drm/Makefile   |   1 +
 drivers/gpu/drm/amd/amdgpu/Makefile|   5 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu.h|  16 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c|  38 +--
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c|   8 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c  |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c|  20 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c   |  14 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h   |  12 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c  |  20 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sched.h  |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c   |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c|   8 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h|   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c|   8 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h|   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c|   8 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h|   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c|  14 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h|   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c |  10 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h |   7 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c  |   4 +-
 drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c  |   8 +-
 drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c  |   8 +-
 drivers/gpu/drm/amd/scheduler/gpu_scheduler.h  | 186 -
 drivers/gpu/drm/scheduler/Makefile |   4 +
 .../gpu/drm/{amd => }/scheduler/gpu_scheduler.c| 296 
++---

 drivers/gpu/drm/{amd => }/scheduler/sched_fence.c  | 122 +
 include/drm/gpu_scheduler.h| 173 
 .../drm/gpu_scheduler_trace.h  |  14 +-
 .../drm/amd/scheduler => include/drm}/spsc_queue.h |   7 +-
 35 files changed, 529 insertions(+), 523 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
 create mode 100644 drivers/gpu/drm/scheduler/Makefile
 rename drivers/gpu/drm/{amd => }/scheduler/gpu_scheduler.c (65%)
 rename drivers/gpu/drm/{amd => }/scheduler/sched_fence.c (58%)
 create mode 100644 include/drm/gpu_scheduler.h
 rename drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h =>
include/drm/gpu_scheduler_trace.h (82%)
 rename {drivers/gpu/drm/amd/scheduler => include/drm}/spsc_queue.h 
(95%)

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH v2 0/2] AMDGPU scheduler move, take 2

2017-12-06 Thread Chunming Zhou

Looks ok to me, Reviewed-by: Chunming Zhou 


On 2017年12月07日 00:49, Lucas Stach wrote:

Hi all,

second try to move the AMDGPU scheduler into a common location, this
time rebased onto drm-next-4.16-wip.

I've tested my etnaviv series on top of this and things seem to work
fine. I checked that AMDGPU still builds, but I don't have any means
to actually runtime test this currently, so I would be very happy to
receive some tested-bys from the AMD side.

Alex, if this looks good please pull this in so it gets your usual
testing.

Thanks,
Lucas

Lucas Stach (2):
   drm: move amd_gpu_scheduler into common location
   drm/sched: move fence slab handling to module init/exit

  drivers/gpu/drm/Kconfig|   5 +
  drivers/gpu/drm/Makefile   |   1 +
  drivers/gpu/drm/amd/amdgpu/Makefile|   5 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu.h|  16 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c |   6 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c|  38 +--
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |   4 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c|   8 -
  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c  |   4 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_job.c|  20 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c   |  14 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h   |  12 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c  |  20 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_sched.h  |   2 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c   |   6 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c|   8 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h|   4 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c|   8 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h|   4 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c|   8 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h|   2 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c|  14 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h|   4 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c |  10 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h |   7 +-
  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c  |   4 +-
  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c  |   8 +-
  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c  |   8 +-
  drivers/gpu/drm/amd/scheduler/gpu_scheduler.h  | 186 -
  drivers/gpu/drm/scheduler/Makefile |   4 +
  .../gpu/drm/{amd => }/scheduler/gpu_scheduler.c| 296 ++---
  drivers/gpu/drm/{amd => }/scheduler/sched_fence.c  | 122 +
  include/drm/gpu_scheduler.h| 173 
  .../drm/gpu_scheduler_trace.h  |  14 +-
  .../drm/amd/scheduler => include/drm}/spsc_queue.h |   7 +-
  35 files changed, 529 insertions(+), 523 deletions(-)
  delete mode 100644 drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
  create mode 100644 drivers/gpu/drm/scheduler/Makefile
  rename drivers/gpu/drm/{amd => }/scheduler/gpu_scheduler.c (65%)
  rename drivers/gpu/drm/{amd => }/scheduler/sched_fence.c (58%)
  create mode 100644 include/drm/gpu_scheduler.h
  rename drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h => 
include/drm/gpu_scheduler_trace.h (82%)
  rename {drivers/gpu/drm/amd/scheduler => include/drm}/spsc_queue.h (95%)



___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/scheduler: add license to the Makefile

2017-12-06 Thread Chunming Zhou

Reviewed-by: Chunming Zhou 


On 2017年12月07日 03:53, Alex Deucher wrote:

Was missing before.

Signed-off-by: Alex Deucher 
---
  drivers/gpu/drm/scheduler/Makefile | 22 ++
  1 file changed, 22 insertions(+)

diff --git a/drivers/gpu/drm/scheduler/Makefile 
b/drivers/gpu/drm/scheduler/Makefile
index ed877912d06d..bd0377c0d2ee 100644
--- a/drivers/gpu/drm/scheduler/Makefile
+++ b/drivers/gpu/drm/scheduler/Makefile
@@ -1,3 +1,25 @@
+#
+# Copyright 2017 Advanced Micro Devices, Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+#
+#
  ccflags-y := -Iinclude/drm
  gpu-sched-y := gpu_scheduler.o sched_fence.o
  


___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH v2 0/2] AMDGPU scheduler move, take 2

2017-12-06 Thread Andrey Grodzovsky

Tested with amdgpu libdrm tests and desktop login with glxgears.

Thanks,

Andrey


On 12/06/2017 02:51 PM, Alex Deucher wrote:

On Wed, Dec 6, 2017 at 11:49 AM, Lucas Stach  wrote:

Hi all,

second try to move the AMDGPU scheduler into a common location, this
time rebased onto drm-next-4.16-wip.

I've tested my etnaviv series on top of this and things seem to work
fine. I checked that AMDGPU still builds, but I don't have any means
to actually runtime test this currently, so I would be very happy to
receive some tested-bys from the AMD side.

Alex, if this looks good please pull this in so it gets your usual
testing.

Series is:
Acked-by: Alex Deucher 


Thanks,
Lucas

Lucas Stach (2):
   drm: move amd_gpu_scheduler into common location
   drm/sched: move fence slab handling to module init/exit

  drivers/gpu/drm/Kconfig|   5 +
  drivers/gpu/drm/Makefile   |   1 +
  drivers/gpu/drm/amd/amdgpu/Makefile|   5 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu.h|  16 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c |   6 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c|  38 +--
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |   4 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c|   8 -
  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c  |   4 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_job.c|  20 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c   |  14 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h   |  12 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c  |  20 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_sched.h  |   2 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c   |   6 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c|   8 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h|   4 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c|   8 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h|   4 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c|   8 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h|   2 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c|  14 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h|   4 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c |  10 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h |   7 +-
  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c  |   4 +-
  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c  |   8 +-
  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c  |   8 +-
  drivers/gpu/drm/amd/scheduler/gpu_scheduler.h  | 186 -
  drivers/gpu/drm/scheduler/Makefile |   4 +
  .../gpu/drm/{amd => }/scheduler/gpu_scheduler.c| 296 ++---
  drivers/gpu/drm/{amd => }/scheduler/sched_fence.c  | 122 +
  include/drm/gpu_scheduler.h| 173 
  .../drm/gpu_scheduler_trace.h  |  14 +-
  .../drm/amd/scheduler => include/drm}/spsc_queue.h |   7 +-
  35 files changed, 529 insertions(+), 523 deletions(-)
  delete mode 100644 drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
  create mode 100644 drivers/gpu/drm/scheduler/Makefile
  rename drivers/gpu/drm/{amd => }/scheduler/gpu_scheduler.c (65%)
  rename drivers/gpu/drm/{amd => }/scheduler/sched_fence.c (58%)
  create mode 100644 include/drm/gpu_scheduler.h
  rename drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h => 
include/drm/gpu_scheduler_trace.h (82%)
  rename {drivers/gpu/drm/amd/scheduler => include/drm}/spsc_queue.h (95%)

--
2.11.0

___
dri-devel mailing list
dri-de...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm/scheduler: add license to the Makefile

2017-12-06 Thread Alex Deucher
Was missing before.

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/scheduler/Makefile | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/drivers/gpu/drm/scheduler/Makefile 
b/drivers/gpu/drm/scheduler/Makefile
index ed877912d06d..bd0377c0d2ee 100644
--- a/drivers/gpu/drm/scheduler/Makefile
+++ b/drivers/gpu/drm/scheduler/Makefile
@@ -1,3 +1,25 @@
+#
+# Copyright 2017 Advanced Micro Devices, Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+#
+#
 ccflags-y := -Iinclude/drm
 gpu-sched-y := gpu_scheduler.o sched_fence.o
 
-- 
2.13.6

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH v2 0/2] AMDGPU scheduler move, take 2

2017-12-06 Thread Alex Deucher
On Wed, Dec 6, 2017 at 11:49 AM, Lucas Stach  wrote:
> Hi all,
>
> second try to move the AMDGPU scheduler into a common location, this
> time rebased onto drm-next-4.16-wip.
>
> I've tested my etnaviv series on top of this and things seem to work
> fine. I checked that AMDGPU still builds, but I don't have any means
> to actually runtime test this currently, so I would be very happy to
> receive some tested-bys from the AMD side.
>
> Alex, if this looks good please pull this in so it gets your usual
> testing.

Series is:
Acked-by: Alex Deucher 

>
> Thanks,
> Lucas
>
> Lucas Stach (2):
>   drm: move amd_gpu_scheduler into common location
>   drm/sched: move fence slab handling to module init/exit
>
>  drivers/gpu/drm/Kconfig|   5 +
>  drivers/gpu/drm/Makefile   |   1 +
>  drivers/gpu/drm/amd/amdgpu/Makefile|   5 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h|  16 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c |   6 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c|  38 +--
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c|   8 -
>  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c  |   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_job.c|  20 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c   |  14 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h   |  12 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c  |  20 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_sched.h  |   2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c   |   6 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c|   8 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h|   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c|   8 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h|   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c|   8 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h|   2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c|  14 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h|   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c |  10 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h |   7 +-
>  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c  |   4 +-
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c  |   8 +-
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c  |   8 +-
>  drivers/gpu/drm/amd/scheduler/gpu_scheduler.h  | 186 -
>  drivers/gpu/drm/scheduler/Makefile |   4 +
>  .../gpu/drm/{amd => }/scheduler/gpu_scheduler.c| 296 
> ++---
>  drivers/gpu/drm/{amd => }/scheduler/sched_fence.c  | 122 +
>  include/drm/gpu_scheduler.h| 173 
>  .../drm/gpu_scheduler_trace.h  |  14 +-
>  .../drm/amd/scheduler => include/drm}/spsc_queue.h |   7 +-
>  35 files changed, 529 insertions(+), 523 deletions(-)
>  delete mode 100644 drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
>  create mode 100644 drivers/gpu/drm/scheduler/Makefile
>  rename drivers/gpu/drm/{amd => }/scheduler/gpu_scheduler.c (65%)
>  rename drivers/gpu/drm/{amd => }/scheduler/sched_fence.c (58%)
>  create mode 100644 include/drm/gpu_scheduler.h
>  rename drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h => 
> include/drm/gpu_scheduler_trace.h (82%)
>  rename {drivers/gpu/drm/amd/scheduler => include/drm}/spsc_queue.h (95%)
>
> --
> 2.11.0
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[pull] amdgpu, radeon, and ttm drm-next-4.16

2017-12-06 Thread Alex Deucher
Hi Dave,

First feature request for 4.16.  Highlights:
- RV and Vega header cleanups
- TTM operation context support
- 48 bit GPUVM fixes for Vega/RV
- More smatch fixes
- ECC support for vega10
- Resizeable BAR support
- Multi-display sync support in DC
- SR-IOV fixes
- Various scheduler improvements
- GPU reset fixes and vram lost tracking
- Clean up DC/powerplay interfaces
- DCN display fixes
- Various DC fixes

The following changes since commit ca797d29cd63e7b71b4eea29aff3b1cefd1ecb59:

  Merge tag 'drm-intel-next-2017-11-17-1' of 
git://anongit.freedesktop.org/drm/drm-intel into drm-next (2017-12-04 10:56:53 
+1000)

are available in the git repository at:

  git://people.freedesktop.org/~agd5f/linux drm-next-4.16

for you to fetch changes up to 3997eea57caf542e9327df9b6bb2882a57c4c421:

  drm/radeon: Use drm_fb_helper_lastclose() and _poll_changed() (2017-12-06 
12:48:34 -0500)


Alex Deucher (5):
  drm/amd/display: add mod_freesync_user_enable to dm_connector_state
  drm/amdgpu/gfx8: use cached values for raster config in clear state
  drm/amdgpu/gfx7: use cached values for raster config in clear state
  drm/amdgpu/gfx6: use cached values for raster config in clear state
  drm/amdgpu/gmc9: make some ECC messages debug only

Andrew Jiang (10):
  drm/amd/display: Reject PPLib clock values if they are invalid
  drm/amd/display: Don't use dc_link in link_encoder
  drm/amd/display: Report pitch_alignment for DCN
  drm/amd/display: Loosen plane_info and scaling_info checks
  drm/amd/display: Remove legacy unused workaround
  drm/amd/display: Add update flags in to determine surface update type
  drm/amd/display: Rename pitch_alignment to linear_pitch_alignment
  drm/amd/display: Add check update surfaces for stream wrapper
  drm/amd/display: Set full update flag in dcn_validate_bandwidth
  drm/amd/display: Set OPP default values in init_hw

Andrey Grodzovsky (6):
  drm/amdgpu: Avoid accessing job->entity after the job is scheduled.
  drm/amdgpu: Add SPSC queue to scheduler.
  drm/amdgpu: Fix deadlock during GPU reset.
  drm/amdgpu: Remove job->s_entity to avoid keeping reference to stale 
pointer.
  drm/amdgpu: Implement BO size validation V2
  drm/amdgpu: Get rid of dep_sync as a seperate object.

Anthony Koo (4):
  drm/amd/display: Add APU cap in dc_caps
  drm/amd/display: DMCU FW loading from PSP
  drm/amd/display: Move hdr_metadata from plane to stream
  drm/amd/display: DMCU and ABM maintenance and refactor

Arun Pandey (1):
  drm/amd/display: Added Opp and Diags Interface for P to I

Bhawanpreet Lakha (1):
  drm/amd/display: Atomic freesync ASSERT fix

Charlene Liu (2):
  drm/amd/display: correct DP is always in full range or bt609
  drm/amd/display: Do post_update_surfaces on new state

Christian König (51):
  drm/amdgpu: use the actual placement for pin accounting
  drm/amdgpu: always bind pinned BOs
  drm/amdgpu: fix pin domain compatibility check
  drm/amdgpu: don't wait interruptible while binding GART space
  drm/amdgpu: remove extra parameter from amdgpu_ttm_bind() v2
  drm/amdgpu: fix indentation in amdgpu_display.h
  drm/amdgpu: nuke amdgpu_ttm_is_bound() v2
  drm/amdgpu: move GART recovery into GTT manager v2
  drm/amdgpu: resize VRAM BAR for CPU access v6
  drm/amdgpu: rename amdgpu_ttm_bind to amdgpu_ttm_alloc_gart
  drm/amdgpu: don't use ttm_bo_move_ttm in amdgpu_ttm_bind v2
  drm/ttm: move unlocking out of ttm_bo_cleanup_memtype_use
  drm/ttm: consistently use reservation_object_unlock
  drm/ttm: user reservation object wrappers v2
  drm/ttm: remove ttm_bo_unreserve_ticket
  drm/amdgpu: remove nonsense const u32 cast on ARRAY_SIZE result
  drm/amdgpu: cleanup vm_size handling
  drm/ttm: make unlocking in ttm_bo_cleanup_refs optional v3
  drm/ttm: optimize ttm_mem_evict_first v5
  drm/amdgpu: require a root bus window above 4GB for BAR resize
  drm/ttm: fix ttm_mem_evict_first once more
  drm/ttm: completely rework ttm_bo_delayed_delete
  drm/ttm: cleanup coding style in ttm_bo_api.h
  drm/ttm: cleanup ttm_bo_driver.h
  drm/ttm: remove cur_placement
  drm/amdgpu: always make gart.table_addr 64bit
  drm/amdgpu: remove VRAM size reduction v2
  drm/amdgpu: align GTT start to 4GB v2
  drm/amdgpu: fix VCE buffer placement restrictions v2
  drm/ttm: add operation ctx to ttm_bo_validate v2
  drm/ttm: use an operation ctx for ttm_bo_init_reserved
  drm/ttm: use an operation context for ttm_bo_mem_space v2
  drm/ttm: use the operation context inside TTM
  drm/ttm: add context to driver move callback as well
  drm/ttm: add number of bytes moved to the operation context
  staging: vboxvideo: adapt to new TTM interface
  drm/amdgpu: forward operation context to 

[pull] amdgpu and ttm drm-fixes-4.15

2017-12-06 Thread Alex Deucher
Hi Dave,

Fixes for 4.15:
- Add licenses to files that were missing it
- huge page fixes for ttm

The following changes since commit 503505bfea19b7d69e2572297e6defa0f9c2404e:

  Merge branch 'drm-fixes-4.15' of git://people.freedesktop.org/~agd5f/linux 
into drm-fixes (2017-12-01 09:15:57 +1000)

are available in the git repository at:

  git://people.freedesktop.org/~agd5f/linux drm-fixes-4.15

for you to fetch changes up to e60bb46b5754727c7643cc5bb7b005c49f869930:

  drm/ttm: swap consecutive allocated pooled pages v4 (2017-12-06 09:28:31 
-0500)


Alex Deucher (2):
  drm/amdgpu: add license to Makefiles
  drm/amdgpu: add license to files where it was missing

Christian König (2):
  drm/ttm: swap consecutive allocated cached pages v3
  drm/ttm: swap consecutive allocated pooled pages v4

Roger He (5):
  drm/ttm: use NUM_PAGES_TO_ALLOC always
  drm/ttm: add page order in page pool
  drm/ttm: add set_pages_wb for handling page order more than zero
  drm/ttm: add page order support in ttm_pages_put
  drm/ttm: roundup the shrink request to prevent skip huge pool

 drivers/gpu/drm/amd/acp/Makefile   | 21 +
 drivers/gpu/drm/amd/amdgpu/Makefile| 22 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c |  2 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h  | 24 +-
 drivers/gpu/drm/amd/amdkfd/Makefile| 22 -
 drivers/gpu/drm/amd/display/Makefile   | 21 +
 drivers/gpu/drm/amd/display/amdgpu_dm/Makefile | 21 +
 drivers/gpu/drm/amd/display/dc/Makefile| 21 +
 drivers/gpu/drm/amd/display/dc/basics/Makefile | 21 +
 drivers/gpu/drm/amd/display/dc/bios/Makefile   | 21 +
 drivers/gpu/drm/amd/display/dc/calcs/Makefile  | 21 +
 drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 22 +
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c  |  2 +-
 drivers/gpu/drm/amd/display/dc/dc_helper.c | 22 +
 drivers/gpu/drm/amd/display/dc/dce/Makefile| 21 +
 drivers/gpu/drm/amd/display/dc/dce100/Makefile | 21 +
 .../drm/amd/display/dc/dce100/dce100_resource.c|  2 +-
 .../drm/amd/display/dc/dce100/dce100_resource.h| 23 +
 drivers/gpu/drm/amd/display/dc/dce110/Makefile | 21 +
 .../drm/amd/display/dc/dce110/dce110_resource.c|  2 +-
 .../display/dc/dce110/dce110_timing_generator_v.c  | 23 +
 drivers/gpu/drm/amd/display/dc/dce112/Makefile | 21 +
 drivers/gpu/drm/amd/display/dc/dce120/Makefile | 23 -
 drivers/gpu/drm/amd/display/dc/dce80/Makefile  | 21 +
 drivers/gpu/drm/amd/display/dc/dcn10/Makefile  | 21 +
 drivers/gpu/drm/amd/display/dc/dml/Makefile| 21 +
 drivers/gpu/drm/amd/display/dc/gpio/Makefile   | 21 +
 drivers/gpu/drm/amd/display/dc/i2caux/Makefile | 21 +
 .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h   | 22 +
 .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 22 +
 drivers/gpu/drm/amd/display/dc/irq/Makefile| 21 +
 drivers/gpu/drm/amd/display/dc/virtual/Makefile| 21 +
 .../gpu/drm/amd/display/modules/freesync/Makefile  | 21 +
 drivers/gpu/drm/amd/lib/Makefile   | 21 +
 drivers/gpu/drm/amd/powerplay/Makefile | 22 -
 drivers/gpu/drm/amd/powerplay/hwmgr/Makefile   | 22 -
 .../gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c| 24 +-
 drivers/gpu/drm/amd/powerplay/inc/smu72.h  | 24 +-
 drivers/gpu/drm/amd/powerplay/inc/smu72_discrete.h | 24 +-
 drivers/gpu/drm/amd/powerplay/smumgr/Makefile  | 22 -
 drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h| 24 +-
 drivers/gpu/drm/ttm/ttm_page_alloc.c   | 98 --
 42 files changed, 875 insertions(+), 38 deletions(-)
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH v2 1/2] drm: move amd_gpu_scheduler into common location

2017-12-06 Thread Lucas Stach
This moves and renames the AMDGPU scheduler to a common location in DRM
in order to facilitate re-use by other drivers. This is mostly a straight
forward rename with no code changes.

One notable exception is the function to_drm_sched_fence(), which is no
longer a inline header function to avoid the need to export the
drm_sched_fence_ops_scheduled and drm_sched_fence_ops_finished structures.

Signed-off-by: Lucas Stach 
---
 drivers/gpu/drm/Kconfig|   5 +
 drivers/gpu/drm/Makefile   |   1 +
 drivers/gpu/drm/amd/amdgpu/Makefile|   5 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu.h|  16 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c|  38 +--
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c|   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c  |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c|  20 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c   |  14 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h   |  12 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c  |  20 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sched.h  |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c   |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c|   8 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h|   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c|   8 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h|   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c|   8 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h|   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c|  14 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h|   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c |  10 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h |   7 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c  |   4 +-
 drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c  |   8 +-
 drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c  |   8 +-
 drivers/gpu/drm/amd/scheduler/gpu_scheduler.h  | 186 -
 drivers/gpu/drm/scheduler/Makefile |   4 +
 .../gpu/drm/{amd => }/scheduler/gpu_scheduler.c| 296 ++---
 drivers/gpu/drm/{amd => }/scheduler/sched_fence.c  | 118 
 include/drm/gpu_scheduler.h| 176 
 .../drm/gpu_scheduler_trace.h  |  14 +-
 .../drm/amd/scheduler => include/drm}/spsc_queue.h |   7 +-
 35 files changed, 530 insertions(+), 517 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
 create mode 100644 drivers/gpu/drm/scheduler/Makefile
 rename drivers/gpu/drm/{amd => }/scheduler/gpu_scheduler.c (65%)
 rename drivers/gpu/drm/{amd => }/scheduler/sched_fence.c (59%)
 create mode 100644 include/drm/gpu_scheduler.h
 rename drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h => 
include/drm/gpu_scheduler_trace.h (82%)
 rename {drivers/gpu/drm/amd/scheduler => include/drm}/spsc_queue.h (95%)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 4d9f21831741..ee38a3db1890 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -149,6 +149,10 @@ config DRM_VM
bool
depends on DRM && MMU
 
+config DRM_SCHED
+   tristate
+   depends on DRM
+
 source "drivers/gpu/drm/i2c/Kconfig"
 
 source "drivers/gpu/drm/arm/Kconfig"
@@ -178,6 +182,7 @@ config DRM_AMDGPU
depends on DRM && PCI && MMU
select FW_LOADER
 select DRM_KMS_HELPER
+   select DRM_SCHED
 select DRM_TTM
select POWER_SUPPLY
select HWMON
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index e9500844333e..1f6ba9e34e31 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -101,3 +101,4 @@ obj-$(CONFIG_DRM_MXSFB) += mxsfb/
 obj-$(CONFIG_DRM_TINYDRM) += tinydrm/
 obj-$(CONFIG_DRM_PL111) += pl111/
 obj-$(CONFIG_DRM_TVE200) += tve200/
+obj-$(CONFIG_DRM_SCHED)+= scheduler/
diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile 
b/drivers/gpu/drm/amd/amdgpu/Makefile
index 78d609123420..5f690f023e75 100644
--- a/drivers/gpu/drm/amd/amdgpu/Makefile
+++ b/drivers/gpu/drm/amd/amdgpu/Makefile
@@ -115,10 +115,7 @@ amdgpu-y += \
 amdgpu-y += amdgpu_cgs.o
 
 # GPU scheduler
-amdgpu-y += \
-   ../scheduler/gpu_scheduler.o \
-   ../scheduler/sched_fence.o \
-   amdgpu_job.o
+amdgpu-y += amdgpu_job.o
 
 # ACP componet
 ifneq ($(CONFIG_DRM_AMD_ACP),)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h 
b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 5e2958a79928..5c8648ec2cd2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -45,6 +45,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include "dm_pp_interface.h"
@@ -68,7 +69,6 @@
 #include "amdgpu_vcn.h"
 

[PATCH v2 0/2] AMDGPU scheduler move, take 2

2017-12-06 Thread Lucas Stach
Hi all,

second try to move the AMDGPU scheduler into a common location, this
time rebased onto drm-next-4.16-wip.

I've tested my etnaviv series on top of this and things seem to work
fine. I checked that AMDGPU still builds, but I don't have any means
to actually runtime test this currently, so I would be very happy to
receive some tested-bys from the AMD side.

Alex, if this looks good please pull this in so it gets your usual
testing.

Thanks,
Lucas

Lucas Stach (2):
  drm: move amd_gpu_scheduler into common location
  drm/sched: move fence slab handling to module init/exit

 drivers/gpu/drm/Kconfig|   5 +
 drivers/gpu/drm/Makefile   |   1 +
 drivers/gpu/drm/amd/amdgpu/Makefile|   5 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu.h|  16 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c|  38 +--
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c|   8 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c  |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c|  20 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c   |  14 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h   |  12 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c  |  20 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sched.h  |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c   |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c|   8 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h|   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c|   8 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h|   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c|   8 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h|   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c|  14 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h|   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c |  10 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h |   7 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c  |   4 +-
 drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c  |   8 +-
 drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c  |   8 +-
 drivers/gpu/drm/amd/scheduler/gpu_scheduler.h  | 186 -
 drivers/gpu/drm/scheduler/Makefile |   4 +
 .../gpu/drm/{amd => }/scheduler/gpu_scheduler.c| 296 ++---
 drivers/gpu/drm/{amd => }/scheduler/sched_fence.c  | 122 +
 include/drm/gpu_scheduler.h| 173 
 .../drm/gpu_scheduler_trace.h  |  14 +-
 .../drm/amd/scheduler => include/drm}/spsc_queue.h |   7 +-
 35 files changed, 529 insertions(+), 523 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
 create mode 100644 drivers/gpu/drm/scheduler/Makefile
 rename drivers/gpu/drm/{amd => }/scheduler/gpu_scheduler.c (65%)
 rename drivers/gpu/drm/{amd => }/scheduler/sched_fence.c (58%)
 create mode 100644 include/drm/gpu_scheduler.h
 rename drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h => 
include/drm/gpu_scheduler_trace.h (82%)
 rename {drivers/gpu/drm/amd/scheduler => include/drm}/spsc_queue.h (95%)

-- 
2.11.0

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH v2 2/2] drm/sched: move fence slab handling to module init/exit

2017-12-06 Thread Lucas Stach
This is the only part of the scheduler which must not be called from
different drivers. Move it to module init/exit so it is done a single
time when loading the scheduler.

Signed-off-by: Lucas Stach 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c |  8 
 drivers/gpu/drm/scheduler/sched_fence.c | 12 
 include/drm/gpu_scheduler.h |  3 ---
 3 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 1d8011bca182..51b76688ab90 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -912,10 +912,6 @@ static int __init amdgpu_init(void)
if (r)
goto error_fence;
 
-   r = drm_sched_fence_slab_init();
-   if (r)
-   goto error_sched;
-
if (vgacon_text_force()) {
DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n");
return -EINVAL;
@@ -928,9 +924,6 @@ static int __init amdgpu_init(void)
/* let modprobe override vga console setting */
return pci_register_driver(pdriver);
 
-error_sched:
-   amdgpu_fence_slab_fini();
-
 error_fence:
amdgpu_sync_fini();
 
@@ -944,7 +937,6 @@ static void __exit amdgpu_exit(void)
pci_unregister_driver(pdriver);
amdgpu_unregister_atpx_handler();
amdgpu_sync_fini();
-   drm_sched_fence_slab_fini();
amdgpu_fence_slab_fini();
 }
 
diff --git a/drivers/gpu/drm/scheduler/sched_fence.c 
b/drivers/gpu/drm/scheduler/sched_fence.c
index f6f2955890c4..69aab086b913 100644
--- a/drivers/gpu/drm/scheduler/sched_fence.c
+++ b/drivers/gpu/drm/scheduler/sched_fence.c
@@ -29,7 +29,7 @@
 
 static struct kmem_cache *sched_fence_slab;
 
-int drm_sched_fence_slab_init(void)
+static int __init drm_sched_fence_slab_init(void)
 {
sched_fence_slab = kmem_cache_create(
"drm_sched_fence", sizeof(struct drm_sched_fence), 0,
@@ -39,14 +39,12 @@ int drm_sched_fence_slab_init(void)
 
return 0;
 }
-EXPORT_SYMBOL_GPL(drm_sched_fence_slab_init);
 
-void drm_sched_fence_slab_fini(void)
+static void __exit drm_sched_fence_slab_fini(void)
 {
rcu_barrier();
kmem_cache_destroy(sched_fence_slab);
 }
-EXPORT_SYMBOL_GPL(drm_sched_fence_slab_fini);
 
 void drm_sched_fence_scheduled(struct drm_sched_fence *fence)
 {
@@ -185,3 +183,9 @@ struct drm_sched_fence *drm_sched_fence_create(struct 
drm_sched_entity *entity,
 
return fence;
 }
+
+module_init(drm_sched_fence_slab_init);
+module_exit(drm_sched_fence_slab_fini);
+
+MODULE_DESCRIPTION("DRM GPU scheduler");
+MODULE_LICENSE("GPL and additional rights");
diff --git a/include/drm/gpu_scheduler.h b/include/drm/gpu_scheduler.h
index d29da4cbb042..dfd54fb94e10 100644
--- a/include/drm/gpu_scheduler.h
+++ b/include/drm/gpu_scheduler.h
@@ -155,9 +155,6 @@ void drm_sched_entity_push_job(struct drm_sched_job 
*sched_job,
 void drm_sched_entity_set_rq(struct drm_sched_entity *entity,
 struct drm_sched_rq *rq);
 
-int drm_sched_fence_slab_init(void);
-void drm_sched_fence_slab_fini(void);
-
 struct drm_sched_fence *drm_sched_fence_create(
struct drm_sched_entity *s_entity, void *owner);
 void drm_sched_fence_scheduled(struct drm_sched_fence *fence);
-- 
2.11.0

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/ttm: swap consecutive allocated pooled pages v4

2017-12-06 Thread Dieter Nützel

Tested-by: Dieter Nützel 

Dieter

Am 05.12.2017 13:54, schrieb Christian König:

When we detect consecutive allocation of pages swap them to avoid
accidentally freeing them as huge page.

v2: use swap
v3: check if it's really the first allocated page
v4: don't touch the loop variable

Signed-off-by: Christian König 
---
 drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index b6f7ce286fb1..44343a2bf55c 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
@@ -958,8 +958,15 @@ static int ttm_get_pages(struct page **pages,
unsigned npages, int flags,
r = ttm_page_pool_get_pages(pool, , flags, cstate,
npages - count, 0);

-   list_for_each_entry(p, , lru)
-   pages[count++] = p;
+   first = count;
+   list_for_each_entry(p, , lru) {
+   struct page *tmp = p;
+
+   /* Swap the pages if we detect consecutive order */
+   if (count > first && pages[count - 1] == tmp - 1)
+   swap(tmp, pages[count - 1]);
+   pages[count++] = tmp;
+   }

if (r) {
/* If there is any pages in the list put them back to

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx