Skip to content

Commit d7b7fd8

Browse files
committed
Merge remote-tracking branch 'drm-intel/drm-intel-next-queued' into drm-tip
# Conflicts: # drivers/gpu/drm/i915/intel_lrc.c
2 parents 7c2861b + c7d2959 commit d7b7fd8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2104
-792
lines changed

arch/x86/kernel/early-quirks.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,18 @@ static resource_size_t __init gen3_stolen_base(int num, int slot, int func,
338338
return bsm & INTEL_BSM_MASK;
339339
}
340340

341+
static resource_size_t __init gen11_stolen_base(int num, int slot, int func,
342+
resource_size_t stolen_size)
343+
{
344+
u64 bsm;
345+
346+
bsm = read_pci_config(num, slot, func, INTEL_GEN11_BSM_DW0);
347+
bsm &= INTEL_BSM_MASK;
348+
bsm |= (u64)read_pci_config(num, slot, func, INTEL_GEN11_BSM_DW1) << 32;
349+
350+
return bsm;
351+
}
352+
341353
static resource_size_t __init i830_stolen_size(int num, int slot, int func)
342354
{
343355
u16 gmch_ctrl;
@@ -498,6 +510,11 @@ static const struct intel_early_ops chv_early_ops __initconst = {
498510
.stolen_size = chv_stolen_size,
499511
};
500512

513+
static const struct intel_early_ops gen11_early_ops __initconst = {
514+
.stolen_base = gen11_stolen_base,
515+
.stolen_size = gen9_stolen_size,
516+
};
517+
501518
static const struct pci_device_id intel_early_ids[] __initconst = {
502519
INTEL_I830_IDS(&i830_early_ops),
503520
INTEL_I845G_IDS(&i845_early_ops),
@@ -529,6 +546,7 @@ static const struct pci_device_id intel_early_ids[] __initconst = {
529546
INTEL_CFL_IDS(&gen9_early_ops),
530547
INTEL_GLK_IDS(&gen9_early_ops),
531548
INTEL_CNL_IDS(&gen9_early_ops),
549+
INTEL_ICL_11_IDS(&gen11_early_ops),
532550
};
533551

534552
struct resource intel_graphics_stolen_res __ro_after_init = DEFINE_RES_MEM(0, 0);

drivers/gpu/drm/drm_gem.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,15 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
10361036
return -EACCES;
10371037
}
10381038

1039+
if (node->readonly) {
1040+
if (vma->vm_flags & VM_WRITE) {
1041+
drm_gem_object_put_unlocked(obj);
1042+
return -EINVAL;
1043+
}
1044+
1045+
vma->vm_flags &= ~VM_MAYWRITE;
1046+
}
1047+
10391048
ret = drm_gem_mmap_obj(obj, drm_vma_node_size(node) << PAGE_SHIFT,
10401049
vma);
10411050

0 commit comments

Comments
 (0)