Commit d53b8e19 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-intel-next-2022-05-06' of git://anongit.freedesktop.org/drm/drm-intel into drm-next



drm/i915 feature pull #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: default avatarDave Airlie <airlied@redhat.com>
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87bkwbkkdo.fsf@intel.com
parents 98bcaafd 949665a6
Loading
Loading
Loading
Loading
+5 −22
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ structure to represent a mediated device's driver::
     struct mdev_driver {
	     int  (*probe)  (struct mdev_device *dev);
	     void (*remove) (struct mdev_device *dev);
	     struct attribute_group **supported_type_groups;
	     struct device_driver    driver;
     };

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

    extern void mdev_unregister_driver(struct mdev_driver *drv);

The mediated bus driver is responsible for adding mediated devices to the VFIO
group when devices are bound to the driver and removing mediated devices from
the VFIO when devices are unbound from the driver.


Physical Device Driver Interface
--------------------------------

The physical device driver interface provides the mdev_parent_ops[3] structure
to define the APIs to manage work in the mediated core driver that is related
to the physical device.

The structures in the mdev_parent_ops structure are as follows:

* dev_attr_groups: attributes of the parent device
* mdev_attr_groups: attributes of the mediated device
* supported_config: attributes to define supported configurations
* device_driver: device driver to bind for mediated device instances

The mdev_parent_ops also still has various functions pointers.  Theses exist
for historical reasons only and shall not be used for new drivers.
The mediated bus driver's probe function should create a vfio_device on top of
the mdev_device and connect it to an appropriate implementation of
vfio_device_ops.

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

	extern int  mdev_register_device(struct device *dev,
	                                 const struct mdev_parent_ops *ops);
	                                 struct mdev_driver *mdev_driver);

This will provide the 'mdev_supported_types/XX/create' files which can then be
used to trigger the creation of a mdev_device. The created mdev_device will be
+1 −0
Original line number Diff line number Diff line
@@ -558,6 +558,7 @@ static const struct pci_device_id intel_early_ids[] __initconst = {
	INTEL_ADLP_IDS(&gen11_early_ops),
	INTEL_ADLN_IDS(&gen11_early_ops),
	INTEL_RPLS_IDS(&gen11_early_ops),
	INTEL_RPLP_IDS(&gen11_early_ops),
};

struct resource intel_graphics_stolen_res __ro_after_init = DEFINE_RES_MEM(0, 0);
+13 −23
Original line number Diff line number Diff line
@@ -106,40 +106,30 @@ config DRM_I915_USERPTR
	  If in doubt, say "Y".

config DRM_I915_GVT
	bool "Enable Intel GVT-g graphics virtualization host support"
	bool

config DRM_I915_GVT_KVMGT
	tristate "Enable KVM host support Intel GVT-g graphics virtualization"
	depends on DRM_I915
	depends on X86
	depends on 64BIT
	default n
	depends on KVM
	depends on VFIO_MDEV
	select DRM_I915_GVT
	select KVM_EXTERNAL_WRITE_TRACKING

	help
	  Choose this option if you want to enable Intel GVT-g graphics
	  virtualization technology host support with integrated graphics.
	  With GVT-g, it's possible to have one integrated graphics
	  device shared by multiple VMs under different hypervisors.

	  Note that at least one hypervisor like Xen or KVM is required for
	  this driver to work, and it only supports newer device from
	  Broadwell+. For further information and setup guide, you can
	  visit: http://01.org/igvt-g.
	  device shared by multiple VMs under KVM.

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

	  If in doubt, say "N".

config DRM_I915_GVT_KVMGT
	tristate "Enable KVM/VFIO support for Intel GVT-g"
	depends on DRM_I915_GVT
	depends on KVM
	depends on VFIO_MDEV
	select KVM_EXTERNAL_WRITE_TRACKING
	default n
	help
	  Choose this option if you want to enable KVMGT support for
	  Intel GVT-g.

config DRM_I915_PXP
	bool "Enable Intel PXP support"
	depends on DRM_I915
+5 −4
Original line number Diff line number Diff line
@@ -223,6 +223,7 @@ i915-y += \
	display/intel_cursor.o \
	display/intel_display.o \
	display/intel_display_power.o \
	display/intel_display_power_map.o \
	display/intel_display_power_well.o \
	display/intel_dmc.o \
	display/intel_dpio_phy.o \
@@ -331,13 +332,13 @@ i915-$(CONFIG_DRM_I915_SELFTEST) += \
# virtual gpu code
i915-y += i915_vgpu.o

ifeq ($(CONFIG_DRM_I915_GVT),y)
i915-y += intel_gvt.o
i915-$(CONFIG_DRM_I915_GVT) += \
	intel_gvt.o \
	intel_gvt_mmio_table.o
include $(src)/gvt/Makefile
endif

obj-$(CONFIG_DRM_I915) += i915.o
obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o
obj-$(CONFIG_DRM_I915_GVT_KVMGT) += kvmgt.o

# header test

+2 −1
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#include "intel_connector.h"
#include "intel_crtc.h"
#include "intel_de.h"
#include "intel_display_power.h"
#include "intel_display_types.h"
#include "intel_dp.h"
#include "intel_dp_link_training.h"
@@ -1375,7 +1376,7 @@ bool g4x_dp_init(struct drm_i915_private *dev_priv,
	dig_port->max_lanes = 4;

	intel_encoder->type = INTEL_OUTPUT_DP;
	intel_encoder->power_domain = intel_port_to_power_domain(port);
	intel_encoder->power_domain = intel_display_power_ddi_lanes_domain(dev_priv, port);
	if (IS_CHERRYVIEW(dev_priv)) {
		if (port == PORT_D)
			intel_encoder->pipe_mask = BIT(PIPE_C);
Loading