Rob Clark
95d1deb02a
drm/msm/gem: Add fenced vma unpin
...
With userspace allocated iova (next patch), we can have a race condition
where userspace observes the fence completion and deletes the vma before
retire_submit() gets around to unpinning the vma. To handle this, add a
fenced unpin which drops the refcount but tracks the fence, and update
msm_gem_vma_inuse() to check any previously unsignaled fences.
v2: Fix inuse underflow (duplicate unpin)
v3: Fix msm_job_run() vs submit_cleanup() race condition
Signed-off-by: Rob Clark <robdclark@chromium.org >
Link: https://lore.kernel.org/r/20220411215849.297838-10-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org >
2022-04-21 15:03:12 -07:00
Rob Clark
27674c6668
drm/msm/gem: Split vma lookup and pin
...
This way we only lookup vma once per object per submit, for both the
submit and retire path.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Link: https://lore.kernel.org/r/20220411215849.297838-9-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org >
2022-04-21 15:03:12 -07:00
Rob Clark
522f1abffe
drm/msm/gem: Rework vma lookup and pin
...
Combines duplicate vma lookup in the get_and_pin path.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com >
Link: https://lore.kernel.org/r/20220411215849.297838-8-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org >
2022-04-21 15:03:12 -07:00
Rob Clark
d413e6f971
drm/msm: Drop msm_gem_iova()
...
There was only a single user, which could just as easily stash the iova
when pinning.
v2: fix prepare->prepare->cleanup->cleanup sequences
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220411215849.297838-7-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org >
2022-04-21 15:03:11 -07:00
Rob Clark
2ee4b5d265
drm/msm/gem: Drop PAGE_SHIFT for address space mm
...
Get rid of all the unnecessary conversion between address/size and page
offsets. It just confuses things.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220411215849.297838-6-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org >
2022-04-21 15:03:11 -07:00
Rob Clark
ca35ab2a20
drm/msm/gem: Split out inuse helper
...
Prep for a following patch, where it gets a bit more complicated.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220411215849.297838-5-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org >
2022-04-21 15:03:11 -07:00
Rob Clark
8e30fa3239
drm/msm/gem: Convert some missed GEM_WARN_ON()s
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220411215849.297838-4-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org >
2022-04-21 15:03:11 -07:00
Rob Clark
f9d5355fa5
drm/msm/gpu: Drop duplicate fence counter
...
The ring seqno counter duplicates the fence-context last_fence counter.
They end up getting incremented in lock-step, on the same scheduler
thread, but the split just makes things less obvious.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Link: https://lore.kernel.org/r/20220411215849.297838-3-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org >
2022-04-21 15:03:11 -07:00
Rob Clark
695383a138
drm/msm/gem: Move prototypes
...
These belong more cleanly in the gem header.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220411215849.297838-2-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org >
2022-04-21 15:03:11 -07:00
Rob Clark
d4726d7700
drm/msm: Add a way to override processes comm/cmdline
...
In the cause of using the GPU via virtgpu, the host side process is
really a sort of proxy, and not terribly interesting from the PoV of
crash/fault logging. Add a way to override these per process so that
we can see the guest process's name.
v2: Handle kmalloc failure, add comment to explain kstrdup returns
NULL if passed NULL [Dan Carpenter]
Signed-off-by: Rob Clark <robdclark@chromium.org >
Link: https://lore.kernel.org/r/20220317165144.222101-4-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org >
2022-04-21 15:01:09 -07:00
Rob Clark
39ba0c0d6c
drm/msm: Split out helper to get comm/cmdline
...
Deduplicate this from fault_worker and recover_worker.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Link: https://lore.kernel.org/r/20220317165144.222101-3-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org >
2022-04-21 15:01:08 -07:00
Rob Clark
4bfba71640
drm/msm: Add support for pointer params
...
The 64b value field is already suffient to hold a pointer instead of
immediate, but we also need a length field.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Link: https://lore.kernel.org/r/20220317165144.222101-2-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org >
2022-04-21 15:01:08 -07:00
Rob Clark
1019933385
drm/msm: Remove unused field in submit
...
Noticed this was unused and never set.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Link: https://lore.kernel.org/r/20220225202614.225197-2-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org >
2022-04-21 15:00:28 -07:00
Bokun Zhang
e15c9d06e9
drm/amd/amdgpu: Update PF2VF header
...
- In the latest version of the header, there is a variable name change.
This should not cause any backward compatibility since the variable is
at the same offset in the struct.
Signed-off-by: Bokun Zhang <Bokun.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-21 16:00:14 -04:00
Bokun Zhang
451913e980
drm/amd/amdgpu: Properly indent PF2VF header
...
- Clean up the identation in the header file
Signed-off-by: Bokun Zhang <Bokun.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-21 16:00:09 -04:00
Bokun Zhang
c649287aba
drm/amd/amdgpu: Update MIT license in SRIOV msg header
...
- Update MIT license header
Signed-off-by: Bokun Zhang <Bokun.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-21 16:00:01 -04:00
Alex Deucher
72f05e3b96
drm/amdgpu/display: make hubp31_program_extended_blank static
...
It's not used outside of dcn31_hubp.c.
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-21 15:59:57 -04:00
Miaoqian Lin
e4f1e3a282
drm/amd/display: Fix memory leak in dcn21_clock_source_create
...
When dcn20_clk_src_construct() fails, we need to release clk_src.
Fixes: 6f4e6361c3 ("drm/amd/display: Add Renoir resource (v2)")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-21 15:59:52 -04:00
Haowen Bai
754fc1824b
drm/amd/display: Remove useless code
...
aux_rep only memset but no use at all, so we drop it.
Signed-off-by: Haowen Bai <baihaowen@meizu.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-21 15:59:46 -04:00
Alex Deucher
4020c22802
drm/amdgpu: don't runtime suspend if there are displays attached (v3)
...
We normally runtime suspend when there are displays attached if they
are in the DPMS off state, however, if something wakes the GPU
we send a hotplug event on resume (in case any displays were connected
while the GPU was in suspend) which can cause userspace to light
up the displays again soon after they were turned off.
Prior to
commit 087451f372 ("drm/amdgpu: use generic fb helpers instead of setting up AMD own's."),
the driver took a runtime pm reference when the fbdev emulation was
enabled because we didn't implement proper shadowing support for
vram access when the device was off so the device never runtime
suspended when there was a console bound. Once that commit landed,
we now utilize the core fb helper implementation which properly
handles the emulation, so runtime pm now suspends in cases where it did
not before. Ultimately, we need to sort out why runtime suspend in not
working in this case for some users, but this should restore similar
behavior to before.
v2: move check into runtime_suspend
v3: wake ups -> wakeups in comment, retain pm_runtime behavior in
runtime_idle callback
Fixes: 087451f372 ("drm/amdgpu: use generic fb helpers instead of setting up AMD own's.")
Link: https://lore.kernel.org/r/20220403132322.51c90903@darkstar.example.org/
Tested-by: Michele Ballabio <ballabio.m@gmail.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-21 15:59:37 -04:00
Lang Yu
515d7cebc2
Revert "drm/amdkfd: only allow heavy-weight TLB flush on some ASICs for SVM too"
...
This reverts commit 36bf93216e .
It causes SVM regressions on Vega10 with XNACK-ON. Just revert it
at the moment.
./kfdtest --gtest_filter=KFDSVMRangeTest.MigratePolicyTest
Signed-off-by: Lang Yu <Lang.Yu@amd.com >
Reviewed-by: Philip Yang<Philip.Yang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-21 15:58:31 -04:00
Candice Li
e50d9ba0d2
drm/amdgpu: Add debugfs TA load/unload/invoke support
...
v1:
Add debugfs support to load/unload/invoke TA in runtime.
v2:
1. Update some variables to static.
2. Use PAGE_ALIGN to calculate shared buf size directly.
3. Remove fp check.
4. Update debugfs from read to write.
Signed-off-by: John Clements <john.clements@amd.com >
Signed-off-by: Candice Li <candice.li@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-21 15:58:22 -04:00
Candice Li
fe96e5636a
drm/amdgpu: Use indirect buffer and save response status for TA load/invoke
...
The upcoming TA debugfs interface needs to use indirect buffer
when performing TA invoke and check psp response status for TA
load and invoke.
Signed-off-by: John Clements <john.clements@amd.com >
Signed-off-by: Candice Li <candice.li@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-21 15:58:10 -04:00
Tomas Winkler
f15856d7de
drm/i915/dg2: add gsc with special gsc bar offsets
...
DG2 uses different GSC offsets on memory bar
and uses PXP head (HECI1).
v2 (Daniele): Rebased to before the ATS patches
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com > #v1
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Reviewed-by: John Harrison <John.C.Harrison@Intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220419193314.526966-7-daniele.ceraolospurio@intel.com
2022-04-21 11:34:39 -07:00
Tomas Winkler
1e3dc1d862
drm/i915/gsc: add gsc as a mei auxiliary device
...
GSC is a graphics system controller, it provides
a chassis controller for graphics discrete cards.
There are two MEI interfaces in GSC: HECI1 and HECI2.
Both interfaces are on the BAR0 at offsets 0x00258000 and 0x00259000.
GSC is a GT Engine (class 4: instance 6). HECI1 interrupt is signaled
via bit 15 and HECI2 via bit 14 in the interrupt register.
This patch exports GSC as auxiliary device for mei driver to bind to
for HECI2 interface and prepares for HECI1 interface as
it will follow up soon.
CC: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Signed-off-by: Vitaly Lubart <vitaly.lubart@intel.com >
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220419193314.526966-2-daniele.ceraolospurio@intel.com
2022-04-21 11:33:56 -07:00
Rodrigo Vivi
e1e1f4e325
Merge drm/drm-next into drm-intel-gt-next
...
In order to get the GSC Support merged on drm-intel-gt-next
in a clean fashion we needed this ATS-M patch to avoid
conflict in i915_pci.c:
commit 412c942bdf ("drm/i915/ats-m: add ATS-M platform info")
--
Fixing a silent conflict on drivers/gpu/drm/i915/gt/intel_gt_gmch.c:
- if (!intel_vtd_active(i915))
+ if (!i915_vtd_active(i915))
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2022-04-21 13:48:26 -04:00
David Yat Sin
747eea0732
drm/amdkfd: CRIU add support for GWS queues
...
Add support to checkpoint/restore GWS (Global Wave Sync) queues.
Signed-off-by: David Yat Sin <david.yatsin@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-21 11:32:38 -04:00
David Yat Sin
ab4d51d47f
drm/amdkfd: Fix GWS queue count
...
dqm->gws_queue_count and pdd->qpd.mapped_gws_queue need to be updated
each time the queue gets evicted.
Fixes: b8020b0304 ("drm/amdkfd: Enable over-subscription with >1 GWS queue")
Signed-off-by: David Yat Sin <david.yatsin@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-21 11:30:42 -04:00
Jouni Högander
b4b157577c
drm/i915: Check EDID for HDR static metadata when choosing blc
...
We have now seen panel (XMG Core 15 e21 laptop) advertizing support
for Intel proprietary eDP backlight control via DPCD registers, but
actually working only with legacy pwm control.
This patch adds panel EDID check for possible HDR static metadata and
Intel proprietary eDP backlight control is used only if that exists.
Missing HDR static metadata is ignored if user specifically asks for
Intel proprietary eDP backlight control via enable_dpcd_backlight
parameter.
v2 :
- Ignore missing HDR static metadata if Intel proprietary eDP
backlight control is forced via i915.enable_dpcd_backlight
- Printout info message if panel is missing HDR static metadata and
support for Intel proprietary eDP backlight control is detected
Fixes: 4a8d79901d ("drm/i915/dp: Enable Intel's HDR backlight interface (only SDR for now)")
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5284
Cc: Lyude Paul <lyude@redhat.com >
Cc: Mika Kahola <mika.kahola@intel.com >
Cc: Jani Nikula <jani.nikula@intel.com >
Cc: Filippo Falezza <filippo.falezza@outlook.it >
Cc: stable@vger.kernel.org
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220413082826.120634-1-jouni.hogander@intel.com
Reviewed-by: Lyude Paul <lyude@redhat.com >
2022-04-21 16:57:01 +03:00
Yang Wang
8f97344aa0
drm/ttm: use kvcalloc() instead of kvmalloc_array() in ttm_tt v2
...
simplify programming with existing functions.
v2 (chk): minimal coding style cleanup
Signed-off-by: Yang Wang <KevinYang.Wang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220421123442.1834102-1-KevinYang.Wang@amd.com
Signed-off-by: Christian König <christian.koenig@amd.com >
2022-04-21 14:47:30 +02:00
Miaoqian Lin
9f15930bb2
drm/bridge: Fix error handling in analogix_dp_probe
...
In the error handling path, the clk_prepare_enable() function
call should be balanced by a corresponding 'clk_disable_unprepare()'
call, as already done in the remove function.
Fixes: 3424e3a4f8 ("drm: bridge: analogix/dp: split exynos dp driver to bridge directory")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com >
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220420011644.25730-1-linmq006@gmail.com
2022-04-21 14:22:47 +02:00
Jason Gunthorpe
6b42f491e1
vfio/mdev: Remove mdev_parent_ops
...
The last useful member in this struct is the supported_type_groups, move
it to the mdev_driver and delete mdev_parent_ops.
Replace it with mdev_driver as an argument to mdev_register_device()
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-33-hch@lst.de
Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
cba619cb0d
drm/i915/gvt: merge gvt.c into kvmgvt.c
...
The code in both files is deeply interconnected, so merge it and
keep a bunch of structures and functions static.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-30-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
978cf586ac
drm/i915/gvt: convert to use vfio_register_emulated_iommu_dev
...
This is straightforward conversion, the intel_vgpu already has a pointer
to the vfio_dev, which can be replaced with the embedded structure and
we can replace all the mdev_get_drvdata() with a simple container_of().
Based on an patch from Jason Gunthorpe.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-29-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
0e09f4066a
drm/i915/gvt: remove kvmgt_guest_{init,exit}
...
Merge these into their only callers.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-28-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
7f11e6893f
drm/i915/gvt: pass a struct intel_vgpu to the vfio read/write helpers
...
Pass the structure we actually care about instead of deriving it from
the mdev_device in the lower level code.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-27-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
4456641232
drm/i915/gvt: streamline intel_vgpu_create
...
Initialize variables at declaration time, avoid pointless gotos and
cater for the fact that intel_gvt_create_vgpu can't return NULL.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-26-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
37e4bdbd5b
drm/i915/gvt: remove the extra vfio_device refcounting for dmabufs
...
All the dmabufs are torn down when th VGPU is released, so there is
no need for extra refcounting here.
Based on an patch from Jason Gunthorpe.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-25-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
5f8f3fe67c
drm/i915/gvt: remove struct intel_gvt_mpt
...
Just call the initializion and exit functions directly and remove
this abstraction entirely.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-24-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
91879bbaf8
drm/i915/gvt: devirtualize dma_pin_guest_page
...
Just call the function directly and remove a pointless wrapper.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-23-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
8398eee85f
drm/i915/gvt: devirtualize ->dma_{,un}map_guest_page
...
Just call the functions directly. Also remove a pointless wrapper.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-22-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
4c2baaaf76
drm/i915/gvt: devirtualize ->{enable,disable}_page_track
...
Just call the kvmgt functions directly.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-21-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
4050dab598
drm/i915/gvt: devirtualize ->gfn_to_mfn
...
Just open code it in the only caller.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-20-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
bd73b4b193
drm/i915/gvt: devirtualize ->is_valid_gfn
...
Just call the code directly and move towards the callers.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-19-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
b3bece3495
drm/i915/gvt: devirtualize ->inject_msi
...
Just open code the MSI injection in a single place instead of going
through the method table.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-18-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
4c705ad0d7
drm/i915/gvt: devirtualize ->detach_vgpu
...
Just call the function directly.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-17-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
f9399b0e4a
drm/i915/gvt: devirtualize ->set_edid and ->set_opregion
...
Just call the code to setup the opregions and EDID data directly.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-16-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
fe902f0ce6
drm/i915/gvt: devirtualize ->{get,put}_vfio_device
...
Just open code the calls to the VFIO APIs.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-15-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
e3d7640eee
drm/i915/gvt: devirtualize ->{read,write}_gpa
...
Just call the VFIO functions directly instead of through the method
table.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-14-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00
Christoph Hellwig
3c340d0586
drm/i915/gvt: remove vgpu->handle
...
Always pass the actual vgpu structure instead of encoding it as a
"handle" and add a bool flag to denote if a VGPU is attached.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-13-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com >
2022-04-21 07:36:56 -04:00