[PATCH v8] Add CRIU support for amdgpu dmabuf

2025-07-18 Thread David Francis
This patch series adds support for CRIU checkpointing of processes that share memory with the amdgpu dmabuf interface. This v8 incorporates the vm mapping rework, which it depends on. (https://lore.kernel.org/amd-gfx/880855c5-dede-4497-8ca1-916bd0dbd...@amd.com/T/#u) Accompanying CRIU changes: ht

[PATCH v8 3/3] drm/amdgpu: Allow kfd CRIU with no buffer objects

2025-07-18 Thread David Francis
The kfd CRIU checkpoint ioctl would return an error if trying to checkpoint a process with no kfd buffer objects. This is a normal case and should not be an error. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH v8 2/3] drm/amdgpu: Add CRIU mapping info ioctl

2025-07-18 Thread David Francis
Add new ioctl DRM_IOCTL_AMDGPU_CRIU_MAPPING_INFO, which returns a list of mappings associated with a given bo, along with their positions and offsets. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_criu.c | 97 drivers/gpu/drm/amd/amdgpu

[PATCH v8 1/3] drm/amdgpu: Add CRIU ioctl to get bo info

2025-07-18 Thread David Francis
Add new ioctl DRM_IOCTL_AMDGPU_CRIU_BO_INFO. This ioctl returns a list of bos with their handles, sizes, and flags and domains. This ioctl is meant to be used during CRIU checkpoint and provide information needed to reconstruct the bos in CRIU restore. Signed-off-by: David Francis --- drivers

[PATCH v3 2/2] drm: Move drm_gem ioctl kerneldoc to uapi file

2025-07-17 Thread David Francis
The drm_gem ioctls were documented in internal file drm_gem.c instead of uapi header drm.h. Move them there and change to appropriate kerneldoc formatting. Signed-off-by: David Francis --- drivers/gpu/drm/drm_gem.c | 30 - include/uapi/drm/drm.h| 40

[PATCH v3 1/2] drm: Add DRM prime interface to reassign GEM handle

2025-07-17 Thread David Francis
://lore.kernel.org/dri-devel/20250617194536.538681-1-david.fran...@amd.com/ v2 - Move documentation to UAPI headers v3 - Always return 0 on success Signed-off-by: David Francis --- drivers/gpu/drm/drm_gem.c | 56 ++ drivers/gpu/drm/drm_internal.h | 4 +++ drivers

Add CHANGE_HANDLE ioctl for drm gem v3

2025-07-17 Thread David Francis
This patch adds a new ioctl GEM_CHANGE_HANDLE which is needed by amdgpu CRIU for dmabuf. The ioctl allows a user to move a gem object to a new handle. v2: Move documentation for this and other drm_gem ioctls to drm.h v3: After testing with IGT, fixed return value on success Accompanying changes:

[PATCH 2/2] drm: Move drm_gem ioctl kerneldoc to uapi file

2025-07-11 Thread David Francis
The drm_gem ioctls were documented in internal file drm_gem.c instead of uapi header drm.h. Move them there and change to appropriate kerneldoc formatting. Signed-off-by: David Francis --- drivers/gpu/drm/drm_gem.c | 30 - include/uapi/drm/drm.h| 40

Add CHANGE_HANDLE ioctl for drm gem v2

2025-07-11 Thread David Francis
This patch adds a new ioctl GEM_CHANGE_HANDLE which is needed by amdgpu CRIU for dmabuf. The ioctl allows a user to move a gem object to a new handle. In this version, I have added kerneldoc comments for the new ioctl in drm.h and have moved over the other drm_gem.c ioctl docs to drm.h. Accompan

[PATCH 1/2] drm: Add DRM prime interface to reassign GEM handle

2025-07-11 Thread David Francis
://lore.kernel.org/dri-devel/20250617194536.538681-1-david.fran...@amd.com/ Signed-off-by: David Francis --- drivers/gpu/drm/drm_gem.c | 54 ++ drivers/gpu/drm/drm_internal.h | 4 +++ drivers/gpu/drm/drm_ioctl.c| 1 + drivers/gpu/drm/drm_prime.c| 6

[PATCH] drm: Add DRM prime interface to reassign GEM handle

2025-07-08 Thread David Francis
drm_prime_remove_buf_handle, but that function acquires the prime lock, which the ioctl needs to hold for other purposes. Make drm_prime_remove_buf_handle not acquire the prime lock, and change its other caller to reflect this. Signed-off-by: David Francis --- drivers/gpu/drm/drm_gem.c | 61

drm: Add CHANGE_HANDLE ioctl for drm gem

2025-07-08 Thread David Francis
This patch adds an ioctl to reassign the gem handle of a bo. It was formerly the first patch of my CRIU with dmabuf patchset. Would it be possible to merge this on its own? Internal deadlines would prefer this to be in the next kernel release if possible. The CRIU patches that are the current use

[PATCH 3/4] drm/amdgpu: Add CRIU mapping info ioctl

2025-06-17 Thread David Francis
Add new ioctl DRM_IOCTL_AMDGPU_CRIU_MAPPING_INFO, which returns a list of mappings associated with a given bo, along with their positions and offsets. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_criu.c | 96 drivers/gpu/drm/amd/amdgpu

[PATCH 4/4] drm/amdgpu: Allow kfd CRIU with no buffer objects

2025-06-17 Thread David Francis
The kfd CRIU checkpoint ioctl would return an error if trying to checkpoint a process with no kfd buffer objects. This is a normal case and should not be an error. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 2/4] drm/amdgpu: Add CRIU ioctl to get bo info

2025-06-17 Thread David Francis
Add new ioctl DRM_IOCTL_AMDGPU_CRIU_BO_INFO. This ioctl returns a list of bos with their handles, sizes, and flags and domains. This ioctl is meant to be used during CRIU checkpoint and provide information needed to reconstruct the bos in CRIU restore. Signed-off-by: David Francis --- drivers

[PATCH 1/4] drm: Add DRM prime interfaces to reassign GEM handle

2025-06-17 Thread David Francis
drm_prime_remove_buf_handle, but that function acquires the prime lock, which the ioctl needs to hold for other purposes. Make drm_prime_remove_buf_handle not acquire the prime lock, and change its other caller to reflect this. Signed-off-by: David Francis --- drivers/gpu/drm/drm_gem.c | 58

[PATCH v7] Add CRIU support for amdgpu dmabuf

2025-06-17 Thread David Francis
This patch series adds support for CRIU checkpointing of processes that share memory with the amdgpu dmabuf interface. This v7 splits the bo and mapping info patches and uses the valid and invalid lists instead of the rb tree. A single macro that iterates over both lists is in the works.

[PATCH v6] Add CRIU support for amdgpu dmabuf

2025-06-13 Thread David Francis
This patch series adds support for CRIU checkpointing of processes that share memory with the amdgpu dmabuf interface. This v6 cleans up the locking and moves some of the mapping info code into amdgpu_vm.c. The mapping flags code is a placeholder awaiting the mapping flags rework.

[PATCH 2/3] drm/amdgpu: Adding amdgpu CRIU ioctl

2025-06-13 Thread David Francis
-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_criu.c | 234 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_criu.h | 34 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 11

[PATCH 1/3] drm: Add DRM prime interfaces to reassign GEM handle

2025-06-13 Thread David Francis
drm_prime_remove_buf_handle, but that function acquires the prime lock, which the ioctl needs to hold for other purposes. Make drm_prime_remove_buf_handle not acquire the prime lock, and change its other caller to reflect this. Signed-off-by: David Francis --- drivers/gpu/drm/drm_gem.c | 56

[PATCH 3/3] drm/amdgpu: Allow kfd CRIU with no buffer objects

2025-06-13 Thread David Francis
The kfd CRIU checkpoint ioctl would return an error if trying to checkpoint a process with no kfd buffer objects. This is a normal case and should not be an error. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 1/3] drm: Add DRM prime interfaces to reassign GEM handle

2025-05-21 Thread David Francis
drm_prime_remove_buf_handle, but that function acquires the prime lock, which the ioctl needs to hold for other purposes. Make drm_prime_remove_buf_handle not acquire the prime lock, and change its other caller to reflect this. Signed-off-by: David Francis --- drivers/gpu/drm/drm_gem.c | 52

[PATCH 2/3] drm/amdgpu: Adding amdgpu CRIU ioctl

2025-05-21 Thread David Francis
-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_criu.c | 247 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_criu.h | 35 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 + drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2

[PATCH 3/3] drm/amdgpu: Allow kfd CRIU with no buffer objects

2025-05-21 Thread David Francis
The kfd CRIU checkpoint ioctl would return an error if trying to checkpoint a process with no kfd buffer objects. This is a normal case and should not be an error. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v5] Add CRIU support for amdgpu dmabuf

2025-05-21 Thread David Francis
(previous patches were incorrectly called v3 but were actually the 4th version) This patch series adds support for CRIU checkpointing of processes that share memory with the amdgpu dmabuf interface. In this v5, the drm interfaces have been changed from creating buffer objects with specified gem h

[no subject]

2025-01-31 Thread David Francis
We are working on extending support for CRIU checkpoint/restore in the amdgpu driver to support new use cases and ROCm applications increasingly using render node ioctls for memory management. In the longer term this may also allow checkpoint/restore of graphics application. With this patch series

[PATCH] Support dmabuf IPC with amdgpu CRIU

2025-01-31 Thread David Francis
me_assign_handle and drm_gem_handle_create_assigned. These are similar to drm_gem_prime_fd_to_handle and drm_gem_handle_create but allow the caller to specify a gem handle. Still TODO: - Backwards compatibility between new kernel and old CRIU Signed-off-by: David Francis ---

[PATCH v9 4/6] drm/dp_mst: Fill branch->num_ports

2019-08-27 Thread David Francis
to 0 Signed-off-by: David Francis Reviewed-by: Lyude Paul Reviewed-by: Harry Wentland --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 9f3604355705..502923c24450 1

[PATCH v9 3/6] drm/dp_mst: Add MST support to DP DPCD R/W functions

2019-08-27 Thread David Francis
Reviewed-by: Harry Wentland Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_aux_dev.c | 12 ++-- drivers/gpu/drm/drm_dp_helper.c | 30 -- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_aux_dev.c b/drivers/gpu/drm

[PATCH v9 6/6] drm/dp_mst: Add helpers for MST DSC and virtual DPCD aux

2019-08-27 Thread David Francis
is a DP feature new in DP v1.4, which exposes certain DPCD registers on virtual ports. v2: Remember to unlock mutex on all paths v3: Refactor to match coding style and increase brevity Cc: Lyude Paul Cc: Jani Nikula Cc: Harry Wentland Reviewed-by: Wenjing Liu Signed-off-by: David Francis ---

[PATCH v9 5/6] drm/dp_mst: Add new quirk for Synaptics MST hubs

2019-08-27 Thread David Francis
Wentland Reviewed-by: Wenjing Liu Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_helper.c | 2 ++ include/drm/drm_dp_helper.h | 7 +++ 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index 2cc21eff4cf3..fc39323e7d52

[PATCH v9 1/6] drm/dp_mst: Add PBN calculation for DSC modes

2019-08-27 Thread David Francis
s Cc: amd-...@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Cc: intel-...@lists.freedesktop.org Reviewed-by: Manasi Navare Reviewed-by: Lyude Paul Reviewed-by: Harry Wentland Signed-off-by: David Francis --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c| 2 +- drivers/gp

[PATCH v9 2/6] drm/dp_mst: Parse FEC capability on MST ports

2019-08-27 Thread David Francis
Store it on drm_dp_mst_port Signed-off-by: David Francis Reviewed-by: Lyude Paul Reviewed-by: Harry Wentland --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ include/drm/drm_dp_mst_helper.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b

[PATCH v9 0/6] DSC MST support in DRM

2019-08-27 Thread David Francis
v6: Fix typo, split last patch in two v7: Fix compilation warnings v8: Fix a missing mutex_unlock v9: Refactor last patch David Francis (6): drm/dp_mst: Add PBN calculation for DSC modes drm/dp_mst: Parse FEC capability on MST ports drm/dp_mst: Add MST support to DP DPCD R/W functions drm

[PATCH v8 3/6] drm/dp_mst: Add MST support to DP DPCD R/W functions

2019-08-26 Thread David Francis
-off-by: David Francis --- drivers/gpu/drm/drm_dp_aux_dev.c | 12 ++-- drivers/gpu/drm/drm_dp_helper.c | 30 -- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_aux_dev.c b/drivers/gpu/drm/drm_dp_aux_dev.c index

[PATCH v8 6/6] drm/dp_mst: Add helpers for MST DSC and virtual DPCD aux

2019-08-26 Thread David Francis
is a DP feature new in DP v1.4, which exposes certain DPCD registers on virtual ports. v2: Remember to unlock mutex on all paths Cc: Lyude Paul Cc: Jani Nikula Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_mst_topology.c | 152 ++ include/drm/drm_dp_mst_helpe

[PATCH v8 5/6] drm/dp_mst: Add new quirk for Synaptics MST hubs

2019-08-26 Thread David Francis
: David Francis --- drivers/gpu/drm/drm_dp_helper.c | 2 ++ include/drm/drm_dp_helper.h | 7 +++ 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index 2cc21eff4cf3..fc39323e7d52 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b

[PATCH v8 1/6] drm/dp_mst: Add PBN calculation for DSC modes

2019-08-26 Thread David Francis
s Cc: amd-...@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Cc: intel-...@lists.freedesktop.org Reviewed-by: Manasi Navare Reviewed-by: Lyude Paul Signed-off-by: David Francis --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c| 2 +- drivers/gpu/drm/drm_dp_mst_topol

[PATCH v8 4/6] drm/dp_mst: Fill branch->num_ports

2019-08-26 Thread David Francis
to 0 Signed-off-by: David Francis Reviewed-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 9f3604355705..502923c24450 100644 --- a/drivers/gp

[PATCH v8 0/6] DSC MST support in DRM

2019-08-26 Thread David Francis
Add necessary support for MST DSC. (Display Stream Compression over Multi-Stream Transport) v4: Split patchset and rebase onto drm-tip v5: Clean up formatting, make new quirk v6: Fix typo, split last patch in two v7: Fix compilation warnings v8: Fix a missing mutex_unlock David Francis (6

[PATCH v8 2/6] drm/dp_mst: Parse FEC capability on MST ports

2019-08-26 Thread David Francis
Store it on drm_dp_mst_port Signed-off-by: David Francis Reviewed-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ include/drm/drm_dp_mst_helper.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm

[PATCH v7 0/6] DSC MST support in DRM

2019-08-26 Thread David Francis
Add necessary support for MST DSC. (Display Stream Compression over Multi-Stream Transport) v4: Split patchset and rebase onto drm-tip v5: Clean up formatting, make new quirk v6: Fix typo, split last patch in two v7: Fix compilation warnings David Francis (6): drm/dp_mst: Add PBN calculation

[PATCH v7 4/6] drm/dp_mst: Fill branch->num_ports

2019-08-26 Thread David Francis
to 0 Signed-off-by: David Francis Reviewed-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 9f3604355705..502923c24450 100644 --- a/drivers/gp

[PATCH v7 6/6] drm/dp_mst: Add helpers for MST DSC and virtual DPCD aux

2019-08-26 Thread David Francis
is a DP feature new in DP v1.4, which exposes certain DPCD registers on virtual ports. Cc: Lyude Paul Cc: Jani Nikula Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_mst_topology.c | 150 ++ include/drm/drm_dp_mst_helper.h | 2 + 2 files changed, 152 inse

[PATCH v7 5/6] drm/dp_mst: Add new quirk for Synaptics MST hubs

2019-08-26 Thread David Francis
: David Francis --- drivers/gpu/drm/drm_dp_helper.c | 2 ++ include/drm/drm_dp_helper.h | 7 +++ 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index 2cc21eff4cf3..fc39323e7d52 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b

[PATCH v7 2/6] drm/dp_mst: Parse FEC capability on MST ports

2019-08-26 Thread David Francis
Store it on drm_dp_mst_port Signed-off-by: David Francis Reviewed-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ include/drm/drm_dp_mst_helper.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm

[PATCH v7 3/6] drm/dp_mst: Add MST support to DP DPCD R/W functions

2019-08-26 Thread David Francis
-off-by: David Francis --- drivers/gpu/drm/drm_dp_aux_dev.c | 12 ++-- drivers/gpu/drm/drm_dp_helper.c | 30 -- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_aux_dev.c b/drivers/gpu/drm/drm_dp_aux_dev.c index

[PATCH v7 1/6] drm/dp_mst: Add PBN calculation for DSC modes

2019-08-26 Thread David Francis
s Cc: amd-...@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Cc: intel-...@lists.freedesktop.org Reviewed-by: Manasi Navare Reviewed-by: Lyude Paul Signed-off-by: David Francis --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c| 2 +- drivers/gpu/drm/drm_dp_mst_topol

[PATCH v6 5/6] drm/dp_mst: Add new quirk for Synaptics MST hubs

2019-08-26 Thread David Francis
: David Francis --- drivers/gpu/drm/drm_dp_helper.c | 2 ++ include/drm/drm_dp_helper.h | 7 +++ 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index 2cc21eff4cf3..fc39323e7d52 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b

[PATCH v6 6/6] drm/dp_mst: Add helpers for MST DSC and virtual DPCD aux

2019-08-26 Thread David Francis
is a DP feature new in DP v1.4, which exposes certain DPCD registers on virtual ports. Cc: Lyude Paul Cc: Jani Nikula Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_mst_topology.c | 148 ++ include/drm/drm_dp_mst_helper.h | 2 + 2 files changed, 150 inse

[PATCH v6 2/6] drm/dp_mst: Parse FEC capability on MST ports

2019-08-26 Thread David Francis
Store it on drm_dp_mst_port Signed-off-by: David Francis Reviewed-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ include/drm/drm_dp_mst_helper.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm

[PATCH v6 1/6] drm/dp_mst: Add PBN calculation for DSC modes

2019-08-26 Thread David Francis
s Cc: amd-...@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Cc: intel-...@lists.freedesktop.org Reviewed-by: Manasi Navare Reviewed-by: Lyude Paul Signed-off-by: David Francis --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c| 2 +- drivers/gpu/drm/drm_dp_mst_topol

[PATCH v6 4/6] drm/dp_mst: Fill branch->num_ports

2019-08-26 Thread David Francis
to 0 Signed-off-by: David Francis Reviewed-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 9f3604355705..502923c24450 100644 --- a/drivers/gp

[PATCH v6 3/6] drm/dp_mst: Add MST support to DP DPCD R/W functions

2019-08-26 Thread David Francis
-off-by: David Francis --- drivers/gpu/drm/drm_dp_aux_dev.c | 12 ++-- drivers/gpu/drm/drm_dp_helper.c | 30 -- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_aux_dev.c b/drivers/gpu/drm/drm_dp_aux_dev.c index

[PATCH v6 0/6] DSC MST support in DRM

2019-08-26 Thread David Francis
Add necessary support for MST DSC. (Display Stream Compression over Multi-Stream Transport) v4: Split patchset and rebase onto drm-tip v5: Clean up formatting, make new quirk v6: Fix typo, split last patch in two David Francis (6): drm/dp_mst: Add PBN calculation for DSC modes drm/dp_mst

[PATCH v5 5/5] drm/dp_mst: Add helper for finding right aux to enable/query DSC

2019-08-23 Thread David Francis
is a DP feature new in DP v1.4, which exposes certain DPCD registers on virtual ports. ALso add a new quirk for Synatics MST hubs that support DSC despite not supporting virtual DPCD. Cc: Lyude Paul Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_helpe

[PATCH v5 4/5] drm/dp_mst: Fill branch->num_ports

2019-08-23 Thread David Francis
to 0 Signed-off-by: David Francis Reviewed-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 11b02f6b9e8a..a39e42c7d868 100644 --- a/drivers/gp

[PATCH v5 2/5] drm/dp_mst: Parse FEC capability on MST ports

2019-08-23 Thread David Francis
Store it on drm_dp_mst_port Signed-off-by: David Francis Reviewed-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ include/drm/drm_dp_mst_helper.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm

[PATCH v5 0/5] DSC MST support in DRM

2019-08-23 Thread David Francis
Add necessary support for MST DSC. (Display Stream Compression over Multi-Stream Transport) v4: Split patchset and rebase onto drm-tip v5: Clean up formatting, make new quirk David Francis (5): drm/dp_mst: Add PBN calculation for DSC modes drm/dp_mst: Parse FEC capability on MST ports drm

[PATCH v5 1/5] drm/dp_mst: Add PBN calculation for DSC modes

2019-08-23 Thread David Francis
s Cc: Lyude Paul Signed-off-by: David Francis --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c| 2 +- drivers/gpu/drm/drm_dp_mst_topology.c| 16 drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/disp.c

[PATCH v5 3/5] drm/dp_mst: Add MST support to DP DPCD R/W functions

2019-08-23 Thread David Francis
-off-by: David Francis --- drivers/gpu/drm/drm_dp_aux_dev.c | 12 ++-- drivers/gpu/drm/drm_dp_helper.c | 30 -- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_aux_dev.c b/drivers/gpu/drm/drm_dp_aux_dev.c index

[PATCH v4 5/5] drm/dp-mst: Add helpers for querying and enabling MST DSC

2019-08-22 Thread David Francis
k branch_dev_id = 0x90CC24 (Synaptix) - There is exactly one branch device between the link and output In this case, DSC can be attempted, but only using the *link* aux device's caps. This is a quirk. Cc: Lyude Paul Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis

[PATCH v4 4/5] drm/dp-mst: Fill branch->num_ports

2019-08-22 Thread David Francis
This field on drm_dp_mst_branch was never filled Initialize it to zero when the list of ports is created. When a port is added to the list, increment num_ports, and when a port is removed from the list, decrement num_ports. v2: remember to decrement on port removal Signed-off-by: David Francis

[PATCH v4 2/5] drm/dp-mst: Parse FEC capability on MST ports

2019-08-22 Thread David Francis
Store it on drm_dp_mst_port Signed-off-by: David Francis Reviewed-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ include/drm/drm_dp_mst_helper.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm

[PATCH v4 3/5] drm/dp-mst: Add MST support to DP DPCD R/W functions

2019-08-22 Thread David Francis
Instead of having drm_dp_dpcd_read/write and drm_dp_mst_dpcd_read/write as entry points into the aux code, have drm_dp_dpcd_read/write handle both. This means that DRM drivers can make MST DPCD read/writes. v2: Fix spacing Cc: Leo Li Cc: Lyude Paul Signed-off-by: David Francis --- drivers

[PATCH v4 1/5] drm/dp-mst: Add PBN calculation for DSC modes

2019-08-22 Thread David Francis
With DSC, bpp can be a multiple of 1/16, so drm_dp_calc_pbn_mode is insufficient. Add drm_dp_calc_pbn_mode_dsc, a function which is the same as drm_dp_calc_pbn_mode, but the bpp is in units of 1/16. Reviewed-by: Lyude Paul Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_mst_topology.c

[PATCH v4 0/5] MST DSC support in drm-mst

2019-08-22 Thread David Francis
Add necessary support for MST DSC. (Display Stream COmpression over Multi-Stream Transport) v4: Split patchset and rebase onto drm-tip David Francis (5): drm/dp-mst: Add PBN calculation for DSC modes drm/dp-mst: Parse FEC capability on MST ports drm/dp-mst: Add MST support to DP DPCD R/W

[PATCH v3 12/16] drm/dp-mst: Add helpers for querying and enabling MST DSC

2019-08-21 Thread David Francis
k branch_dev_id = 0x90CC24 (Synaptix) - There is exactly one branch device between the link and output In this case, DSC can be attempted, but only using the *link* aux device's caps. This is a quirk. Cc: Lyude Paul Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis

[PATCH v3 15/16] drm/amd/display: MST DSC compute fair share

2019-08-21 Thread David Francis
end of amdgpu atomic check. If it fails, fail check; This combination of timings cannot be supported. Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 + .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 375

[PATCH v3 14/16] drm/amd/display: Write DSC enable to MST DPCD

2019-08-21 Thread David Francis
Rework the dm_helpers_write_dsc_enable callback to handle the MST case. Use the drm_dp_mst_dsc_enable helper. Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c| 16 +++- 1 file changed, 15 insertions(+), 1

[PATCH v3 13/16] drm/amd/display: Validate DSC caps on MST endpoints

2019-08-21 Thread David Francis
During MST mode enumeration, if a new dc_sink is created, populate it with dsc caps as appropriate. Use drm_dp_mst_dsc_caps_for_port to get the raw caps, then parse them onto dc_sink with dc_dsc_parse_dsc_dpcd. Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis --- .../display

[PATCH v3 16/16] drm/amd/display: Trigger modesets on MST DSC connectors

2019-08-21 Thread David Francis
before adding connectors and planes on modesetting crtcs Cc: Leo Li Cc: Nicholas Kazlauskas Cc: Lyude Paul Signed-off-by: David Francis --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 77 +++ 1 file changed, 77 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH v3 11/16] drm/dp-mst: Fill branch->num_ports

2019-08-21 Thread David Francis
This field on drm_dp_mst_branch was never filled Initialize it to zero when the list of ports is created. When a port is added to the list, increment num_ports, and when a port is removed from the list, decrement num_ports. v2: remember to decrement on port removal Signed-off-by: David Francis

[PATCH v3 09/16] drm/dp-mst: Parse FEC capability on MST ports

2019-08-21 Thread David Francis
Store it on drm_dp_mst_port Signed-off-by: David Francis Reviewed-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ include/drm/drm_dp_mst_helper.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm

[PATCH v3 10/16] drm/dp-mst: Add MST support to DP DPCD R/W functions

2019-08-21 Thread David Francis
Instead of having drm_dp_dpcd_read/write and drm_dp_mst_dpcd_read/write as entry points into the aux code, have drm_dp_dpcd_read/write handle both. This means that DRM drivers can make MST DPCD read/writes. Cc: Leo Li Cc: Lyude Paul Signed-off-by: David Francis --- drivers/gpu/drm

[PATCH v3 07/16] drm/amd/display: Use correct helpers to compute timeslots

2019-08-21 Thread David Francis
don't add a new helper to cover our approach. Use the same means of calculating pbn per time slot as the DSC code. Cc: Jerry Zuo Cc: Nicholas Kazlauskas Signed-off-by: David Francis --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 17 - 1 file changed, 12 insertions(+)

[PATCH v3 08/16] drm/amd/display: Initialize DSC PPS variables to 0

2019-08-21 Thread David Francis
For DSC MST, sometimes monitors would break out in full-screen static. The issue traced back to the PPS generation code, where these variables were being used uninitialized and were picking up garbage. memset to 0 to avoid this Signed-off-by: David Francis Reviewed-by: Nicholas Kazlauskas

[PATCH v3 03/16] Revert "drm/amd/display: add global master update lock for DCN2"

2019-08-21 Thread David Francis
This reverts commit 55a6f5bbcf00a49565946c0a9b8c716313dc6c05. This commit was accidentally promoted twice Signed-off-by: David Francis Reviewed-by: Roman Li Reviewed-by: Harry Wentland Reviewed-by: Nicholas Kazlauskas --- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c| 4 -- .../gpu/drm

[PATCH v3 00/16] Display Stream Compression (DSC) for AMD Navi

2019-08-21 Thread David Francis
reprogrammed v2: Updating patches 6 and 14 in respoinse to Nick's feedback v3: Add return value to patch 6 and split it (now patches 6 & 7) New patch 10 adding MST DPCD read/write support Minor fix (num_ports--) to patch 11 Add DRM helpers (patch 12) David Francis (16): Revert

[PATCH v3 06/16] drm/dp-mst: Add PBN calculation for DSC modes

2019-08-21 Thread David Francis
With DSC, bpp can be a multiple of 1/16, so drm_dp_calc_pbn_mode is insufficient. Add drm_dp_calc_pbn_mode_dsc, a function which is the same as drm_dp_calc_pbn_mode, but the bpp is in units of 1/16. Cc: Lyude Paul Cc: Nicholas Kazlauskas Signed-off-by: David Francis --- drivers/gpu/drm

[PATCH v3 04/16] Revert "drm/amd/display: Fix underscan not using proper scaling"

2019-08-21 Thread David Francis
timing Signed-off-by: David Francis Reviewed-by: Roman Li Reviewed-by: Harry Wentland Reviewed-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/dc/core/dc.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers

[PATCH v3 02/16] Revert "drm/amd/display: navi10 bring up skip dsc encoder config"

2019-08-21 Thread David Francis
This reverts commit 5f2fd347eeff7d4ce271920efd47baaa18fe968c. Re-enable enc2_dp_set_dsc_config. This function caused warnings due to missing register definitions. With the registers added, this now works Signed-off-by: David Francis Reviewed-by: Roman Li Reviewed-by: Harry Wentland Reviewed

[PATCH v3 05/16] drm/amd/display: Enable SST DSC in DM

2019-08-21 Thread David Francis
In create_stream_for_sink, check for SST DP connectors Parse DSC caps to DC format, then, if DSC is supported, compute the config DSC hardware will be programmed by dc_commit_state Tested-by: Mikita Lipski Signed-off-by: David Francis Reviewed-by: Nicholas Kazlauskas --- .../gpu/drm/amd

[PATCH v3 01/16] Revert "drm/amd/display: skip dsc config for navi10 bring up"

2019-08-21 Thread David Francis
not associated with dsc, and power gating on dsc still has an issue on non-dsc monitors where the dsc hardware block is never init and so cannot respond to power gating requests. Therefore, those are left as is Signed-off-by: David Francis Reviewed-by: Roman Li Reviewed-by: Harry Wentland

[PATCH v2 07/14] drm/amd/display: Initialize DSC PPS variables to 0

2019-08-20 Thread David Francis
For DSC MST, sometimes monitors would break out in full-screen static. The issue traced back to the PPS generation code, where these variables were being used uninitialized and were picking up garbage. memset to 0 to avoid this Signed-off-by: David Francis Reviewed-by: Nicholas Kazlauskas

[PATCH v2 08/14] drm/dp-mst: Parse FEC capability on MST ports

2019-08-20 Thread David Francis
Store it on drm_dp_mst_port Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ include/drm/drm_dp_mst_helper.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index d789b7af7dbf

[PATCH v2 05/14] drm/amd/display: Enable SST DSC in DM

2019-08-20 Thread David Francis
In create_stream_for_sink, check for SST DP connectors Parse DSC caps to DC format, then, if DSC is supported, compute the config DSC hardware will be programmed by dc_commit_state Tested-by: Mikita Lipski Signed-off-by: David Francis Reviewed-by: Nicholas Kazlauskas --- .../gpu/drm/amd

[PATCH v2 11/14] drm/amd/display: Validate DSC caps on MST endpoints

2019-08-20 Thread David Francis
t will not have been created yet If no DSC is attempted, zero the DSC caps Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis --- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 123 +- .../display/amdgpu_dm/amdgpu_dm_mst_types.h | 3 + 2 files changed, 125 inser

[PATCH v2 06/14] drm/dp-mst: Use dc and drm helpers to compute timeslots

2019-08-20 Thread David Francis
don't add a new helper to cover our approach. Use the same means of calculating pbn per time slot as the DSC code. v2: Add drm helper for clock to pbn conversion Cc: Jerry Zuo Cc: Nicholas Kazlauskas Signed-off-by: David Francis --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c

[PATCH v2 01/14] Revert "drm/amd/display: skip dsc config for navi10 bring up"

2019-08-20 Thread David Francis
not associated with dsc, and power gating on dsc still has an issue on non-dsc monitors where the dsc hardware block is never init and so cannot respond to power gating requests. Therefore, those are left as is Signed-off-by: David Francis Reviewed-by: Roman Li Reviewed-by: Harry Wentland

[PATCH v2 14/14] drm/amd/display: Trigger modesets on MST DSC connectors

2019-08-20 Thread David Francis
before adding connectors and planes on modesetting crtcs Cc: Leo Li Cc: Nicholas Kazlauskas Signed-off-by: David Francis --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 74 +++ 1 file changed, 74 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b

[PATCH v2 03/14] Revert "drm/amd/display: add global master update lock for DCN2"

2019-08-20 Thread David Francis
This reverts commit 55a6f5bbcf00a49565946c0a9b8c716313dc6c05. This commit was accidentally promoted twice Signed-off-by: David Francis Reviewed-by: Roman Li Reviewed-by: Harry Wentland Reviewed-by: Nicholas Kazlauskas --- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c| 4 -- .../gpu/drm

[PATCH v2 13/14] drm/amd/display: MST DSC compute fair share

2019-08-20 Thread David Francis
end of amdgpu atomic check. If it fails, fail check; This combination of timings cannot be supported. Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 + .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 375

[PATCH v2 04/14] Revert "drm/amd/display: Fix underscan not using proper scaling"

2019-08-20 Thread David Francis
timing Signed-off-by: David Francis Reviewed-by: Roman Li Reviewed-by: Harry Wentland Reviewed-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/dc/core/dc.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers

[PATCH v2 09/14] drm/dp-mst: Export symbols for dpcd read/write

2019-08-20 Thread David Francis
To use these functions in drm driver directories, they must be exported Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index b40d975aec76

[PATCH v2 10/14] drm/dp-mst: Fill branch->num_ports

2019-08-20 Thread David Francis
This field on drm_dp_mst_branch was never filled Initialize it to zero when the list of ports is created. When a port is added to the list, increment num_ports Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers

[PATCH v2 02/14] Revert "drm/amd/display: navi10 bring up skip dsc encoder config"

2019-08-20 Thread David Francis
This reverts commit 5f2fd347eeff7d4ce271920efd47baaa18fe968c. Re-enable enc2_dp_set_dsc_config. This function caused warnings due to missing register definitions. With the registers added, this now works Signed-off-by: David Francis Reviewed-by: Roman Li Reviewed-by: Harry Wentland Reviewed

[PATCH v2 12/14] drm/amd/display: Write DSC enable to MST DPCD

2019-08-20 Thread David Francis
devices, use the upstream (peer) device For DP-to-HDMI or virtual DP peer devices, use the output port For the Synaptix workaround, use the link aux Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 30 ++- 1 file

[PATCH v2 00/14] Display Stream Compression (DSC) for AMD Navi

2019-08-20 Thread David Francis
x27;s feedback David Francis (14): Revert "drm/amd/display: skip dsc config for navi10 bring up" Revert "drm/amd/display: navi10 bring up skip dsc encoder config" Revert "drm/amd/display: add global master update lock for DCN2" Revert "drm/amd/display

[PATCH 11/14] drm/amd/display: Validate DSC caps on MST endpoints

2019-08-19 Thread David Francis
t will not have been created yet If no DSC is attempted, zero the DSC caps Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis --- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 123 +- .../display/amdgpu_dm/amdgpu_dm_mst_types.h | 3 + 2 files changed, 125 inser

  1   2   >