From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ankit Nautiyal <ankit.k.nautiyal@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: suraj.kandpal@intel.com, ville.syrjala@linux.intel.com
Subject: Re: [PATCH] drm/i915/display: Check whether platform supports joiner
Date: Thu, 12 Sep 2024 18:36:31 +0300 [thread overview]
Message-ID: <875xr0g9z4.fsf@intel.com> (raw)
In-Reply-To: <87h6alf0w7.fsf@intel.com>
On Thu, 12 Sep 2024, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Thu, 12 Sep 2024, Ankit Nautiyal <ankit.k.nautiyal@intel.com> wrote:
>> 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.
>
> Please split this to two, adding the macros and then adding the new
> place.
On second thoughts, it's small enough. Just merge after you get CI
results.
>
> BR,
> Jani.
>
>>
>> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>> ---
>> drivers/gpu/drm/i915/display/intel_display.c | 9 ++++++---
>> drivers/gpu/drm/i915/display/intel_display_debugfs.c | 2 +-
>> drivers/gpu/drm/i915/display/intel_display_device.h | 2 ++
>> drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
>> 4 files changed, 10 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
>> index fdf244a32b24..d4a371edfcdd 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display.c
>> @@ -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;
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
>> index b75361e95e97..8caacdd624bd 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
>> @@ -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,
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
>> index dfb0c8bf5ca2..5306bbd13e59 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
>> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
>> @@ -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)
>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
>> index cb0f6db5f8e7..c53eb8e165de 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>> @@ -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
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-09-12 15:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 13:29 [PATCH] drm/i915/display: Check whether platform supports joiner Ankit Nautiyal
2024-09-12 13:31 ` Ville Syrjälä
2024-09-12 13:38 ` Jani Nikula
2024-09-12 15:36 ` Jani Nikula [this message]
2024-09-18 12:14 ` Nautiyal, Ankit K
2024-09-12 19:09 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
2024-09-12 19:17 ` ✓ Fi.CI.BAT: success " Patchwork
2024-09-13 10:51 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-09-13 12:40 ` ✓ Fi.CI.IGT: success " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875xr0g9z4.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=suraj.kandpal@intel.com \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox