All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/4] drm/i915/dsi: Use enc_to_intel_dsi()
Date: Thu,  7 Mar 2024 17:18:07 +0200	[thread overview]
Message-ID: <20240307151810.24208-2-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20240307151810.24208-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Use enc_to_intel_dsi() instead hand rolling it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/icl_dsi.c | 3 +--
 drivers/gpu/drm/i915/display/vlv_dsi.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
index ac456a2275db..79ecfc339430 100644
--- a/drivers/gpu/drm/i915/display/icl_dsi.c
+++ b/drivers/gpu/drm/i915/display/icl_dsi.c
@@ -1616,8 +1616,7 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder,
 				    struct drm_connector_state *conn_state)
 {
 	struct drm_i915_private *i915 = to_i915(encoder->base.dev);
-	struct intel_dsi *intel_dsi = container_of(encoder, struct intel_dsi,
-						   base);
+	struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
 	struct intel_connector *intel_connector = intel_dsi->attached_connector;
 	struct drm_display_mode *adjusted_mode =
 		&pipe_config->hw.adjusted_mode;
diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
index 9b33b8a74d64..63f4af601d15 100644
--- a/drivers/gpu/drm/i915/display/vlv_dsi.c
+++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
@@ -273,8 +273,7 @@ static int intel_dsi_compute_config(struct intel_encoder *encoder,
 				    struct drm_connector_state *conn_state)
 {
 	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
-	struct intel_dsi *intel_dsi = container_of(encoder, struct intel_dsi,
-						   base);
+	struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
 	struct intel_connector *intel_connector = intel_dsi->attached_connector;
 	struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;
 	int ret;
-- 
2.43.0


  reply	other threads:[~2024-03-07 15:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-07 15:18 [PATCH 0/4] drm/i915: Use container_of_const() Ville Syrjala
2024-03-07 15:18 ` Ville Syrjala [this message]
2024-03-08  9:37   ` [PATCH 1/4] drm/i915/dsi: Use enc_to_intel_dsi() Jani Nikula
2024-03-07 15:18 ` [PATCH 2/4] drm/i915: Don't cast away const Ville Syrjala
2024-03-08  9:39   ` Jani Nikula
2024-03-07 15:18 ` [PATCH 3/4] drm/i915: Use container_of_const() for states Ville Syrjala
2024-03-08  9:46   ` Jani Nikula
2024-03-07 15:18 ` [PATCH 4/4] drm/i915: Drop pointless (void*) cast Ville Syrjala
2024-03-08  9:46   ` Jani Nikula
2024-03-07 22:10 ` ✗ Fi.CI.SPARSE: warning for drm/i915: Use container_of_const() Patchwork
2024-03-07 22:28 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-03-14  0:02 ` ✗ Fi.CI.SPARSE: warning for drm/i915: Use container_of_const() (rev2) Patchwork
2024-03-14  0:22 ` ✓ Fi.CI.BAT: success " Patchwork
2024-03-14  8: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=20240307151810.24208-2-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.