Re: [PATCH 00/21] drm/i915: remove unused structure members

2024-02-16 Thread Zhi Wang
On Fri, 16 Feb 2024 10:51:20 +0200 Jani Nikula wrote: > On Fri, 16 Feb 2024, "Jiri Slaby (SUSE)" wrote: > > this series removes unused i915 structure members as found by > > clang-struct (and manually checked by me). > > Thanks Jiri, good stuff! > > Acked-by: Jani Nikula > > However, you

Re: [PATCH][next] drm/i915/gvt: remove redundant assignment to pointer map

2024-02-11 Thread Zhi Wang
q_info = NULL; > u32 set_bits = 0; > u32 clear_bits = 0; Thanks for the patch! Reviewed-by: Zhi Wang

Re: [Intel-gfx] [PATCH] drm/i915: Replace dead 01.org link

2024-02-03 Thread Zhi Wang
t; drivers/gpu/drm/i915/intel_gvt.c | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index d516295978a4..805d33a107aa 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -10436,7 +10436,7 @@ M:Zhi Wang > L: intel

[Intel-gfx] [PATCH RESEND] drm/i915/gvt: remove unused variable gma_bottom in command parser

2023-05-30 Thread Zhi Wang
Wang Cc: intel-gvt-...@lists.freedesktop.org Signed-off-by: Zhi Wang --- drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c index 3c4ae1da0d41..05f9348b7a9d

[Intel-gfx] [PATCH 1/2] drm/i915/gvt: Make intel_gvt_match_device() static

2022-04-27 Thread Zhi Wang
After the refactor of GVT-g, the reference of intel_gvt_match_device() only happens in handlers.c. Make it static to let the compiler be happy. Cc: Jason Gunthorpe Cc: Jani Nikula Cc: Robert Beckett Signed-off-by: Zhi Wang --- drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 1 file changed, 1

[Intel-gfx] [PATCH 2/2] drm/i915/gvt: Fix the compiling error when CONFIG_DRM_I915_DEBUG_RUNTIME_PM=n

2022-04-27 Thread Zhi Wang
A compiling error was reported when CONFIG_DRM_I915_DEBUG_RUNTIME_PM=n. Fix the problem by using the pre-defined macro. Cc: Jason Gunthorpe Cc: Jani Nikula Signed-off-by: Zhi Wang --- drivers/gpu/drm/i915/intel_gvt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH] drm/i915/gvt: Add missing symbol export.

2022-04-25 Thread Zhi Wang
When CONFIG_DRM_I915_DEBUG_RUNTIME and CONFIG_DRM_I915_DEBUG_PM are enabled, two more extra symols in i915 are required to be exported. Cc: Jani Nikula Signed-off-by: Zhi Wang --- drivers/gpu/drm/i915/intel_gvt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH v9 3/3] i915/gvt: Use the initial HW state snapshot saved in i915

2022-04-07 Thread Zhi Wang
The code of saving initial HW state snapshot has been moved into i915. Let the GVT-g core logic use that snapshot. Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Vivi Rodrigo Cc: Zhenyu Wang Cc: Zhi Wang Signed-off-by: Zhi Wang --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v9 1/3] i915/gvt: Separate the MMIO tracking table from GVT-g

2022-04-07 Thread Zhi Wang
From: Zhi Wang To support the new mdev interfaces and the re-factor patches from Christoph, which moves the GVT-g code into a dedicated module, the GVT-g MMIO tracking table needs to be separated from GVT-g. v9: - Fix a problem might cause kernel panic. v8: - Use SPDX header

[Intel-gfx] [PATCH v9 2/3] i915/gvt: Save the initial HW state snapshot in i915

2022-04-07 Thread Zhi Wang
state. v6: - Remove the reference of intel_gvt_device_info.(Christoph) - Refine the save_mmio() function. (Christoph) Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Vivi Rodrigo Cc: Zhenyu Wang Cc: Zhi Wang Signed-off-by: Zhi Wang --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v9 0/3] Refactor GVT-g MMIO tracking table and handlers

2022-04-07 Thread Zhi Wang
CONFIG_DRM_I915_WERROR is turned on. (Jani) v2: - Implement a mmio table instead of generating it by marco in i915. (Jani) Zhi Wang (3): i915/gvt: Separate the MMIO tracking table from GVT-g i915/gvt: Save the initial HW state snapshot in i915 i915/gvt: Use the initial HW state snapshot saved

[Intel-gfx] [PATCH v8 3/3] i915/gvt: Use the initial HW state snapshot saved in i915

2022-04-01 Thread Zhi Wang
The code of saving initial HW state snapshot has been moved into i915. Let the GVT-g core logic use that snapshot. Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Vivi Rodrigo Cc: Zhenyu Wang Cc: Zhi Wang Signed-off-by: Zhi Wang --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v8 1/3] i915/gvt: Separate the MMIO tracking table from GVT-g

2022-04-01 Thread Zhi Wang
From: Zhi Wang To support the new mdev interfaces and the re-factor patches from Christoph, which moves the GVT-g code into a dedicated module, the GVT-g MMIO tracking table needs to be separated from GVT-g. --- v8: - Use SPDX header in the intel_gvt_mmio_table.c - Reference the gvt.h

[Intel-gfx] [PATCH v8 2/3] i915/gvt: Save the initial HW state snapshot in i915

2022-04-01 Thread Zhi Wang
state. --- v6: - Remove the reference of intel_gvt_device_info.(Christoph) - Refine the save_mmio() function. (Christoph) Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Vivi Rodrigo Cc: Zhenyu Wang Cc: Zhi Wang Signed-off-by: Zhi Wang --- drivers/gpu/drm

[Intel-gfx] [PATCH v8 0/3] Refactor GVT-g MMIO tracking table and handlers

2022-04-01 Thread Zhi Wang
on. (Jani) v2: - Implement a mmio table instead of generating it by marco in i915. (Jani) Zhi Wang (3): i915/gvt: Separate the MMIO tracking table from GVT-g i915/gvt: Save the initial HW state snapshot in i915 i915/gvt: Use the initial HW state snapshot saved in i915 drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH v7 1/3] i915/gvt: Separate the MMIO tracking table from GVT-g

2022-03-31 Thread Zhi Wang
Thanks. Let me fix that. :) On 3/31/22 04:33, Christoph Hellwig wrote: On Thu, Mar 31, 2022 at 08:04:04AM +, Wang, Zhi A wrote: Hi Chris: Thanks for the testing. Can you attach the dmesg? I tested mostly on my skylake desktop with some 3D workload. Sure, I should have done that from the

[Intel-gfx] [PATCH v7 3/3] i915/gvt: Use the initial HW state snapshot saved in i915

2022-03-25 Thread Zhi Wang
The code of saving initial HW state snapshot has been moved into i915. Let the GVT-g core logic use that snapshot. Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Vivi Rodrigo Cc: Zhenyu Wang Cc: Zhi Wang Signed-off-by: Zhi Wang --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v7 2/3] i915/gvt: Save the initial HW state snapshot in i915

2022-03-25 Thread Zhi Wang
state. v6: - Remove the reference of intel_gvt_device_info.(Christoph) - Refine the save_mmio() function. (Christoph) Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Vivi Rodrigo Cc: Zhenyu Wang Cc: Zhi Wang Signed-off-by: Zhi Wang --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v7 1/3] i915/gvt: Separate the MMIO tracking table from GVT-g

2022-03-25 Thread Zhi Wang
From: Zhi Wang To support the new mdev interfaces and the re-factor patches from Christoph, which moves the GVT-g code into a dedicated module, the GVT-g MMIO tracking table needs to be separated from GVT-g. v7: - Keep the marcos of device generation in GVT-g. (Christoph, Jani) v6: - Move

[Intel-gfx] [PATCH v6 3/3] i915/gvt: Use the initial HW state snapshot saved in i915

2022-02-08 Thread Zhi Wang
The code of saving initial HW state snapshot has been moved into i915. Let the GVT-g core logic use that snapshot. Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Vivi Rodrigo Cc: Zhenyu Wang Cc: Zhi Wang Signed-off-by: Zhi Wang --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v6 1/3] i915/gvt: Introduce the mmio table to support VFIO new mdev API

2022-02-08 Thread Zhi Wang
From: Zhi Wang To support the new mdev interfaces and the re-factor patches from Christoph, which moves the GVT-g code into a dedicated module, the GVT-g initialization path has to be separated into two phases: a) Early initialization. The early initialization of GVT requires to be done when

[Intel-gfx] [PATCH v6 2/3] i915/gvt: Save the initial HW state snapshot in i915

2022-02-08 Thread Zhi Wang
state. v6: - Remove the reference of intel_gvt_device_info.(Christoph) - Refine the save_mmio() function. (Christoph) Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Vivi Rodrigo Cc: Zhenyu Wang Cc: Zhi Wang Signed-off-by: Zhi Wang --- drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH 1/3] i915/gvt: Introduce the mmio_table.c to support VFIO new mdev API

2022-02-07 Thread Zhi Wang
On 2/7/22 05:48, Jani Nikula wrote: On Mon, 07 Feb 2022, Christoph Hellwig wrote: On Mon, Feb 07, 2022 at 08:28:13AM +, Wang, Zhi A wrote: 1) About having the mmio_table.h, I would like to keep the stuff in a dedicated header as putting them in intel_gvt.h might needs i915 guys to

[Intel-gfx] [PATCH 3/3] i915/gvt: Use the initial HW state snapshot saved in i915

2022-01-27 Thread Zhi Wang
The code of saving initial HW state snapshot has been moved into i915. Let the GVT-g core logic use that snapshot. Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Vivi Rodrigo Cc: Zhenyu Wang Cc: Zhi Wang Signed-off-by: Zhi Wang --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 2/3] i915/gvt: save the initial HW state snapshot in i915.

2022-01-27 Thread Zhi Wang
state. Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Vivi Rodrigo Cc: Zhenyu Wang Cc: Zhi Wang Signed-off-by: Zhi Wang --- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/intel_gvt.c | 110 ++- 2 files changed, 110

[Intel-gfx] [PATCH 1/3] i915/gvt: Introduce the mmio_table.c to support VFIO new mdev API

2022-01-27 Thread Zhi Wang
From: Zhi Wang To support the new mdev interfaces and the re-factor patches from Christoph, which moves the GVT-g code into a dedicated module, the GVT-g initialization path has to be separated into two phases: a) Early initialization. The early initialization of GVT requires to be done when

[Intel-gfx] [GVT PULL] gvt-fixes for drm-intel-fixes

2022-01-15 Thread Zhi Wang
Hi folks: Here is the gvt-fixes pull for drm-intel-fixes. It contains: - Make DRM_I915_GVT depend on X86 (Siva Mullati) - Clean kernel doc in gtt.c (Randy Dunlap) This pull has been tested by: dim apply-pull drm-intel-fixes < this_email.eml Zhi. The following changes since commit

[Intel-gfx] [PATCH v4 1/2] i915/gvt: Introduce the mmio_info_table.c to support VFIO new mdev API

2021-11-29 Thread Zhi Wang
From: Zhi Wang To support the new mdev interfaces and the re-factor patches from Christoph, which moves the GVT-g code into a dedicated module, the GVT-g initialization path has to be separated into two phases: a) Early initialization. The early initialization of GVT requires to be done when

[Intel-gfx] [PATCH v4 2/2] i915/gvt: save the MMIO snapshot in the early init of GVT-g

2021-11-29 Thread Zhi Wang
From: Zhi Wang To support the early init of GVT-g, which will be put in i915, after the GVT-g is moved into a dedicated module, we need to save the MMIO snapshot in the early init of GVT-g, when the HW hasn't been touched. v3: - Fix errors when CONFIG_DRM_I915_WERROR is turned on. (Jani) Cc

[Intel-gfx] [PATCH v3 1/2] i915/gvt: Introduce the mmio_info_table.c to support VFIO new mdev API

2021-11-26 Thread Zhi Wang
From: Zhi Wang To support the new mdev interfaces and the re-factor patches from Christoph, which moves the GVT-g code into a dedicated module, the GVT-g initialization path has to be seperated into two phases: a) Early initialization. The early initialization of GVT requires to be done when

[Intel-gfx] [PATCH v3 2/2] i915/gvt: save the MMIO snapshot in the early init of GVT-g

2021-11-26 Thread Zhi Wang
From: Zhi Wang To support the early init of GVT-g, which will be put in i915, after the GVT-g is moved into a dedicated module, we need to save the MMIO snapshot in the early init of GVT-g, when the HW hasn't been touched. v3: - Fix errors when CONFIG_DRM_I915_WERROR is turned on. (Jani) Cc

[Intel-gfx] [PATCH 2/2] i915/gvt: save the MMIO snapshot in the early init of GVT-g

2021-11-19 Thread Zhi Wang
From: Zhi Wang To support the early init of GVT-g, which will be put in i915, after the GVT-g is moved into a dedicated module, we need to save the MMIO snapshot in the early init of GVT-g, when the HW hasn't been touched. Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Jani Nikula Cc: Joonas

[Intel-gfx] [PATCH 1/2] i915/gvt: Introduce the mmio_info_table.c to support VFIO new mdev API

2021-11-19 Thread Zhi Wang
From: Zhi Wang To support the new mdev interfaces and the re-factor patches from Christoph, which moves the GVT-g code into a dedicated module, the GVT-g initialization path has to be seperated into two phases: a) Early initialization. The early initialization of GVT requires to be done when

[Intel-gfx] [PATCH 3/3] i915/gvt: Use the initial HW state snapshot saved in i915

2021-11-09 Thread Zhi Wang
From: Zhi Wang The code of saving initial HW state snapshot has been moved into i915. Let the GVT-g core logic use that snapshot. Cc: Joonas Lahtinen Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Zhenyu Wang Cc: Zhi Wang Cc: Christoph Hellwig Cc: Jason Gunthorpe Signed-off-by: Zhi Wang

[Intel-gfx] [PATCH 1/3] i915/gvt: seperate tracked MMIO table from handlers.c

2021-11-09 Thread Zhi Wang
From: Zhi Wang To support the new mdev interfaces and the re-factor patches from Christoph, which moves the GVT-g code into a dedicated module, the GVT-g MMIO snapshot still needs to be saved in i915 so that the inital clean HW state can be used for the further vGPU. Seperate the tracked MMIO

[Intel-gfx] [PATCH 2/3] i915/gvt: save the initial HW state snapshot in i915.

2021-11-09 Thread Zhi Wang
From: Zhi Wang Save the inital HW state snapshot in i915 so that the rest code of GVT-g can be moved into a dedicated module while it can still get a clean initial HW state saved at the correct time during the initialization of i915. The futhrer vGPU created by GVT-g will use this HW state

[Intel-gfx] [PATCH] drm/i915/gvt: Introduce per object locking in GVT scheduler.

2020-09-07 Thread Zhi Wang
-by: Zhi Wang --- drivers/gpu/drm/i915/gvt/scheduler.c | 68 ++-- 1 file changed, 57 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c index 1570eb8..fe7ee10 100644 --- a/drivers/gpu/drm/i915/gvt

Re: [Intel-gfx] [PATCH v4] drm/i915: Remove i915.enable_ppgtt override

2018-10-09 Thread Zhi Wang
This is ideal and had been discussed in the beginning of upstream. Mostly people didn't like this approach because it needs to modify i915 ppgtt code a lot and have to introduce a lot gvt-only code in i915 ppgtt. The idea of the series of Joonas patch is to make PPGTT selection per-platform.

Re: [Intel-gfx] [PATCH v4] drm/i915: Remove i915.enable_ppgtt override

2018-09-26 Thread Zhi Wang
Sure. Acked-by: Zhi Wang Meanwhile, I could send a patch to remove gen8_preallocate_top_level_pdp() in i915_gem_gtt.c, which is only used by vGPU with 32bit PPGTT (no one is going to use them after this patch is landed) Thanks, Zhi. On 09/26/18 04:02, Joonas Lahtinen wrote: Quoting He

Re: [Intel-gfx] [PATCH v4] drm/i915: Remove i915.enable_ppgtt override

2018-09-25 Thread Zhi Wang
Hi Min: I remembered the IOTG guest kernel is using aliasing-ppgtt in the last technical sharing (probably I didn't remember it correctly). Can you confirm? Also, thanks Joonas for the reminding. :) thanks, Zhi. On 09/25/18 09:22, Joonas Lahtinen wrote: + Zhi and Zhenyu For me the patch

Re: [Intel-gfx] [PULL] gvt-fixes for 4.19-rc5

2018-09-25 Thread Zhi Wang
Thanks for the reminder. :) So much appreciate. :) I just got two small code changes which hasn't been tested by QA. So I guess you can send the pull request first. Thanks again for the kindly reminding. :) thanks, Zhi. On 09/19/18 02:34, Joonas Lahtinen wrote: Just a reminder, if you are

Re: [Intel-gfx] Possible use_mm() mis-uses

2018-08-22 Thread Zhi Wang
Hi Linus: Thanks for letting us know that. We would fix this ASAP. The kvmgt.c module is a part of GVT-g code. It's our fault that we didn't find this mis-uses, not i915 or KVM guys. Wish they would feel better after seeing this message. Thanks, Zhi. On 08/23/18 00:44, Linus Torvalds

[Intel-gfx] [PULL] gvt-next for 4.18

2018-05-13 Thread Zhi Wang
m/i915/gvt: set max priority for gvt context" Zhao Yan (3): drm/i915/gvt: let NOPID be the default value of force_to_nonpriv registers drm/i915/gvt: do not return error on handling force_to_nonpriv registers drm/i915/gvt: let force_to_nonpriv cmd handler only valid for

Re: [Intel-gfx] [PULL] gvt-next for 4.18

2018-04-24 Thread Zhi Wang
this patch to enable host preemption. v2: - refine description(Zhenyu) Signed-off-by: Weinan Li <weinan.z...@intel.com> Signed-off-by: Zhenyu Wang <zhen...@linux.intel.com> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- has a dependency with the following patch which is m

Re: [Intel-gfx] [PULL] gvt-next for 4.18

2018-04-23 Thread Zhi Wang
Thanks! :) On 04/23/18 18:25, Jani Nikula wrote: On Mon, 23 Apr 2018, Zhi Wang <zhi.a.w...@intel.com> wrote: Hi Jani: I picked out the patch which causes conflicts and may put it back in the next back merge from drm-intel-next to gvt-next. So there shouldn't be any conflict in thi

Re: [Intel-gfx] [PULL] gvt-next for 4.18

2018-04-23 Thread Zhi Wang
Hi Jani: I picked out the patch which causes conflicts and may put it back in the next back merge from drm-intel-next to gvt-next. So there shouldn't be any conflict in this pull. Thanks for your efforts. Thanks, Zhi. On 04/23/18 16:11, Zhi Wang wrote: The following changes since commit

[Intel-gfx] [PULL] gvt-next for 4.18

2018-04-23 Thread Zhi Wang
The following changes since commit fadec6eefe232696c5c471b40df33e6db616e854: drm/i915: Update DRIVER_DATE to 20180413 (2018-04-13 12:20:58 +0300) are available in the git repository at: https://github.com/intel/gvt-linux.git tags/gvt-next-2018-04-23 for you to fetch changes up to

Re: [Intel-gfx] [PULL] gvt-next for 4.17

2018-04-19 Thread Zhi Wang
Weird. I try to apply the patches one by one on drm-intel-next-2018-04-13. I didn't get any conflicts... Let me dig more.. On 04/19/18 17:50, Zhi Wang wrote: Thanks, Let me discuss with Zhenyu about how to deal with this. It must be the git rebase I've done which causes the commiter change

Re: [Intel-gfx] [PULL] gvt-next for 4.17

2018-04-19 Thread Zhi Wang
Thanks, Let me discuss with Zhenyu about how to deal with this. It must be the git rebase I've done which causes the commiter change without new signoff-by. Thanks, Zhi. On 04/19/18 17:34, Jani Nikula wrote: On Thu, 19 Apr 2018, Zhi Wang <zhi.a.w...@intel.com> wrote: Hi: Here is th

Re: [Intel-gfx] [PULL] gvt-next for 4.17

2018-04-19 Thread Zhi Wang
Sorry it's gvt-next, so it should be for 4.18. Thanks, Zhi. On 04/19/18 17:17, Zhi Wang wrote: Hi: Here is the pull request of gvt-next for 4.17 with some new features and optimizations. Thanks, Zhi. -- The following changes since commit fadec6eefe232696c5c471b40df33e6db616e854: drm

[Intel-gfx] [PULL] gvt-next for 4.17

2018-04-19 Thread Zhi Wang
Hi: Here is the pull request of gvt-next for 4.17 with some new features and optimizations. Thanks, Zhi. -- The following changes since commit fadec6eefe232696c5c471b40df33e6db616e854: drm/i915: Update DRIVER_DATE to 20180413 (2018-04-13 12:20:58 +0300) are available in the git

[Intel-gfx] The behavior of i915_wait_request() after calling i915_gem_suspend_request()

2018-03-27 Thread Zhi Wang
Hi Chris and Joonas: Thanks for the discussion in the IRC for the suspend/resume request APIs. I just a bit curious about the behavior of i915_wait_request() after a caller suspend an i915 request. Will the caller of i915_wait_request() be woken up at this time? or not? This behavior

[Intel-gfx] [PULL] gvt-next-fixes for 4.16

2018-02-06 Thread Zhi Wang
Hi guys: Here are the latest gvt-next-fixes pull. It contains vGPU reset enhancement, which refines vGPU reset flow and the support of virtual aperture read/write when x-no-mmap=on is set in KVM, which is required by a test case from Redhat and also another fix for virtual OpRegion.

[Intel-gfx] [GIT PULL] gvt fix for 4.14-rc6

2017-10-26 Thread Zhi Wang
read handler Zhenyu Wang (1): drm/i915/gvt: properly check per_ctx bb valid state Zhi Wang (1): drm/i915/gvt: Refine MMIO_RING_F() drivers/gpu/drm/i915/gvt/cmd_parser.c | 3 ++ drivers/gpu/drm/i915/gvt/execlist.c | 3 +- drivers/gpu/drm/i915/gvt/handlers.c | 70

Re: [Intel-gfx] [PATCH] drm/i915/gvt: use ARRAY_SIZE

2017-10-23 Thread Zhi Wang
Thanks, applied! On 10/16/17 10:32, Jérémy Lefaure wrote: Using the ARRAY_SIZE macro improves the readability of the code. Also, it's useless to use a variable to store this constant calculated at compile time. Found with Coccinelle with the following semantic patch: @r depends on (org ||

Re: [Intel-gfx] [PATCH] drm/i915/gvt: Clean up dead code in cmd_parser

2017-10-23 Thread Zhi Wang
Thanks, applied! :) On 10/16/17 06:32, Christos Gkekas wrote: Delete variables 'gma_bottom' that are set but never used. Signed-off-by: Christos Gkekas --- drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[Intel-gfx] [GIT PULL] gvt fix for 4.14-rc5

2017-10-16 Thread Zhi Wang
Hi: Here is a fix of one bug for 4.14-rc5 which fixes a GPU hang after resuing one vGPU across different guest OSes. Thanks. --- The following changes since commit ea850f64c2722278f150dc11de2141baeb24211c: drm/i915/bios: parse DDI ports also for CHV for HDMI DDC pin and DP AUX channel

Re: [Intel-gfx] [PATCH 00/18] use ARRAY_SIZE macro

2017-10-02 Thread Zhi Wang
Thanks for the patch! :) 2017-10-01 22:30 GMT+03:00 Jérémy Lefaure : > Hi everyone, > Using ARRAY_SIZE improves the code readability. I used coccinelle (I > made a change to the array_size.cocci file [1]) to find several places > where ARRAY_SIZE could be used

[Intel-gfx] [PATCH v18 1/2] drm/i915: Do not allocate unused PPAT entries

2017-09-21 Thread Zhi Wang
<joonas.lahti...@linux.intel.com> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...@intel.com> Cc: Chris Wilson <ch...@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahti...@linu

[Intel-gfx] [PATCH v18 2/2] drm/i915/selftests: Introduce live tests of private PAT management

2017-09-21 Thread Zhi Wang
est case. (Chris) Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...@intel.com> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Suggested-by: Chris Wilson <ch...@chris-wilson.co.uk> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- dr

[Intel-gfx] [PATCH] drm/i915: Return the correct score in i915_ppat_get()

2017-09-21 Thread Zhi Wang
/i915: Introduce private PAT management") Cc: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...@intel.com> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zhi Wang <zhi.a.w...@in

[Intel-gfx] [PATCH 1/2] drm/i915/selftests: Refine the i915_ppat_get test case

2017-09-21 Thread Zhi Wang
daw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...@intel.com> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 28 +++ 1 file changed, 11 insertions(+

[Intel-gfx] [PATCH v18 1/2] drm/i915: Do not allocate unused PPAT entries

2017-09-21 Thread Zhi Wang
<joonas.lahti...@linux.intel.com> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...@intel.com> Cc: Chris Wilson <ch...@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahti...@linu

[Intel-gfx] [PATCH] drm/i915: Return the correct score in i915_ppat_get()

2017-09-18 Thread Zhi Wang
/i915: Introduce private PAT management") Cc: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...@intel.com> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zhi Wang <zhi.a.w...@in

[Intel-gfx] [PATCH v2 2/2] drm/i915: add lockdep_assert_held in i915_ppat_{get, put}

2017-09-14 Thread Zhi Wang
struct_mutext needs to be held before call these two APIs. Cc: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...@intel.com> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zhi Wa

[Intel-gfx] [PATCH v2 1/2] drm/i915: Return the correct score in i915_ppat_get()

2017-09-14 Thread Zhi Wang
Wilson <ch...@chris-wilson.co.uk> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...@intel.com> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/i915_gem_gtt.c |

[Intel-gfx] [PATCH 2/2] drm/i915: add lockdep_assert_held in i915_ppat_{get, put}

2017-09-14 Thread Zhi Wang
struct_mutext needs to be held before call these two APIs. Cc: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...@intel.com> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zhi Wa

[Intel-gfx] [PATCH 1/2] drm/i915: Fix a typo in i915_ppat_get()

2017-09-14 Thread Zhi Wang
Cc: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...@intel.com> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/i915_ge

[Intel-gfx] [PATCH v17 2/4] drm/i915: Remove the "INDEX" suffix from PPAT marcos

2017-09-14 Thread Zhi Wang
Remove the "INDEX" suffix from PPAT marcos as they are bits actually, not indexes. Suggested-by: Chris Wilson <ch...@chris-wilson.co.uk> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...

[Intel-gfx] [PATCH 1/2] drm/i915: Fix a typo in i915_ppat_get()

2017-09-14 Thread Zhi Wang
Cc: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...@intel.com> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/i915_ge

[Intel-gfx] [PATCH 2/2] drm/i915: add lockdep_assert_held in i915_ppat_{get, put}

2017-09-14 Thread Zhi Wang
struct_mutext needs to be held before call these two APIs. Cc: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...@intel.com> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zhi Wa

[Intel-gfx] [PATCH v17 1/4] drm/i915: Introduce private PAT management

2017-09-14 Thread Zhi Wang
ms which don't have PPAT. v3: - Introduce dirty bitmap for PPAT registers. (Chris) - Change the name of the pointer "dev_priv" to "i915". (Chris) - intel_ppat_{get, put} returns/takes a const intel_ppat_entry *. (Chris) v2: - API re-design. (Chris) Signed-off-by: Zhi Wang

[Intel-gfx] [PATCH v17 3/4] drm/i915: Do not allocate unused PPAT entries

2017-09-14 Thread Zhi Wang
Only PPAT entries 0/2/3/4 are using. Remove extra PPAT entry allocation during initialization. v8: - Move ppat_index() into i915_gem_gtt.c. (Chris) - Change the name of ppat_bits_to_index to ppat_index. Suggested-by: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zh

[Intel-gfx] [PATCH v17 1/4] drm/i915: Introduce private PAT management

2017-09-14 Thread Zhi Wang
ms which don't have PPAT. v3: - Introduce dirty bitmap for PPAT registers. (Chris) - Change the name of the pointer "dev_priv" to "i915". (Chris) - intel_ppat_{get, put} returns/takes a const intel_ppat_entry *. (Chris) v2: - API re-design. (Chris) Signed-off-by: Zhi Wang

[Intel-gfx] [PATCH v17 4/4] drm/i915/selftests: Introduce live tests of private PAT management

2017-09-14 Thread Zhi Wang
test case. (Chris) v9: - Refine generate_new_value(). (Chris) - Refine failure output. (Chris) - Refine test flow of "perfect match". (Chris) - Introduce another negative test case after "partial match". (Chris) v8: - Remove noisy output. (Chris) - Add negative test case. (C

[Intel-gfx] [PATCH v17 2/4] drm/i915: Remove the "INDEX" suffix from PPAT marcos

2017-09-14 Thread Zhi Wang
Remove the "INDEX" suffix from PPAT marcos as they are bits actually, not indexes. Suggested-by: Chris Wilson <ch...@chris-wilson.co.uk> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...

[Intel-gfx] [PATCH v16 4/4] drm/i915/selftests: Introduce live tests of private PAT management

2017-09-13 Thread Zhi Wang
test case. (Chris) v9: - Refine generate_new_value(). (Chris) - Refine failure output. (Chris) - Refine test flow of "perfect match". (Chris) - Introduce another negative test case after "partial match". (Chris) v8: - Remove noisy output. (Chris) - Add negative test case. (C

[Intel-gfx] [PATCH v16 3/4] drm/i915: Do not allocate unused PPAT entries

2017-09-13 Thread Zhi Wang
Only PPAT entries 0/2/3/4 are using. Remove extra PPAT entry allocation during initialization. v8: - Move ppat_index() into i915_gem_gtt.c. (Chris) - Change the name of ppat_bits_to_index to ppat_index. Suggested-by: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zh

[Intel-gfx] [PATCH v16 2/4] drm/i915: Remove the "INDEX" suffix from PPAT marcos

2017-09-13 Thread Zhi Wang
Remove the "INDEX" suffix from PPAT marcos as they are bits actually, not indexes. Suggested-by: Chris Wilson <ch...@chris-wilson.co.uk> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...

[Intel-gfx] [PATCH v16 1/4] drm/i915: Introduce private PAT management

2017-09-13 Thread Zhi Wang
for PPAT registers. (Chris) - Change the name of the pointer "dev_priv" to "i915". (Chris) - intel_ppat_{get, put} returns/takes a const intel_ppat_entry *. (Chris) v2: - API re-design. (Chris) Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> Cc: Ben Widawsky <benjamin

Re: [Intel-gfx] [PATCH v13 2/5] drm/i915: Introduce private PAT management

2017-09-12 Thread Zhi Wang
On 09/11/17 16:59, Joonas Lahtinen wrote: On Mon, 2017-09-11 at 12:26 +0800, Zhi Wang wrote: The private PAT management is to support PPAT entry manipulation. Two APIs are introduced for dynamically managing PPAT entries: intel_ppat_get and intel_ppat_put. intel_ppat_get will search

[Intel-gfx] [PATCH v2 7/9] drm/i915/gvt: Rename reserved ring buffer

2017-09-11 Thread Zhi Wang
"reserved" means reserve something from somewhere. Actually they are buffers used by command scanner. Rename it to ring_scan_buffer. v2: - Remove the usage of an extra variable. (Zhenyu) Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/gvt/c

[Intel-gfx] [PATCH v2 3/9] drm/i915/gvt: Move workload cache init/clean into intel_vgpu_{setup, clean}_submission()

2017-09-11 Thread Zhi Wang
Move vGPU workload cache initialization/de-initialization into intel_vgpu_{setup, clean}_submission() since they are not specific to execlist stuffs. Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/gvt/execlist.c | 15 +-- drivers/gpu/drm/i915/gvt/sched

[Intel-gfx] [PATCH v2 2/9] drm/i915/gvt: Rename intel_vgpu_{init, clean}_gvt_context()

2017-09-11 Thread Zhi Wang
To move workload related functions into scheduler.c, an expected way is to collect all the init/clean functions related to vGPU workload submission into fewer functions. Rename intel_vgpu_{init, clean}_gvt_context() for above usage in future. Signed-off-by: Zhi Wang <zhi.a.w...@intel.

[Intel-gfx] [PATCH v2 1/9] drm/i915/gvt: Make elsp_dwords in the right order

2017-09-11 Thread Zhi Wang
-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/gvt/execlist.c | 22 +++--- drivers/gpu/drm/i915/gvt/execlist.h | 8 drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i9

[Intel-gfx] [PATCH v2 9/9] drm/i915/gvt: Do not allocate initial ring scan buffer

2017-09-11 Thread Zhi Wang
chance to get the buffer of suitable size in the first submission. Tested on my SKL NUC. Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/gvt/execlist.c | 21 - drivers/gpu/drm/i915/gvt/gvt.h | 1 - 2 files changed, 22 deletions(-) diff

[Intel-gfx] [PATCH v2 4/9] drm/i915/gvt: Introduce intel_vgpu_submission

2017-09-11 Thread Zhi Wang
Introduce intel_vgpu_submission to hold all members related to submission in struct intel_vgpu before. Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/gvt/execlist.c | 30 +--- drivers/gpu/drm/i915/gvt/gvt.h | 17 + drivers/gpu/drm/i9

[Intel-gfx] [PATCH v2 6/9] drm/i915/gvt: Fix a memory leak in cmd_parser.c

2017-09-11 Thread Zhi Wang
The pointer points to the original memory can never take the return value of krealloc(). Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/gvt/cmd_parser.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/cmd_pa

[Intel-gfx] [PATCH v2 5/9] drm/i915/gvt: Move tlb_handle_pending into intel_vgpu_submission

2017-09-11 Thread Zhi Wang
Move tlb_handle_pending into intel_vgpu_submssion since it belongs to a part of vGPU submission stuffs Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/gvt/gvt.h | 2 +- drivers/gpu/drm/i915/gvt/handlers.c | 2 +- drivers/gpu/drm/i915/gvt/render.c

[Intel-gfx] [PATCH v2 8/9] drm/i915/gvt: Move ring scan buffers into intel_vgpu_submission

2017-09-11 Thread Zhi Wang
Move ring scan buffers into intel_vgpu_submission since they belongs to a part of vGPU submission stuffs. Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/gvt/cmd_parser.c | 11 ++- drivers/gpu/drm/i915/gvt/execlist.c | 23 +-- drivers/g

[Intel-gfx] [PATCH v14 5/5] drm/i915/selftests: Introduce live tests of private PAT management

2017-09-11 Thread Zhi Wang
test case. (Chris) v9: - Refine generate_new_value(). (Chris) - Refine failure output. (Chris) - Refine test flow of "perfect match". (Chris) - Introduce another negative test case after "partial match". (Chris) v8: - Remove noisy output. (Chris) - Add negative test case. (C

[Intel-gfx] [PATCH v14 4/5] drm/i915: Do not allocate unused PPAT entries

2017-09-11 Thread Zhi Wang
Only PPAT entries 0/2/3/4 are using. Remove extra PPAT entry allocation during initialization. v8: - Move ppat_index() into i915_gem_gtt.c. (Chris) - Change the name of ppat_bits_to_index to ppat_index. Suggested-by: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zh

[Intel-gfx] [PATCH v14 1/5] drm/i915: Factor out setup_private_pat()

2017-09-11 Thread Zhi Wang
Factor out setup_private_pat() for introducing the following patches. Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...@intel.com> Cc: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Joona

[Intel-gfx] [PATCH v14 2/5] drm/i915: Introduce private PAT management

2017-09-11 Thread Zhi Wang
(Chris) - intel_ppat_{get, put} returns/takes a const intel_ppat_entry *. (Chris) v2: - API re-design. (Chris) Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...@intel.com> Cc: Chris Wilson <

[Intel-gfx] [PATCH v14 3/5] drm/i915: Remove the "INDEX" suffix from PPAT marcos

2017-09-11 Thread Zhi Wang
Remove the "INDEX" suffix from PPAT marcos as they are bits actually, not indexes. Suggested-by: Chris Wilson <ch...@chris-wilson.co.uk> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...

[Intel-gfx] [PATCH v13 3/5] drm/i915: Remove the "INDEX" suffix from PPAT marcos

2017-09-10 Thread Zhi Wang
rigo.v...@intel.com> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/gvt/gtt.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 10 +- drivers/gpu/drm/i915/i915_gem_gtt.h | 8 3 files changed,

[Intel-gfx] [PATCH v13 5/5] drm/i915/selftests: Introduce live tests of private PAT management

2017-09-10 Thread Zhi Wang
Cc: Ben Widawsky <benjamin.widaw...@intel.com> Cc: Rodrigo Vivi <rodrigo.v...@intel.com> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Suggested-by: Chris Wilson <ch...@chris-wilson.co.uk> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v13 2/5] drm/i915: Introduce private PAT management

2017-09-10 Thread Zhi Wang
;ch...@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_gem_gtt.c | 279 +--- drivers/gpu/drm/i915/i915_gem_g

[Intel-gfx] [PATCH v13 1/5] drm/i915: Factor out setup_private_pat()

2017-09-10 Thread Zhi Wang
hris Wilson <ch...@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/i915_gem_gtt.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/

[Intel-gfx] [PATCH v13 4/5] drm/i915: Do not allocate unused PPAT entries

2017-09-10 Thread Zhi Wang
l.com> Cc: Chris Wilson <ch...@chris-wilson.co.uk> Suggested-by: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Signed-off-by: Zhi Wang <zhi.a.w...@intel.com> --- drivers/gpu/drm/i915/i915_gem_gtt.c | 53 +++-- 1 file changed, 27 insertions(+

  1   2   3   4   5   >