Re: [Intel-gfx] [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'

2019-10-31 Thread Changbin Du
On Tue, Oct 29, 2019 at 02:00:27AM -0600, Jonathan Corbet wrote: > On Tue, 29 Oct 2019 08:31:22 +0800 > Changbin Du wrote: > > > Here python is different from C. Both empty string and None are False in > > python. > > Note such condition is common in python. > &g

Re: [Intel-gfx] [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'

2019-10-29 Thread Changbin Du
On Mon, Oct 28, 2019 at 11:24:22AM +0200, Jani Nikula wrote: > On Fri, 25 Oct 2019, Changbin Du wrote: > > On Fri, Oct 25, 2019 at 09:57:48AM +0300, Jani Nikula wrote: > >> On Thu, 24 Oct 2019, Jonathan Corbet wrote: > >> > On Sun, 20 Oct 2019 21:17:17 +

Re: [Intel-gfx] [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'

2019-10-25 Thread Changbin Du
On Fri, Oct 25, 2019 at 09:57:48AM +0300, Jani Nikula wrote: > On Thu, 24 Oct 2019, Jonathan Corbet wrote: > > On Sun, 20 Oct 2019 21:17:17 +0800 > > Changbin Du wrote: > > > >> The 'functions' directive is not only for functions, but also works for > >> st

[Intel-gfx] [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'

2019-10-20 Thread Changbin Du
are updated. Signed-off-by: Changbin Du --- v2: o use 'identifiers' as the new directive name. --- Documentation/doc-guide/kernel-doc.rst | 29 ++ Documentation/sphinx/kerneldoc.py | 19 ++--- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git

Re: [Intel-gfx] [PATCH] kernel-doc: rename the kernel-doc directive 'functions' to 'specific'

2019-10-16 Thread Changbin Du
those things separately, but it does cover > all the things we do allow to be individually documented. -- Cheers, Changbin Du ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH] kernel-doc: rename the kernel-doc directive 'functions' to 'specific'

2019-10-16 Thread Changbin Du
On Tue, Oct 15, 2019 at 12:27:26PM -0600, Jonathan Corbet wrote: > On Sun, 13 Oct 2019 13:53:59 +0800 > Changbin Du wrote: > > > The 'functions' directive is not only for functions, but also works for > > structs/unions. So the name is misleading. This patch renames it to &

[Intel-gfx] [PATCH] kernel-doc: rename the kernel-doc directive 'functions' to 'specific'

2019-10-14 Thread Changbin Du
message. Signed-off-by: Changbin Du --- Documentation/PCI/pci.rst | 4 +- Documentation/core-api/boot-time-mm.rst | 2 +- Documentation/core-api/debug-objects.rst | 14 +- Documentation/core-api/genalloc.rst | 34 +-- Documentation/core-api/generic

[Intel-gfx] [PATCH] drm/i915: Add new vGPU cap info bit VGT_CAPS_HUGE_GTT

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> This adds a new vGPU cap info bit VGT_CAPS_HUGE_GTT, which is to detect whether the host supports shadowing of huge gtt pages. If host does support it, remove the page sizes restriction for vGPU. Signed-off-by: Changbin Du <changbin...@

[Intel-gfx] [PATCH v6 13/14] drm/i915/gvt: Fix error handling in ppgtt_populate_spt_by_guest_entry

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Don't forget to free allocated spt if shadowing failed. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i915/gvt/gtt.c | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff --g

[Intel-gfx] [PATCH v6 11/14] drm/i915/gvt: Add 2M huge gtt support

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> This add 2M huge gtt support for GVTg. Unlike 64K gtt entry, we can shadow 2M guest entry with real huge gtt. But before that, we have to check memory physical continuous, alignment and if it is supported on the host. We can get all supported page

[Intel-gfx] [PATCH v6 07/14] drm/i915/gvt: Split ppgtt_alloc_spt into two parts

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> We need a interface to allocate a pure shadow page which doesn't have a guest page associated with. Such shadow page is used to shadow 2M huge gtt entry. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i915/gv

[Intel-gfx] [PATCH v6 12/14] drm/i915/gvt: Handle special sequence on PDE IPS bit

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> If the guest update the 64K gtt entry before changing IPS bit of PDE, we need to re-shadow the whole page table. Because we have ignored all updates to unused entries. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i9

[Intel-gfx] [PATCH v6 06/14] drm/i915/gvt: Add GTT clear_pse operation

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Add clear_pse operation in case we need to split huge gtt into small pages. v2: correct description. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i915/gvt/gtt.c | 19 +++ drivers/gpu/drm/i915/gv

[Intel-gfx] [PATCH v6 05/14] drm/i915/gvt: Add software PTE flag to mark special 64K splited entry

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> This add a software PTE flag on the Ignored bit of PTE. It will be used to identify splited 64K shadow entries. v2: fix mask definition. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i915/gv

[Intel-gfx] [PATCH v6 03/14] drm/i915/gvt: Handle MMIO GEN8_GAMW_ECO_DEV_RW_IA for 64K GTT

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> The register RENDER_HWS_PGA_GEN7 is renamed to GEN8_GAMW_ECO_DEV_RW_IA from GEN8 which can control IPS enabling. v2: IPS of all engines must be enabled together for gen9. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/

[Intel-gfx] [PATCH v6 00/14] drm/i915/gvt: Add huge gtt shadowing

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Add huge gtt shadowing for GVT. This will alow huge gtt feature turned on for vGPU. v6: o Split changes of last patch in i915 side into a separated patch. v5: o IPS of all engines must be enabled together for gen9. o Coding style improvme

[Intel-gfx] [PATCH v6 01/14] drm/i915/gvt: Add new 64K entry type

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Add a new entry type GTT_TYPE_PPGTT_PTE_64K_ENTRY. 64K entry is very different from 2M/1G entry. 64K entry is controlled by IPS bit in upper PDE. To leverage the current logic, I take IPS bit as 'PSE' for PTE level. Which means, 64K entries ca

[Intel-gfx] [PATCH v6 14/14] drm/i915: Enable platform support for vGPU huge gtt pages

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Now GVTg supports shadowing both 2M/64K huge gtt pages. So let's turn on the cap info bit VGT_CAPS_HUGE_GTT. v2: Split changes in i915 side into a separated patch. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i91

[Intel-gfx] [PATCH v6 02/14] drm/i915/gvt: Add PTE IPS bit operations

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Add three IPS operation functions to test/set/clear IPS in PDE. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i915/gvt/gtt.c | 18 ++ drivers/gpu/drm/i915/gvt/gtt.h | 2 ++ 2 files changed, 2

[Intel-gfx] [PATCH v6 08/14] drm/i915/gvt: Make PTE iterator 64K entry aware

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> 64K PTE is special, only PTE#0, PTE#16, PTE#32, ... PTE#496 are used in the page table. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i915/gvt/gtt.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)

[Intel-gfx] [PATCH v6 09/14] drm/i915/gvt: Add 64K huge gtt support

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Finally, this add the first huge gtt support for GVTg - 64K pages. Since 64K page and 4K page cannot be mixed on the same page table, so we always split a 64K entry into small 4K page. And when unshadow guest 64K entry, we need ensure all the sh

[Intel-gfx] [PATCH v6 10/14] drm/i915/kvmgt: Support setting dma map for huge pages

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> To support huge gtt, we need to support huge pages in kvmgt first. This patch adds a 'size' param to the intel_gvt_mpt::dma_map_guest_page API and implements it in kvmgt. v2: rebase. Signed-off-by: Changbin Du <changbin...@intel.com> ---

[Intel-gfx] [PATCH v6 04/14] drm/i915/gvt: Detect 64K gtt entry by IPS bit of PDE

2018-05-08 Thread changbin . du
From: Changbin Du <changbin...@intel.com> This change help us detect the real entry type per PSE and IPS setting. For 64K entry, we also need to check reg GEN8_GAMW_ECO_DEV_RW_IA. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i915/gv

[Intel-gfx] [PATCH v5 12/14] drm/i915/gvt: Handle special sequence on PDE IPS bit

2018-05-07 Thread changbin . du
From: Changbin Du <changbin...@intel.com> If the guest update the 64K gtt entry before changing IPS bit of PDE, we need to re-shadow the whole page table. Because we have ignored all updates to unused entries. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i9

[Intel-gfx] [PATCH v5 13/14] drm/i915/gvt: Fix error handling in ppgtt_populate_spt_by_guest_entry

2018-05-07 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Don't forget to free allocated spt if shadowing failed. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i915/gvt/gtt.c | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff --g

[Intel-gfx] [PATCH v5 11/14] drm/i915/gvt: Add 2M huge gtt support

2018-05-07 Thread changbin . du
From: Changbin Du <changbin...@intel.com> This add 2M huge gtt support for GVTg. Unlike 64K gtt entry, we can shadow 2M guest entry with real huge gtt. But before that, we have to check memory physical continuous, alignment and if it is supported on the host. We can get all supported page

[Intel-gfx] [PATCH v5 05/14] drm/i915/gvt: Add software PTE flag to mark special 64K splited entry

2018-05-07 Thread changbin . du
From: Changbin Du <changbin...@intel.com> This add a software PTE flag on the Ignored bit of PTE. It will be used to identify splited 64K shadow entries. v2: fix mask definition. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i915/gv

[Intel-gfx] [PATCH v5 14/14] drm/i915: Enable platform support for vGPU huge gtt pages

2018-05-07 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Now GVTg supports shadowing both 2M/64K huge gtt pages. So this is to remove the restriction on guest side. To be compatible with old host kernel, we defined a new cap info bit VGT_CAPS_HUGE_GTT. Cc: Zhenyu Wang <zhen...@linux.intel.com>

[Intel-gfx] [PATCH v5 08/14] drm/i915/gvt: Make PTE iterator 64K entry aware

2018-05-07 Thread changbin . du
From: Changbin Du <changbin...@intel.com> 64K PTE is special, only PTE#0, PTE#16, PTE#32, ... PTE#496 are used in the page table. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i915/gvt/gtt.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)

[Intel-gfx] [PATCH v5 10/14] drm/i915/kvmgt: Support setting dma map for huge pages

2018-05-07 Thread changbin . du
From: Changbin Du <changbin...@intel.com> To support huge gtt, we need to support huge pages in kvmgt first. This patch adds a 'size' param to the intel_gvt_mpt::dma_map_guest_page API and implements it in kvmgt. v2: rebase. Signed-off-by: Changbin Du <changbin...@intel.com> ---

[Intel-gfx] [PATCH v5 07/14] drm/i915/gvt: Split ppgtt_alloc_spt into two parts

2018-05-07 Thread changbin . du
From: Changbin Du <changbin...@intel.com> We need a interface to allocate a pure shadow page which doesn't have a guest page associated with. Such shadow page is used to shadow 2M huge gtt entry. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i915/gv

[Intel-gfx] [PATCH v5 06/14] drm/i915/gvt: Add GTT clear_pse operation

2018-05-07 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Add clear_pse operation in case we need to split huge gtt into small pages. v2: correct description. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i915/gvt/gtt.c | 19 +++ drivers/gpu/drm/i915/gv

[Intel-gfx] [PATCH v5 01/14] drm/i915/gvt: Add new 64K entry type

2018-05-07 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Add a new entry type GTT_TYPE_PPGTT_PTE_64K_ENTRY. 64K entry is very different from 2M/1G entry. 64K entry is controlled by IPS bit in upper PDE. To leverage the current logic, I take IPS bit as 'PSE' for PTE level. Which means, 64K entries ca

[Intel-gfx] [PATCH v5 04/14] drm/i915/gvt: Detect 64K gtt entry by IPS bit of PDE

2018-05-07 Thread changbin . du
From: Changbin Du <changbin...@intel.com> This change help us detect the real entry type per PSE and IPS setting. For 64K entry, we also need to check reg GEN8_GAMW_ECO_DEV_RW_IA. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i915/gv

[Intel-gfx] [PATCH v5 03/14] drm/i915/gvt: Handle MMIO GEN8_GAMW_ECO_DEV_RW_IA for 64K GTT

2018-05-07 Thread changbin . du
From: Changbin Du <changbin...@intel.com> The register RENDER_HWS_PGA_GEN7 is renamed to GEN8_GAMW_ECO_DEV_RW_IA from GEN8 which can control IPS enabling. v2: IPS of all engines must be enabled together for gen9. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/

[Intel-gfx] [PATCH v5 02/14] drm/i915/gvt: Add PTE IPS bit operations

2018-05-07 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Add three IPS operation functions to test/set/clear IPS in PDE. Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i915/gvt/gtt.c | 18 ++ drivers/gpu/drm/i915/gvt/gtt.h | 2 ++ 2 files changed, 2

[Intel-gfx] [PATCH v5 00/14] drm/i915/gvt: Add huge gtt shadowing

2018-05-07 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Add huge gtt shadowing for GVT. This will alow huge gtt feature turned on for vGPU. v5: o IPS of all engines must be enabled together for gen9. o Coding style improvment. v4: o Make first patch bisectable. v3: o rebase. v2: o fix comment

[Intel-gfx] [PATCH v5 09/14] drm/i915/gvt: Add 64K huge gtt support

2018-05-07 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Finally, this add the first huge gtt support for GVTg - 64K pages. Since 64K page and 4K page cannot be mixed on the same page table, so we always split a 64K entry into small 4K page. And when unshadow guest 64K entry, we need ensure all the sh

[Intel-gfx] [PATCH v2] drm/i915: Do not enable movntdqa optimization in hypervisor guest

2017-12-24 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Our QA reported a problem caused by movntdqa instructions. Currently, the KVM hypervisor doesn't support VEX-prefix instructions emulation. If users passthrough a GPU to guest with vfio option 'x-no-mmap=on', then all access to the BARs will be t

[Intel-gfx] [PATCH] drm/i915: Do not enable movntdqa optimization in hypervisor guest

2017-12-21 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Our QA reported a problem caused by movntdqa instructions. Currently, the KVM hypervisor doesn't support VEX-prefix instructions emulation. If users passthrough a GPU to guest with vfio option 'x-no-mmap=on', then all access to the BARs will be t

[Intel-gfx] [PATCH i-g-t] overlay: fix debugfs path when debugfs mounted on path '/debug'

2017-12-06 Thread changbin . du
From: Changbin Du <changbin...@intel.com> It mistakenly set debugfs root path to "/debug/dri", so correct it. Signed-off-by: Changbin Du <changbin...@intel.com> --- overlay/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlay/debugfs.c b/o

[Intel-gfx] [PATCH] Documentation/i915: Add "User command execution" to doc-tree

2017-10-16 Thread changbin . du
From: Changbin Du <changbin...@intel.com> Just found this is a useful introduction about User command execution, so add it to doc-tree. Signed-off-by: Changbin Du <changbin...@intel.com> --- Documentation/gpu/i915.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Docum

[Intel-gfx] [PATCH v3] drm/i915: Add interface to reserve fence registers for vGPU

2017-09-04 Thread changbin . du
From: Changbin Du <changbin...@intel.com> In the past, vGPU alloc fence registers by walking through mm.fence_list to find fence which pin_count = 0 and vma is empty. vGPU may not find enough fence registers this way. Because a fence can be bind to vma even though it is not in using. W

[Intel-gfx] [PATCH v2] drm/i915: Add interface to reserve fence registers for vGPU

2017-09-01 Thread changbin . du
From: Changbin Du <changbin...@intel.com> In the past, vGPU alloc fence registers by walking through mm.fence_list to find fence which pin_count = 0 and vma is empty. vGPU may not find enough fence registers this way. Because a fence can be bind to vma even though it is not in using. W

[Intel-gfx] [PATCH] drm/i915: Add interface to reserve fence registers for vGPU

2017-08-30 Thread changbin . du
From: Changbin Du <changbin...@intel.com> In the past, vGPU alloc fence registers by walking through mm.fence_list to find fence which pin_count = 0 and vma is empty. vGPU may not find enough fence registers this way. Because a fence can be bind to vma even though it is not in using. W

[Intel-gfx] [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected

2017-05-24 Thread changbin . du
From: Changbin Du <changbin...@intel.com> At least we need one MPT module (currently only have one) selected to get GVTg functional. When GVTg is enabled while no MPT selected, the build just includes useless GVTg code. This doesn't make sense. With this patch, a submenut is created unde

[Intel-gfx] [PATCH v2] drm/i915: make context status notifier head be per engine

2017-03-12 Thread changbin . du
From: Changbin Du <changbin...@intel.com> GVTg has introduced the context status notifier to schedule the GVTg workload. At that time, the notifier is bound to GVTg context only, so GVTg is not aware of host workloads. Now we are going to improve GVTg's guest workload scheduler policy, a

[Intel-gfx] [PATCH] drm/i915: make context status notifier head be per engine

2017-03-09 Thread changbin . du
From: Changbin Du <changbin...@intel.com> GVTg has introduced the context status notifier to schedule the GVTg workload. At that time, the notifier is bound to GVTg context only, so GVTg is not aware of host workloads. Now we are going to improve GVTg's guest workload scheduler policy, a

[Intel-gfx] [RFC PATCH] drm/i915: make context status notifier head be per engine

2017-03-02 Thread changbin . du
From: Changbin Du <changbin...@intel.com> hi, Daniel, Chris and All, As you know, GVTg introduced the context status notifier to schedule the GVTg workload. At that time, the notifier is bound to GVTg context only, so GVTg is not aware of host workloads. Now we are going to improve GVTg's

[Intel-gfx] [PATCH] drm/i915: check if execlist_port is empty before using its content

2016-12-22 Thread changbin . du
0x30 Signed-off-by: Changbin Du <changbin...@intel.com> --- drivers/gpu/drm/i915/intel_lrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 0a09024..81a9b0b 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c