Skip to content

Commit abd0211

Browse files
committed
Merge tag 'drm-intel-fixes-2023-12-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
drm/i915 fixes for v6.7-rc5: - d21a396 ("drm/i915: Call intel_pre_plane_updates() also for pipes getting enabled") in the previous fixes pull depends on a change that wasn't included. Pick it up. - Relax BXT/GLK DSI transcoder hblank limits - Fix DP MST .mode_valid_ctx() return values - Reject DP MST modes that require bigjoiner (as it's not yet supported on DP MST) - Fix _intel_dsb_commit() variable type to allow negative values Signed-off-by: Dave Airlie <[email protected]> From: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 3392432 + 9f26907 commit abd0211

File tree

13 files changed

+92
-8
lines changed

13 files changed

+92
-8
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,6 +1440,13 @@ static void gen11_dsi_post_disable(struct intel_atomic_state *state,
14401440
static enum drm_mode_status gen11_dsi_mode_valid(struct drm_connector *connector,
14411441
struct drm_display_mode *mode)
14421442
{
1443+
struct drm_i915_private *i915 = to_i915(connector->dev);
1444+
enum drm_mode_status status;
1445+
1446+
status = intel_cpu_transcoder_mode_valid(i915, mode);
1447+
if (status != MODE_OK)
1448+
return status;
1449+
14431450
/* FIXME: DSC? */
14441451
return intel_dsi_mode_valid(connector, mode);
14451452
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,13 @@ intel_crt_mode_valid(struct drm_connector *connector,
348348
struct drm_device *dev = connector->dev;
349349
struct drm_i915_private *dev_priv = to_i915(dev);
350350
int max_dotclk = dev_priv->max_dotclk_freq;
351+
enum drm_mode_status status;
351352
int max_clock;
352353

354+
status = intel_cpu_transcoder_mode_valid(dev_priv, mode);
355+
if (status != MODE_OK)
356+
return status;
357+
353358
if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
354359
return MODE_NO_DBLESCAN;
355360

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7869,6 +7869,16 @@ enum drm_mode_status intel_mode_valid(struct drm_device *dev,
78697869
mode->vtotal > vtotal_max)
78707870
return MODE_V_ILLEGAL;
78717871

7872+
return MODE_OK;
7873+
}
7874+
7875+
enum drm_mode_status intel_cpu_transcoder_mode_valid(struct drm_i915_private *dev_priv,
7876+
const struct drm_display_mode *mode)
7877+
{
7878+
/*
7879+
* Additional transcoder timing limits,
7880+
* excluding BXT/GLK DSI transcoders.
7881+
*/
78727882
if (DISPLAY_VER(dev_priv) >= 5) {
78737883
if (mode->hdisplay < 64 ||
78747884
mode->htotal - mode->hdisplay < 32)

drivers/gpu/drm/i915/display/intel_display.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,9 @@ enum drm_mode_status
403403
intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
404404
const struct drm_display_mode *mode,
405405
bool bigjoiner);
406+
enum drm_mode_status
407+
intel_cpu_transcoder_mode_valid(struct drm_i915_private *i915,
408+
const struct drm_display_mode *mode);
406409
enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
407410
bool is_trans_port_sync_mode(const struct intel_crtc_state *state);
408411
bool is_trans_port_sync_master(const struct intel_crtc_state *state);

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,10 @@ intel_dp_mode_valid(struct drm_connector *_connector,
11721172
enum drm_mode_status status;
11731173
bool dsc = false, bigjoiner = false;
11741174

1175+
status = intel_cpu_transcoder_mode_valid(dev_priv, mode);
1176+
if (status != MODE_OK)
1177+
return status;
1178+
11751179
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
11761180
return MODE_H_ILLEGAL;
11771181

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

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,10 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector *connector,
959959
return 0;
960960
}
961961

962+
*status = intel_cpu_transcoder_mode_valid(dev_priv, mode);
963+
if (*status != MODE_OK)
964+
return 0;
965+
962966
if (mode->flags & DRM_MODE_FLAG_DBLSCAN) {
963967
*status = MODE_NO_DBLESCAN;
964968
return 0;
@@ -993,6 +997,10 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector *connector,
993997
if (intel_dp_need_bigjoiner(intel_dp, mode->hdisplay, target_clock)) {
994998
bigjoiner = true;
995999
max_dotclk *= 2;
1000+
1001+
/* TODO: add support for bigjoiner */
1002+
*status = MODE_CLOCK_HIGH;
1003+
return 0;
9961004
}
9971005

9981006
if (DISPLAY_VER(dev_priv) >= 10 &&
@@ -1027,11 +1035,15 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector *connector,
10271035
* Big joiner configuration needs DSC for TGL which is not true for
10281036
* XE_LPD where uncompressed joiner is supported.
10291037
*/
1030-
if (DISPLAY_VER(dev_priv) < 13 && bigjoiner && !dsc)
1031-
return MODE_CLOCK_HIGH;
1038+
if (DISPLAY_VER(dev_priv) < 13 && bigjoiner && !dsc) {
1039+
*status = MODE_CLOCK_HIGH;
1040+
return 0;
1041+
}
10321042

1033-
if (mode_rate > max_rate && !dsc)
1034-
return MODE_CLOCK_HIGH;
1043+
if (mode_rate > max_rate && !dsc) {
1044+
*status = MODE_CLOCK_HIGH;
1045+
return 0;
1046+
}
10351047

10361048
*status = intel_mode_valid_max_plane_size(dev_priv, mode, false);
10371049
return 0;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ static int intel_dsb_dewake_scanline(const struct intel_crtc_state *crtc_state)
340340
}
341341

342342
static void _intel_dsb_commit(struct intel_dsb *dsb, u32 ctrl,
343-
unsigned int dewake_scanline)
343+
int dewake_scanline)
344344
{
345345
struct intel_crtc *crtc = dsb->crtc;
346346
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,17 @@ intel_dvo_mode_valid(struct drm_connector *_connector,
217217
struct drm_display_mode *mode)
218218
{
219219
struct intel_connector *connector = to_intel_connector(_connector);
220+
struct drm_i915_private *i915 = to_i915(connector->base.dev);
220221
struct intel_dvo *intel_dvo = intel_attached_dvo(connector);
221222
const struct drm_display_mode *fixed_mode =
222223
intel_panel_fixed_mode(connector, mode);
223224
int max_dotclk = to_i915(connector->base.dev)->max_dotclk_freq;
224225
int target_clock = mode->clock;
226+
enum drm_mode_status status;
227+
228+
status = intel_cpu_transcoder_mode_valid(i915, mode);
229+
if (status != MODE_OK)
230+
return status;
225231

226232
if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
227233
return MODE_NO_DBLESCAN;

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,6 +1983,10 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
19831983
bool ycbcr_420_only;
19841984
enum intel_output_format sink_format;
19851985

1986+
status = intel_cpu_transcoder_mode_valid(dev_priv, mode);
1987+
if (status != MODE_OK)
1988+
return status;
1989+
19861990
if ((mode->flags & DRM_MODE_FLAG_3D_MASK) == DRM_MODE_FLAG_3D_FRAME_PACKING)
19871991
clock *= 2;
19881992

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,16 @@ intel_lvds_mode_valid(struct drm_connector *_connector,
389389
struct drm_display_mode *mode)
390390
{
391391
struct intel_connector *connector = to_intel_connector(_connector);
392+
struct drm_i915_private *i915 = to_i915(connector->base.dev);
392393
const struct drm_display_mode *fixed_mode =
393394
intel_panel_fixed_mode(connector, mode);
394395
int max_pixclk = to_i915(connector->base.dev)->max_dotclk_freq;
395396
enum drm_mode_status status;
396397

398+
status = intel_cpu_transcoder_mode_valid(i915, mode);
399+
if (status != MODE_OK)
400+
return status;
401+
397402
if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
398403
return MODE_NO_DBLESCAN;
399404

0 commit comments

Comments
 (0)