Skip to content

Commit 1cc4af4

Browse files
committed
Merge tag 'drm-intel-next-2020-07-02' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
drm/i915 features for v5.9 Highlights: - Rocket Lake (RKL) platform enabling (Matt Roper, Lucas, José, Aditya) Gem/GT: - Numerous selftest fixes and improvements (Chris) - TGL, RKL, EHL workaround updates (Matts Atwood and Roper, Clint, Swathi Dhanavanthri, Chris) - Retry faulthandlers on ENOSPC to avoid oomkiller (Chris) - Numerous refactorings and cleanups (Chris) - Several GT fixes around init/suspend/resume/shutdown (Chris) - Whitelist CTX_TIMESTAMP register on non-RCS (Chris) - Track if an engine requires forcewake w/a (Chris) - Locking improvements (Chris) - Timeslicing improvements (Chris) - Add a safety submission flush in the heartbeat (Chris) - Flush gen3 relocs harder (Chris) - Discard a misplaced GGTT vma (Chris) - Reduce relocation paths to async GPU relocations only (Chris) - It's all build up with no pay off (Chris' own words...) Display: - A plethora of DP MST fixes (Imre) - Implement proper dbuf global state (Ville) - Consider dbuf bandwidth when calculating CDCLK (Stan) - FBC fixes and refactoring (Ville) - PSR fixes and improvements (José, Gwan-gyeong) - Cursor size fixes (Ville) - Overlay color and gamma fixes (Ville) - Fix and improve FSB and HRAWCLK read out (Ville) - Pre allocate and late cleanup of DSB cmd buffer (Animesh) - Stop using mode->private_flags (Ville) - Add plane color encoding support for YCBCR_BT2020 (Kishore Kadiyala) - Update TGL Type-C DP and DKL HBR and HBR+ vswing tables (José) - Fix DSI connector init error path (Vivek) - A plethora of DP vswing/preemph fixes and refactoring (Ville) - Fix TGL DKL vswing sequence selection (Vandita) - Fix ICL hotplug interrupt disabling after storm detection (Imre) - Retry HDCP link integrity check on failure (Oliver Barta) - Fix TBT DPLL fractional divider (Imre) - Fix ICL+ HBR3 source rate (Matt Atwood) - Fix gen2 spurious underruns (Ville) - Fix potential NULL dereference, some spelling fixes (Colin Ian King) - Fix NULL dereference on encoder state probe (Chris) Other: - Backmerge to get mmap locking API (Jani) - Distinguish Comet Lake from Coffee Lake (Chris) - Various compiler warning fixes (Arnd Bergmann, Nathan Chancellor) - WARN* conversions to drm_WARN* (Pankaj) - Switch to device specific parameters with debugfs access (Jani) - Fix agp/intel error path leak (Qiushi Wu) - Forcewake power optimization (Chris) - Irq handler optimization (Chris) Signed-off-by: Dave Airlie <[email protected]> From: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 9555152 + d524b87 commit 1cc4af4

File tree

150 files changed

+6046
-3356
lines changed

Some content is hidden

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

150 files changed

+6046
-3356
lines changed

arch/x86/kernel/early-quirks.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ static const struct pci_device_id intel_early_ids[] __initconst = {
550550
INTEL_ICL_11_IDS(&gen11_early_ops),
551551
INTEL_EHL_IDS(&gen11_early_ops),
552552
INTEL_TGL_12_IDS(&gen11_early_ops),
553+
INTEL_RKL_IDS(&gen11_early_ops),
553554
};
554555

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

drivers/char/agp/intel-gtt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,10 @@ static int intel_gtt_setup_scratch_page(void)
304304
if (intel_private.needs_dmar) {
305305
dma_addr = pci_map_page(intel_private.pcidev, page, 0,
306306
PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
307-
if (pci_dma_mapping_error(intel_private.pcidev, dma_addr))
307+
if (pci_dma_mapping_error(intel_private.pcidev, dma_addr)) {
308+
__free_page(page);
308309
return -EINVAL;
310+
}
309311

310312
intel_private.scratch_page_dma = dma_addr;
311313
} else

drivers/dma-buf/selftests.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* a module parameter. It must be unique and legal for a C identifier.
66
*
77
* The function should be of type int function(void). It may be conditionally
8-
* compiled using #if IS_ENABLED(DRM_I915_SELFTEST).
8+
* compiled using #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST).
99
*
1010
* Tests are executed in order by igt/dmabuf_selftest
1111
*/

drivers/gpu/drm/i915/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ gt-y += \
7878
gt/debugfs_engines.o \
7979
gt/debugfs_gt.o \
8080
gt/debugfs_gt_pm.o \
81+
gt/gen2_engine_cs.o \
82+
gt/gen6_engine_cs.o \
8183
gt/gen6_ppgtt.o \
8284
gt/gen7_renderclear.o \
8385
gt/gen8_ppgtt.o \

drivers/gpu/drm/i915/display/icl_dsi.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,8 +1469,7 @@ static void gen11_dsi_get_config(struct intel_encoder *encoder,
14691469
pipe_config->pipe_bpp = bdw_get_pipemisc_bpp(crtc);
14701470

14711471
if (gen11_dsi_is_periodic_cmd_mode(intel_dsi))
1472-
pipe_config->hw.adjusted_mode.private_flags |=
1473-
I915_MODE_FLAG_DSI_PERIODIC_CMD_MODE;
1472+
pipe_config->mode_flags |= I915_MODE_FLAG_DSI_PERIODIC_CMD_MODE;
14741473
}
14751474

14761475
static int gen11_dsi_dsc_compute_config(struct intel_encoder *encoder,
@@ -1558,25 +1557,21 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder,
15581557

15591558
pipe_config->port_clock = afe_clk(encoder, pipe_config) / 5;
15601559

1561-
/* We would not operate in periodic command mode */
1562-
pipe_config->hw.adjusted_mode.private_flags &=
1563-
~I915_MODE_FLAG_DSI_PERIODIC_CMD_MODE;
1564-
15651560
/*
15661561
* In case of TE GATE cmd mode, we
15671562
* receive TE from the slave if
15681563
* dual link is enabled
15691564
*/
15701565
if (is_cmd_mode(intel_dsi)) {
15711566
if (intel_dsi->ports == (BIT(PORT_B) | BIT(PORT_A)))
1572-
pipe_config->hw.adjusted_mode.private_flags |=
1567+
pipe_config->mode_flags |=
15731568
I915_MODE_FLAG_DSI_USE_TE1 |
15741569
I915_MODE_FLAG_DSI_USE_TE0;
15751570
else if (intel_dsi->ports == BIT(PORT_B))
1576-
pipe_config->hw.adjusted_mode.private_flags |=
1571+
pipe_config->mode_flags |=
15771572
I915_MODE_FLAG_DSI_USE_TE1;
15781573
else
1579-
pipe_config->hw.adjusted_mode.private_flags |=
1574+
pipe_config->mode_flags |=
15801575
I915_MODE_FLAG_DSI_USE_TE0;
15811576
}
15821577

@@ -1954,6 +1949,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)
19541949
return;
19551950

19561951
err:
1952+
drm_connector_cleanup(connector);
19571953
drm_encoder_cleanup(&encoder->base);
19581954
kfree(intel_dsi);
19591955
kfree(intel_connector);

drivers/gpu/drm/i915/display/intel_atomic.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,11 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc)
249249
crtc_state->update_wm_post = false;
250250
crtc_state->fifo_changed = false;
251251
crtc_state->preload_luts = false;
252+
crtc_state->inherited = false;
252253
crtc_state->wm.need_postvbl_update = false;
253254
crtc_state->fb_bits = 0;
254255
crtc_state->update_planes = 0;
256+
crtc_state->dsb = NULL;
255257

256258
return &crtc_state->uapi;
257259
}
@@ -292,6 +294,8 @@ intel_crtc_destroy_state(struct drm_crtc *crtc,
292294
{
293295
struct intel_crtc_state *crtc_state = to_intel_crtc_state(state);
294296

297+
drm_WARN_ON(crtc->dev, crtc_state->dsb);
298+
295299
__drm_atomic_helper_crtc_destroy_state(&crtc_state->uapi);
296300
intel_crtc_free_hw_state(crtc_state);
297301
kfree(crtc_state);

drivers/gpu/drm/i915/display/intel_bios.c

Lines changed: 54 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ parse_sdvo_panel_data(struct drm_i915_private *dev_priv,
479479
struct drm_display_mode *panel_fixed_mode;
480480
int index;
481481

482-
index = i915_modparams.vbt_sdvo_panel_type;
482+
index = dev_priv->params.vbt_sdvo_panel_type;
483483
if (index == -2) {
484484
drm_dbg_kms(&dev_priv->drm,
485485
"Ignore SDVO panel mode from BIOS VBT tables.\n");
@@ -829,9 +829,9 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
829829
u8 vswing;
830830

831831
/* Don't read from VBT if module parameter has valid value*/
832-
if (i915_modparams.edp_vswing) {
832+
if (dev_priv->params.edp_vswing) {
833833
dev_priv->vbt.edp.low_vswing =
834-
i915_modparams.edp_vswing == 1;
834+
dev_priv->params.edp_vswing == 1;
835835
} else {
836836
vswing = (edp->edp_vswing_preemph >> (panel_type * 4)) & 0xF;
837837
dev_priv->vbt.edp.low_vswing = vswing == 0;
@@ -1619,37 +1619,67 @@ static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
16191619
return 0;
16201620
}
16211621

1622-
static enum port dvo_port_to_port(u8 dvo_port)
1622+
static enum port __dvo_port_to_port(int n_ports, int n_dvo,
1623+
const int port_mapping[][3], u8 dvo_port)
16231624
{
1624-
/*
1625-
* Each DDI port can have more than one value on the "DVO Port" field,
1626-
* so look for all the possible values for each port.
1627-
*/
1628-
static const int dvo_ports[][3] = {
1629-
[PORT_A] = { DVO_PORT_HDMIA, DVO_PORT_DPA, -1},
1630-
[PORT_B] = { DVO_PORT_HDMIB, DVO_PORT_DPB, -1},
1631-
[PORT_C] = { DVO_PORT_HDMIC, DVO_PORT_DPC, -1},
1632-
[PORT_D] = { DVO_PORT_HDMID, DVO_PORT_DPD, -1},
1633-
[PORT_E] = { DVO_PORT_CRT, DVO_PORT_HDMIE, DVO_PORT_DPE},
1634-
[PORT_F] = { DVO_PORT_HDMIF, DVO_PORT_DPF, -1},
1635-
[PORT_G] = { DVO_PORT_HDMIG, DVO_PORT_DPG, -1},
1636-
};
16371625
enum port port;
16381626
int i;
16391627

1640-
for (port = PORT_A; port < ARRAY_SIZE(dvo_ports); port++) {
1641-
for (i = 0; i < ARRAY_SIZE(dvo_ports[port]); i++) {
1642-
if (dvo_ports[port][i] == -1)
1628+
for (port = PORT_A; port < n_ports; port++) {
1629+
for (i = 0; i < n_dvo; i++) {
1630+
if (port_mapping[port][i] == -1)
16431631
break;
16441632

1645-
if (dvo_port == dvo_ports[port][i])
1633+
if (dvo_port == port_mapping[port][i])
16461634
return port;
16471635
}
16481636
}
16491637

16501638
return PORT_NONE;
16511639
}
16521640

1641+
static enum port dvo_port_to_port(struct drm_i915_private *dev_priv,
1642+
u8 dvo_port)
1643+
{
1644+
/*
1645+
* Each DDI port can have more than one value on the "DVO Port" field,
1646+
* so look for all the possible values for each port.
1647+
*/
1648+
static const int port_mapping[][3] = {
1649+
[PORT_A] = { DVO_PORT_HDMIA, DVO_PORT_DPA, -1 },
1650+
[PORT_B] = { DVO_PORT_HDMIB, DVO_PORT_DPB, -1 },
1651+
[PORT_C] = { DVO_PORT_HDMIC, DVO_PORT_DPC, -1 },
1652+
[PORT_D] = { DVO_PORT_HDMID, DVO_PORT_DPD, -1 },
1653+
[PORT_E] = { DVO_PORT_HDMIE, DVO_PORT_DPE, DVO_PORT_CRT },
1654+
[PORT_F] = { DVO_PORT_HDMIF, DVO_PORT_DPF, -1 },
1655+
[PORT_G] = { DVO_PORT_HDMIG, DVO_PORT_DPG, -1 },
1656+
};
1657+
/*
1658+
* Bspec lists the ports as A, B, C, D - however internally in our
1659+
* driver we keep them as PORT_A, PORT_B, PORT_D and PORT_E so the
1660+
* registers in Display Engine match the right offsets. Apply the
1661+
* mapping here to translate from VBT to internal convention.
1662+
*/
1663+
static const int rkl_port_mapping[][3] = {
1664+
[PORT_A] = { DVO_PORT_HDMIA, DVO_PORT_DPA, -1 },
1665+
[PORT_B] = { DVO_PORT_HDMIB, DVO_PORT_DPB, -1 },
1666+
[PORT_C] = { -1 },
1667+
[PORT_D] = { DVO_PORT_HDMIC, DVO_PORT_DPC, -1 },
1668+
[PORT_E] = { DVO_PORT_HDMID, DVO_PORT_DPD, -1 },
1669+
};
1670+
1671+
if (IS_ROCKETLAKE(dev_priv))
1672+
return __dvo_port_to_port(ARRAY_SIZE(rkl_port_mapping),
1673+
ARRAY_SIZE(rkl_port_mapping[0]),
1674+
rkl_port_mapping,
1675+
dvo_port);
1676+
else
1677+
return __dvo_port_to_port(ARRAY_SIZE(port_mapping),
1678+
ARRAY_SIZE(port_mapping[0]),
1679+
port_mapping,
1680+
dvo_port);
1681+
}
1682+
16531683
static void parse_ddi_port(struct drm_i915_private *dev_priv,
16541684
struct display_device_data *devdata,
16551685
u8 bdb_version)
@@ -1659,7 +1689,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
16591689
bool is_dvi, is_hdmi, is_dp, is_edp, is_crt;
16601690
enum port port;
16611691

1662-
port = dvo_port_to_port(child->dvo_port);
1692+
port = dvo_port_to_port(dev_priv, child->dvo_port);
16631693
if (port == PORT_NONE)
16641694
return;
16651695

@@ -2603,10 +2633,10 @@ enum aux_ch intel_bios_port_aux_ch(struct drm_i915_private *dev_priv,
26032633
aux_ch = AUX_CH_B;
26042634
break;
26052635
case DP_AUX_C:
2606-
aux_ch = AUX_CH_C;
2636+
aux_ch = IS_ROCKETLAKE(dev_priv) ? AUX_CH_D : AUX_CH_C;
26072637
break;
26082638
case DP_AUX_D:
2609-
aux_ch = AUX_CH_D;
2639+
aux_ch = IS_ROCKETLAKE(dev_priv) ? AUX_CH_E : AUX_CH_D;
26102640
break;
26112641
case DP_AUX_E:
26122642
aux_ch = AUX_CH_E;

0 commit comments

Comments
 (0)