aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-04-25drm/i915: Add crtc .crtc_get_shared_dpll()Ville Syrjälä3-1/+52
Start splitting the .compute_crtc_clock() into two parts; one part does the computation, the second part does the shared dpll assignment. I want to move the actual computation part much earlier into the compute_config() phase. v2: dg2_crtc_get_shared_dpll() not needed (Jani) Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2022-04-25drm/i915: Split out dg2_crtc_compute_clock()Ville Syrjälä1-4/+18
DG2 doesn't currently used the shared_dpll stuff so let's just split it out from hsw_crtc_compute_clock() entirely. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2022-04-25drm/i915: Clear the dpll_hw_state when disabling a pipeVille Syrjälä1-3/+3
Clear the dpll_hw_state when we're about disable the pipe. Previously it looks like we just left the old junk in there. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2022-04-25drm/i915: Move the dpll_hw_state clearing to intel_dpll_crtc_compute_clock()Ville Syrjälä2-36/+3
All .crtc_compute_clock() implementations do the same memset() to clear the dpll_hw_state (since we preserve it across intel_crtc_prepare_cleared_state()). Move the memset() to the common wrapper. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2022-04-25drm/i915: Move stuff into intel_dpll_crtc_compute_clock()Ville Syrjälä2-2/+11
Move some checks into intel_dpll_crtc_compute_clock() from the caller. Avoids the caller from having to worry about all this crap. We'll also reorder the hw.enable vs. shared_dpll checks since it makes sense to sanity check that we've cleared out the old shared_dpll even if the pipe is getting disabled. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2022-04-25drm/i915: Adjust .crtc_compute_clock() calling conventionVille Syrjälä3-36/+53
Pass the full atomic state+crtc rather than the redundant crtc+crtc_state pair. We already need the full atomic state in the hsw+ codepath anyway. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2022-04-25drm/i915: Remove pointless dpll_funcs checksVille Syrjälä1-4/+0
All platforms have dpll_funcs. Remove the pointless NULL checks. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2022-04-25drm/i915: Pass dev_priv to intel_shared_dpll_init()Ville Syrjälä3-8/+6
Stop passing around the drm_device and just pass the dev_priv instead. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2022-04-25drm/i915: Make .get_dplls() return intVille Syrjälä3-130/+132
Get rid of the confusing back and forth between bools and ints in the .get_dplls() stuff. Just make everything return an int. Initial conversion done with cocci, with some manual fixups on top: @find@ identifier func !~ "get_hw_state|_is_|needed"; typedef bool; parameter list[N] P; @@ - bool + int func(P) { <... ( - return true; + return 0; | - return false; + return -EINVAL; ) ...> } @@ identifier find.func; expression list[find.N] E; expression X; @@ - if (!func(E)) + ret = func(E); + if (ret) { ... - return X; + return ret; } @@ identifier find.func; expression X; expression list[find.N] E; @@ - if (!func(E)) + ret = func(E); + if (ret) - return X; + return ret; @@ identifier find.func; expression list[find.N] E; expression O, X; typedef bool; bool B; @@ - B = func(E); - if (O && !B) + if (O) { + ret = func(E); + if (ret) - return X; + return ret; + } @@ identifier find.func; expression list[find.N] E; expression O, X; @@ - if (O && !func(E)) + if (O) { + ret = func(E); + if (ret) - return X; + return ret; + } @@ identifier find.func; expression list[find.N] E; expression X; typedef bool; bool B; @@ - B = func(E); - if (!B) + ret = func(E); + if (ret) { ... - return X; + return ret; } Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2022-04-25drm/i915/fbc: s/false/0/Ville Syrjälä1-4/+4
intel_fbc_check_plane() is supposed to an int, not a boolean. So replace the bogus 'return false's with the correct 'return 0's. These were accidental copy-paste mistakes when the code got moved into intel_fbc_check_plane() from somewhere else tht did return a boolean. No functional issue here since false==0. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Manasi Navare <[email protected]>
2022-04-25drm/i915/fbc: Consult hw.crtc instead of uapi.crtcVille Syrjälä1-1/+1
plane_state->uapi.crtc is not what we want to be looking at. If bigjoiner is used hw.crtc is what tells us what crtc the plane is supposedly using. Not an actual problem on current hardware as the only FBC capable pipe (A) can't be a bigjoiner slave and thus uapi.crtc==hw.crtc always here. But when we get more FBC instances this will become actually important. Fixes: 2e6c99f88679 ("drm/i915/fbc: Nuke lots of crap from intel_fbc_state_cache") Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Manasi Navare <[email protected]>
2022-04-25drm/i915: Fix SEL_FETCH_PLANE_*(PIPE_B+) register addressesImre Deak1-1/+1
Fix typo in the _SEL_FETCH_PLANE_BASE_1_B register base address. Fixes: a5523e2ff074a5 ("drm/i915: Add PSR2 selective fetch registers") References: https://gitlab.freedesktop.org/drm/intel/-/issues/5400 Cc: José Roberto de Souza <[email protected]> Cc: <[email protected]> # v5.9+ Signed-off-by: Imre Deak <[email protected]> Reviewed-by: José Roberto de Souza <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2022-04-25Merge tag 'gvt-next-2022-04-21-for-christoph' of ↵Jani Nikula42-3138/+2531
https://github.com/intel/gvt-linux into drm-intel-next gvt-next-2022-04-21-for-christoph - Separating the MMIO table from GVT-g. (Zhi) - GVT-g re-factor. (Christoph) - GVT-g mdev API cleanup. (Jason) - GVT-g trace/makefile cleanup. (Jani) [Jani: added #include to adapt to header refactoring in drm-intel-next] Signed-off-by: Jani Nikula <[email protected]> From: "Wang, Zhi A" <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2022-04-21drm/i915: Check EDID for HDR static metadata when choosing blcJouni Högander1-8/+26
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: 4a8d79901d5b ("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 <[email protected]> Cc: Mika Kahola <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Filippo Falezza <[email protected]> Cc: [email protected] Signed-off-by: Jouni Högander <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Lyude Paul <[email protected]>
2022-04-21vfio/mdev: Remove mdev drvdataJason Gunthorpe1-9/+0
This is no longer used, remove it. All usages were moved over to either use container_of() from a vfio_device or to use dev_drvdata() directly on the mdev. Signed-off-by: Jason Gunthorpe <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Kirti Wankhede <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21vfio/mdev: Use the driver core to create the 'remove' fileJason Gunthorpe3-9/+13
The device creator is supposed to use the dev.groups value to add sysfs files before device_add is called, not call sysfs_create_files() after device_add() returns. This creates a race with uevent delivery where the extra attribute will not be visible. This was being done because the groups had been co-opted by the mdev driver, now that prior patches have moved the driver's groups to the struct device_driver the dev.group is properly free for use here. Signed-off-by: Jason Gunthorpe <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Kirti Wankhede <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21vfio/mdev: Remove mdev_parent_opsJason Gunthorpe11-92/+28
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 <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Kirti Wankhede <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21vfio/mdev: Remove mdev_parent_ops dev_attr_groupsJason Gunthorpe3-41/+3
This is only used by one sample to print a fixed string that is pointless. In general, having a device driver attach sysfs attributes to the parent is horrific. This should never happen, and always leads to some kind of liftime bug as it become very difficult for the sysfs attribute to go back to any data owned by the device driver. Remove the general mechanism to create this abuse. Signed-off-by: Jason Gunthorpe <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Kirti Wankhede <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21vfio/mdev: Remove vfio_mdev.cJason Gunthorpe7-251/+6
Now that all mdev drivers directly create their own mdev_device driver and directly register with the vfio core's vfio_device_ops this is all dead code. Delete vfio_mdev.c and the mdev_parent_ops members that are connected to it. Signed-off-by: Jason Gunthorpe <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Kirti Wankhede <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: merge gvt.c into kvmgvt.cChristoph Hellwig4-302/+260
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 <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: convert to use vfio_register_emulated_iommu_devChristoph Hellwig2-90/+102
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 <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: remove kvmgt_guest_{init,exit}Christoph Hellwig1-69/+60
Merge these into their only callers. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: pass a struct intel_vgpu to the vfio read/write helpersChristoph Hellwig1-14/+14
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 <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: streamline intel_vgpu_createChristoph Hellwig1-19/+9
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 <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: remove the extra vfio_device refcounting for dmabufsChristoph Hellwig2-13/+0
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 <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: remove struct intel_gvt_mptChristoph Hellwig5-169/+17
Just call the initializion and exit functions directly and remove this abstraction entirely. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: devirtualize dma_pin_guest_pageChristoph Hellwig5-33/+3
Just call the function directly and remove a pointless wrapper. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: devirtualize ->dma_{,un}map_guest_pageChristoph Hellwig6-57/+17
Just call the functions directly. Also remove a pointless wrapper. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: devirtualize ->{enable,disable}_page_trackChristoph Hellwig5-38/+9
Just call the kvmgt functions directly. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: devirtualize ->gfn_to_mfnChristoph Hellwig4-35/+5
Just open code it in the only caller. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: devirtualize ->is_valid_gfnChristoph Hellwig4-37/+18
Just call the code directly and move towards the callers. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: devirtualize ->inject_msiChristoph Hellwig4-63/+39
Just open code the MSI injection in a single place instead of going through the method table. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: devirtualize ->detach_vgpuChristoph Hellwig5-20/+3
Just call the function directly. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: devirtualize ->set_edid and ->set_opregionChristoph Hellwig5-42/+8
Just call the code to setup the opregions and EDID data directly. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: devirtualize ->{get,put}_vfio_deviceChristoph Hellwig4-59/+7
Just open code the calls to the VFIO APIs. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: devirtualize ->{read,write}_gpaChristoph Hellwig10-97/+72
Just call the VFIO functions directly instead of through the method table. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: remove vgpu->handleChristoph Hellwig5-116/+71
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 <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: merge struct kvmgt_guest_info into strut intel_vgpuChristoph Hellwig2-73/+52
Consolidate the per-VGPU structures into a single one. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: merge struct kvmgt_vdev into struct intel_vgpuChristoph Hellwig5-216/+128
Move towards having only a single structure for the per-VGPU state. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: remove the unused from_virt_to_mfn opChristoph Hellwig3-19/+0
Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: remove the map_gfn_to_mfn and set_trap_area opsChristoph Hellwig3-120/+17
The map_gfn_to_mfn and set_trap_area ops are never defined, so remove them and clean up code that depends on them in the callers. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: remove intel_gvt_opsChristoph Hellwig5-69/+19
Remove these pointless indirect alls by just calling the only instance of each method directly. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: move the gvt code into kvmgt.koChristoph Hellwig12-153/+192
Instead of having an option to build the gvt code into the main i915 module, just move it into the kvmgt.ko module. This only requires a new struct with three entries that the KVMGT modules needs to register with the main i915 module, and a proper list of GVT-enabled devices instead of global device pointer. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: rename intel_vgpu_ops to intel_vgpu_mdev_opsChristoph Hellwig1-3/+3
Free the intel_vgpu_ops symbol name for something that fits better. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: remove enum hypervisor_typeChristoph Hellwig5-141/+34
The only supported hypervisor is KVM, so don't bother with dead code enumerating hypervisors. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: remove module refcounting in intel_gvt_{,un}register_hypervisorChristoph Hellwig1-6/+0
THIS_MODULE always is reference when a symbol called by it is used, so don't bother with the additional reference. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Zhi Wang <[email protected]>
2022-04-21drm/i915/gvt: better align the Makefile with i915 MakefileJani Nikula2-10/+26
Drop extra ccflags, drop extra intermediate variables, list object files one per line alphabetically. Cc: Zhi Wang <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/8bc0895376c077156a671e24ac6a5c75b7db4c9c.1649852517.git.jani.nikula@intel.com Reviewed-by: Zhi Wang <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
2022-04-21drm/i915/gvt: fix trace TRACE_INCLUDE_PATHJani Nikula1-1/+1
TRACE_INCLUDE_PATH should be a path relative to define_trace.h, not the file including it. (See the comment in include/trace/define_trace.h.) Cc: Zhi Wang <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/48b772795b7ab674f609ecad53b4882c66a8262a.1649852517.git.jani.nikula@intel.com Reviewed-by: Zhi Wang <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
2022-04-21i915/gvt: Use the initial HW state snapshot saved in i915Zhi Wang1-16/+9
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 <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Vivi Rodrigo <[email protected]> Cc: Zhenyu Wang <[email protected]> Cc: Zhi Wang <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Tested-by: Christoph Hellwig <[email protected]> Reviewed-by: Zhenyu Wang <[email protected]> Acked-by: Jani Nikula <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2022-04-21i915/gvt: Save the initial HW state snapshot in i915Zhi Wang2-2/+92
Save the initial 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 as the initial HW state. v6: - Remove the reference of intel_gvt_device_info.(Christoph) - Refine the save_mmio() function. (Christoph) Cc: Christoph Hellwig <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Vivi Rodrigo <[email protected]> Cc: Zhenyu Wang <[email protected]> Cc: Zhi Wang <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Tested-by: Christoph Hellwig <[email protected]> Reviewed-by: Zhenyu Wang <[email protected]> Acked-by: Jani Nikula <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]