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>, <lucas.demarchi@intel.com>,
<maarten.lankhorst@linux.intel.com>
Subject: Re: [PATCH v4 15/15] drm/i915/vblank: use display->platform.<platform> instead of IS_<PLATFORM>()
Date: Tue, 22 Oct 2024 13:42:27 -0400 [thread overview]
Message-ID: <ZxfkA2iM-hqUe5O9@intel.com> (raw)
In-Reply-To: <beed4681f5b69699a5bcf50247dd3f9b451a71b4.1729518793.git.jani.nikula@intel.com>
On Mon, Oct 21, 2024 at 04:54:16PM +0300, Jani Nikula wrote:
> Switch to using the new display->platform.<platform> members for
> platform identification in display code.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_vblank.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_vblank.c b/drivers/gpu/drm/i915/display/intel_vblank.c
> index d18b8292be49..a95fb3349eba 100644
> --- a/drivers/gpu/drm/i915/display/intel_vblank.c
> +++ b/drivers/gpu/drm/i915/display/intel_vblank.c
> @@ -195,7 +195,6 @@ static u32 __intel_get_crtc_scanline_from_timestamp(struct intel_crtc *crtc)
> int intel_crtc_scanline_offset(const struct intel_crtc_state *crtc_state)
> {
> struct intel_display *display = to_intel_display(crtc_state);
> - struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
>
> /*
> * The scanline counter increments at the leading edge of hsync.
> @@ -225,7 +224,7 @@ int intel_crtc_scanline_offset(const struct intel_crtc_state *crtc_state)
> */
> if (DISPLAY_VER(display) == 2)
> return -1;
> - else if (HAS_DDI(i915) && intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
> + else if (HAS_DDI(display) && intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
I believe this first chunk should be in a separate patch.
but if so
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
in both anyways...
> return 2;
> else
> return 1;
> @@ -327,14 +326,13 @@ static bool i915_get_crtc_scanoutpos(struct drm_crtc *_crtc,
> const struct drm_display_mode *mode)
> {
> struct intel_display *display = to_intel_display(_crtc->dev);
> - struct drm_i915_private *dev_priv = to_i915(display->drm);
> struct intel_crtc *crtc = to_intel_crtc(_crtc);
> enum pipe pipe = crtc->pipe;
> int position;
> int vbl_start, vbl_end, hsync_start, htotal, vtotal;
> unsigned long irqflags;
> bool use_scanline_counter = DISPLAY_VER(display) >= 5 ||
> - IS_G4X(dev_priv) || DISPLAY_VER(display) == 2 ||
> + display->platform.g4x || DISPLAY_VER(display) == 2 ||
> crtc->mode_flags & I915_MODE_FLAG_USE_SCANLINE_COUNTER;
>
> if (drm_WARN_ON(display->drm, !mode->crtc_clock)) {
> @@ -603,14 +601,15 @@ void intel_vblank_evade_init(const struct intel_crtc_state *old_crtc_state,
> const struct intel_crtc_state *new_crtc_state,
> struct intel_vblank_evade_ctx *evade)
> {
> + struct intel_display *display = to_intel_display(new_crtc_state);
> struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc);
> - struct drm_i915_private *i915 = to_i915(crtc->base.dev);
> const struct intel_crtc_state *crtc_state;
> const struct drm_display_mode *adjusted_mode;
>
> evade->crtc = crtc;
>
> - evade->need_vlv_dsi_wa = (IS_VALLEYVIEW(i915) || IS_CHERRYVIEW(i915)) &&
> + evade->need_vlv_dsi_wa = (display->platform.valleyview ||
> + display->platform.cherryview) &&
> intel_crtc_has_type(new_crtc_state, INTEL_OUTPUT_DSI);
>
> /*
> --
> 2.39.5
>
next prev parent reply other threads:[~2024-10-22 17:42 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-21 13:54 [PATCH v4 00/15] drm/i915/display: platform identification with display->platform.<platform> Jani Nikula
2024-10-21 13:54 ` [PATCH v4 01/15] drm/i915/display: reindent subplatform initialization Jani Nikula
2024-10-21 13:54 ` [PATCH v4 02/15] drm/i915/display: use a macro to initialize subplatforms Jani Nikula
2024-10-21 13:54 ` [PATCH v4 03/15] drm/i915/display: use a macro to define platform enumerations Jani Nikula
2024-10-21 13:54 ` [PATCH v4 04/15] drm/i915/display: join the platform and subplatform enums Jani Nikula
2024-10-21 13:54 ` [PATCH v4 05/15] drm/i915/display: convert display platforms to lower case Jani Nikula
2024-10-21 13:54 ` [PATCH v4 06/15] drm/i915/display: add display platforms structure with platform members Jani Nikula
2024-10-22 17:52 ` Rodrigo Vivi
2024-10-21 13:54 ` [PATCH v4 07/15] drm/i915/display: add platform member to struct intel_display Jani Nikula
2024-10-22 17:51 ` Rodrigo Vivi
2024-10-21 13:54 ` [PATCH v4 08/15] drm/i915/display: remove the display platform enum as unnecessary Jani Nikula
2024-10-22 17:49 ` Rodrigo Vivi
2024-10-23 13:09 ` Jani Nikula
2024-10-23 14:40 ` Rodrigo Vivi
2024-10-21 13:54 ` [PATCH v4 09/15] drm/i915/display: add platform group for g4x Jani Nikula
2024-10-22 17:45 ` Rodrigo Vivi
2024-10-21 13:54 ` [PATCH v4 10/15] drm/i915/display: add subplatform group for HSW/BDW ULT Jani Nikula
2024-10-23 15:08 ` Rodrigo Vivi
2024-10-21 13:54 ` [PATCH v4 11/15] drm/i915/bios: use display->platform.<platform> instead of IS_<PLATFORM>() Jani Nikula
2024-10-22 17:45 ` Rodrigo Vivi
2024-10-21 13:54 ` [PATCH v4 12/15] drm/i915/pps: " Jani Nikula
2024-10-22 17:43 ` Rodrigo Vivi
2024-10-21 13:54 ` [PATCH v4 13/15] drm/i915/tv: " Jani Nikula
2024-10-22 17:43 ` Rodrigo Vivi
2024-10-21 13:54 ` [PATCH v4 14/15] drm/i915/vga: " Jani Nikula
2024-10-22 17:42 ` Rodrigo Vivi
2024-10-21 13:54 ` [PATCH v4 15/15] drm/i915/vblank: " Jani Nikula
2024-10-22 17:42 ` Rodrigo Vivi [this message]
2024-10-21 14:41 ` ✗ Fi.CI.SPARSE: warning for drm/i915/display: platform identification with display->platform.<platform> (rev2) Patchwork
2024-10-21 15:06 ` ✓ Fi.CI.BAT: success " Patchwork
2024-10-21 18:53 ` ✗ Fi.CI.IGT: failure " 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=ZxfkA2iM-hqUe5O9@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=lucas.demarchi@intel.com \
--cc=maarten.lankhorst@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