Skip to content

Commit d53b8e1

Browse files
committed
Merge tag 'drm-intel-next-2022-05-06' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
drm/i915 feature pull rib#2 for v5.19: Features and functionality: - Add first set of DG2 PCI IDs for "motherboard down" designs (Matt Roper) - Add initial RPL-P PCI IDs as ADL-P subplatform (Matt Atwood) Refactoring and cleanups: - Power well refactoring and cleanup (Imre) - GVT-g refactor and mdev API cleanup (Christoph, Jason, Zhi) - DPLL refactoring and cleanup (Ville) - VBT panel specific data parsing cleanup (Ville) - Use drm_mode_init() for on-stack modes (Ville) Fixes: - Fix PSR state pipe A/B confusion by clearing more state on disable (José) - Fix FIFO underruns caused by not taking DRAM channel into account (Vinod) - Fix FBC flicker on display 11+ by enabling a workaround (José) - Fix VBT seamless DRRS min refresh rate check (Ville) - Fix panel type assumption on bogus VBT data (Ville) - Fix panel data parsing for VBT that misses panel data pointers block (Ville) - Fix spurious AUX timeout/hotplug handling on LTTPR links (Imre) Merges: - Backmerge drm-next (Jani) - GVT changes (Jani) Signed-off-by: Dave Airlie <[email protected]> From: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 98bcaaf + 949665a commit d53b8e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+7536
-8232
lines changed

Documentation/driver-api/vfio-mediated-device.rst

+5-22
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ structure to represent a mediated device's driver::
105105
struct mdev_driver {
106106
int (*probe) (struct mdev_device *dev);
107107
void (*remove) (struct mdev_device *dev);
108+
struct attribute_group **supported_type_groups;
108109
struct device_driver driver;
109110
};
110111

@@ -119,33 +120,15 @@ to register and unregister itself with the core driver:
119120

120121
extern void mdev_unregister_driver(struct mdev_driver *drv);
121122

122-
The mediated bus driver is responsible for adding mediated devices to the VFIO
123-
group when devices are bound to the driver and removing mediated devices from
124-
the VFIO when devices are unbound from the driver.
125-
126-
127-
Physical Device Driver Interface
128-
--------------------------------
129-
130-
The physical device driver interface provides the mdev_parent_ops[3] structure
131-
to define the APIs to manage work in the mediated core driver that is related
132-
to the physical device.
133-
134-
The structures in the mdev_parent_ops structure are as follows:
135-
136-
* dev_attr_groups: attributes of the parent device
137-
* mdev_attr_groups: attributes of the mediated device
138-
* supported_config: attributes to define supported configurations
139-
* device_driver: device driver to bind for mediated device instances
140-
141-
The mdev_parent_ops also still has various functions pointers. Theses exist
142-
for historical reasons only and shall not be used for new drivers.
123+
The mediated bus driver's probe function should create a vfio_device on top of
124+
the mdev_device and connect it to an appropriate implementation of
125+
vfio_device_ops.
143126

144127
When a driver wants to add the GUID creation sysfs to an existing device it has
145128
probe'd to then it should call::
146129

147130
extern int mdev_register_device(struct device *dev,
148-
const struct mdev_parent_ops *ops);
131+
struct mdev_driver *mdev_driver);
149132

150133
This will provide the 'mdev_supported_types/XX/create' files which can then be
151134
used to trigger the creation of a mdev_device. The created mdev_device will be

arch/x86/kernel/early-quirks.c

+1
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,7 @@ static const struct pci_device_id intel_early_ids[] __initconst = {
558558
INTEL_ADLP_IDS(&gen11_early_ops),
559559
INTEL_ADLN_IDS(&gen11_early_ops),
560560
INTEL_RPLS_IDS(&gen11_early_ops),
561+
INTEL_RPLP_IDS(&gen11_early_ops),
561562
};
562563

563564
struct resource intel_graphics_stolen_res __ro_after_init = DEFINE_RES_MEM(0, 0);

drivers/gpu/drm/i915/Kconfig

+13-23
Original file line numberDiff line numberDiff line change
@@ -106,40 +106,30 @@ config DRM_I915_USERPTR
106106
If in doubt, say "Y".
107107

108108
config DRM_I915_GVT
109-
bool "Enable Intel GVT-g graphics virtualization host support"
109+
bool
110+
111+
config DRM_I915_GVT_KVMGT
112+
tristate "Enable KVM host support Intel GVT-g graphics virtualization"
110113
depends on DRM_I915
111114
depends on X86
112115
depends on 64BIT
113-
default n
116+
depends on KVM
117+
depends on VFIO_MDEV
118+
select DRM_I915_GVT
119+
select KVM_EXTERNAL_WRITE_TRACKING
120+
114121
help
115122
Choose this option if you want to enable Intel GVT-g graphics
116123
virtualization technology host support with integrated graphics.
117124
With GVT-g, it's possible to have one integrated graphics
118-
device shared by multiple VMs under different hypervisors.
119-
120-
Note that at least one hypervisor like Xen or KVM is required for
121-
this driver to work, and it only supports newer device from
122-
Broadwell+. For further information and setup guide, you can
123-
visit: http://01.org/igvt-g.
125+
device shared by multiple VMs under KVM.
124126

125-
Now it's just a stub to support the modifications of i915 for
126-
GVT device model. It requires at least one MPT modules for Xen/KVM
127-
and other components of GVT device model to work. Use it under
128-
you own risk.
127+
Note that this driver only supports newer device from Broadwell on.
128+
For further information and setup guide, you can visit:
129+
http://01.org/igvt-g.
129130

130131
If in doubt, say "N".
131132

132-
config DRM_I915_GVT_KVMGT
133-
tristate "Enable KVM/VFIO support for Intel GVT-g"
134-
depends on DRM_I915_GVT
135-
depends on KVM
136-
depends on VFIO_MDEV
137-
select KVM_EXTERNAL_WRITE_TRACKING
138-
default n
139-
help
140-
Choose this option if you want to enable KVMGT support for
141-
Intel GVT-g.
142-
143133
config DRM_I915_PXP
144134
bool "Enable Intel PXP support"
145135
depends on DRM_I915

drivers/gpu/drm/i915/Makefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ i915-y += \
223223
display/intel_cursor.o \
224224
display/intel_display.o \
225225
display/intel_display_power.o \
226+
display/intel_display_power_map.o \
226227
display/intel_display_power_well.o \
227228
display/intel_dmc.o \
228229
display/intel_dpio_phy.o \
@@ -331,13 +332,13 @@ i915-$(CONFIG_DRM_I915_SELFTEST) += \
331332
# virtual gpu code
332333
i915-y += i915_vgpu.o
333334

334-
ifeq ($(CONFIG_DRM_I915_GVT),y)
335-
i915-y += intel_gvt.o
335+
i915-$(CONFIG_DRM_I915_GVT) += \
336+
intel_gvt.o \
337+
intel_gvt_mmio_table.o
336338
include $(src)/gvt/Makefile
337-
endif
338339

339340
obj-$(CONFIG_DRM_I915) += i915.o
340-
obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o
341+
obj-$(CONFIG_DRM_I915_GVT_KVMGT) += kvmgt.o
341342

342343
# header test
343344

drivers/gpu/drm/i915/display/g4x_dp.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "intel_connector.h"
1414
#include "intel_crtc.h"
1515
#include "intel_de.h"
16+
#include "intel_display_power.h"
1617
#include "intel_display_types.h"
1718
#include "intel_dp.h"
1819
#include "intel_dp_link_training.h"
@@ -1375,7 +1376,7 @@ bool g4x_dp_init(struct drm_i915_private *dev_priv,
13751376
dig_port->max_lanes = 4;
13761377

13771378
intel_encoder->type = INTEL_OUTPUT_DP;
1378-
intel_encoder->power_domain = intel_port_to_power_domain(port);
1379+
intel_encoder->power_domain = intel_display_power_ddi_lanes_domain(dev_priv, port);
13791380
if (IS_CHERRYVIEW(dev_priv)) {
13801381
if (port == PORT_D)
13811382
intel_encoder->pipe_mask = BIT(PIPE_C);

drivers/gpu/drm/i915/display/g4x_hdmi.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "intel_connector.h"
1111
#include "intel_crtc.h"
1212
#include "intel_de.h"
13+
#include "intel_display_power.h"
1314
#include "intel_display_types.h"
1415
#include "intel_dpio_phy.h"
1516
#include "intel_fifo_underrun.h"
@@ -574,7 +575,7 @@ void g4x_hdmi_init(struct drm_i915_private *dev_priv,
574575
intel_encoder->shutdown = intel_hdmi_encoder_shutdown;
575576

576577
intel_encoder->type = INTEL_OUTPUT_HDMI;
577-
intel_encoder->power_domain = intel_port_to_power_domain(port);
578+
intel_encoder->power_domain = intel_display_power_ddi_lanes_domain(dev_priv, port);
578579
intel_encoder->port = port;
579580
if (IS_CHERRYVIEW(dev_priv)) {
580581
if (port == PORT_D)

drivers/gpu/drm/i915/display/icl_dsi.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,8 @@ static void get_dsi_io_power_domains(struct drm_i915_private *dev_priv,
400400
intel_dsi->io_wakeref[port] =
401401
intel_display_power_get(dev_priv,
402402
port == PORT_A ?
403-
POWER_DOMAIN_PORT_DDI_A_IO :
404-
POWER_DOMAIN_PORT_DDI_B_IO);
403+
POWER_DOMAIN_PORT_DDI_IO_A :
404+
POWER_DOMAIN_PORT_DDI_IO_B);
405405
}
406406
}
407407

@@ -1426,8 +1426,8 @@ static void gen11_dsi_disable_io_power(struct intel_encoder *encoder)
14261426
wakeref = fetch_and_zero(&intel_dsi->io_wakeref[port]);
14271427
intel_display_power_put(dev_priv,
14281428
port == PORT_A ?
1429-
POWER_DOMAIN_PORT_DDI_A_IO :
1430-
POWER_DOMAIN_PORT_DDI_B_IO,
1429+
POWER_DOMAIN_PORT_DDI_IO_A :
1430+
POWER_DOMAIN_PORT_DDI_IO_B,
14311431
wakeref);
14321432
}
14331433

0 commit comments

Comments
 (0)