[PATCH] drm/i915: avoid concurrent writes to aux_inv

2022-03-17 Thread fei . yang
From: Fei Yang GPU hangs have been observed when multiple engines write to the same aux_inv register at the same time. To avoid this each engine should only invalidate its own auxiliary table. The function gen12_emit_flush_xcs() currently invalidate the auxiliary table for all engines because

[PATCH] drm/i915: avoid concurrent writes to aux_inv

2022-03-17 Thread fei . yang
From: Fei Yang GPU hangs have been observed when multiple engines write to the same aux_inv register at the same time. To avoid this each engine should only invalidate its own auxiliary table. The function gen12_emit_flush_xcs() currently invalidate the auxiliary table for all engines because

[PATCH] drm/i915: avoid concurrent writes to aux_inv

2022-03-18 Thread fei . yang
From: Fei Yang GPU hangs have been observed when multiple engines write to the same aux_inv register at the same time. To avoid this each engine should only invalidate its own auxiliary table. The function gen12_emit_flush_xcs() currently invalidate the auxiliary table for all engines because

[PATCH] drm/i915: avoid concurrent writes to aux_inv

2022-03-27 Thread fei . yang
From: Fei Yang GPU hangs have been observed when multiple engines write to the same aux_inv register at the same time. To avoid this each engine should only invalidate its own auxiliary table. The function gen12_emit_flush_xcs() currently invalidate the auxiliary table for all engines because

[PATCH] drm/i915: avoid concurrent writes to aux_inv

2022-03-28 Thread fei . yang
From: Fei Yang GPU hangs have been observed when multiple engines write to the same aux_inv register at the same time. To avoid this each engine should only invalidate its own auxiliary table. The function gen12_emit_flush_xcs() currently invalidate the auxiliary table for all engines because

[PATCH] drm/i915: avoid concurrent writes to aux_inv

2022-02-25 Thread fei . yang
From: Fei Yang GPU hangs have been observed when multiple engines write to the same aux_inv register at the same time. To avoid this each engine should only invalidate its own auxiliary table. The function gen12_emit_flush_xcs() currently invalidate the auxiliary table for all engines because

[PATCH] drm/i915: avoid concurrent writes to aux_inv

2022-02-25 Thread fei . yang
From: Fei Yang GPU hangs have been observed when multiple engines write to the same aux_inv register at the same time. To avoid this each engine should only invalidate its own auxiliary table. The function gen12_emit_flush_xcs() currently invalidate the auxiliary table for all engines because

[PATCH] drm/i915: avoid concurrent writes to aux_inv

2022-03-02 Thread fei . yang
From: Fei Yang GPU hangs have been observed when multiple engines write to the same aux_inv register at the same time. To avoid this each engine should only invalidate its own auxiliary table. The function gen12_emit_flush_xcs() currently invalidate the auxiliary table for all engines because

[PATCH] drm/i915: avoid concurrent writes to aux_inv

2022-03-04 Thread fei . yang
From: Fei Yang GPU hangs have been observed when multiple engines write to the same aux_inv register at the same time. To avoid this each engine should only invalidate its own auxiliary table. The function gen12_emit_flush_xcs() currently invalidate the auxiliary table for all engines because

[PATCH] drm/i915: avoid concurrent writes to aux_inv

2022-03-04 Thread fei . yang
From: Fei Yang GPU hangs have been observed when multiple engines write to the same aux_inv register at the same time. To avoid this each engine should only invalidate its own auxiliary table. The function gen12_emit_flush_xcs() currently invalidate the auxiliary table for all engines because

[PATCH 2/8] drm/i915/mtl: Define MOCS and PAT tables for MTL

2023-04-19 Thread fei . yang
. This patch makes sure that these registers are programmed in the proper way. BSpec: 44509, 45101, 44235 Cc: Matt Roper Cc: Lucas De Marchi Signed-off-by: Madhumitha Tolakanahalli Pradeep Signed-off-by: Aravind Iddamsetty Signed-off-by: Nirmoy Das Signed-off-by: Fei Yang --- drivers/gpu/drm

[PATCH 4/8] drm/i915/mtl: workaround coherency issue for Media

2023-04-19 Thread fei . yang
From: Fei Yang This patch implements Wa_22016122933. In MTL, memory writes initiated by Media tile update the whole cache line even for partial writes. This creates a coherency problem for cacheable memory if both CPU and GPU are writing data to different locations within a single cache line

[PATCH 1/8] drm/i915/mtl: Set has_llc=0

2023-04-19 Thread fei . yang
From: Fei Yang On MTL, LLC is not shared between GT and CPU, set has_llc=0. Signed-off-by: Fei Yang --- drivers/gpu/drm/i915/i915_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index d64e074d7457..272a8ba37b64 100644

[PATCH 3/8] drm/i915/mtl: Add PTE encode function

2023-04-19 Thread fei . yang
From: Fei Yang PTE encode functions are platform dependent. This patch implements PTE functions for MTL, and ensures the correct PTE encode function is used by calling pte_encode function pointer instead of the hardcoded gen8 version of PTE encode. Signed-off-by: Fei Yang --- drivers/gpu/drm

[PATCH 6/8] drm/i915: preparation for using PAT index

2023-04-19 Thread fei . yang
From: Fei Yang This patch is a preparation for replacing enum i915_cache_level with PAT index. Caching policy for buffer objects is set through the PAT index in PTE, the old i915_cache_level is not sufficient to represent all caching modes supported by the hardware. Preparing the transition by

[PATCH 0/8] drm/i915/mtl: Define MOCS and PAT tables for MTL

2023-04-19 Thread fei . yang
From: Fei Yang The series includes patches needed to enable MTL. Also add new extension for GEM_CREATE uAPI to let user space set cache policy for buffer objects. v2: addressing review comments and checkpatch warnings Fei Yang (7): drm/i915/mtl: Set has_llc=0 drm/i915/mtl: Add PTE encode

[PATCH 7/8] drm/i915: use pat_index instead of cache_level

2023-04-19 Thread fei . yang
From: Fei Yang Currently the KMD is using enum i915_cache_level to set caching policy for buffer objects. This is flaky because the PAT index which really controls the caching behavior in PTE has far more levels than what's defined in the enum. In addition, the PAT index is platform depe

[PATCH 8/8] drm/i915: Allow user to set cache at BO creation

2023-04-19 Thread fei . yang
From: Fei Yang To comply with the design that buffer objects shall have immutable cache setting through out its life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at object creation time. The current code appl

[PATCH 5/8] drm/i915/mtl: end support for set caching ioctl

2023-04-19 Thread fei . yang
From: Fei Yang The design is to keep Buffer Object's caching policy immutable through out its life cycle. This patch ends the support for set caching ioctl from MTL onward. While doing that we also set BO's to be 1-way coherent at creation time because GPU is no longer automatically sn

[PATCH 2/8] drm/i915/mtl: Define MOCS and PAT tables for MTL

2023-04-19 Thread fei . yang
. This patch makes sure that these registers are programmed in the proper way. BSpec: 44509, 45101, 44235 Cc: Matt Roper Cc: Lucas De Marchi Signed-off-by: Madhumitha Tolakanahalli Pradeep Signed-off-by: Aravind Iddamsetty Signed-off-by: Nirmoy Das Signed-off-by: Fei Yang --- drivers/gpu/drm

[PATCH 0/8] drm/i915/mtl: Define MOCS and PAT tables for MTL

2023-04-19 Thread fei . yang
From: Fei Yang The series includes patches needed to enable MTL. Also add new extension for GEM_CREATE uAPI to let user space set cache policy for buffer objects. v2: addressing review comments and checkpatch warnings v3: make mtl_ggtt_pte_encode static Fei Yang (7): drm/i915/mtl: Set

[PATCH 3/8] drm/i915/mtl: Add PTE encode function

2023-04-19 Thread fei . yang
From: Fei Yang PTE encode functions are platform dependent. This patch implements PTE functions for MTL, and ensures the correct PTE encode function is used by calling pte_encode function pointer instead of the hardcoded gen8 version of PTE encode. Signed-off-by: Fei Yang --- drivers/gpu/drm

[PATCH 5/8] drm/i915/mtl: end support for set caching ioctl

2023-04-19 Thread fei . yang
From: Fei Yang The design is to keep Buffer Object's caching policy immutable through out its life cycle. This patch ends the support for set caching ioctl from MTL onward. While doing that we also set BO's to be 1-way coherent at creation time because GPU is no longer automatically sn

[PATCH 6/8] drm/i915: preparation for using PAT index

2023-04-19 Thread fei . yang
From: Fei Yang This patch is a preparation for replacing enum i915_cache_level with PAT index. Caching policy for buffer objects is set through the PAT index in PTE, the old i915_cache_level is not sufficient to represent all caching modes supported by the hardware. Preparing the transition by

[PATCH 1/8] drm/i915/mtl: Set has_llc=0

2023-04-19 Thread fei . yang
From: Fei Yang On MTL, LLC is not shared between GT and CPU, set has_llc=0. Signed-off-by: Fei Yang --- drivers/gpu/drm/i915/i915_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index d64e074d7457..272a8ba37b64 100644

[PATCH 7/8] drm/i915: use pat_index instead of cache_level

2023-04-19 Thread fei . yang
From: Fei Yang Currently the KMD is using enum i915_cache_level to set caching policy for buffer objects. This is flaky because the PAT index which really controls the caching behavior in PTE has far more levels than what's defined in the enum. In addition, the PAT index is platform depe

[PATCH 8/8] drm/i915: Allow user to set cache at BO creation

2023-04-19 Thread fei . yang
From: Fei Yang To comply with the design that buffer objects shall have immutable cache setting through out their life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at object creation time. The current code appl

[PATCH 4/8] drm/i915/mtl: workaround coherency issue for Media

2023-04-19 Thread fei . yang
From: Fei Yang This patch implements Wa_22016122933. In MTL, memory writes initiated by Media tile update the whole cache line even for partial writes. This creates a coherency problem for cacheable memory if both CPU and GPU are writing data to different locations within a single cache line

[PATCH 0/8] drm/i915/mtl: Define MOCS and PAT tables for MTL

2023-04-19 Thread fei . yang
From: Fei Yang The series includes patches needed to enable MTL. Also add new extension for GEM_CREATE uAPI to let user space set cache policy for buffer objects. v2: addressing review comments and checkpatch warnings v3: make mtl_ggtt_pte_encode static Fei Yang (7): drm/i915/mtl: Set

[PATCH 2/8] drm/i915/mtl: Define MOCS and PAT tables for MTL

2023-04-19 Thread fei . yang
. This patch makes sure that these registers are programmed in the proper way. BSpec: 44509, 45101, 44235 Cc: Matt Roper Cc: Lucas De Marchi Signed-off-by: Madhumitha Tolakanahalli Pradeep Signed-off-by: Aravind Iddamsetty Signed-off-by: Nirmoy Das Signed-off-by: Fei Yang Reviewed-by: Andrzej

[PATCH 1/8] drm/i915/mtl: Set has_llc=0

2023-04-19 Thread fei . yang
From: Fei Yang On MTL, LLC is not shared between GT and CPU, set has_llc=0. Signed-off-by: Fei Yang Reviewed-by: Andi Shyti Reviewed-by: Andrzej Hajda Reviewed-by: Nirmoy Das --- drivers/gpu/drm/i915/i915_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915

[PATCH 5/8] drm/i915/mtl: end support for set caching ioctl

2023-04-19 Thread fei . yang
From: Fei Yang The design is to keep Buffer Object's caching policy immutable through out its life cycle. This patch ends the support for set caching ioctl from MTL onward. While doing that we also set BO's to be 1-way coherent at creation time because GPU is no longer automatically sn

[PATCH 3/8] drm/i915/mtl: Add PTE encode function

2023-04-19 Thread fei . yang
From: Fei Yang PTE encode functions are platform dependent. This patch implements PTE functions for MTL, and ensures the correct PTE encode function is used by calling pte_encode function pointer instead of the hardcoded gen8 version of PTE encode. Signed-off-by: Fei Yang Reviewed-by: Andrzej

[PATCH 8/8] drm/i915: Allow user to set cache at BO creation

2023-04-19 Thread fei . yang
From: Fei Yang To comply with the design that buffer objects shall have immutable cache setting through out their life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at object creation time. The current code appl

[PATCH 4/8] drm/i915/mtl: workaround coherency issue for Media

2023-04-19 Thread fei . yang
From: Fei Yang This patch implements Wa_22016122933. In MTL, memory writes initiated by Media tile update the whole cache line even for partial writes. This creates a coherency problem for cacheable memory if both CPU and GPU are writing data to different locations within a single cache line

[PATCH 7/8] drm/i915: use pat_index instead of cache_level

2023-04-19 Thread fei . yang
From: Fei Yang Currently the KMD is using enum i915_cache_level to set caching policy for buffer objects. This is flaky because the PAT index which really controls the caching behavior in PTE has far more levels than what's defined in the enum. In addition, the PAT index is platform depe

[PATCH 6/8] drm/i915: preparation for using PAT index

2023-04-19 Thread fei . yang
From: Fei Yang This patch is a preparation for replacing enum i915_cache_level with PAT index. Caching policy for buffer objects is set through the PAT index in PTE, the old i915_cache_level is not sufficient to represent all caching modes supported by the hardware. Preparing the transition by

[PATCH v4 1/8] drm/i915/mtl: Define MOCS and PAT tables for MTL

2023-04-21 Thread fei . yang
index 7 to 8. This patch makes sure that these registers are programmed in the proper way. BSpec: 44509, 45101, 44235 Cc: Matt Roper Cc: Lucas De Marchi Signed-off-by: Madhumitha Tolakanahalli Pradeep Signed-off-by: Aravind Iddamsetty Signed-off-by: Nirmoy Das Signed-off-by: Fei Yang

[PATCH v4 2/8] drm/i915/mtl: fix mocs selftest

2023-04-21 Thread fei . yang
From: Fei Yang Media GT has a different base for MOCS register, need to apply gsi_offset to the mmio address if not using the intel_uncore_r/w functions for register access. Cc: Matt Roper Signed-off-by: Fei Yang --- drivers/gpu/drm/i915/gt/selftest_mocs.c | 3 ++- 1 file changed, 2

[PATCH v4 7/8] drm/i915/mtl: end support for set caching ioctl

2023-04-21 Thread fei . yang
From: Fei Yang The design is to keep Buffer Object's caching policy immutable through out its life cycle. This patch ends the support for set caching ioctl from MTL onward. While doing that we also set BO's to be 1-way coherent at creation time because GPU is no longer automatically sn

[PATCH v4 0/8] drm/i915/mtl: Define MOCS and PAT tables for MTL

2023-04-21 Thread fei . yang
From: Fei Yang The series includes patches needed to enable MTL. Also add new extension for GEM_CREATE uAPI to let user space set cache policy for buffer objects. v2: addressing review comments and checkpatch warnings v3: make mtl_ggtt_pte_encode static v4: addressing more comments from Matt

[PATCH v4 6/8] drm/i915: make sure correct pte encode is used

2023-04-21 Thread fei . yang
From: Fei Yang PTE encode is platform dependent. After replacing cache_level with pat_index, the newly introduced mtl_pte_encode is actually generic for all gen12 platforms, thus rename it to gen12_pte_encode and apply it to all gen12 platforms. Cc: Chris Wilson Cc: Matt Roper Signed-off-by

[PATCH v4 3/8] drm/i915/mtl: Add PTE encode function

2023-04-21 Thread fei . yang
From: Fei Yang PTE encode functions are platform dependent. This patch implements PTE functions for MTL, and ensures the correct PTE encode function is used by calling pte_encode function pointer instead of the hardcoded gen8 version of PTE encode. Signed-off-by: Fei Yang Reviewed-by: Andrzej

[PATCH v4 4/8] drm/i915: preparation for using PAT index

2023-04-21 Thread fei . yang
From: Fei Yang This patch is a preparation for replacing enum i915_cache_level with PAT index. Caching policy for buffer objects is set through the PAT index in PTE, the old i915_cache_level is not sufficient to represent all caching modes supported by the hardware. Preparing the transition by

[PATCH v4 5/8] drm/i915: use pat_index instead of cache_level

2023-04-21 Thread fei . yang
From: Fei Yang Currently the KMD is using enum i915_cache_level to set caching policy for buffer objects. This is flaky because the PAT index which really controls the caching behavior in PTE has far more levels than what's defined in the enum. In addition, the PAT index is platform depe

[PATCH v4 8/8] drm/i915: Allow user to set cache at BO creation

2023-04-21 Thread fei . yang
From: Fei Yang To comply with the design that buffer objects shall have immutable cache setting through out their life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at object creation time. The current code appl

[PATCH v1 1/4] drm/i915/mtl: Add PTE encode function

2023-04-23 Thread fei . yang
From: Fei Yang PTE encode functions are platform dependent. This patch implements PTE functions for MTL, and ensures the correct PTE encode function is used by calling pte_encode function pointer instead of the hardcoded gen8 version of PTE encode. Signed-off-by: Fei Yang Reviewed-by: Andrzej

[PATCH v1 0/4] drm/i915/mtl: add PTE encode function

2023-04-23 Thread fei . yang
From: Fei Yang These patches are extracted from series https://patchwork.freedesktop.org/series/115980/ This series start with adding PTE encode functions for MTL as it can no longer reuse the PTE encode functions for GEN8 due to PAT index changes. Then there are patches refactoring the cache

[PATCH v1 3/4] drm/i915: use pat_index instead of cache_level

2023-04-23 Thread fei . yang
From: Fei Yang Currently the KMD is using enum i915_cache_level to set caching policy for buffer objects. This is flaky because the PAT index which really controls the caching behavior in PTE has far more levels than what's defined in the enum. In addition, the PAT index is platform depe

[PATCH v1 2/4] drm/i915: preparation for using PAT index

2023-04-23 Thread fei . yang
From: Fei Yang This patch is a preparation for replacing enum i915_cache_level with PAT index. Caching policy for buffer objects is set through the PAT index in PTE, the old i915_cache_level is not sufficient to represent all caching modes supported by the hardware. Preparing the transition by

[PATCH v1 4/4] drm/i915: make sure correct pte encode is used

2023-04-23 Thread fei . yang
From: Fei Yang PTE encode is platform dependent. After replacing cache_level with pat_index, the newly introduced mtl_pte_encode is actually generic for all gen12 platforms, thus rename it to gen12_pte_encode and apply it to all gen12 platforms. Cc: Chris Wilson Cc: Matt Roper Signed-off-by

[PATCH v1 1/6] drm/i915/mtl: Add PTE encode function

2023-04-23 Thread fei . yang
From: Fei Yang PTE encode functions are platform dependent. This patch implements PTE functions for MTL, and ensures the correct PTE encode function is used by calling pte_encode function pointer instead of the hardcoded gen8 version of PTE encode. Signed-off-by: Fei Yang Reviewed-by: Andrzej

[PATCH v1 0/6] drm/i915: Allow user to set cache at BO creation

2023-04-23 Thread fei . yang
From: Fei Yang The first four patches in this series are taken from https://patchwork.freedesktop.org/series/116868/ These patches are included here because the last patch has dependency on the pat_index refactor. This series is focusing on uAPI changes, 1. end support for set caching ioctl

[PATCH v1 2/6] drm/i915: preparation for using PAT index

2023-04-23 Thread fei . yang
From: Fei Yang This patch is a preparation for replacing enum i915_cache_level with PAT index. Caching policy for buffer objects is set through the PAT index in PTE, the old i915_cache_level is not sufficient to represent all caching modes supported by the hardware. Preparing the transition by

[PATCH v1 4/6] drm/i915: make sure correct pte encode is used

2023-04-23 Thread fei . yang
From: Fei Yang PTE encode is platform dependent. After replacing cache_level with pat_index, the newly introduced mtl_pte_encode is actually generic for all gen12 platforms, thus rename it to gen12_pte_encode and apply it to all gen12 platforms. Cc: Chris Wilson Cc: Matt Roper Signed-off-by

[PATCH v1 3/6] drm/i915: use pat_index instead of cache_level

2023-04-23 Thread fei . yang
From: Fei Yang Currently the KMD is using enum i915_cache_level to set caching policy for buffer objects. This is flaky because the PAT index which really controls the caching behavior in PTE has far more levels than what's defined in the enum. In addition, the PAT index is platform depe

[PATCH v1 5/6] drm/i915/mtl: end support for set caching ioctl

2023-04-23 Thread fei . yang
From: Fei Yang The design is to keep Buffer Object's caching policy immutable through out its life cycle. This patch ends the support for set caching ioctl from MTL onward. While doing that we also set BO's to be 1-way coherent at creation time because GPU is no longer automatically sn

[PATCH v1 6/6] drm/i915: Allow user to set cache at BO creation

2023-04-23 Thread fei . yang
From: Fei Yang To comply with the design that buffer objects shall have immutable cache setting through out their life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at object creation time. The current code appl

[PATCH 0/2] drm/i915/mtl: Add PTE encode functions

2023-04-24 Thread fei . yang
From: Fei Yang Extract PTE patch from https://patchwork.freedesktop.org/series/116868/ to fix MTL boot issue caused by MOCS/PAT update. Fei Yang (2): drm/i915/mtl: Add PTE encode function drm/i915/mtl: workaround coherency issue for Media drivers/gpu/drm/i915/display/intel_dpt.c | 2

[PATCH 1/2] drm/i915/mtl: Add PTE encode function

2023-04-24 Thread fei . yang
From: Fei Yang PTE encode functions are platform dependent. This patch implements PTE functions for MTL, and ensures the correct PTE encode function is used by calling pte_encode function pointer instead of the hardcoded gen8 version of PTE encode. Fixes: b76c0deef627 ("drm/i915/mtl: D

[PATCH 2/2] drm/i915/mtl: workaround coherency issue for Media

2023-04-24 Thread fei . yang
From: Fei Yang This patch implements Wa_22016122933. In MTL, memory writes initiated by the Media tile update the whole cache line, even for partial writes. This creates a coherency problem for cacheable memory if both CPU and GPU are writing data to different locations within a single cache

[PATCH v2 1/2] drm/i915/mtl: Add PTE encode function

2023-04-24 Thread fei . yang
From: Fei Yang PTE encode functions are platform dependent. This patch implements PTE functions for MTL, and ensures the correct PTE encode function is used by calling pte_encode function pointer instead of the hardcoded gen8 version of PTE encode. Fixes: b76c0deef627 ("drm/i915/mtl: D

[PATCH v2 0/2] drm/i915/mtl: Add PTE encode functions

2023-04-24 Thread fei . yang
From: Fei Yang Extract PTE patch from https://patchwork.freedesktop.org/series/116868/ to fix MTL boot issue caused by MOCS/PAT update. v2: address comment from Matt. Fei Yang (2): drm/i915/mtl: Add PTE encode function drm/i915/mtl: workaround coherency issue for Media drivers/gpu/drm

[PATCH v2 2/2] drm/i915/mtl: workaround coherency issue for Media

2023-04-24 Thread fei . yang
From: Fei Yang This patch implements Wa_22016122933. In MTL, memory writes initiated by the Media tile update the whole cache line, even for partial writes. This creates a coherency problem for cacheable memory if both CPU and GPU are writing data to different locations within a single cache

[PATCH v2 1/3] drm/i915: preparation for using PAT index

2023-04-25 Thread fei . yang
From: Fei Yang This patch is a preparation for replacing enum i915_cache_level with PAT index. Caching policy for buffer objects is set through the PAT index in PTE, the old i915_cache_level is not sufficient to represent all caching modes supported by the hardware. Preparing the transition by

[PATCH v2 2/3] drm/i915: use pat_index instead of cache_level

2023-04-25 Thread fei . yang
From: Fei Yang Currently the KMD is using enum i915_cache_level to set caching policy for buffer objects. This is flaky because the PAT index which really controls the caching behavior in PTE has far more levels than what's defined in the enum. In addition, the PAT index is platform depe

[PATCH v2 0/3] drm/i915/mtl: add PTE encode function

2023-04-25 Thread fei . yang
From: Fei Yang These patches are extracted from series https://patchwork.freedesktop.org/series/115980/ This series refactor the cache policy programming so that the PTE encode functions can be unified across all GEN12 platforms. This refactor is also important in implementing the design which

[PATCH v2 3/3] drm/i915: make sure correct pte encode is used

2023-04-25 Thread fei . yang
From: Fei Yang PTE encode is platform dependent. After replacing cache_level with pat_index, the newly introduced mtl_pte_encode is actually generic for all gen12 platforms, thus rename it to gen12_pte_encode and apply it to all gen12 platforms. Cc: Chris Wilson Cc: Matt Roper Signed-off-by

[PATCH v2 4/5] drm/i915/mtl: end support for set caching ioctl

2023-04-25 Thread fei . yang
From: Fei Yang The design is to keep Buffer Object's caching policy immutable through out its life cycle. This patch ends the support for set caching ioctl from MTL onward. While doing that we also set BO's to be 1-way coherent at creation time because GPU is no longer automatically sn

[PATCH v2 0/5] drm/i915: Allow user to set cache at BO creation

2023-04-25 Thread fei . yang
From: Fei Yang The first three patches in this series are taken from https://patchwork.freedesktop.org/series/116868/ These patches are included here because the last patch has dependency on the pat_index refactor. This series is focusing on uAPI changes, 1. end support for set caching ioctl

[PATCH v2 5/5] drm/i915: Allow user to set cache at BO creation

2023-04-25 Thread fei . yang
From: Fei Yang To comply with the design that buffer objects shall have immutable cache setting through out their life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at object creation time. The current code appl

[PATCH v2 3/5] drm/i915: make sure correct pte encode is used

2023-04-25 Thread fei . yang
From: Fei Yang PTE encode is platform dependent. After replacing cache_level with pat_index, the newly introduced mtl_pte_encode is actually generic for all gen12 platforms, thus rename it to gen12_pte_encode and apply it to all gen12 platforms. Cc: Chris Wilson Cc: Matt Roper Signed-off-by

[PATCH v2 1/5] drm/i915: preparation for using PAT index

2023-04-25 Thread fei . yang
From: Fei Yang This patch is a preparation for replacing enum i915_cache_level with PAT index. Caching policy for buffer objects is set through the PAT index in PTE, the old i915_cache_level is not sufficient to represent all caching modes supported by the hardware. Preparing the transition by

[PATCH v2 2/5] drm/i915: use pat_index instead of cache_level

2023-04-25 Thread fei . yang
From: Fei Yang Currently the KMD is using enum i915_cache_level to set caching policy for buffer objects. This is flaky because the PAT index which really controls the caching behavior in PTE has far more levels than what's defined in the enum. In addition, the PAT index is platform depe

[PATCH v3 2/3] drm/i915: use pat_index instead of cache_level

2023-04-27 Thread fei . yang
From: Fei Yang Currently the KMD is using enum i915_cache_level to set caching policy for buffer objects. This is flaky because the PAT index which really controls the caching behavior in PTE has far more levels than what's defined in the enum. In addition, the PAT index is platform depe

[PATCH v3 0/3] drm/i915: use pat_index instead of cache_level

2023-04-27 Thread fei . yang
From: Fei Yang This patch set was posted at https://patchwork.freedesktop.org/series/116868/ Change title since the PTE patch was merged separately. These patches are extracted from series https://patchwork.freedesktop.org/series/115980/ This series refactor the cache policy programming so

[PATCH v3 3/3] drm/i915: make sure correct pte encode is used

2023-04-27 Thread fei . yang
From: Fei Yang PTE encode is platform dependent. After replacing cache_level with pat_index, the newly introduced mtl_pte_encode is actually generic for all gen12 platforms, thus rename it to gen12_pte_encode and apply it to all gen12 platforms. Cc: Chris Wilson Cc: Matt Roper Signed-off-by

[PATCH v3 1/3] drm/i915: preparation for using PAT index

2023-04-27 Thread fei . yang
From: Fei Yang This patch is a preparation for replacing enum i915_cache_level with PAT index. Caching policy for buffer objects is set through the PAT index in PTE, the old i915_cache_level is not sufficient to represent all caching modes supported by the hardware. Preparing the transition by

[PATCH v3 0/5] drm/i915: Allow user to set cache at BO creation

2023-04-27 Thread fei . yang
From: Fei Yang The first three patches in this series are taken from https://patchwork.freedesktop.org/series/116868/ These patches are included here because the last patch has dependency on the pat_index refactor. This series is focusing on uAPI changes, 1. end support for set caching ioctl

[PATCH v3 5/5] drm/i915: Allow user to set cache at BO creation

2023-04-27 Thread fei . yang
From: Fei Yang To comply with the design that buffer objects shall have immutable cache setting through out their life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at object creation time. The current code appl

[PATCH v3 1/5] drm/i915: preparation for using PAT index

2023-04-27 Thread fei . yang
From: Fei Yang This patch is a preparation for replacing enum i915_cache_level with PAT index. Caching policy for buffer objects is set through the PAT index in PTE, the old i915_cache_level is not sufficient to represent all caching modes supported by the hardware. Preparing the transition by

[PATCH v3 3/5] drm/i915: make sure correct pte encode is used

2023-04-27 Thread fei . yang
From: Fei Yang PTE encode is platform dependent. After replacing cache_level with pat_index, the newly introduced mtl_pte_encode is actually generic for all gen12 platforms, thus rename it to gen12_pte_encode and apply it to all gen12 platforms. Cc: Chris Wilson Cc: Matt Roper Signed-off-by

[PATCH v3 4/5] drm/i915/mtl: end support for set caching ioctl

2023-04-27 Thread fei . yang
From: Fei Yang The design is to keep Buffer Object's caching policy immutable through out its life cycle. This patch ends the support for set caching ioctl from MTL onward. While doing that we also set BO's to be 1-way coherent at creation time because GPU is no longer automatically sn

[PATCH v3 2/5] drm/i915: use pat_index instead of cache_level

2023-04-27 Thread fei . yang
From: Fei Yang Currently the KMD is using enum i915_cache_level to set caching policy for buffer objects. This is flaky because the PAT index which really controls the caching behavior in PTE has far more levels than what's defined in the enum. In addition, the PAT index is platform depe

[PATCH v4 0/3] drm/i915: use pat_index instead of cache_level

2023-05-01 Thread fei . yang
From: Fei Yang This patch set was posted at https://patchwork.freedesktop.org/series/116868/ Change title since the PTE patch was merged separately. These patches are extracted from series https://patchwork.freedesktop.org/series/115980/ This series refactor the cache policy programming so

[PATCH v4 3/3] drm/i915: make sure correct pte encode is used

2023-05-01 Thread fei . yang
From: Fei Yang PTE encode is platform dependent. After replacing cache_level with pat_index, the newly introduced mtl_pte_encode is actually generic for all gen12 platforms, thus rename it to gen12_pte_encode and apply it to all gen12 platforms. Cc: Chris Wilson Cc: Matt Roper Signed-off-by

[PATCH v4 1/3] drm/i915: preparation for using PAT index

2023-05-01 Thread fei . yang
From: Fei Yang This patch is a preparation for replacing enum i915_cache_level with PAT index. Caching policy for buffer objects is set through the PAT index in PTE, the old i915_cache_level is not sufficient to represent all caching modes supported by the hardware. Preparing the transition by

[PATCH v4 2/3] drm/i915: use pat_index instead of cache_level

2023-05-01 Thread fei . yang
From: Fei Yang Currently the KMD is using enum i915_cache_level to set caching policy for buffer objects. This is flaky because the PAT index which really controls the caching behavior in PTE has far more levels than what's defined in the enum. In addition, the PAT index is platform depe

[PATCH v4 0/5] drm/i915: Allow user to set cache at BO creation

2023-05-01 Thread fei . yang
From: Fei Yang The first three patches in this series are taken from https://patchwork.freedesktop.org/series/116868/ These patches are included here because the last patch has dependency on the pat_index refactor. This series is focusing on uAPI changes, 1. end support for set caching ioctl

[PATCH v4 4/5] drm/i915/mtl: end support for set caching ioctl

2023-05-01 Thread fei . yang
From: Fei Yang The design is to keep Buffer Object's caching policy immutable through out its life cycle. This patch ends the support for set caching ioctl from MTL onward. While doing that we also set BO's to be 1-way coherent at creation time because GPU is no longer automatically sn

[PATCH v4 1/5] drm/i915: preparation for using PAT index

2023-05-01 Thread fei . yang
From: Fei Yang This patch is a preparation for replacing enum i915_cache_level with PAT index. Caching policy for buffer objects is set through the PAT index in PTE, the old i915_cache_level is not sufficient to represent all caching modes supported by the hardware. Preparing the transition by

[PATCH v4 2/5] drm/i915: use pat_index instead of cache_level

2023-05-01 Thread fei . yang
From: Fei Yang Currently the KMD is using enum i915_cache_level to set caching policy for buffer objects. This is flaky because the PAT index which really controls the caching behavior in PTE has far more levels than what's defined in the enum. In addition, the PAT index is platform depe

[PATCH v4 3/5] drm/i915: make sure correct pte encode is used

2023-05-01 Thread fei . yang
From: Fei Yang PTE encode is platform dependent. After replacing cache_level with pat_index, the newly introduced mtl_pte_encode is actually generic for all gen12 platforms, thus rename it to gen12_pte_encode and apply it to all gen12 platforms. Cc: Chris Wilson Cc: Matt Roper Signed-off-by

[PATCH v4 5/5] drm/i915: Allow user to set cache at BO creation

2023-05-01 Thread fei . yang
From: Fei Yang To comply with the design that buffer objects shall have immutable cache setting through out their life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at object creation time. The current code appl

[PATCH v5 3/3] drm/i915: make sure correct pte encode is used

2023-05-03 Thread fei . yang
From: Fei Yang PTE encode is platform dependent. After replacing cache_level with pat_index, the newly introduced mtl_pte_encode is actually generic for all gen12 platforms, thus rename it to gen12_pte_encode and apply it to all gen12 platforms. Cc: Chris Wilson Cc: Matt Roper Signed-off-by

[PATCH v5 1/3] drm/i915: preparation for using PAT index

2023-05-03 Thread fei . yang
From: Fei Yang This patch is a preparation for replacing enum i915_cache_level with PAT index. Caching policy for buffer objects is set through the PAT index in PTE, the old i915_cache_level is not sufficient to represent all caching modes supported by the hardware. Preparing the transition by

[PATCH v5 0/3] drm/i915: use pat_index instead of cache_level

2023-05-03 Thread fei . yang
From: Fei Yang This patch set was posted at https://patchwork.freedesktop.org/series/116868/ Change title since the PTE patch was merged separately. These patches are extracted from series https://patchwork.freedesktop.org/series/115980/ This series refactor the cache policy programming so

[PATCH v5 2/3] drm/i915: use pat_index instead of cache_level

2023-05-03 Thread fei . yang
From: Fei Yang Currently the KMD is using enum i915_cache_level to set caching policy for buffer objects. This is flaky because the PAT index which really controls the caching behavior in PTE has far more levels than what's defined in the enum. In addition, the PAT index is platform depe

[PATCH v5 1/5] drm/i915: preparation for using PAT index

2023-05-03 Thread fei . yang
From: Fei Yang This patch is a preparation for replacing enum i915_cache_level with PAT index. Caching policy for buffer objects is set through the PAT index in PTE, the old i915_cache_level is not sufficient to represent all caching modes supported by the hardware. Preparing the transition by

[PATCH v5 0/5] drm/i915: Allow user to set cache at BO creation

2023-05-03 Thread fei . yang
From: Fei Yang The first three patches in this series are taken from https://patchwork.freedesktop.org/series/116868/ These patches are included here because the last patch has dependency on the pat_index refactor. This series is focusing on uAPI changes, 1. end support for set caching ioctl

  1   2   >