Commit 7b7d2429 authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-intel-next-fixes-2023-02-27' of...

Merge tag 'drm-intel-next-fixes-2023-02-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-next

drm/i915 fixes for v6.3-rc1:
- Don't use stolen memory or BAR mappings for ring buffers with LLC
- Add inverted backlight quirk for HP 14-r206nv
- Fix GSI offset for MCR lookups
- GVT fixes (memleak, debugfs attributes, kconfig, typos)
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87cz5v2z0j.fsf@intel.com
parents 3d3921d1 5d2fdb25
...@@ -118,9 +118,6 @@ config DRM_I915_USERPTR ...@@ -118,9 +118,6 @@ config DRM_I915_USERPTR
If in doubt, say "Y". If in doubt, say "Y".
config DRM_I915_GVT
bool
config DRM_I915_GVT_KVMGT config DRM_I915_GVT_KVMGT
tristate "Enable KVM host support Intel GVT-g graphics virtualization" tristate "Enable KVM host support Intel GVT-g graphics virtualization"
depends on DRM_I915 depends on DRM_I915
...@@ -171,3 +168,6 @@ menu "drm/i915 Unstable Evolution" ...@@ -171,3 +168,6 @@ menu "drm/i915 Unstable Evolution"
depends on DRM_I915 depends on DRM_I915
source "drivers/gpu/drm/i915/Kconfig.unstable" source "drivers/gpu/drm/i915/Kconfig.unstable"
endmenu endmenu
config DRM_I915_GVT
bool
...@@ -199,6 +199,8 @@ static struct intel_quirk intel_quirks[] = { ...@@ -199,6 +199,8 @@ static struct intel_quirk intel_quirks[] = {
/* ECS Liva Q2 */ /* ECS Liva Q2 */
{ 0x3185, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time }, { 0x3185, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time },
{ 0x3184, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time }, { 0x3184, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time },
/* HP Notebook - 14-r206nv */
{ 0x0f31, 0x103c, 0x220f, quirk_invert_brightness },
}; };
void intel_init_quirks(struct drm_i915_private *i915) void intel_init_quirks(struct drm_i915_private *i915)
......
...@@ -559,12 +559,15 @@ static bool reg_needs_read_steering(struct intel_gt *gt, ...@@ -559,12 +559,15 @@ static bool reg_needs_read_steering(struct intel_gt *gt,
i915_mcr_reg_t reg, i915_mcr_reg_t reg,
enum intel_steering_type type) enum intel_steering_type type)
{ {
const u32 offset = i915_mmio_reg_offset(reg); u32 offset = i915_mmio_reg_offset(reg);
const struct intel_mmio_range *entry; const struct intel_mmio_range *entry;
if (likely(!gt->steering_table[type])) if (likely(!gt->steering_table[type]))
return false; return false;
if (IS_GSI_REG(offset))
offset += gt->uncore->gsi_offset;
for (entry = gt->steering_table[type]; entry->end; entry++) { for (entry = gt->steering_table[type]; entry->end; entry++) {
if (offset >= entry->start && offset <= entry->end) if (offset >= entry->start && offset <= entry->end)
return true; return true;
......
...@@ -53,7 +53,7 @@ int intel_ring_pin(struct intel_ring *ring, struct i915_gem_ww_ctx *ww) ...@@ -53,7 +53,7 @@ int intel_ring_pin(struct intel_ring *ring, struct i915_gem_ww_ctx *ww)
if (unlikely(ret)) if (unlikely(ret))
goto err_unpin; goto err_unpin;
if (i915_vma_is_map_and_fenceable(vma)) { if (i915_vma_is_map_and_fenceable(vma) && !HAS_LLC(vma->vm->i915)) {
addr = (void __force *)i915_vma_pin_iomap(vma); addr = (void __force *)i915_vma_pin_iomap(vma);
} else { } else {
int type = i915_coherent_map_type(vma->vm->i915, vma->obj, false); int type = i915_coherent_map_type(vma->vm->i915, vma->obj, false);
...@@ -98,7 +98,7 @@ void intel_ring_unpin(struct intel_ring *ring) ...@@ -98,7 +98,7 @@ void intel_ring_unpin(struct intel_ring *ring)
return; return;
i915_vma_unset_ggtt_write(vma); i915_vma_unset_ggtt_write(vma);
if (i915_vma_is_map_and_fenceable(vma)) if (i915_vma_is_map_and_fenceable(vma) && !HAS_LLC(vma->vm->i915))
i915_vma_unpin_iomap(vma); i915_vma_unpin_iomap(vma);
else else
i915_gem_object_unpin_map(vma->obj); i915_gem_object_unpin_map(vma->obj);
...@@ -116,7 +116,7 @@ static struct i915_vma *create_ring_vma(struct i915_ggtt *ggtt, int size) ...@@ -116,7 +116,7 @@ static struct i915_vma *create_ring_vma(struct i915_ggtt *ggtt, int size)
obj = i915_gem_object_create_lmem(i915, size, I915_BO_ALLOC_VOLATILE | obj = i915_gem_object_create_lmem(i915, size, I915_BO_ALLOC_VOLATILE |
I915_BO_ALLOC_PM_VOLATILE); I915_BO_ALLOC_PM_VOLATILE);
if (IS_ERR(obj) && i915_ggtt_has_aperture(ggtt)) if (IS_ERR(obj) && i915_ggtt_has_aperture(ggtt) && !HAS_LLC(i915))
obj = i915_gem_object_create_stolen(i915, size); obj = i915_gem_object_create_stolen(i915, size);
if (IS_ERR(obj)) if (IS_ERR(obj))
obj = i915_gem_object_create_internal(i915, size); obj = i915_gem_object_create_internal(i915, size);
......
...@@ -147,9 +147,9 @@ vgpu_scan_nonprivbb_set(void *data, u64 val) ...@@ -147,9 +147,9 @@ vgpu_scan_nonprivbb_set(void *data, u64 val)
return 0; return 0;
} }
DEFINE_SIMPLE_ATTRIBUTE(vgpu_scan_nonprivbb_fops, DEFINE_DEBUGFS_ATTRIBUTE(vgpu_scan_nonprivbb_fops,
vgpu_scan_nonprivbb_get, vgpu_scan_nonprivbb_set, vgpu_scan_nonprivbb_get, vgpu_scan_nonprivbb_set,
"0x%llx\n"); "0x%llx\n");
static int vgpu_status_get(void *data, u64 *val) static int vgpu_status_get(void *data, u64 *val)
{ {
...@@ -165,7 +165,7 @@ static int vgpu_status_get(void *data, u64 *val) ...@@ -165,7 +165,7 @@ static int vgpu_status_get(void *data, u64 *val)
return 0; return 0;
} }
DEFINE_SIMPLE_ATTRIBUTE(vgpu_status_fops, vgpu_status_get, NULL, "0x%llx\n"); DEFINE_DEBUGFS_ATTRIBUTE(vgpu_status_fops, vgpu_status_get, NULL, "0x%llx\n");
/** /**
* intel_gvt_debugfs_add_vgpu - register debugfs entries for a vGPU * intel_gvt_debugfs_add_vgpu - register debugfs entries for a vGPU
...@@ -180,10 +180,10 @@ void intel_gvt_debugfs_add_vgpu(struct intel_vgpu *vgpu) ...@@ -180,10 +180,10 @@ void intel_gvt_debugfs_add_vgpu(struct intel_vgpu *vgpu)
debugfs_create_file("mmio_diff", 0444, vgpu->debugfs, vgpu, debugfs_create_file("mmio_diff", 0444, vgpu->debugfs, vgpu,
&vgpu_mmio_diff_fops); &vgpu_mmio_diff_fops);
debugfs_create_file("scan_nonprivbb", 0644, vgpu->debugfs, vgpu, debugfs_create_file_unsafe("scan_nonprivbb", 0644, vgpu->debugfs, vgpu,
&vgpu_scan_nonprivbb_fops); &vgpu_scan_nonprivbb_fops);
debugfs_create_file("status", 0644, vgpu->debugfs, vgpu, debugfs_create_file_unsafe("status", 0644, vgpu->debugfs, vgpu,
&vgpu_status_fops); &vgpu_status_fops);
} }
/** /**
......
...@@ -171,7 +171,7 @@ static int verify_firmware(struct intel_gvt *gvt, ...@@ -171,7 +171,7 @@ static int verify_firmware(struct intel_gvt *gvt,
mem = (fw->data + h->cfg_space_offset); mem = (fw->data + h->cfg_space_offset);
id = *(u16 *)(mem + PCI_VENDOR_ID); id = *(u16 *)(mem + PCI_VENDOR_ID);
VERIFY("vender id", id, pdev->vendor); VERIFY("vendor id", id, pdev->vendor);
id = *(u16 *)(mem + PCI_DEVICE_ID); id = *(u16 *)(mem + PCI_DEVICE_ID);
VERIFY("device id", id, pdev->device); VERIFY("device id", id, pdev->device);
......
...@@ -699,7 +699,7 @@ static void intel_vgpu_close_device(struct vfio_device *vfio_dev) ...@@ -699,7 +699,7 @@ static void intel_vgpu_close_device(struct vfio_device *vfio_dev)
clear_bit(INTEL_VGPU_STATUS_ATTACHED, vgpu->status); clear_bit(INTEL_VGPU_STATUS_ATTACHED, vgpu->status);
debugfs_remove(debugfs_lookup(KVMGT_DEBUGFS_FILENAME, vgpu->debugfs)); debugfs_lookup_and_remove(KVMGT_DEBUGFS_FILENAME, vgpu->debugfs);
kvm_page_track_unregister_notifier(vgpu->vfio_device.kvm, kvm_page_track_unregister_notifier(vgpu->vfio_device.kvm,
&vgpu->track_node); &vgpu->track_node);
......
...@@ -323,7 +323,7 @@ int intel_gvt_create_vgpu(struct intel_vgpu *vgpu, ...@@ -323,7 +323,7 @@ int intel_gvt_create_vgpu(struct intel_vgpu *vgpu,
ret = idr_alloc(&gvt->vgpu_idr, vgpu, IDLE_VGPU_IDR + 1, GVT_MAX_VGPU, ret = idr_alloc(&gvt->vgpu_idr, vgpu, IDLE_VGPU_IDR + 1, GVT_MAX_VGPU,
GFP_KERNEL); GFP_KERNEL);
if (ret < 0) if (ret < 0)
goto out_unlock;; goto out_unlock;
vgpu->id = ret; vgpu->id = ret;
vgpu->sched_ctl.weight = conf->weight; vgpu->sched_ctl.weight = conf->weight;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment