Skip to content

Commit 21050a3

Browse files
committed
Merge tag 'drm-intel-next-fixes-2022-03-24' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
- Reject unsupported TMDS rates on ICL+ (Ville Syrjälä) - Treat SAGV block time 0 as SAGV disabled (Ville Syrjälä) - Fix PSF GV point mask when SAGV is not possible (Ville Syrjälä) - Fix renamed INTEL_INFO->media.arch/ver field (Lucas De Marchi) Signed-off-by: Dave Airlie <[email protected]> From: Tvrtko Ursulin <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/YjwvgGzYNAX5rxHN@tursulin-mobl2
2 parents c6e90a1 + 00f4150 commit 21050a3

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,8 @@ int intel_bw_atomic_check(struct intel_atomic_state *state)
992992
* cause.
993993
*/
994994
if (!intel_can_enable_sagv(dev_priv, new_bw_state)) {
995-
allowed_points = BIT(max_bw_point);
995+
allowed_points &= ADLS_PSF_PT_MASK;
996+
allowed_points |= BIT(max_bw_point);
996997
drm_dbg_kms(&dev_priv->drm, "No SAGV, using single QGV point %d\n",
997998
max_bw_point);
998999
}

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,6 +1836,7 @@ hdmi_port_clock_valid(struct intel_hdmi *hdmi,
18361836
bool has_hdmi_sink)
18371837
{
18381838
struct drm_i915_private *dev_priv = intel_hdmi_to_i915(hdmi);
1839+
enum phy phy = intel_port_to_phy(dev_priv, hdmi_to_dig_port(hdmi)->base.port);
18391840

18401841
if (clock < 25000)
18411842
return MODE_CLOCK_LOW;
@@ -1856,6 +1857,14 @@ hdmi_port_clock_valid(struct intel_hdmi *hdmi,
18561857
if (IS_CHERRYVIEW(dev_priv) && clock > 216000 && clock < 240000)
18571858
return MODE_CLOCK_RANGE;
18581859

1860+
/* ICL+ combo PHY PLL can't generate 500-533.2 MHz */
1861+
if (intel_phy_is_combo(dev_priv, phy) && clock > 500000 && clock < 533200)
1862+
return MODE_CLOCK_RANGE;
1863+
1864+
/* ICL+ TC PHY PLL can't generate 500-532.8 MHz */
1865+
if (intel_phy_is_tc(dev_priv, phy) && clock > 500000 && clock < 532800)
1866+
return MODE_CLOCK_RANGE;
1867+
18591868
/*
18601869
* SNPS PHYs' MPLLB table-based programming can only handle a fixed
18611870
* set of link rates.

drivers/gpu/drm/i915/i915_drv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ static inline struct intel_gt *to_gt(struct drm_i915_private *i915)
947947
(GRAPHICS_VER(i915) >= (from) && GRAPHICS_VER(i915) <= (until))
948948

949949
#define MEDIA_VER(i915) (INTEL_INFO(i915)->media.ver)
950-
#define MEDIA_VER_FULL(i915) IP_VER(INTEL_INFO(i915)->media.arch, \
950+
#define MEDIA_VER_FULL(i915) IP_VER(INTEL_INFO(i915)->media.ver, \
951951
INTEL_INFO(i915)->media.rel)
952952
#define IS_MEDIA_VER(i915, from, until) \
953953
(MEDIA_VER(i915) >= (from) && MEDIA_VER(i915) <= (until))

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3698,8 +3698,7 @@ skl_setup_sagv_block_time(struct drm_i915_private *dev_priv)
36983698
MISSING_CASE(DISPLAY_VER(dev_priv));
36993699
}
37003700

3701-
/* Default to an unusable block time */
3702-
dev_priv->sagv_block_time_us = -1;
3701+
dev_priv->sagv_block_time_us = 0;
37033702
}
37043703

37053704
/*
@@ -5645,7 +5644,7 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state,
56455644
result->min_ddb_alloc = max(min_ddb_alloc, blocks) + 1;
56465645
result->enable = true;
56475646

5648-
if (DISPLAY_VER(dev_priv) < 12)
5647+
if (DISPLAY_VER(dev_priv) < 12 && dev_priv->sagv_block_time_us)
56495648
result->can_sagv = latency >= dev_priv->sagv_block_time_us;
56505649
}
56515650

@@ -5678,7 +5677,10 @@ static void tgl_compute_sagv_wm(const struct intel_crtc_state *crtc_state,
56785677
struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
56795678
struct skl_wm_level *sagv_wm = &plane_wm->sagv.wm0;
56805679
struct skl_wm_level *levels = plane_wm->wm;
5681-
unsigned int latency = dev_priv->wm.skl_latency[0] + dev_priv->sagv_block_time_us;
5680+
unsigned int latency = 0;
5681+
5682+
if (dev_priv->sagv_block_time_us)
5683+
latency = dev_priv->sagv_block_time_us + dev_priv->wm.skl_latency[0];
56825684

56835685
skl_compute_plane_wm(crtc_state, plane, 0, latency,
56845686
wm_params, &levels[0],

0 commit comments

Comments
 (0)