Skip to content

Commit 2828494

Browse files
committed
drm/i915/gvt: Fix port number for BDW on EDID region setup
Current BDW virtual display port is initialized as PORT_B, so need to use same port for VFIO EDID region, otherwise invalid EDID blob pointer is assigned which caused kernel null pointer reference. We might evaluate actual display hotplug for BDW to make this function work as expected, anyway this is always required to be fixed first. Reported-by: Alejandro Sior <aho@sior.be> Cc: Alejandro Sior <aho@sior.be> Fixes: 0178f4c ("drm/i915/gvt: Enable vfio edid for all GVT supported platform") Reviewed-by: Hang Yuan <hang.yuan@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20200914030302.2775505-1-zhenyuw@linux.intel.com
1 parent a291e4f commit 2828494

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • drivers/gpu/drm/i915/gvt

drivers/gpu/drm/i915/gvt/vgpu.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ void intel_gvt_destroy_idle_vgpu(struct intel_vgpu *vgpu)
367367
static struct intel_vgpu *__intel_gvt_create_vgpu(struct intel_gvt *gvt,
368368
struct intel_vgpu_creation_params *param)
369369
{
370+
struct drm_i915_private *dev_priv = gvt->gt->i915;
370371
struct intel_vgpu *vgpu;
371372
int ret;
372373

@@ -434,7 +435,10 @@ static struct intel_vgpu *__intel_gvt_create_vgpu(struct intel_gvt *gvt,
434435
if (ret)
435436
goto out_clean_sched_policy;
436437

437-
ret = intel_gvt_hypervisor_set_edid(vgpu, PORT_D);
438+
if (IS_BROADWELL(dev_priv))
439+
ret = intel_gvt_hypervisor_set_edid(vgpu, PORT_B);
440+
else
441+
ret = intel_gvt_hypervisor_set_edid(vgpu, PORT_D);
438442
if (ret)
439443
goto out_clean_sched_policy;
440444

0 commit comments

Comments
 (0)