mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 05:39:42 -04:00
drm/i915/display: Check whether platform supports joiner
Add macros to check if platform supports bigjoiner/uncompressed joiner. Replace the existing DISPLAY_VER checks with these. Additionally use it before readout for joiner stuff, where its missing. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240912132931.1320686-1-ankit.k.nautiyal@intel.com
This commit is contained in:
@@ -1712,7 +1712,7 @@ static void hsw_crtc_enable(struct intel_atomic_state *state,
|
||||
|
||||
intel_dsc_enable(pipe_crtc_state);
|
||||
|
||||
if (DISPLAY_VER(dev_priv) >= 13)
|
||||
if (HAS_UNCOMPRESSED_JOINER(dev_priv))
|
||||
intel_uncompressed_joiner_enable(pipe_crtc_state);
|
||||
|
||||
intel_set_pipe_src_size(pipe_crtc_state);
|
||||
@@ -3546,6 +3546,9 @@ static void enabled_joiner_pipes(struct drm_i915_private *dev_priv,
|
||||
*primary_pipes = 0;
|
||||
*secondary_pipes = 0;
|
||||
|
||||
if (!HAS_BIGJOINER(dev_priv))
|
||||
return;
|
||||
|
||||
for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc,
|
||||
joiner_pipes(dev_priv)) {
|
||||
enum intel_display_power_domain power_domain;
|
||||
@@ -3565,7 +3568,7 @@ static void enabled_joiner_pipes(struct drm_i915_private *dev_priv,
|
||||
*secondary_pipes |= BIT(pipe);
|
||||
}
|
||||
|
||||
if (DISPLAY_VER(dev_priv) < 13)
|
||||
if (!HAS_UNCOMPRESSED_JOINER(dev_priv))
|
||||
continue;
|
||||
|
||||
power_domain = POWER_DOMAIN_PIPE(pipe);
|
||||
@@ -7966,7 +7969,7 @@ static int max_dotclock(struct drm_i915_private *i915)
|
||||
int max_dotclock = i915->display.cdclk.max_dotclk_freq;
|
||||
|
||||
/* icl+ might use joiner */
|
||||
if (DISPLAY_VER(i915) >= 11)
|
||||
if (HAS_BIGJOINER(i915))
|
||||
max_dotclock *= 2;
|
||||
|
||||
return max_dotclock;
|
||||
|
||||
@@ -1550,7 +1550,7 @@ void intel_connector_debugfs_add(struct intel_connector *connector)
|
||||
connector, &i915_dsc_fractional_bpp_fops);
|
||||
}
|
||||
|
||||
if (DISPLAY_VER(i915) >= 11 &&
|
||||
if (HAS_BIGJOINER(i915) &&
|
||||
(connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
|
||||
connector_type == DRM_MODE_CONNECTOR_eDP)) {
|
||||
debugfs_create_bool("i915_bigjoiner_force_enable", 0644, root,
|
||||
|
||||
@@ -118,6 +118,7 @@ enum intel_display_subplatform {
|
||||
|
||||
#define HAS_4TILE(i915) (IS_DG2(i915) || DISPLAY_VER(i915) >= 14)
|
||||
#define HAS_ASYNC_FLIPS(i915) (DISPLAY_VER(i915) >= 5)
|
||||
#define HAS_BIGJOINER(i915) (DISPLAY_VER(i915) >= 11)
|
||||
#define HAS_CDCLK_CRAWL(i915) (DISPLAY_INFO(i915)->has_cdclk_crawl)
|
||||
#define HAS_CDCLK_SQUASH(i915) (DISPLAY_INFO(i915)->has_cdclk_squash)
|
||||
#define HAS_CUR_FBC(i915) (!HAS_GMCH(i915) && IS_DISPLAY_VER(i915, 7, 13))
|
||||
@@ -152,6 +153,7 @@ enum intel_display_subplatform {
|
||||
#define HAS_SAGV(i915) (DISPLAY_VER(i915) >= 9 && !IS_LP(i915))
|
||||
#define HAS_TRANSCODER(i915, trans) ((DISPLAY_RUNTIME_INFO(i915)->cpu_transcoder_mask & \
|
||||
BIT(trans)) != 0)
|
||||
#define HAS_UNCOMPRESSED_JOINER(i915) (DISPLAY_VER(i915) >= 13)
|
||||
#define HAS_VRR(i915) (DISPLAY_VER(i915) >= 11)
|
||||
#define HAS_AS_SDP(i915) (DISPLAY_VER(i915) >= 13)
|
||||
#define HAS_CMRR(i915) (DISPLAY_VER(i915) >= 20)
|
||||
|
||||
@@ -2520,7 +2520,7 @@ bool intel_dp_joiner_needs_dsc(struct drm_i915_private *i915, bool use_joiner)
|
||||
* limitation. DG2 onwards pipe joiner can be enabled without
|
||||
* compression.
|
||||
*/
|
||||
return DISPLAY_VER(i915) < 13 && use_joiner;
|
||||
return !HAS_UNCOMPRESSED_JOINER(i915) && use_joiner;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user