Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/gvt-next' into gvt-staging
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenyw committed Nov 11, 2022
2 parents 92b9d7a + 50468ca commit 812d8fa
Show file tree
Hide file tree
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
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/gvt/dmabuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/gvt/firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 1 addition & 6 deletions drivers/gpu/drm/i915/gvt/gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
*
*/
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/gvt/gvt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
4 changes: 0 additions & 4 deletions drivers/gpu/drm/i915/gvt/kvmgt.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,6 @@ static int intel_vgpu_open_device(struct vfio_device *vfio_dev)

intel_gvt_activate_vgpu(vgpu);

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

Expand All @@ -705,9 +704,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));
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/gvt/page_track.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/gvt/vgpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 812d8fa

Please sign in to comment.