[PATCH libdrm 1/1] amdgpu: update marketing names

2017-05-04 Thread Samuel Li
Change-Id: Ia0aff9dba5889f0c9006923236da1b2adc907f1a Signed-off-by: Samuel Li --- amdgpu/amdgpu_asic_id.h | 146 +--- 1 file changed, 87 insertions(+), 59 deletions(-) diff --git a/amdgpu/amdgpu_asic_id.h b/amdgpu/amdgpu_asic_id.h index 3e7d736

[PATCH 1/1] amdgpu: move asic id table to a separate file

2017-05-10 Thread Samuel Li
From: Xiaojie Yuan Change-Id: I12216da14910f5e2b0970bc1fafc2a20b0ef1ba9 Signed-off-by: Samuel Li --- amdgpu/Makefile.am | 2 + amdgpu/Makefile.sources | 2 +- amdgpu/amdgpu_asic_id.c | 198 +++ amdgpu/amdgpu_asic_id.h | 165

[PATCH libdrm v2 1/1] amdgpu: move asic id table to a separate file

2017-05-11 Thread Samuel Li
From: Xiaojie Yuan v2: fix an off by one error and leading white spaces Change-Id: I12216da14910f5e2b0970bc1fafc2a20b0ef1ba9 Reviewed-by: Junwei Zhang Signed-off-by: Samuel Li --- amdgpu/Makefile.am | 2 + amdgpu/Makefile.sources | 2 +- amdgpu/amdgpu_asic_id.c | 198

[PATCH libdrm v3 1/1] amdgpu: move asic id table to a separate file

2017-05-26 Thread Samuel Li
: Samuel Li --- Makefile.am | 3 + amdgpu/Makefile.am | 2 + amdgpu/Makefile.sources | 2 +- amdgpu/amdgpu_asic_id.c | 199 +++ amdgpu/amdgpu_asic_id.h | 165 --- amdgpu/amdgpu_device.c

[PATCH libdrm v4 1/1] amdgpu: move asic id table to a separate file

2017-05-29 Thread Samuel Li
: I12216da14910f5e2b0970bc1fafc2a20b0ef1ba9 Reviewed-by: Junwei Zhang Signed-off-by: Samuel Li --- Makefile.am | 3 + amdgpu/Makefile.am | 2 + amdgpu/Makefile.sources | 2 +- amdgpu/amdgpu_asic_id.c | 206 +++ amdgpu/amdgpu_asic_id.h | 165

[PATCH libdrm v5 1/1] amdgpu: move asic id table to a separate file

2017-05-31 Thread Samuel Li
empty/commented lines; realloc to save memory; indentation changes Change-Id: I12216da14910f5e2b0970bc1fafc2a20b0ef1ba9 Reviewed-by: Junwei Zhang Signed-off-by: Samuel Li --- Makefile.am | 3 + amdgpu/Makefile.am | 2 + amdgpu/Makefile.sources | 2 +- amdgpu

[PATCH libdrm v6 1/1] amdgpu: move asic id table to a separate file

2017-05-31 Thread Samuel Li
empty/commented lines; realloc to save memory; indentation changes v6: remove a line error Change-Id: I12216da14910f5e2b0970bc1fafc2a20b0ef1ba9 Reviewed-by: Junwei Zhang Signed-off-by: Samuel Li --- Makefile.am | 3 + amdgpu/Makefile.am | 2 + amdgpu/Makefile.sources | 2

[PATCH libdrm 1/2] util: move some files to an ASIC neutral directory.

2017-06-30 Thread Samuel Li
Change-Id: Iac1c4870253e8b8860a61b7cf175e7a25cc95921 Signed-off-by: Samuel Li --- Makefile.sources | 10 +- amdgpu/Makefile.am | 3 +- amdgpu/Makefile.sources | 7 +- amdgpu/amdgpu_asic_id.c | 219 --- amdgpu/amdgpu_device.c | 7 +- amdgpu

[PATCH libdrm 2/2] radeon: use asic id table to get chipset name

2017-06-30 Thread Samuel Li
Change-Id: I24b6624789d1a9dc0fd3a446b0e6f21ed5183ff2 Signed-off-by: Samuel Li --- radeon/Makefile.am | 6 +++ radeon/Makefile.sources | 6 ++- radeon/radeon_asic_id.c | 106 radeon/radeon_asic_id.h | 37 + 4 files changed

[PATCH 1/6] drm/amdgpu: add new asic callbacks for HDP flush/invalidation

2017-09-06 Thread Samuel Li
From: Alex Deucher Needed to properly flush the HDP cache with the CPU from rather than the GPU. Signed-off-by: Alex Deucher Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b

[PATCH 5/6] drm/amdgpu/vi: add HDP asic callbacks for SOC15

2017-09-06 Thread Samuel Li
From: Alex Deucher Needed to flush and invalidate the HDP block using the CPU. Signed-off-by: Alex Deucher Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/soc15.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu

[PATCH 3/6] drm/amdgpu/vi: add HDP asic callbacks for CIK

2017-09-06 Thread Samuel Li
From: Alex Deucher Needed to flush and invalidate the HDP block using the CPU. Signed-off-by: Alex Deucher Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/cik.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd

[PATCH 2/6] drm/amdgpu/vi: add HDP asic callbacks for SI

2017-09-06 Thread Samuel Li
From: Alex Deucher Needed to flush and invalidate the HDP block using the CPU. Signed-off-by: Alex Deucher Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/si.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd

[PATCH 6/6] drm/amdgpu: Add gem_prime_mmap support

2017-09-06 Thread Samuel Li
Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 95 ++- 3 files changed, 99 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH 4/6] drm/amdgpu/vi: add HDP asic callbacks for VI

2017-09-06 Thread Samuel Li
From: Alex Deucher Needed to flush and invalidate the HDP block using the CPU. Signed-off-by: Alex Deucher Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/vi.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd

Re: [PATCH 6/6] drm/amdgpu: Add gem_prime_mmap support

2017-09-07 Thread Samuel Li
ed to you (HDP coherency check), I think the code here is correct. Regards, Sam On 2017-09-07 03:02 AM, Christian König wrote: Am 07.09.2017 um 00:07 schrieb Samuel Li: > Signed-off-by: Samuel Li > --- > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 + > drivers/gpu/drm/amd/amdgp

[PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support

2017-09-13 Thread Samuel Li
v2: drop hdp invalidate/flush. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 77 ++- 3 files changed, 81 insertions(+), 2 deletions

Re: [PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support

2017-09-19 Thread Samuel Li
Sam On 2017-09-15 11:05 AM, Christian König wrote: > Am 14.09.2017 um 00:39 schrieb Samuel Li: >> v2: drop hdp invalidate/flush. >> >> Signed-off-by: Samuel Li >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++ >> drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH v3 1/1] drm/amdgpu: Add gem_prime_mmap support

2017-09-19 Thread Samuel Li
v2: drop hdp invalidate/flush. v3: honor pgoff during prime mmap. Add a barrier after cpu access. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 78

[PATCH 1/1] drm/amdgpu: Pin to gtt before cpu accesses dma buf.

2017-11-28 Thread Samuel Li
To improve cpu read performance. This is implemented for APUs currently. Change-Id: I300a7daed8f2b0ba6be71a43196a6b8617ddc62e --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

[PATCH v2 2/2] drm/amdgpu: Move to gtt before cpu accesses dma buf.

2017-12-08 Thread Samuel Li
To improve cpu read performance. This is implemented for APUs currently. v2: Adapt to change https://lists.freedesktop.org/archives/amd-gfx/2017-October/015174.html Change-Id: I7a583e23a9ee706e0edd2a46f4e4186a609368e3 --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/am

[PATCH v2 1/2] drm/amdgpu: allow framebuffer in GART memory as well

2017-12-08 Thread Samuel Li
stian König Reviewed-by: Andrey Grodzovsky Acked-by: Alex Deucher Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 14 +- drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c| 10 ++ dr

Re: FW: [PATCH v2 2/2] drm/amdgpu: Move to gtt before cpu accesses dma buf.

2017-12-13 Thread Samuel Li
he dma-buf object. > > There are quite a number of exceptions, but those drivers then implement > everything on their own because the DRM marshaling doesn't make sense for > them. > > Christian. > > Am 13.12.2017 um 19:01 schrieb Samuel Li: >> That is an approa

Re: FW: [PATCH v2 2/2] drm/amdgpu: Move to gtt before cpu accesses dma buf.

2017-12-14 Thread Samuel Li
> This is for the DMA-buf mapping function, not the normal driver mmap > implementation. So we can be pretty sure that the memory will be CPU accessed. > > The question in my mind is if it really is such a good idea to ping/pong the > page when the GPU/CPU is accessing them. Not that I want to b

[PATCH 1/3] drm/prime: forward begin_cpu_access callback to drivers

2017-12-15 Thread Samuel Li
From: Christian König Allow drivers to implement their own begin_cpu_access callback. Change-Id: I97709b42b9351a04ee7e01106107a87bc56ea258 Signed-off-by: Christian König --- drivers/gpu/drm/drm_prime.c | 13 + include/drm/drm_drv.h | 2 ++ 2 files changed, 15 insertions(+)

[PATCH 2/3] drm/amdgpu: allow framebuffer in GART memory as well

2017-12-15 Thread Samuel Li
stian König Reviewed-by: Andrey Grodzovsky Acked-by: Alex Deucher Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 14 +- drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c| 10 ++ dr

[PATCH 3/3] drm/amdgpu: Move to gtt before cpu accesses dma buf.

2017-12-15 Thread Samuel Li
To improve cpu read performance. This is implemented for APUs currently. v2: Adapt to change https://lists.freedesktop.org/archives/amd-gfx/2017-October/015174.html v3: Adapt to change "forward begin_cpu_access callback to drivers" Change-Id: I7a583e23a9ee706e0edd2a46f4e4186a609368e3 --- driver

[PATCH 1/3] drm/amdgpu: allow framebuffer in GART memory as well

2018-01-04 Thread Samuel Li
stian König Reviewed-by: Andrey Grodzovsky Acked-by: Alex Deucher Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 14 +- drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c| 10 ++ dr

[PATCH 2/3] drm: export gem dmabuf_ops for drivers to reuse

2018-01-04 Thread Samuel Li
Change-Id: I03c22a890d2305f3243d88019d1a28bddd4ddda7 Signed-off-by: Samuel Li --- drivers/gpu/drm/drm_prime.c | 53 ++--- include/drm/drm_prime.h | 22 +++ 2 files changed, 53 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 3/3] drm/amdgpu: Move to gtt before cpu accesses dma buf.

2018-01-04 Thread Samuel Li
Also some minor fixes as suggested. Change-Id: I7a583e23a9ee706e0edd2a46f4e4186a609368e3 Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 67 ++

Re: [PATCH 1/3] drm/amdgpu: allow framebuffer in GART memory as well

2018-01-04 Thread Samuel Li
a black screen. Need to debug this further before enabling. >> >> Change-Id: Id0f8af3110e54a3aabf7a258871867bc121cc1a2 >> Signed-off-by: Christian König >> Reviewed-by: Andrey Grodzovsky >> Acked-by: Alex Deucher >> Signed-off-by: Samuel Li >> --- >> drivers/gpu/drm/amd/amdgpu/amd

Re: [PATCH 1/3] drm/amdgpu: allow framebuffer in GART memory as well

2018-01-05 Thread Samuel Li
> to make all the files use consistent naming going forward to make the code > more > readable. OK. Will do. Sam On 2018-01-04 05:43 PM, Alex Deucher wrote: > On Thu, Jan 4, 2018 at 5:26 PM, Samuel Li wrote: >>>> +uint32_t amdgpu_framebuffer_domains(struct amdgpu_devi

[PATCH 1/1] drm/amdgpu: only set dma_buf ops when it is valid

2018-01-12 Thread Samuel Li
Change-Id: I37daecbf695da13eaeea1d362c270b92a894393a --- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c index a14234b..8afec21 100644 --- a/dri

Re: [PATCH 1/3] drm/amdgpu: remove agp_base

2018-01-15 Thread Samuel Li
The series Reviewed-by: Samuel Li Sam On 2018-01-15 06:51 AM, Christian König wrote: > No AGP support for in this driver. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/dr

[PATCH 1/1] drm: add kernel doc for exported gem dmabuf_ops

2018-01-17 Thread Samuel Li
Signed-off-by: Samuel Li --- drivers/gpu/drm/drm_prime.c | 81 + 1 file changed, 81 insertions(+) diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c index ca09ce7..3ead5a6 100644 --- a/drivers/gpu/drm/drm_prime.c +++ b/drivers/gpu

[PATCH v2 1/1] drm: add kernel doc for exported gem dmabuf_ops

2018-01-18 Thread Samuel Li
Signed-off-by: Samuel Li Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_prime.c | 88 + 1 file changed, 88 insertions(+) diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c index ca09ce7..e82a976 100644 --- a/drivers/gpu/drm

[PATCH 03/13] drm/amdgpu: rename amdgpu_crtc_set_config

2018-01-22 Thread Samuel Li
Add display to the name for consistency. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h| 4 ++-- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu

[PATCH 01/13] drm/amdgpu: rename static functions in amdgpu_display.c

2018-01-22 Thread Samuel Li
Add display to the name for consistency. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 41 - 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 10/13] drm/amdgpu: rename amdgpu_crtc_scaling_mode_fixup

2018-01-22 Thread Samuel Li
Add display to the name for consistency. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h| 6 +++--- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers

[PATCH 08/13] drm/amdgpu: rename amdgpu_modeset_create_props

2018-01-22 Thread Samuel Li
Add display to the name for consistency. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c| 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c

[PATCH 07/13] drm/amdgpu: rename amdgpu_user_framebuffer_create

2018-01-22 Thread Samuel Li
Add display to the name for consistency. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 6 +++--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 3 files changed, 8 insertions(+), 8

[PATCH 06/13] drm/amdgpu: rename amdgpu_framebuffer_init

2018-01-22 Thread Samuel Li
Add display to the name for consistency. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 11 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h| 8 3 files changed, 11 insertions(+), 11 deletions

[PATCH 09/13] drm/amdgpu: rename amdgpu_update_display_priority

2018-01-22 Thread Samuel Li
Rename as amdgpu_display_update_priority for consistency. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2

[PATCH 04/13] drm/amdgpu: rename amdgpu_print_display_setup

2018-01-22 Thread Samuel Li
Add display to the name for consistency. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h| 2 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu/drm

[PATCH 13/13] drm/amdgpu: rename amdgpu_freesync_ioctl

2018-01-22 Thread Samuel Li
Add display to the name for consistency. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a

[PATCH 02/13] drm/amdgpu: rename amdgpu_crtc_page_flip_target

2018-01-22 Thread Samuel Li
Add display to the name for consistency. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h| 10 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2

[PATCH 05/13] drm/amdgpu: rename amdgpu_ddc_probe

2018-01-22 Thread Samuel Li
Add display to the name for consistency. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 10 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_display.c| 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 3 ++- 3 files changed, 11 insertions(+), 8

[PATCH 11/13] drm/amdgpu: rename amdgpu_get_crtc_scanoutpos

2018-01-22 Thread Samuel Li
Add display to the name for consistency. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 14 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 8 drivers/gpu/drm/amd/amdgpu

[PATCH 12/13] drm/amdgpu: rename amdgpu_crtc_idx_to_irq_type

2018-01-22 Thread Samuel Li
Add display to the name for consistency. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c

[PATCH 1/2] drm/amdgpu: Enable scatter gather display support

2018-03-02 Thread Samuel Li
It's enabled by default. -1 is auto, to allow both vram and gtt memory be available, for testing purpose only. --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 9 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 drivers/gpu/drm/amd

[PATCH 2/2] drm/amdgpu: Expose scatter gather display to user space.

2018-03-02 Thread Samuel Li
--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++ include/uapi/drm/amdgpu_drm.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 51a4b08..2cb344f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH 1/1] amdgpu: add scatter gather display flag

2018-03-02 Thread Samuel Li
--- include/drm/amdgpu_drm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h index d9aa4a3..dc4d8bd 100644 --- a/include/drm/amdgpu_drm.h +++ b/include/drm/amdgpu_drm.h @@ -526,6 +526,7 @@ struct drm_amdgpu_cs_chunk_data { */ #define AMDGP

Re: [PATCH 2/2] drm/amdgpu: Expose scatter gather display to user space.

2018-03-05 Thread Samuel Li
On 2018-03-03 08:42 AM, Christian König wrote: > Am 03.03.2018 um 00:26 schrieb Samuel Li: >> --- >>   drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++ >>   include/uapi/drm/amdgpu_drm.h   | 1 + >>   2 files changed, 4 insertions(+) >> >> diff --git a/driv

Re: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support

2018-03-05 Thread Samuel Li
all PCs. So it seems beneficial to provide all the options. Sam On 2018-03-05 05:17 AM, Michel Dänzer wrote: > On 2018-03-03 12:25 AM, Samuel Li wrote: >> It's enabled by default. -1 is auto, to allow both vram and gtt >> memory be available, for testing purpose only. >

Re: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support

2018-03-06 Thread Samuel Li
gather display: auto\n"); >> +} > > Dito and printing that here is not a good idea as far as I can see. > > Christian. The intention here is to print out when fb is created. You have other suggestions? Sam On 2018-03-03 08:41 AM, Christian König wrote: > Am 03

Re: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support

2018-03-07 Thread Samuel Li
Why so complicated? If old user space compatibility is required, just use sg_display=0. Sam On 2018-03-07 05:12 AM, Michel Dänzer wrote: > On 2018-03-07 11:04 AM, Christian König wrote: >> Am 07.03.2018 um 10:53 schrieb Michel Dänzer: >>> On 2018-03-07 10:47 AM, Christian König wrote: See

Re: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support

2018-03-07 Thread Samuel Li
now. Sam On 2018-03-07 12:50 PM, Michel Dänzer wrote: > On 2018-03-07 06:38 PM, Alex Deucher wrote: >> On Wed, Mar 7, 2018 at 12:29 PM, Samuel Li wrote: >>> >>> Why so complicated? If old user space compatibility is required, just use >>> sg_display=0. >>

Re: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support

2018-03-07 Thread Samuel Li
s and not really worth the effort. Sam On 2018-03-07 01:27 PM, Alex Deucher wrote: > On Wed, Mar 7, 2018 at 1:18 PM, Samuel Li wrote: >> I think it's not useful though. Think about that, SG display feature is >> intended to use as less VRAM as possible. Will someone want a

[PATCH 1/1] drm: add parameter explanation for some gem dmabuf_ops

2018-03-26 Thread Samuel Li
To reduce some warnings. Signed-off-by: Samuel Li --- drivers/gpu/drm/drm_prime.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c index 7856a9b..caf675e 100644 --- a/drivers/gpu/drm/drm_prime.c +++ b/drivers/gpu/drm

[PATCH v2 1/1] drm/amdgpu: Enable scatter gather display support

2018-03-27 Thread Samuel Li
setting to auto, also some misc changes. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 10 -- drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Re: [PATCH v2 1/1] drm/amdgpu: Enable scatter gather display support

2018-04-12 Thread Samuel Li
3) Use only VRAM or GTT depending on a threshhold. As per discussion, the 3rd one, which is the current patch, seems the best so far. Regards, Samuel Li On 2018-04-12 01:03 PM, Christian König wrote: >> Can you be more specific, Christian? Mesa has this, I don't think it needs

Re: [PATCH v2 1/1] drm/amdgpu: Enable scatter gather display support

2018-04-12 Thread Samuel Li
ects. > > Regards, > Christian. > > Am 12.04.2018 um 19:21 schrieb Samuel Li: >>> The point is this kernel change now needs to be reworked and adapted to >>> what Mesa is doing. >> Three options have been brought up for kernel, >> 1) Turn off immediate

Re: [PATCH v2 1/1] drm/amdgpu: Enable scatter gather display support

2018-04-12 Thread Samuel Li
> AMDGPU_GEM_DOMAIN_GTT) >     domain = AMDGPU_GEM_DOMAIN_GTT; > > That should be everything we need here. > > Regards, > Christian. > > Am 12.04.2018 um 20:07 schrieb Samuel Li: >> Please clarify, Christian. How would you like it to be implemented? >> >> S

Re: [PATCH v2 1/1] drm/amdgpu: Enable scatter gather display support

2018-04-12 Thread Samuel Li
Hi Christian, If you have any good proposal, please describe here. Otherwise kindly avoid saying anything based on your emotion. Regards, Sam On 2018-04-12 04:13 PM, Christian König wrote: > Am 12.04.2018 um 22:01 schrieb Samuel Li: >> The 4th proposal :) >> >>> In o

[PATCH 1/1] drm/amdgpu: Enable scatter gather display support

2018-04-17 Thread Samuel Li
ing to auto. v3: Move some logic from amdgpu_display_framebuffer_domains() to pin function, suggested by Christian. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/a

Re: [PATCH 1/1] drm/amdgpu: Enable scatter gather display support

2018-04-18 Thread Samuel Li
On 2018-04-18 12:14 AM, Alex Deucher wrote: > On Tue, Apr 17, 2018 at 8:40 PM, Samuel Li wrote: >> It's auto by default. For CZ/ST, auto setting enables sg display >> when vram size is small; otherwise still uses vram. >> This patch fixed some potention hang issue intr

Re: [PATCH 1/1] drm/amdgpu: Enable scatter gather display support

2018-04-18 Thread Samuel Li
On 2018-04-18 04:34 AM, Christian König wrote: > Am 18.04.2018 um 06:14 schrieb Alex Deucher: >> On Tue, Apr 17, 2018 at 8:40 PM, Samuel Li wrote: >>> It's auto by default. For CZ/ST, auto setting enables sg display >>> when vram size is small; otherwise still

Re: [PATCH 1/1] drm/amdgpu: Enable scatter gather display support

2018-04-18 Thread Samuel Li
On 2018-04-18 12:16 PM, Christian König wrote: > Am 18.04.2018 um 17:29 schrieb Samuel Li: >> >> On 2018-04-18 12:14 AM, Alex Deucher wrote: >>> On Tue, Apr 17, 2018 at 8:40 PM, Samuel Li wrote: >>>> It's auto by default. For CZ/ST, auto setting enable

[PATCH 1/3] drm/amdgpu: Rename amdgpu_display_framebuffer_domains()

2018-04-18 Thread Samuel Li
It returns supported domains, and domains actually used are to be decided later. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c| 2 +- drivers

[PATCH 3/3] drm/amdgpu: Enable scatter gather display support

2018-04-18 Thread Samuel Li
ing to auto. v3: Move some logic from amdgpu_display_framebuffer_domains() to pin function, suggested by Christian. v4: Split into several patches. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 4 drivers/gpu

[PATCH 2/3] drm/amdgpu: Remove VRAM from shared bo domains.

2018-04-18 Thread Samuel Li
Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 24f582c..8dc782a 100644 --- a/drivers/gpu/drm/amd

[PATCH v5 1/1] drm/amdgpu: Enable scatter gather display support

2018-04-23 Thread Samuel Li
me logic from amdgpu_display_framebuffer_domains() to pin function, suggested by Christian. v4: Split into several patches. v5: Drop module parameter for now. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 9 +

Re: [PATCH xf86-video-amdgpu 2/2] Wait for pending flips in drmmode_output_set_tear_free

2018-04-26 Thread Samuel Li
rmmode_output_set_tear_free(AMDGPUEntPtr pAMDGPUEnt, > drmmode_output->tear_free = tear_free; > > if (crtc) { > + drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; > + > + /* Wait for pending flips before drmmode_set_mode_major calls Trail

[PATCH 1/1] drm/amdgpu: add kernel doc for amdgpu_object.c

2018-05-17 Thread Samuel Li
Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 233 + 1 file changed, 233 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 6a9e46a..271dbfa 100644 --- a/drivers/gpu

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

2018-05-18 Thread Samuel Li
On 2018-05-18 04:21 AM, Michel Dänzer 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 and respect that if it's been set explicitly. >> >> Signed-off-by: Alex Deucher >> --- >> drivers/gpu/drm/amd/amdgpu/

Re: [PATCH 1/1] drm/amdgpu: add kernel doc for amdgpu_object.c

2018-05-18 Thread Samuel Li
On 2018-05-18 02:54 PM, Alex Deucher wrote: > On Thu, May 17, 2018 at 6:20 PM, Samuel Li wrote: >> Signed-off-by: Samuel Li > > Please also add a separate DOC section at the top of this file giving > a brief overview of how amdgpu bo API works. E.g., how you would > allo

[PATCH 1/2] drm/amdgpu: add kernel doc for amdgpu_object.c

2018-05-24 Thread Samuel Li
v2: Add a DOC section and some more clarification. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 266 + 1 file changed, 266 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

[PATCH 2/2] drm/amdgpu: add kernel doc for memory domains.

2018-05-24 Thread Samuel Li
Signed-off-by: Samuel Li --- include/uapi/drm/amdgpu_drm.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h index 5b007fa..a2ae752 100644 --- a/include/uapi/drm/amdgpu_drm.h +++ b/include/uapi/drm/amdgpu_drm.h

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

2018-06-01 Thread Samuel Li
On 2018-05-31 12:30 PM, Michel Dänzer wrote: > On 2018-05-30 08:42 PM, Leo Liu wrote: >> There are four ioctls in this files, and DOC gives details of >> data structures for each of ioctls, and their functionalities. >> >> Signed-off-by: Leo Liu > > This isn't enough to actually make this part

[PATCH v4 1/1] drm/amdgpu: Add gem_prime_mmap support

2017-09-21 Thread Samuel Li
v2: drop hdp invalidate/flush. v3: honor pgoff during prime mmap. Add a barrier after cpu access. v4: drop begin/end_cpu_access() for now, revisit later. Signed-off-by: Samuel Li --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + drivers/gpu