From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 11/15] drm/i915/display: convert HAS_ULTRAJOINER() to struct intel_display
Date: Wed, 6 Nov 2024 12:09:38 -0500 [thread overview]
Message-ID: <Zyui0sspZS5t9VYW@intel.com> (raw)
In-Reply-To: <ea4d7f4694ba92c87b00258cd9786d668a09c313.1730740629.git.jani.nikula@intel.com>
On Mon, Nov 04, 2024 at 07:19:25PM +0200, Jani Nikula wrote:
> Convert HAS_ULTRAJOINER() to struct intel_display. Do minimal drive-by
> conversions to struct intel_display in the callers while at it.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 10 ++++++----
> drivers/gpu/drm/i915/display/intel_display_debugfs.c | 4 ++--
> drivers/gpu/drm/i915/display/intel_display_device.h | 6 +++---
> drivers/gpu/drm/i915/display/intel_dp.c | 5 ++---
> 4 files changed, 13 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index f53611e83502..a3924bbb0d2a 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -3746,12 +3746,13 @@ static u8 fixup_ultrajoiner_secondary_pipes(u8 ultrajoiner_primary_pipes,
> static void enabled_ultrajoiner_pipes(struct drm_i915_private *i915,
> u8 *primary_pipes, u8 *secondary_pipes)
> {
> + struct intel_display *display = &i915->display;
> struct intel_crtc *crtc;
>
> *primary_pipes = 0;
> *secondary_pipes = 0;
>
> - if (!HAS_ULTRAJOINER(i915))
> + if (!HAS_ULTRAJOINER(display))
> return;
>
> for_each_intel_crtc_in_pipe_mask(&i915->drm, crtc,
> @@ -8310,11 +8311,12 @@ void intel_setup_outputs(struct drm_i915_private *dev_priv)
>
> static int max_dotclock(struct drm_i915_private *i915)
> {
> - int max_dotclock = i915->display.cdclk.max_dotclk_freq;
> + struct intel_display *display = &i915->display;
> + int max_dotclock = display->cdclk.max_dotclk_freq;
>
> - if (HAS_ULTRAJOINER(i915))
> + if (HAS_ULTRAJOINER(display))
> max_dotclock *= 4;
> - else if (HAS_UNCOMPRESSED_JOINER(i915) || HAS_BIGJOINER(i915))
> + else if (HAS_UNCOMPRESSED_JOINER(display) || HAS_BIGJOINER(display))
> 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 11aff485d8fa..2874867aae2b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -1331,7 +1331,7 @@ static ssize_t i915_joiner_write(struct file *file,
> {
> struct seq_file *m = file->private_data;
> struct intel_connector *connector = m->private;
> - struct drm_i915_private *i915 = to_i915(connector->base.dev);
> + struct intel_display *display = to_intel_display(connector);
> int force_joined_pipes = 0;
> int ret;
>
> @@ -1349,7 +1349,7 @@ static ssize_t i915_joiner_write(struct file *file,
> connector->force_joined_pipes = force_joined_pipes;
> break;
> case 4:
> - if (HAS_ULTRAJOINER(i915)) {
> + if (HAS_ULTRAJOINER(display)) {
> connector->force_joined_pipes = force_joined_pipes;
> break;
> }
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
> index e1e718fced3c..548256401d0a 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
> @@ -178,9 +178,9 @@ struct intel_display_platforms {
> #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_ULTRAJOINER(i915) ((DISPLAY_VER(i915) >= 20 || \
> - (IS_DGFX(i915) && DISPLAY_VER(i915) == 14)) && \
> - HAS_DSC(i915))
> +#define HAS_ULTRAJOINER(__display) ((DISPLAY_VER(__display) >= 20 || \
> + ((__display)->platform.dgfx && DISPLAY_VER(__display) == 14)) && \
> + HAS_DSC(__display))
> #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 a27da96d2c60..7d65945c9563 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -1333,16 +1333,15 @@ int intel_dp_num_joined_pipes(struct intel_dp *intel_dp,
> int hdisplay, int clock)
> {
> struct intel_display *display = to_intel_display(intel_dp);
> - struct drm_i915_private *i915 = to_i915(display->drm);
>
> if (connector->force_joined_pipes)
> return connector->force_joined_pipes;
>
> - if (HAS_ULTRAJOINER(i915) &&
> + if (HAS_ULTRAJOINER(display) &&
> intel_dp_needs_joiner(intel_dp, connector, hdisplay, clock, 4))
> return 4;
>
> - if ((HAS_BIGJOINER(i915) || HAS_UNCOMPRESSED_JOINER(i915)) &&
> + if ((HAS_BIGJOINER(display) || HAS_UNCOMPRESSED_JOINER(display)) &&
> intel_dp_needs_joiner(intel_dp, connector, hdisplay, clock, 2))
> return 2;
>
> --
> 2.39.5
>
next prev parent reply other threads:[~2024-11-06 17:12 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 17:19 [PATCH 00/15] drm/i915/display: convert display feature helpers to struct intel_display Jani Nikula
2024-11-04 17:19 ` [PATCH 01/15] drm/i915/display: identify discrete graphics Jani Nikula
2024-11-06 16:43 ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 02/15] drm/i915/display: convert HAS_D12_PLANE_MINIMIZATION() to struct intel_display Jani Nikula
2024-11-06 8:58 ` Govindapillai, Vinod
2024-11-06 9:07 ` Jani Nikula
2024-11-06 16:44 ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 03/15] drm/i915/display: convert HAS_4TILE() " Jani Nikula
2024-11-06 9:11 ` Govindapillai, Vinod
2024-11-06 16:45 ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 04/15] drm/i915/display: convert HAS_DOUBLE_BUFFERED_M_N() " Jani Nikula
2024-11-06 9:17 ` Govindapillai, Vinod
2024-11-06 16:46 ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 05/15] drm/i915/display: convert HAS_DP20() " Jani Nikula
2024-11-06 10:19 ` Govindapillai, Vinod
2024-11-06 16:47 ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 06/15] drm/i915/display: convert HAS_GMBUS_BURST_READ() " Jani Nikula
2024-11-06 10:21 ` Govindapillai, Vinod
2024-11-06 17:03 ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 07/15] drm/i915/display: convert HAS_IPS() " Jani Nikula
2024-11-06 10:24 ` Govindapillai, Vinod
2024-11-06 17:04 ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 08/15] drm/i915/display: convert HAS_MBUS_JOINING() " Jani Nikula
2024-11-06 10:27 ` Govindapillai, Vinod
2024-11-06 17:04 ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 09/15] drm/i915/display: convert HAS_SAGV() " Jani Nikula
2024-11-06 10:38 ` Govindapillai, Vinod
2024-11-06 17:06 ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 10/15] drm/i915/display: convert HAS_HW_SAGV_WM() " Jani Nikula
2024-11-06 10:44 ` Govindapillai, Vinod
2024-11-06 17:08 ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 11/15] drm/i915/display: convert HAS_ULTRAJOINER() " Jani Nikula
2024-11-06 10:55 ` Govindapillai, Vinod
2024-11-06 17:09 ` Rodrigo Vivi [this message]
2024-11-04 17:19 ` [PATCH 12/15] drm/i915/display: rename i915 parameter to __display in feature helpers Jani Nikula
2024-11-06 11:50 ` Govindapillai, Vinod
2024-11-04 17:19 ` [PATCH 13/15] drm/i915/display: convert display device identification to struct intel_display Jani Nikula
2024-11-05 10:17 ` [PATCH v2] " Jani Nikula
2024-11-06 13:03 ` Govindapillai, Vinod
2024-11-04 17:19 ` [PATCH 14/15] drm/i915/display: pass struct pci_dev * to intel_display_device_probe() Jani Nikula
2024-11-06 13:10 ` Govindapillai, Vinod
2024-11-04 17:19 ` [PATCH 15/15] drm/i915/display: add mobile platform group Jani Nikula
2024-11-05 18:53 ` kernel test robot
2024-11-06 9:27 ` [PATCH v2] " Jani Nikula
2024-11-06 15:44 ` Govindapillai, Vinod
2024-11-06 16:40 ` [PATCH 15/15] " Rodrigo Vivi
2024-11-07 10:32 ` Jani Nikula
2024-11-07 18:10 ` Rodrigo Vivi
2024-11-04 17:58 ` ✓ CI.Patch_applied: success for drm/i915/display: convert display feature helpers to struct intel_display Patchwork
2024-11-04 17:59 ` ✗ CI.checkpatch: warning " Patchwork
2024-11-04 18:00 ` ✓ CI.KUnit: success " Patchwork
2024-11-04 18:12 ` ✓ CI.Build: " Patchwork
2024-11-04 18:14 ` ✓ CI.Hooks: " Patchwork
2024-11-04 18:15 ` ✗ CI.checksparse: warning " Patchwork
2024-11-04 19:01 ` ✗ CI.BAT: failure " Patchwork
2024-11-05 6:25 ` ✓ CI.FULL: success " Patchwork
2024-11-05 11:33 ` ✓ CI.Patch_applied: success for drm/i915/display: convert display feature helpers to struct intel_display (rev2) Patchwork
2024-11-05 11:34 ` ✗ CI.checkpatch: warning " Patchwork
2024-11-05 11:35 ` ✓ CI.KUnit: success " Patchwork
2024-11-05 11:47 ` ✓ CI.Build: " Patchwork
2024-11-05 11:49 ` ✓ CI.Hooks: " Patchwork
2024-11-05 11:51 ` ✗ CI.checksparse: warning " Patchwork
2024-11-05 12:12 ` ✓ CI.BAT: success " Patchwork
2024-11-06 9:46 ` ✓ CI.Patch_applied: success for drm/i915/display: convert display feature helpers to struct intel_display (rev3) Patchwork
2024-11-06 9:47 ` ✗ CI.checkpatch: warning " Patchwork
2024-11-06 9:48 ` ✓ CI.KUnit: success " Patchwork
2024-11-06 10:00 ` ✓ CI.Build: " Patchwork
2024-11-06 10:02 ` ✓ CI.Hooks: " Patchwork
2024-11-06 10:04 ` ✗ CI.checksparse: warning " Patchwork
2024-11-06 10:20 ` ✓ CI.BAT: success " Patchwork
2024-11-06 14:11 ` ✗ CI.FULL: failure for drm/i915/display: convert display feature helpers to struct intel_display (rev2) Patchwork
2024-11-07 11:08 ` ✗ CI.FULL: failure for drm/i915/display: convert display feature helpers to struct intel_display (rev3) 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=Zyui0sspZS5t9VYW@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@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;
as well as URLs for NNTP newsgroup(s).