From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/hdmi: convert intel_hdmi_to_dev to intel_hdmi_to_i915
Date: Tue, 21 Sep 2021 15:52:42 +0300 [thread overview]
Message-ID: <YUnVmuhQJ+UXmp/a@intel.com> (raw)
In-Reply-To: <20210921110244.8666-1-jani.nikula@intel.com>
On Tue, Sep 21, 2021 at 02:02:44PM +0300, Jani Nikula wrote:
> Prefer i915 over drm pointer.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_hdmi.c | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 1bc33766ed39..1e8a87f81e8e 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -53,21 +53,20 @@
> #include "intel_panel.h"
> #include "intel_snps_phy.h"
>
> -static struct drm_device *intel_hdmi_to_dev(struct intel_hdmi *intel_hdmi)
> +static struct drm_i915_private *intel_hdmi_to_i915(struct intel_hdmi *intel_hdmi)
> {
> - return hdmi_to_dig_port(intel_hdmi)->base.base.dev;
> + return to_i915(hdmi_to_dig_port(intel_hdmi)->base.base.dev);
> }
>
> static void
> assert_hdmi_port_disabled(struct intel_hdmi *intel_hdmi)
> {
> - struct drm_device *dev = intel_hdmi_to_dev(intel_hdmi);
> - struct drm_i915_private *dev_priv = to_i915(dev);
> + struct drm_i915_private *dev_priv = intel_hdmi_to_i915(intel_hdmi);
> u32 enabled_bits;
>
> enabled_bits = HAS_DDI(dev_priv) ? DDI_BUF_CTL_ENABLE : SDVO_ENABLE;
>
> - drm_WARN(dev,
> + drm_WARN(&dev_priv->drm,
> intel_de_read(dev_priv, intel_hdmi->hdmi_reg) & enabled_bits,
> "HDMI port enabled, expecting disabled\n");
> }
> @@ -1246,7 +1245,7 @@ static void hsw_set_infoframes(struct intel_encoder *encoder,
>
> void intel_dp_dual_mode_set_tmds_output(struct intel_hdmi *hdmi, bool enable)
> {
> - struct drm_i915_private *dev_priv = to_i915(intel_hdmi_to_dev(hdmi));
> + struct drm_i915_private *dev_priv = intel_hdmi_to_i915(hdmi);
> struct i2c_adapter *adapter =
> intel_gmbus_get_adapter(dev_priv, hdmi->ddc_bus);
>
> @@ -1830,7 +1829,7 @@ hdmi_port_clock_valid(struct intel_hdmi *hdmi,
> int clock, bool respect_downstream_limits,
> bool has_hdmi_sink)
> {
> - struct drm_i915_private *dev_priv = to_i915(intel_hdmi_to_dev(hdmi));
> + struct drm_i915_private *dev_priv = intel_hdmi_to_i915(hdmi);
>
> if (clock < 25000)
> return MODE_CLOCK_LOW;
> @@ -1946,8 +1945,7 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
> struct drm_display_mode *mode)
> {
> struct intel_hdmi *hdmi = intel_attached_hdmi(to_intel_connector(connector));
> - struct drm_device *dev = intel_hdmi_to_dev(hdmi);
> - struct drm_i915_private *dev_priv = to_i915(dev);
> + struct drm_i915_private *dev_priv = intel_hdmi_to_i915(hdmi);
> enum drm_mode_status status;
> int clock = mode->clock;
> int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
> --
> 2.30.2
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2021-09-21 12:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-21 11:02 [Intel-gfx] [PATCH] drm/i915/hdmi: convert intel_hdmi_to_dev to intel_hdmi_to_i915 Jani Nikula
2021-09-21 12:52 ` Ville Syrjälä [this message]
2021-10-01 9:40 ` Jani Nikula
2021-09-21 14:05 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/hdmi: convert intel_hdmi_to_dev to intel_hdmi_to_i915 (rev2) Patchwork
2021-09-21 16:42 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2021-04-01 11:59 [Intel-gfx] [PATCH] drm/i915/hdmi: convert intel_hdmi_to_dev to intel_hdmi_to_i915 Jani Nikula
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=YUnVmuhQJ+UXmp/a@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@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