mirror of https://gitee.com/openkylin/linux.git
Only fixes coming from gvt containing "Two more BXT fixes from Colin,
one srcu locking fix and one fix for GGTT clear when destroy vGPU." -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJbomjjAAoJEPpiX2QO6xPKlaMH/0sp97hPs11qVzYNrKk3Znh8 DJaI9IzRWfmSwLbfnpyywK7VqqErUltRSwUW+R8X2FqLXeG4shni154/jRdIMy1a zx7Or/8fIyvVbCEJteMvn+Lv+8ucm8tTG3YL9JqQj7blyo3T1JbtA8zsIoVgug3T pf4niyqcoO1plpZUsrnGKHmdrhUG+oGUkG6AWOBS8NlGgobvFY5nviyfVhdLEyG1 JZRjruFRnVNmyIgyUCHwSN9ILO6DDykMW6xpqv7CIm8eLcImetHQvwfgEsl8mMUq SCT5EoUEnzSJrlRHkzoso4X7slM35wJ/JNnCN3NsmznWSs3FoIuFt3R3qsD8GlE= =XeR4 -----END PGP SIGNATURE----- Merge tag 'drm-intel-fixes-2018-09-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Only fixes coming from gvt containing "Two more BXT fixes from Colin, one srcu locking fix and one fix for GGTT clear when destroy vGPU." Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180919151915.GA6309@intel.com
This commit is contained in:
commit
8ca4fff974
|
@ -3210,6 +3210,7 @@ static int init_bxt_mmio_info(struct intel_gvt *gvt)
|
|||
MMIO_D(BXT_DSI_PLL_ENABLE, D_BXT);
|
||||
|
||||
MMIO_D(GEN9_CLKGATE_DIS_0, D_BXT);
|
||||
MMIO_D(GEN9_CLKGATE_DIS_4, D_BXT);
|
||||
|
||||
MMIO_D(HSW_TVIDEO_DIP_GCP(TRANSCODER_A), D_BXT);
|
||||
MMIO_D(HSW_TVIDEO_DIP_GCP(TRANSCODER_B), D_BXT);
|
||||
|
|
|
@ -1833,6 +1833,8 @@ static bool kvmgt_is_valid_gfn(unsigned long handle, unsigned long gfn)
|
|||
{
|
||||
struct kvmgt_guest_info *info;
|
||||
struct kvm *kvm;
|
||||
int idx;
|
||||
bool ret;
|
||||
|
||||
if (!handle_valid(handle))
|
||||
return false;
|
||||
|
@ -1840,8 +1842,11 @@ static bool kvmgt_is_valid_gfn(unsigned long handle, unsigned long gfn)
|
|||
info = (struct kvmgt_guest_info *)handle;
|
||||
kvm = info->kvm;
|
||||
|
||||
return kvm_is_visible_gfn(kvm, gfn);
|
||||
idx = srcu_read_lock(&kvm->srcu);
|
||||
ret = kvm_is_visible_gfn(kvm, gfn);
|
||||
srcu_read_unlock(&kvm->srcu, idx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct intel_gvt_mpt kvmgt_mpt = {
|
||||
|
|
|
@ -244,6 +244,34 @@ void intel_vgpu_reset_mmio(struct intel_vgpu *vgpu, bool dmlr)
|
|||
|
||||
/* set the bit 0:2(Core C-State ) to C0 */
|
||||
vgpu_vreg_t(vgpu, GEN6_GT_CORE_STATUS) = 0;
|
||||
|
||||
if (IS_BROXTON(vgpu->gvt->dev_priv)) {
|
||||
vgpu_vreg_t(vgpu, BXT_P_CR_GT_DISP_PWRON) &=
|
||||
~(BIT(0) | BIT(1));
|
||||
vgpu_vreg_t(vgpu, BXT_PORT_CL1CM_DW0(DPIO_PHY0)) &=
|
||||
~PHY_POWER_GOOD;
|
||||
vgpu_vreg_t(vgpu, BXT_PORT_CL1CM_DW0(DPIO_PHY1)) &=
|
||||
~PHY_POWER_GOOD;
|
||||
vgpu_vreg_t(vgpu, BXT_PHY_CTL_FAMILY(DPIO_PHY0)) &=
|
||||
~BIT(30);
|
||||
vgpu_vreg_t(vgpu, BXT_PHY_CTL_FAMILY(DPIO_PHY1)) &=
|
||||
~BIT(30);
|
||||
vgpu_vreg_t(vgpu, BXT_PHY_CTL(PORT_A)) &=
|
||||
~BXT_PHY_LANE_ENABLED;
|
||||
vgpu_vreg_t(vgpu, BXT_PHY_CTL(PORT_A)) |=
|
||||
BXT_PHY_CMNLANE_POWERDOWN_ACK |
|
||||
BXT_PHY_LANE_POWERDOWN_ACK;
|
||||
vgpu_vreg_t(vgpu, BXT_PHY_CTL(PORT_B)) &=
|
||||
~BXT_PHY_LANE_ENABLED;
|
||||
vgpu_vreg_t(vgpu, BXT_PHY_CTL(PORT_B)) |=
|
||||
BXT_PHY_CMNLANE_POWERDOWN_ACK |
|
||||
BXT_PHY_LANE_POWERDOWN_ACK;
|
||||
vgpu_vreg_t(vgpu, BXT_PHY_CTL(PORT_C)) &=
|
||||
~BXT_PHY_LANE_ENABLED;
|
||||
vgpu_vreg_t(vgpu, BXT_PHY_CTL(PORT_C)) |=
|
||||
BXT_PHY_CMNLANE_POWERDOWN_ACK |
|
||||
BXT_PHY_LANE_POWERDOWN_ACK;
|
||||
}
|
||||
} else {
|
||||
#define GVT_GEN8_MMIO_RESET_OFFSET (0x44200)
|
||||
/* only reset the engine related, so starting with 0x44200
|
||||
|
|
|
@ -281,6 +281,7 @@ void intel_gvt_destroy_vgpu(struct intel_vgpu *vgpu)
|
|||
intel_vgpu_clean_submission(vgpu);
|
||||
intel_vgpu_clean_display(vgpu);
|
||||
intel_vgpu_clean_opregion(vgpu);
|
||||
intel_vgpu_reset_ggtt(vgpu, true);
|
||||
intel_vgpu_clean_gtt(vgpu);
|
||||
intel_gvt_hypervisor_detach_vgpu(vgpu);
|
||||
intel_vgpu_free_resource(vgpu);
|
||||
|
|
Loading…
Reference in New Issue