From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
Lucas De Marchi <lucas.demarchi@intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH v2 1/4] drm/i915/display: Use drm_device alias if defined
Date: Thu, 6 Oct 2022 19:41:01 +0300 [thread overview]
Message-ID: <Yz8FHapUF8BD7kkw@intel.com> (raw)
In-Reply-To: <20221006163200.2803722-2-andrzej.hajda@intel.com>
On Thu, Oct 06, 2022 at 06:31:57PM +0200, Andrzej Hajda wrote:
> Alias is shorter and more readable.
NAK. We want to get rid of these extra 'dev' pointers.
>
> Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/icl_dsi.c | 4 ++--
> drivers/gpu/drm/i915/display/intel_display.c | 3 +--
> .../gpu/drm/i915/display/intel_display_debugfs.c | 2 +-
> drivers/gpu/drm/i915/display/intel_hotplug.c | 2 +-
> drivers/gpu/drm/i915/display/intel_lvds.c | 13 +++++--------
> drivers/gpu/drm/i915/display/intel_opregion.c | 2 +-
> drivers/gpu/drm/i915/display/vlv_dsi.c | 2 +-
> 7 files changed, 12 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
> index 47f13750f6fa66..bdf874c9f66b00 100644
> --- a/drivers/gpu/drm/i915/display/icl_dsi.c
> +++ b/drivers/gpu/drm/i915/display/icl_dsi.c
> @@ -2050,7 +2050,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)
> mutex_unlock(&dev->mode_config.mutex);
>
> if (!intel_panel_preferred_fixed_mode(intel_connector)) {
> - drm_err(&dev_priv->drm, "DSI fixed mode info missing\n");
> + drm_err(dev, "DSI fixed mode info missing\n");
> goto err;
> }
>
> @@ -2063,7 +2063,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)
> else
> intel_dsi->ports = BIT(port);
>
> - if (drm_WARN_ON(&dev_priv->drm, intel_connector->panel.vbt.dsi.bl_ports & ~intel_dsi->ports))
> + if (drm_WARN_ON(dev, intel_connector->panel.vbt.dsi.bl_ports & ~intel_dsi->ports))
> intel_connector->panel.vbt.dsi.bl_ports &= intel_dsi->ports;
>
> if (drm_WARN_ON(&dev_priv->drm, intel_connector->panel.vbt.dsi.cabc_ports & ~intel_dsi->ports))
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 8c3bd9ba0d7481..d49e7aadcec3d5 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -8726,8 +8726,7 @@ int intel_modeset_init_nogem(struct drm_i915_private *i915)
>
> intel_gmbus_setup(i915);
>
> - drm_dbg_kms(&i915->drm, "%d display pipe%s available.\n",
> - INTEL_NUM_PIPES(i915),
> + drm_dbg_kms(dev, "%d display pipe%s available.\n", INTEL_NUM_PIPES(i915),
> INTEL_NUM_PIPES(i915) > 1 ? "s" : "");
>
> for_each_pipe(i915, pipe) {
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index 372a5b427e4fbd..03c4d3dc0064fb 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -998,7 +998,7 @@ static int i915_ddb_info(struct seq_file *m, void *unused)
>
> seq_printf(m, "%-15s%8s%8s%8s\n", "", "Start", "End", "Size");
>
> - for_each_intel_crtc(&dev_priv->drm, crtc) {
> + for_each_intel_crtc(dev, crtc) {
> struct intel_crtc_state *crtc_state =
> to_intel_crtc_state(crtc->base.state);
> enum pipe pipe = crtc->pipe;
> diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c
> index 352a1b53b63ed6..6bad2e7543c427 100644
> --- a/drivers/gpu/drm/i915/display/intel_hotplug.c
> +++ b/drivers/gpu/drm/i915/display/intel_hotplug.c
> @@ -378,7 +378,7 @@ static void i915_hotplug_work_func(struct work_struct *work)
> u32 hpd_retry_bits;
>
> mutex_lock(&dev->mode_config.mutex);
> - drm_dbg_kms(&dev_priv->drm, "running encoder hotplug functions\n");
> + drm_dbg_kms(dev, "running encoder hotplug functions\n");
>
> spin_lock_irq(&dev_priv->irq_lock);
>
> diff --git a/drivers/gpu/drm/i915/display/intel_lvds.c b/drivers/gpu/drm/i915/display/intel_lvds.c
> index e97e24f690a9f8..fc315fc3457f91 100644
> --- a/drivers/gpu/drm/i915/display/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/display/intel_lvds.c
> @@ -847,8 +847,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
> }
>
> if (!dev_priv->display.vbt.int_lvds_support) {
> - drm_dbg_kms(&dev_priv->drm,
> - "Internal LVDS support disabled by VBT\n");
> + drm_dbg_kms(dev, "Internal LVDS support disabled by VBT\n");
> return;
> }
>
> @@ -867,12 +866,10 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
> pin = GMBUS_PIN_PANEL;
> if (!intel_bios_is_lvds_present(dev_priv, &pin)) {
> if ((lvds & LVDS_PORT_EN) == 0) {
> - drm_dbg_kms(&dev_priv->drm,
> - "LVDS is not present in VBT\n");
> + drm_dbg_kms(dev, "LVDS is not present in VBT\n");
> return;
> }
> - drm_dbg_kms(&dev_priv->drm,
> - "LVDS is not present in VBT, but enabled anyway\n");
> + drm_dbg_kms(dev, "LVDS is not present in VBT, but enabled anyway\n");
> }
>
> lvds_encoder = kzalloc(sizeof(*lvds_encoder), GFP_KERNEL);
> @@ -993,7 +990,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
> intel_backlight_setup(intel_connector, INVALID_PIPE);
>
> lvds_encoder->is_dual_link = compute_is_dual_link_lvds(lvds_encoder);
> - drm_dbg_kms(&dev_priv->drm, "detected %s-link lvds configuration\n",
> + drm_dbg_kms(dev, "detected %s-link lvds configuration\n",
> lvds_encoder->is_dual_link ? "dual" : "single");
>
> lvds_encoder->a3_power = lvds & LVDS_A3_POWER_MASK;
> @@ -1001,7 +998,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
> return;
>
> failed:
> - drm_dbg_kms(&dev_priv->drm, "No LVDS modes found, disabling.\n");
> + drm_dbg_kms(dev, "No LVDS modes found, disabling.\n");
> drm_connector_cleanup(connector);
> drm_encoder_cleanup(encoder);
> kfree(lvds_encoder);
> diff --git a/drivers/gpu/drm/i915/display/intel_opregion.c b/drivers/gpu/drm/i915/display/intel_opregion.c
> index caa07ef34f21ef..ba3666e94fc48d 100644
> --- a/drivers/gpu/drm/i915/display/intel_opregion.c
> +++ b/drivers/gpu/drm/i915/display/intel_opregion.c
> @@ -465,7 +465,7 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)
> struct opregion_asle *asle = dev_priv->display.opregion.asle;
> struct drm_device *dev = &dev_priv->drm;
>
> - drm_dbg(&dev_priv->drm, "bclp = 0x%08x\n", bclp);
> + drm_dbg(dev, "bclp = 0x%08x\n", bclp);
>
> if (acpi_video_get_backlight_type() == acpi_backlight_native) {
> drm_dbg_kms(&dev_priv->drm,
> diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
> index dee0147a316ce7..fdfe3611e74a76 100644
> --- a/drivers/gpu/drm/i915/display/vlv_dsi.c
> +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
> @@ -1855,7 +1855,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)
> enum port port;
> enum pipe pipe;
>
> - drm_dbg_kms(&dev_priv->drm, "\n");
> + drm_dbg_kms(dev, "\n");
>
> /* There is no detection method for MIPI so rely on VBT */
> if (!intel_bios_is_dsi_present(dev_priv, &port))
> --
> 2.34.1
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-10-06 16:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-06 16:31 [Intel-gfx] [PATCH v2 0/4] Simplify uncore register updates Andrzej Hajda
2022-10-06 16:31 ` [Intel-gfx] [PATCH v2 1/4] drm/i915/display: Use drm_device alias if defined Andrzej Hajda
2022-10-06 16:41 ` Ville Syrjälä [this message]
2022-10-06 20:48 ` [Intel-gfx] [PATCH v3 1/4] drm/i915/display: remove drm_device aliases Andrzej Hajda
2022-10-10 14:31 ` Andi Shyti
2022-10-10 15:22 ` Jani Nikula
2022-10-11 10:09 ` Andi Shyti
2022-10-11 10:13 ` Jani Nikula
2022-10-11 10:17 ` Jani Nikula
2022-10-11 10:28 ` Andi Shyti
2022-10-11 11:19 ` Tvrtko Ursulin
2022-10-06 16:31 ` [Intel-gfx] [PATCH v2 2/4] drm/i915/display: Use intel_uncore alias if defined Andrzej Hajda
2022-10-06 16:31 ` [Intel-gfx] [PATCH v2 3/4] drm/i915: make intel_uncore_rmw() write unconditionally Andrzej Hajda
2022-10-06 16:32 ` [Intel-gfx] [PATCH v2 4/4] drm/i915: use proper helper for register updates Andrzej Hajda
2022-10-14 17:57 ` Matt Roper
2022-10-17 9:28 ` Andrzej Hajda
2022-10-06 16:51 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Simplify uncore register updates (rev2) Patchwork
2022-10-06 17:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-10-06 21:26 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Simplify uncore register updates (rev3) Patchwork
2022-10-06 21:47 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-10-07 5:00 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for Simplify uncore register updates (rev2) Patchwork
2022-10-11 22:18 ` [Intel-gfx] [PATCH v2 0/4] Simplify uncore register updates Andi Shyti
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=Yz8FHapUF8BD7kkw@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=andrzej.hajda@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lucas.demarchi@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