Skip to content

Commit

Permalink
Merge tag 'gvt-next-2022-11-17' of https://github.com/intel/gvt-linux
Browse files Browse the repository at this point in the history
…into drm-intel-next

gvt-next-2022-11-17

- kernel doc fixes
- remove vgpu->released sanity check
- small clean up

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
From: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221117064106.GT30028@zhen-hp.sh.intel.com
  • Loading branch information
Rodrigo Vivi committed Nov 17, 2022

Unverified

No user is associated with the committer email.
2 parents 36d3571 + 04ec334 commit 164312d
Showing 8 changed files with 8 additions and 19 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/gvt/cfg_space.c
Original file line number Diff line number Diff line change
@@ -244,7 +244,7 @@ static void emulate_pci_bar_write(struct intel_vgpu *vgpu, unsigned int offset,
}

/**
* intel_vgpu_emulate_cfg_read - emulate vGPU configuration space write
* intel_vgpu_emulate_cfg_write - emulate vGPU configuration space write
* @vgpu: target vgpu
* @offset: offset
* @p_data: write data ptr
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/gvt/dmabuf.h
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ struct intel_vgpu_fb_info {
struct intel_vgpu_dmabuf_obj *obj;
};

/**
/*
* struct intel_vgpu_dmabuf_obj- Intel vGPU device buffer object
*/
struct intel_vgpu_dmabuf_obj {
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/gvt/firmware.c
Original file line number Diff line number Diff line change
@@ -104,7 +104,7 @@ static int expose_firmware_sysfs(struct intel_gvt *gvt)

memcpy(p, gvt->firmware.mmio, info->mmio_size);

crc32_start = offsetof(struct gvt_firmware_header, crc32) + 4;
crc32_start = offsetof(struct gvt_firmware_header, version);
h->crc32 = crc32_le(0, firmware + crc32_start, size - crc32_start);

firmware_attr.size = size;
7 changes: 1 addition & 6 deletions drivers/gpu/drm/i915/gvt/gtt.c
Original file line number Diff line number Diff line change
@@ -282,11 +282,6 @@ static inline int get_next_pt_type(int type)
return gtt_type_table[type].next_pt_type;
}

static inline int get_pt_type(int type)
{
return gtt_type_table[type].pt_type;
}

static inline int get_entry_type(int type)
{
return gtt_type_table[type].entry_type;
@@ -2785,7 +2780,7 @@ int intel_gvt_init_gtt(struct intel_gvt *gvt)
* intel_gvt_clean_gtt - clean up mm components of a GVT device
* @gvt: GVT device
*
* This function is called at the driver unloading stage, to clean up the
* This function is called at the driver unloading stage, to clean up
* the mm components of a GVT device.
*
*/
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/gvt/gvt.h
Original file line number Diff line number Diff line change
@@ -227,8 +227,6 @@ struct intel_vgpu {
unsigned long nr_cache_entries;
struct mutex cache_lock;

atomic_t released;

struct kvm_page_track_notifier_node track_node;
#define NR_BKT (1 << 18)
struct hlist_head ptable[NR_BKT];
4 changes: 0 additions & 4 deletions drivers/gpu/drm/i915/gvt/kvmgt.c
Original file line number Diff line number Diff line change
@@ -684,7 +684,6 @@ static int intel_vgpu_open_device(struct vfio_device *vfio_dev)

intel_gvt_activate_vgpu(vgpu);

atomic_set(&vgpu->released, 0);
return 0;
}

@@ -706,9 +705,6 @@ static void intel_vgpu_close_device(struct vfio_device *vfio_dev)
if (!vgpu->attached)
return;

if (atomic_cmpxchg(&vgpu->released, 0, 1))
return;

intel_gvt_release_vgpu(vgpu);

debugfs_remove(debugfs_lookup(KVMGT_DEBUGFS_FILENAME, vgpu->debugfs));
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/gvt/page_track.c
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ int intel_vgpu_enable_page_track(struct intel_vgpu *vgpu, unsigned long gfn)
}

/**
* intel_vgpu_enable_page_track - cancel write-protection on guest page
* intel_vgpu_disable_page_track - cancel write-protection on guest page
* @vgpu: a vGPU
* @gfn: the gfn of guest page
*
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/gvt/vgpu.c
Original file line number Diff line number Diff line change
@@ -158,7 +158,7 @@ void intel_gvt_clean_vgpu_types(struct intel_gvt *gvt)
}

/**
* intel_gvt_active_vgpu - activate a virtual GPU
* intel_gvt_activate_vgpu - activate a virtual GPU
* @vgpu: virtual GPU
*
* This function is called when user wants to activate a virtual GPU.
@@ -172,7 +172,7 @@ void intel_gvt_activate_vgpu(struct intel_vgpu *vgpu)
}

/**
* intel_gvt_deactive_vgpu - deactivate a virtual GPU
* intel_gvt_deactivate_vgpu - deactivate a virtual GPU
* @vgpu: virtual GPU
*
* This function is called when user wants to deactivate a virtual GPU.
@@ -295,7 +295,7 @@ struct intel_vgpu *intel_gvt_create_idle_vgpu(struct intel_gvt *gvt)
}

/**
* intel_gvt_destroy_vgpu - destroy an idle virtual GPU
* intel_gvt_destroy_idle_vgpu - destroy an idle virtual GPU
* @vgpu: virtual GPU
*
* This function is called when user wants to destroy an idle virtual GPU.

0 comments on commit 164312d

Please sign in to comment.