From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: jani.nikula@intel.com, rodrigo.vivi@intel.com,
lucas.demarchi@intel.com, maarten.lankhorst@linux.intel.com
Subject: [CI v4 v4 13/16] drm/i915/tv: use display->platform.<platform> instead of IS_<PLATFORM>()
Date: Thu, 24 Oct 2024 15:33:39 +0300 [thread overview]
Message-ID: <fbd9291353da2ac190ca67f96c60c763c28ac5dc.1729773149.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1729773149.git.jani.nikula@intel.com>
Switch to using the new display->platform.<platform> members for
platform identification in display code.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/display/intel_tv.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_tv.c b/drivers/gpu/drm/i915/display/intel_tv.c
index e40aff490486..bfd16054ca05 100644
--- a/drivers/gpu/drm/i915/display/intel_tv.c
+++ b/drivers/gpu/drm/i915/display/intel_tv.c
@@ -1093,7 +1093,6 @@ intel_tv_get_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config)
{
struct intel_display *display = to_intel_display(encoder);
- struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
struct drm_display_mode *adjusted_mode =
&pipe_config->hw.adjusted_mode;
struct drm_display_mode mode = {};
@@ -1167,7 +1166,7 @@ intel_tv_get_config(struct intel_encoder *encoder,
adjusted_mode->crtc_clock /= 2;
/* pixel counter doesn't work on i965gm TV output */
- if (IS_I965GM(dev_priv))
+ if (display->platform.i965gm)
pipe_config->mode_flags |=
I915_MODE_FLAG_USE_SCANLINE_COUNTER;
}
@@ -1197,7 +1196,6 @@ intel_tv_compute_config(struct intel_encoder *encoder,
struct intel_atomic_state *state =
to_intel_atomic_state(pipe_config->uapi.state);
struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
- struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
struct intel_tv_connector_state *tv_conn_state =
to_intel_tv_connector_state(conn_state);
const struct tv_mode *tv_mode = intel_tv_mode_find(conn_state);
@@ -1349,7 +1347,7 @@ intel_tv_compute_config(struct intel_encoder *encoder,
adjusted_mode->name[0] = '\0';
/* pixel counter doesn't work on i965gm TV output */
- if (IS_I965GM(dev_priv))
+ if (display->platform.i965gm)
pipe_config->mode_flags |=
I915_MODE_FLAG_USE_SCANLINE_COUNTER;
@@ -1525,7 +1523,7 @@ static void intel_tv_pre_enable(struct intel_atomic_state *state,
tv_mode->dda3_inc << TV_SCDDA3_INC_SHIFT;
/* Enable two fixes for the chips that need them. */
- if (IS_I915GM(dev_priv))
+ if (display->platform.i915gm)
tv_ctl |= TV_ENC_C0_FIX | TV_ENC_SDP_FIX;
set_tv_mode_timings(display, tv_mode, burst_ena);
@@ -1627,7 +1625,7 @@ intel_tv_detect_type(struct intel_tv *intel_tv,
* The TV sense state should be cleared to zero on cantiga platform. Otherwise
* the TV is misdetected. This is hardware requirement.
*/
- if (IS_GM45(dev_priv))
+ if (display->platform.gm45)
tv_dac &= ~(TVDAC_STATE_CHG_EN | TVDAC_A_SENSE_CTL |
TVDAC_B_SENSE_CTL | TVDAC_C_SENSE_CTL);
--
2.39.5
next prev parent reply other threads:[~2024-10-24 12:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 12:33 [CI v4 v4 00/16] drm/i915/display: platform identification with display->platform.<platform> Jani Nikula
2024-10-24 12:33 ` [CI v4 v4 01/16] drm/i915/display: reindent subplatform initialization Jani Nikula
2024-10-24 12:33 ` [CI v4 v4 02/16] drm/i915/display: use a macro to initialize subplatforms Jani Nikula
2024-10-24 12:33 ` [CI v4 v4 03/16] drm/i915/display: use a macro to define platform enumerations Jani Nikula
2024-10-24 12:33 ` [CI v4 v4 04/16] drm/i915/display: join the platform and subplatform enums Jani Nikula
2024-10-24 12:33 ` [CI v4 v4 05/16] drm/i915/display: convert display platforms to lower case Jani Nikula
2024-10-24 12:33 ` [CI v4 v4 06/16] drm/i915/display: add display platforms structure with platform members Jani Nikula
2024-10-24 12:33 ` [CI v4 v4 07/16] drm/i915/display: add platform member to struct intel_display Jani Nikula
2024-10-24 12:33 ` [CI v4 v4 08/16] drm/i915/display: remove the display platform enum as unnecessary Jani Nikula
2024-10-24 12:33 ` [CI v4 v4 09/16] drm/i915/display: add platform group for g4x Jani Nikula
2024-10-24 12:33 ` [CI v4 v4 10/16] drm/i915/display: add subplatform group for HSW/BDW ULT Jani Nikula
2024-10-24 12:33 ` [CI v4 v4 11/16] drm/i915/bios: use display->platform.<platform> instead of IS_<PLATFORM>() Jani Nikula
2024-10-24 12:33 ` [CI v4 v4 12/16] drm/i915/pps: " Jani Nikula
2024-10-24 12:33 ` Jani Nikula [this message]
2024-10-24 12:33 ` [CI v4 v4 14/16] drm/i915/vga: " Jani Nikula
2024-10-24 12:33 ` [CI v4 v4 15/16] drm/i915/vblank: drop unnecessary i915 local variable Jani Nikula
2024-10-24 12:33 ` [CI v4 v4 16/16] drm/i915/vblank: use display->platform.<platform> instead of IS_<PLATFORM>() Jani Nikula
2024-10-24 13:18 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: platform identification with display->platform.<platform> (rev3) Patchwork
2024-10-24 13:18 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-10-24 13:35 ` ✓ Fi.CI.BAT: success " Patchwork
2024-10-24 17:11 ` ✗ 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=fbd9291353da2ac190ca67f96c60c763c28ac5dc.1729773149.git.jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=rodrigo.vivi@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