Skip to content

Commit b1c4f7f

Browse files
committed
Merge tag 'drm-intel-next-2019-04-17' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
UAPI Changes: - uAPI "Fixes:" patch for the upcoming kernel 5.1, included here too We have an Ack from the media folks (only current user) for this late tweak Cross-subsystem Changes: - ALSA: hda: Fix racy display power access (Takashi, Chris) Driver Changes: - DDI and MIPI-DSI clocks fixes for Icelake (Vandita) - Fix Icelake frequency change/locking (RPS) (Mika) - Temporarily disable ppGTT read-only bit on Icelake (Mika) - Add missing Icelake W/As (Mika) - Enable 12 deep CSB status FIFO on Icelake (Mika) - Inherit more Icelake code for Elkhartlake (Bob, Jani) - Handle catastrophic error on engine reset (Mika) - Shortcut readiness to reset check (Mika) - Regression fix for GEM_BUSY causing us to report a mixed uabi-class request as not busy (Chris) - Revert back to max link rate and lane count on eDP (Jani) - Fix pipe BPP readout for BXT/GLK DSI (Ville) - Set DP min_bpp to 8*3 for non-RGB output formats (Ville) - Enable coarse preemption boundaries for Gen8 (Chris) - Do not enable FEC without DSC (Ville) - Restore correct BXT DDI latency optim setting calculation (Ville) - Always reset context's RING registers to avoid running workload twice during reset (Chris) - Set GPU wedged on driver unload (Janusz) - Consolidate two similar barries from timeline into one (Chris) - Only reset the pinned kernel contexts on resume (Chris) - Wakeref tracking improvements (Chris, Imre) - Lockdep fixes for shrinker interactions (Chris) - Bump ready tasks ahead of busywaits in prep of semaphore use (Chris) - Huge step in splitting display code into fine grained files (Jani) - Refactor the IRQ init/reset macros for code saving (Paulo) - Convert IRQ initialization code to uncore MMIO access (Paulo) - Convert workarounds code to use uncore MMIO access (Chris) - Nuke drm_crtc_state and use intel_atomic_state instead (Manasi) - Update SKL clock-gating WA (Radhakrishna, Ville) - Isolate GuC reset code flow (Chris) - Expose force_dsc_enable through debugfs (Manasi) - Header standalone compile testing framework (Jani) - Code cleanups to reduce driver footprint (Chris) - PSR code fixes and cleanups (Jose) - Sparse and kerneldoc updates (Chris) - Suppress spurious combo PHY B warning (Vile) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190418080426.GA6409@jlahtine-desk.ger.corp.intel.com
2 parents b3edf49 + ad2c467 commit b1c4f7f

142 files changed

Lines changed: 4429 additions & 2237 deletions

File tree

Some content is hidden

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

‎arch/x86/kernel/early-quirks.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,8 @@ static const struct pci_device_id intel_early_ids[] __initconst = {
525525
INTEL_I945G_IDS(&gen3_early_ops),
526526
INTEL_I945GM_IDS(&gen3_early_ops),
527527
INTEL_VLV_IDS(&gen6_early_ops),
528-
INTEL_PINEVIEW_IDS(&gen3_early_ops),
528+
INTEL_PINEVIEW_G_IDS(&gen3_early_ops),
529+
INTEL_PINEVIEW_M_IDS(&gen3_early_ops),
529530
INTEL_I965G_IDS(&gen3_early_ops),
530531
INTEL_G33_IDS(&gen3_early_ops),
531532
INTEL_I965GM_IDS(&gen3_early_ops),
@@ -547,6 +548,7 @@ static const struct pci_device_id intel_early_ids[] __initconst = {
547548
INTEL_GLK_IDS(&gen9_early_ops),
548549
INTEL_CNL_IDS(&gen9_early_ops),
549550
INTEL_ICL_11_IDS(&gen11_early_ops),
551+
INTEL_EHL_IDS(&gen11_early_ops),
550552
};
551553

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

‎drivers/gpu/drm/i915/.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
header_test_*.c

‎drivers/gpu/drm/i915/Makefile‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@ CFLAGS_intel_fbdev.o = $(call cc-disable-warning, override-init)
3232
subdir-ccflags-y += \
3333
$(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
3434

35+
# Extra header tests
36+
include $(src)/Makefile.header-test
37+
3538
# Please keep these build lists sorted!
3639

3740
# core driver code
38-
i915-y := i915_drv.o \
41+
i915-y += i915_drv.o \
3942
i915_irq.o \
4043
i915_memcpy.o \
4144
i915_mm.o \
@@ -57,15 +60,6 @@ i915-$(CONFIG_COMPAT) += i915_ioc32.o
5760
i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o intel_pipe_crc.o
5861
i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
5962

60-
# Test the headers are compilable as standalone units
61-
i915-$(CONFIG_DRM_I915_WERROR) += \
62-
test_i915_active_types_standalone.o \
63-
test_i915_gem_context_types_standalone.o \
64-
test_i915_timeline_types_standalone.o \
65-
test_intel_context_types_standalone.o \
66-
test_intel_engine_types_standalone.o \
67-
test_intel_workarounds_types_standalone.o
68-
6963
# GEM code
7064
i915-y += \
7165
i915_active.o \
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# SPDX-License-Identifier: MIT
2+
# Copyright © 2019 Intel Corporation
3+
4+
# Test the headers are compilable as standalone units
5+
header_test := \
6+
i915_active_types.h \
7+
i915_gem_context_types.h \
8+
i915_priolist_types.h \
9+
i915_scheduler_types.h \
10+
i915_timeline_types.h \
11+
intel_atomic_plane.h \
12+
intel_audio.h \
13+
intel_cdclk.h \
14+
intel_color.h \
15+
intel_connector.h \
16+
intel_context_types.h \
17+
intel_crt.h \
18+
intel_csr.h \
19+
intel_ddi.h \
20+
intel_dp.h \
21+
intel_dvo.h \
22+
intel_engine_types.h \
23+
intel_fbc.h \
24+
intel_fbdev.h \
25+
intel_frontbuffer.h \
26+
intel_hdcp.h \
27+
intel_hdmi.h \
28+
intel_lspcon.h \
29+
intel_lvds.h \
30+
intel_panel.h \
31+
intel_pipe_crc.h \
32+
intel_pm.h \
33+
intel_psr.h \
34+
intel_sdvo.h \
35+
intel_sprite.h \
36+
intel_tv.h \
37+
intel_workarounds_types.h
38+
39+
quiet_cmd_header_test = HDRTEST $@
40+
cmd_header_test = echo "\#include \"$(<F)\"" > $@
41+
42+
header_test_%.c: %.h
43+
$(call cmd,header_test)
44+
45+
i915-$(CONFIG_DRM_I915_WERROR) += $(foreach h,$(header_test),$(patsubst %.h,header_test_%.o,$(h)))
46+
47+
clean-files += $(foreach h,$(header_test),$(patsubst %.h,header_test_%.c,$(h)))

‎drivers/gpu/drm/i915/gvt/cmd_parser.c‎

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,7 @@ static int cmd_handler_pipe_control(struct parser_exec_state *s)
10771077
bool index_mode = false;
10781078
unsigned int post_sync;
10791079
int ret = 0;
1080+
u32 hws_pga, val;
10801081

10811082
post_sync = (cmd_val(s, 1) & PIPE_CONTROL_POST_SYNC_OP_MASK) >> 14;
10821083

@@ -1100,6 +1101,15 @@ static int cmd_handler_pipe_control(struct parser_exec_state *s)
11001101
index_mode = true;
11011102
ret |= cmd_address_audit(s, gma, sizeof(u64),
11021103
index_mode);
1104+
if (ret)
1105+
return ret;
1106+
if (index_mode) {
1107+
hws_pga = s->vgpu->hws_pga[s->ring_id];
1108+
gma = hws_pga + gma;
1109+
patch_value(s, cmd_ptr(s, 2), gma);
1110+
val = cmd_val(s, 1) & (~(1 << 21));
1111+
patch_value(s, cmd_ptr(s, 1), val);
1112+
}
11031113
}
11041114
}
11051115
}
@@ -1317,8 +1327,14 @@ static int gen8_update_plane_mmio_from_mi_display_flip(
13171327
info->tile_val << 10);
13181328
}
13191329

1320-
vgpu_vreg_t(vgpu, PIPE_FRMCOUNT_G4X(info->pipe))++;
1321-
intel_vgpu_trigger_virtual_event(vgpu, info->event);
1330+
if (info->plane == PLANE_PRIMARY)
1331+
vgpu_vreg_t(vgpu, PIPE_FLIPCOUNT_G4X(info->pipe))++;
1332+
1333+
if (info->async_flip)
1334+
intel_vgpu_trigger_virtual_event(vgpu, info->event);
1335+
else
1336+
set_bit(info->event, vgpu->irq.flip_done_event[info->pipe]);
1337+
13221338
return 0;
13231339
}
13241340

@@ -1563,6 +1579,7 @@ static int cmd_handler_mi_flush_dw(struct parser_exec_state *s)
15631579
unsigned long gma;
15641580
bool index_mode = false;
15651581
int ret = 0;
1582+
u32 hws_pga, val;
15661583

15671584
/* Check post-sync and ppgtt bit */
15681585
if (((cmd_val(s, 0) >> 14) & 0x3) && (cmd_val(s, 1) & (1 << 2))) {
@@ -1573,6 +1590,15 @@ static int cmd_handler_mi_flush_dw(struct parser_exec_state *s)
15731590
if (cmd_val(s, 0) & (1 << 21))
15741591
index_mode = true;
15751592
ret = cmd_address_audit(s, gma, sizeof(u64), index_mode);
1593+
if (ret)
1594+
return ret;
1595+
if (index_mode) {
1596+
hws_pga = s->vgpu->hws_pga[s->ring_id];
1597+
gma = hws_pga + gma;
1598+
patch_value(s, cmd_ptr(s, 1), gma);
1599+
val = cmd_val(s, 0) & (~(1 << 21));
1600+
patch_value(s, cmd_ptr(s, 0), val);
1601+
}
15761602
}
15771603
/* Check notify bit */
15781604
if ((cmd_val(s, 0) & (1 << 8)))

‎drivers/gpu/drm/i915/gvt/display.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,6 @@ static void emulate_vblank_on_pipe(struct intel_vgpu *vgpu, int pipe)
407407
if (!pipe_is_enabled(vgpu, pipe))
408408
continue;
409409

410-
vgpu_vreg_t(vgpu, PIPE_FLIPCOUNT_G4X(pipe))++;
411410
intel_vgpu_trigger_virtual_event(vgpu, event);
412411
}
413412

‎drivers/gpu/drm/i915/gvt/execlist.c‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -526,12 +526,13 @@ static void init_vgpu_execlist(struct intel_vgpu *vgpu, int ring_id)
526526
vgpu_vreg(vgpu, ctx_status_ptr_reg) = ctx_status_ptr.dw;
527527
}
528528

529-
static void clean_execlist(struct intel_vgpu *vgpu, unsigned long engine_mask)
529+
static void clean_execlist(struct intel_vgpu *vgpu,
530+
intel_engine_mask_t engine_mask)
530531
{
531-
unsigned int tmp;
532532
struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv;
533533
struct intel_engine_cs *engine;
534534
struct intel_vgpu_submission *s = &vgpu->submission;
535+
intel_engine_mask_t tmp;
535536

536537
for_each_engine_masked(engine, dev_priv, engine_mask, tmp) {
537538
kfree(s->ring_scan_buffer[engine->id]);
@@ -541,18 +542,18 @@ static void clean_execlist(struct intel_vgpu *vgpu, unsigned long engine_mask)
541542
}
542543

543544
static void reset_execlist(struct intel_vgpu *vgpu,
544-
unsigned long engine_mask)
545+
intel_engine_mask_t engine_mask)
545546
{
546547
struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv;
547548
struct intel_engine_cs *engine;
548-
unsigned int tmp;
549+
intel_engine_mask_t tmp;
549550

550551
for_each_engine_masked(engine, dev_priv, engine_mask, tmp)
551552
init_vgpu_execlist(vgpu, engine->id);
552553
}
553554

554555
static int init_execlist(struct intel_vgpu *vgpu,
555-
unsigned long engine_mask)
556+
intel_engine_mask_t engine_mask)
556557
{
557558
reset_execlist(vgpu, engine_mask);
558559
return 0;

‎drivers/gpu/drm/i915/gvt/execlist.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,6 @@ int intel_vgpu_init_execlist(struct intel_vgpu *vgpu);
180180
int intel_vgpu_submit_execlist(struct intel_vgpu *vgpu, int ring_id);
181181

182182
void intel_vgpu_reset_execlist(struct intel_vgpu *vgpu,
183-
unsigned long engine_mask);
183+
intel_engine_mask_t engine_mask);
184184

185185
#endif /*_GVT_EXECLIST_H_*/

‎drivers/gpu/drm/i915/gvt/gtt.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2504,6 +2504,7 @@ static void clean_spt_oos(struct intel_gvt *gvt)
25042504
list_for_each_safe(pos, n, &gtt->oos_page_free_list_head) {
25052505
oos_page = container_of(pos, struct intel_vgpu_oos_page, list);
25062506
list_del(&oos_page->list);
2507+
free_page((unsigned long)oos_page->mem);
25072508
kfree(oos_page);
25082509
}
25092510
}
@@ -2524,6 +2525,12 @@ static int setup_spt_oos(struct intel_gvt *gvt)
25242525
ret = -ENOMEM;
25252526
goto fail;
25262527
}
2528+
oos_page->mem = (void *)__get_free_pages(GFP_KERNEL, 0);
2529+
if (!oos_page->mem) {
2530+
ret = -ENOMEM;
2531+
kfree(oos_page);
2532+
goto fail;
2533+
}
25272534

25282535
INIT_LIST_HEAD(&oos_page->list);
25292536
INIT_LIST_HEAD(&oos_page->vm_list);

‎drivers/gpu/drm/i915/gvt/gtt.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ struct intel_vgpu_oos_page {
222222
struct list_head list;
223223
struct list_head vm_list;
224224
int id;
225-
unsigned char mem[I915_GTT_PAGE_SIZE];
225+
void *mem;
226226
};
227227

228228
#define GTT_ENTRY_NUM_IN_ONE_PAGE 512

0 commit comments

Comments
 (0)