Skip to content

Commit 418eda8

Browse files
committed
Merge tag 'drm-intel-next-2020-07-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
drm/i915 features for v5.9, batch #2 Highlights: - Very early DG1 enabling (Abdiel, Lucas, Anusha) Gem/GT: - Fix spinlock recursion on signaling a signaled request (Chris) - Perf: Use GTT when saving/restoring engine GPR (Umesh Nerlige Ramappa) - SSEU refactoring, debugfs move under gt/ (Daniele, Venkata Sandeep Dhanalakota) - Various GT refactoring and cleanup, preparation for future changes (Daniele) - Adjust HuC state accordingly after GuC fetch error (Michał Winiarski) - UC debugfs updates (Michał Winiarski) - Only revoke the GGTT mmappings on aperture detiling changes (Chris) - Only revoke mmap handlers if active (Chris) - Split the context's obj:vma lut into its own mutex (Chris) - Various memory, mmap and performance optimisations (Chris) - Improve system stability in case of false CS events (Chris) - Various refactorings and cleanup (Chris) - Always reset the engine on execlist failures (Chris) - Trace placement of timeline HWSP (Chris) - Update dma-attributes for our sg DMA (Chris) Display: - TGL CDCLK workaround tweaks to unbreak 8K display support (Stanislav) - A number of FBC fixes, along with i865 FBC enabling (Ville) - Validate MST modes against PBN limits (Lyude, Shawn Lee) - Do not access non-existing swizzle registers (Lucas) - Revert GEN11+ HBR3 rate fix that caused issues on TGL (Matt Atwood) - Update TGL+ combo phy initialization to match spec update (José) - Fix HDCP Content Protection property state machine (Anshuman) - Fix HDCP revoked keys handling (Ram) - Improve DDI BUF status checks and waits (Manasi) - Various SDVO+HDMI+DVI fixes around colorimetry, clocking, pixel repeat etc. (Ville) - DP voltage swing function refactoring (José) - WARN if max vswing/pre-emphasis violates the DP spec (Ville) Other: - Add new EHL PCI IDs (José) - Unify struct intel_digital_port variable naming (Lucas) - Various taint updates to aid debugging and improve CI (Michał Winiarski) - Straggler conversions to new mmio register accessors (Daniele) Signed-off-by: Dave Airlie <[email protected]> From: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 5de5b6e + e57bd05 commit 418eda8

File tree

115 files changed

+2940
-2075
lines changed

Some content is hidden

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

115 files changed

+2940
-2075
lines changed

drivers/gpu/drm/drm_crtc_helper_internal.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,11 @@ enum drm_mode_status drm_crtc_mode_valid(struct drm_crtc *crtc,
7373
const struct drm_display_mode *mode);
7474
enum drm_mode_status drm_encoder_mode_valid(struct drm_encoder *encoder,
7575
const struct drm_display_mode *mode);
76-
enum drm_mode_status drm_connector_mode_valid(struct drm_connector *connector,
77-
struct drm_display_mode *mode);
76+
int
77+
drm_connector_mode_valid(struct drm_connector *connector,
78+
struct drm_display_mode *mode,
79+
struct drm_modeset_acquire_ctx *ctx,
80+
enum drm_mode_status *status);
7881

7982
struct drm_encoder *
8083
drm_connector_get_single_encoder(struct drm_connector *connector);

drivers/gpu/drm/drm_probe_helper.c

Lines changed: 66 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -86,26 +86,28 @@ drm_mode_validate_flag(const struct drm_display_mode *mode,
8686
return MODE_OK;
8787
}
8888

89-
static enum drm_mode_status
89+
static int
9090
drm_mode_validate_pipeline(struct drm_display_mode *mode,
91-
struct drm_connector *connector)
91+
struct drm_connector *connector,
92+
struct drm_modeset_acquire_ctx *ctx,
93+
enum drm_mode_status *status)
9294
{
9395
struct drm_device *dev = connector->dev;
94-
enum drm_mode_status ret = MODE_OK;
9596
struct drm_encoder *encoder;
97+
int ret;
9698

9799
/* Step 1: Validate against connector */
98-
ret = drm_connector_mode_valid(connector, mode);
99-
if (ret != MODE_OK)
100+
ret = drm_connector_mode_valid(connector, mode, ctx, status);
101+
if (ret || *status != MODE_OK)
100102
return ret;
101103

102104
/* Step 2: Validate against encoders and crtcs */
103105
drm_connector_for_each_possible_encoder(connector, encoder) {
104106
struct drm_bridge *bridge;
105107
struct drm_crtc *crtc;
106108

107-
ret = drm_encoder_mode_valid(encoder, mode);
108-
if (ret != MODE_OK) {
109+
*status = drm_encoder_mode_valid(encoder, mode);
110+
if (*status != MODE_OK) {
109111
/* No point in continuing for crtc check as this encoder
110112
* will not accept the mode anyway. If all encoders
111113
* reject the mode then, at exit, ret will not be
@@ -114,10 +116,10 @@ drm_mode_validate_pipeline(struct drm_display_mode *mode,
114116
}
115117

116118
bridge = drm_bridge_chain_get_first_bridge(encoder);
117-
ret = drm_bridge_chain_mode_valid(bridge,
118-
&connector->display_info,
119-
mode);
120-
if (ret != MODE_OK) {
119+
*status = drm_bridge_chain_mode_valid(bridge,
120+
&connector->display_info,
121+
mode);
122+
if (*status != MODE_OK) {
121123
/* There is also no point in continuing for crtc check
122124
* here. */
123125
continue;
@@ -127,17 +129,17 @@ drm_mode_validate_pipeline(struct drm_display_mode *mode,
127129
if (!drm_encoder_crtc_ok(encoder, crtc))
128130
continue;
129131

130-
ret = drm_crtc_mode_valid(crtc, mode);
131-
if (ret == MODE_OK) {
132+
*status = drm_crtc_mode_valid(crtc, mode);
133+
if (*status == MODE_OK) {
132134
/* If we get to this point there is at least
133135
* one combination of encoder+crtc that works
134136
* for this mode. Lets return now. */
135-
return ret;
137+
return 0;
136138
}
137139
}
138140
}
139141

140-
return ret;
142+
return 0;
141143
}
142144

143145
static int drm_helper_probe_add_cmdline_mode(struct drm_connector *connector)
@@ -198,16 +200,27 @@ enum drm_mode_status drm_encoder_mode_valid(struct drm_encoder *encoder,
198200
return encoder_funcs->mode_valid(encoder, mode);
199201
}
200202

201-
enum drm_mode_status drm_connector_mode_valid(struct drm_connector *connector,
202-
struct drm_display_mode *mode)
203+
int
204+
drm_connector_mode_valid(struct drm_connector *connector,
205+
struct drm_display_mode *mode,
206+
struct drm_modeset_acquire_ctx *ctx,
207+
enum drm_mode_status *status)
203208
{
204209
const struct drm_connector_helper_funcs *connector_funcs =
205210
connector->helper_private;
211+
int ret = 0;
212+
213+
if (!connector_funcs)
214+
*status = MODE_OK;
215+
else if (connector_funcs->mode_valid_ctx)
216+
ret = connector_funcs->mode_valid_ctx(connector, mode, ctx,
217+
status);
218+
else if (connector_funcs->mode_valid)
219+
*status = connector_funcs->mode_valid(connector, mode);
220+
else
221+
*status = MODE_OK;
206222

207-
if (!connector_funcs || !connector_funcs->mode_valid)
208-
return MODE_OK;
209-
210-
return connector_funcs->mode_valid(connector, mode);
223+
return ret;
211224
}
212225

213226
#define DRM_OUTPUT_POLL_PERIOD (10*HZ)
@@ -385,8 +398,9 @@ EXPORT_SYMBOL(drm_helper_probe_detect);
385398
* (if specified)
386399
* - drm_mode_validate_flag() checks the modes against basic connector
387400
* capabilities (interlace_allowed,doublescan_allowed,stereo_allowed)
388-
* - the optional &drm_connector_helper_funcs.mode_valid helper can perform
389-
* driver and/or sink specific checks
401+
* - the optional &drm_connector_helper_funcs.mode_valid or
402+
* &drm_connector_helper_funcs.mode_valid_ctx helpers can perform driver
403+
* and/or sink specific checks
390404
* - the optional &drm_crtc_helper_funcs.mode_valid,
391405
* &drm_bridge_funcs.mode_valid and &drm_encoder_helper_funcs.mode_valid
392406
* helpers can perform driver and/or source specific checks which are also
@@ -517,22 +531,39 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
517531
mode_flags |= DRM_MODE_FLAG_3D_MASK;
518532

519533
list_for_each_entry(mode, &connector->modes, head) {
520-
if (mode->status == MODE_OK)
521-
mode->status = drm_mode_validate_driver(dev, mode);
534+
if (mode->status != MODE_OK)
535+
continue;
536+
537+
mode->status = drm_mode_validate_driver(dev, mode);
538+
if (mode->status != MODE_OK)
539+
continue;
522540

523-
if (mode->status == MODE_OK)
524-
mode->status = drm_mode_validate_size(mode, maxX, maxY);
541+
mode->status = drm_mode_validate_size(mode, maxX, maxY);
542+
if (mode->status != MODE_OK)
543+
continue;
525544

526-
if (mode->status == MODE_OK)
527-
mode->status = drm_mode_validate_flag(mode, mode_flags);
545+
mode->status = drm_mode_validate_flag(mode, mode_flags);
546+
if (mode->status != MODE_OK)
547+
continue;
528548

529-
if (mode->status == MODE_OK)
530-
mode->status = drm_mode_validate_pipeline(mode,
531-
connector);
549+
ret = drm_mode_validate_pipeline(mode, connector, &ctx,
550+
&mode->status);
551+
if (ret) {
552+
drm_dbg_kms(dev,
553+
"drm_mode_validate_pipeline failed: %d\n",
554+
ret);
555+
556+
if (drm_WARN_ON_ONCE(dev, ret != -EDEADLK)) {
557+
mode->status = MODE_ERROR;
558+
} else {
559+
drm_modeset_backoff(&ctx);
560+
goto retry;
561+
}
562+
}
532563

533-
if (mode->status == MODE_OK)
534-
mode->status = drm_mode_validate_ycbcr420(mode,
535-
connector);
564+
if (mode->status != MODE_OK)
565+
continue;
566+
mode->status = drm_mode_validate_ycbcr420(mode, connector);
536567
}
537568

538569
prune:

drivers/gpu/drm/i915/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ gt-y += \
112112
gt/intel_ring_submission.o \
113113
gt/intel_rps.o \
114114
gt/intel_sseu.o \
115+
gt/intel_sseu_debugfs.o \
115116
gt/intel_timeline.o \
116117
gt/intel_workarounds.o \
117118
gt/shmem_utils.o \

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,9 @@ parse_power_conservation_features(struct drm_i915_private *dev_priv,
722722
*/
723723
if (!(power->drrs & BIT(panel_type)))
724724
dev_priv->vbt.drrs_type = DRRS_NOT_SUPPORTED;
725+
726+
if (bdb->version >= 232)
727+
dev_priv->vbt.edp.hobl = power->hobl & BIT(panel_type);
725728
}
726729

727730
static void

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,8 +2080,15 @@ int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state)
20802080
* Explicitly stating here that this seems to be currently
20812081
* rather a Hack, than final solution.
20822082
*/
2083-
if (IS_TIGERLAKE(dev_priv))
2084-
min_cdclk = max(min_cdclk, (int)crtc_state->pixel_rate);
2083+
if (IS_TIGERLAKE(dev_priv)) {
2084+
/*
2085+
* Clamp to max_cdclk_freq in case pixel rate is higher,
2086+
* in order not to break an 8K, but still leave W/A at place.
2087+
*/
2088+
min_cdclk = max_t(int, min_cdclk,
2089+
min_t(int, crtc_state->pixel_rate,
2090+
dev_priv->max_cdclk_freq));
2091+
}
20852092

20862093
if (min_cdclk > dev_priv->max_cdclk_freq) {
20872094
drm_dbg_kms(&dev_priv->drm,

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,18 @@ static bool icl_combo_phy_verify_state(struct drm_i915_private *dev_priv,
264264
if (!icl_combo_phy_enabled(dev_priv, phy))
265265
return false;
266266

267+
if (INTEL_GEN(dev_priv) >= 12) {
268+
ret &= check_phy_reg(dev_priv, phy, ICL_PORT_TX_DW8_LN0(phy),
269+
ICL_PORT_TX_DW8_ODCC_CLK_SEL |
270+
ICL_PORT_TX_DW8_ODCC_CLK_DIV_SEL_MASK,
271+
ICL_PORT_TX_DW8_ODCC_CLK_SEL |
272+
ICL_PORT_TX_DW8_ODCC_CLK_DIV_SEL_DIV2);
273+
274+
ret &= check_phy_reg(dev_priv, phy, ICL_PORT_PCS_DW1_LN0(phy),
275+
DCC_MODE_SELECT_MASK,
276+
DCC_MODE_SELECT_CONTINUOSLY);
277+
}
278+
267279
ret = cnl_verify_procmon_ref_values(dev_priv, phy);
268280

269281
if (phy_is_master(dev_priv, phy)) {
@@ -375,6 +387,19 @@ static void icl_combo_phys_init(struct drm_i915_private *dev_priv)
375387
intel_de_write(dev_priv, ICL_PHY_MISC(phy), val);
376388

377389
skip_phy_misc:
390+
if (INTEL_GEN(dev_priv) >= 12) {
391+
val = intel_de_read(dev_priv, ICL_PORT_TX_DW8_LN0(phy));
392+
val &= ~ICL_PORT_TX_DW8_ODCC_CLK_DIV_SEL_MASK;
393+
val |= ICL_PORT_TX_DW8_ODCC_CLK_SEL;
394+
val |= ICL_PORT_TX_DW8_ODCC_CLK_DIV_SEL_DIV2;
395+
intel_de_write(dev_priv, ICL_PORT_TX_DW8_GRP(phy), val);
396+
397+
val = intel_de_read(dev_priv, ICL_PORT_PCS_DW1_LN0(phy));
398+
val &= ~DCC_MODE_SELECT_MASK;
399+
val |= DCC_MODE_SELECT_CONTINUOSLY;
400+
intel_de_write(dev_priv, ICL_PORT_PCS_DW1_GRP(phy), val);
401+
}
402+
378403
cnl_set_procmon_ref_values(dev_priv, phy);
379404

380405
if (phy_is_master(dev_priv, phy)) {

0 commit comments

Comments
 (0)