forked from luck/tmp_suning_uos_patched
Merge tag 'drm-intel-fixes-2020-09-24' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
drm/i915 fixes for v5.9-rc7: - Fix selftest reference to stack data out of scope - Fix GVT null pointer dereference - Backmerge from Linus' master to fix build Signed-off-by: Dave Airlie <airlied@redhat.com> From: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/87zh5fpmha.fsf@intel.com
This commit is contained in:
commit
f3231a02aa
|
@ -368,6 +368,7 @@ void intel_gvt_destroy_idle_vgpu(struct intel_vgpu *vgpu)
|
|||
static struct intel_vgpu *__intel_gvt_create_vgpu(struct intel_gvt *gvt,
|
||||
struct intel_vgpu_creation_params *param)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = gvt->gt->i915;
|
||||
struct intel_vgpu *vgpu;
|
||||
int ret;
|
||||
|
||||
|
@ -436,7 +437,10 @@ static struct intel_vgpu *__intel_gvt_create_vgpu(struct intel_gvt *gvt,
|
|||
if (ret)
|
||||
goto out_clean_sched_policy;
|
||||
|
||||
ret = intel_gvt_hypervisor_set_edid(vgpu, PORT_D);
|
||||
if (IS_BROADWELL(dev_priv))
|
||||
ret = intel_gvt_hypervisor_set_edid(vgpu, PORT_B);
|
||||
else
|
||||
ret = intel_gvt_hypervisor_set_edid(vgpu, PORT_D);
|
||||
if (ret)
|
||||
goto out_clean_sched_policy;
|
||||
|
||||
|
|
|
@ -118,11 +118,11 @@ static struct dev_pm_domain pm_domain = {
|
|||
|
||||
struct drm_i915_private *mock_gem_device(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_IOMMU_API) && defined(CONFIG_INTEL_IOMMU)
|
||||
static struct dev_iommu fake_iommu = { .priv = (void *)-1 };
|
||||
#endif
|
||||
struct drm_i915_private *i915;
|
||||
struct pci_dev *pdev;
|
||||
#if IS_ENABLED(CONFIG_IOMMU_API) && defined(CONFIG_INTEL_IOMMU)
|
||||
struct dev_iommu iommu;
|
||||
#endif
|
||||
int err;
|
||||
|
||||
pdev = kzalloc(sizeof(*pdev), GFP_KERNEL);
|
||||
|
@ -141,10 +141,8 @@ struct drm_i915_private *mock_gem_device(void)
|
|||
dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
|
||||
|
||||
#if IS_ENABLED(CONFIG_IOMMU_API) && defined(CONFIG_INTEL_IOMMU)
|
||||
/* HACK HACK HACK to disable iommu for the fake device; force identity mapping */
|
||||
memset(&iommu, 0, sizeof(iommu));
|
||||
iommu.priv = (void *)-1;
|
||||
pdev->dev.iommu = &iommu;
|
||||
/* HACK to disable iommu for the fake device; force identity mapping */
|
||||
pdev->dev.iommu = &fake_iommu;
|
||||
#endif
|
||||
|
||||
pci_set_drvdata(pdev, i915);
|
||||
|
|
Loading…
Reference in New Issue
Block a user