Commit 81fdd7bf authored by Matt Roper's avatar Matt Roper Committed by Rodrigo Vivi

drm/i915/tgl: Add Wa_14010477008:tgl

Media decompression support should not be advertised on any display
planes for steppings A0-C0.

Bspec: 53273
Fixes: 2dfbf9d2 ("drm/i915/tgl: Gen-12 display can decompress surfaces compressed by the media engine")
Cc: Matt Atwood <matthew.s.atwood@intel.com>
Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200414211118.2787489-3-matthew.d.roper@intel.comReviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
(cherry picked from commit dbff5a8d)
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 5809e8f8
...@@ -2817,19 +2817,25 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane, ...@@ -2817,19 +2817,25 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,
} }
} }
static bool gen12_plane_supports_mc_ccs(enum plane_id plane_id) static bool gen12_plane_supports_mc_ccs(struct drm_i915_private *dev_priv,
enum plane_id plane_id)
{ {
/* Wa_14010477008:tgl[a0..c0] */
if (IS_TGL_REVID(dev_priv, TGL_REVID_A0, TGL_REVID_C0))
return false;
return plane_id < PLANE_SPRITE4; return plane_id < PLANE_SPRITE4;
} }
static bool gen12_plane_format_mod_supported(struct drm_plane *_plane, static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,
u32 format, u64 modifier) u32 format, u64 modifier)
{ {
struct drm_i915_private *dev_priv = to_i915(_plane->dev);
struct intel_plane *plane = to_intel_plane(_plane); struct intel_plane *plane = to_intel_plane(_plane);
switch (modifier) { switch (modifier) {
case I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS: case I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS:
if (!gen12_plane_supports_mc_ccs(plane->id)) if (!gen12_plane_supports_mc_ccs(dev_priv, plane->id))
return false; return false;
/* fall through */ /* fall through */
case DRM_FORMAT_MOD_LINEAR: case DRM_FORMAT_MOD_LINEAR:
...@@ -2998,9 +3004,10 @@ static const u32 *icl_get_plane_formats(struct drm_i915_private *dev_priv, ...@@ -2998,9 +3004,10 @@ static const u32 *icl_get_plane_formats(struct drm_i915_private *dev_priv,
} }
} }
static const u64 *gen12_get_plane_modifiers(enum plane_id plane_id) static const u64 *gen12_get_plane_modifiers(struct drm_i915_private *dev_priv,
enum plane_id plane_id)
{ {
if (gen12_plane_supports_mc_ccs(plane_id)) if (gen12_plane_supports_mc_ccs(dev_priv, plane_id))
return gen12_plane_format_modifiers_mc_ccs; return gen12_plane_format_modifiers_mc_ccs;
else else
return gen12_plane_format_modifiers_rc_ccs; return gen12_plane_format_modifiers_rc_ccs;
...@@ -3070,7 +3077,7 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv, ...@@ -3070,7 +3077,7 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
plane->has_ccs = skl_plane_has_ccs(dev_priv, pipe, plane_id); plane->has_ccs = skl_plane_has_ccs(dev_priv, pipe, plane_id);
if (INTEL_GEN(dev_priv) >= 12) { if (INTEL_GEN(dev_priv) >= 12) {
modifiers = gen12_get_plane_modifiers(plane_id); modifiers = gen12_get_plane_modifiers(dev_priv, plane_id);
plane_funcs = &gen12_plane_funcs; plane_funcs = &gen12_plane_funcs;
} else { } else {
if (plane->has_ccs) if (plane->has_ccs)
......
...@@ -1507,6 +1507,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915, ...@@ -1507,6 +1507,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
(IS_ICELAKE(p) && IS_REVID(p, since, until)) (IS_ICELAKE(p) && IS_REVID(p, since, until))
#define TGL_REVID_A0 0x0 #define TGL_REVID_A0 0x0
#define TGL_REVID_B0 0x1
#define TGL_REVID_C0 0x2
#define IS_TGL_REVID(p, since, until) \ #define IS_TGL_REVID(p, since, until) \
(IS_TIGERLAKE(p) && IS_REVID(p, since, until)) (IS_TIGERLAKE(p) && IS_REVID(p, since, until))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment