From: Alain Volmat <avolmat@me.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: Alain Volmat <alain.volmat@foss.st.com>,
intel-gfx@lists.freedesktop.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
dri-devel@lists.freedesktop.org, Alain Volmat <avolmat@me.com>
Subject: Re: [Intel-gfx] [PATCH 7/9] drm/sti/sti_hdmi: convert to using is_hdmi from display info
Date: Sat, 22 Apr 2023 19:06:55 +0200 [thread overview]
Message-ID: <ZEQUL8UB1uRXF0Aq@imac101> (raw)
In-Reply-To: <74fbd7a83712009734534d92e5499d4d87f0c53b.1662036058.git.jani.nikula@intel.com>
Hi Jani,
On Thu, Sep 01, 2022 at 03:47:09PM +0300, Jani Nikula wrote:
> Prefer the parsed results for is_hdmi in display info over calling
> drm_detect_hdmi_monitor(). Remove the now redundant hdmi_monitor member
> from struct sti_hdmi.
>
> Cc: Alain Volmat <alain.volmat@foss.st.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/sti/sti_hdmi.c | 11 ++++++-----
> drivers/gpu/drm/sti/sti_hdmi.h | 2 --
> 2 files changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
> index cb82622877d2..7e6d47c1c43b 100644
> --- a/drivers/gpu/drm/sti/sti_hdmi.c
> +++ b/drivers/gpu/drm/sti/sti_hdmi.c
> @@ -266,6 +266,7 @@ static void hdmi_active_area(struct sti_hdmi *hdmi)
> */
> static void hdmi_config(struct sti_hdmi *hdmi)
> {
> + struct drm_connector *connector = hdmi->drm_connector;
> u32 conf;
>
> DRM_DEBUG_DRIVER("\n");
> @@ -275,7 +276,7 @@ static void hdmi_config(struct sti_hdmi *hdmi)
>
> /* Select encryption type and the framing mode */
> conf |= HDMI_CFG_ESS_NOT_OESS;
> - if (hdmi->hdmi_monitor)
> + if (connector->display_info.is_hdmi)
> conf |= HDMI_CFG_HDMI_NOT_DVI;
>
> /* Set Hsync polarity */
> @@ -985,15 +986,15 @@ static int sti_hdmi_connector_get_modes(struct drm_connector *connector)
> if (!edid)
> goto fail;
>
> - hdmi->hdmi_monitor = drm_detect_hdmi_monitor(edid);
> - DRM_DEBUG_KMS("%s : %dx%d cm\n",
> - (hdmi->hdmi_monitor ? "hdmi monitor" : "dvi monitor"),
> - edid->width_cm, edid->height_cm);
> cec_notifier_set_phys_addr_from_edid(hdmi->notifier, edid);
>
> count = drm_add_edid_modes(connector, edid);
> drm_connector_update_edid_property(connector, edid);
>
> + DRM_DEBUG_KMS("%s : %dx%d cm\n",
> + (connector->display_info.is_hdmi ? "hdmi monitor" : "dvi monitor"),
> + edid->width_cm, edid->height_cm);
> +
> kfree(edid);
> return count;
>
> diff --git a/drivers/gpu/drm/sti/sti_hdmi.h b/drivers/gpu/drm/sti/sti_hdmi.h
> index 05b2f3d0d48d..6d4c3f57bc46 100644
> --- a/drivers/gpu/drm/sti/sti_hdmi.h
> +++ b/drivers/gpu/drm/sti/sti_hdmi.h
> @@ -57,7 +57,6 @@ struct hdmi_audio_params {
> * @reset: reset control of the hdmi phy
> * @ddc_adapt: i2c ddc adapter
> * @colorspace: current colorspace selected
> - * @hdmi_monitor: true if HDMI monitor detected else DVI monitor assumed
> * @audio_pdev: ASoC hdmi-codec platform device
> * @audio: hdmi audio parameters.
> * @drm_connector: hdmi connector
> @@ -83,7 +82,6 @@ struct sti_hdmi {
> struct reset_control *reset;
> struct i2c_adapter *ddc_adapt;
> enum hdmi_colorspace colorspace;
> - bool hdmi_monitor;
> struct platform_device *audio_pdev;
> struct hdmi_audio_params audio;
> struct drm_connector *drm_connector;
> --
Acked-by: Alain Volmat <avolmat@me.com>
Thanks.
> 2.34.1
>
next prev parent reply other threads:[~2023-04-24 12:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 12:47 [Intel-gfx] [PATCH 0/9] drm: convert to using is_hdmi and has_audio from display info Jani Nikula
2022-09-01 12:47 ` [Intel-gfx] [PATCH 1/9] drm/edid: parse display info has_audio similar to is_hdmi Jani Nikula
2022-09-01 12:47 ` [Intel-gfx] [PATCH 2/9] drm/nouveau: convert to using is_hdmi and has_audio from display info Jani Nikula
2022-09-01 20:16 ` Lyude Paul
2022-09-01 12:47 ` [Intel-gfx] [PATCH 3/9] drm/radeon: " Jani Nikula
2022-09-01 12:47 ` [Intel-gfx] [PATCH 4/9] drm/tegra: convert to using is_hdmi " Jani Nikula
2022-09-15 12:29 ` Thierry Reding
2022-09-01 12:47 ` [Intel-gfx] [PATCH 5/9] drm/exynos: " Jani Nikula
2022-09-01 12:47 ` [Intel-gfx] [PATCH 6/9] drm/i2c/tda998x: convert to using has_audio from display_info Jani Nikula
2022-09-01 12:47 ` [Intel-gfx] [PATCH 7/9] drm/sti/sti_hdmi: convert to using is_hdmi from display info Jani Nikula
2023-04-22 17:06 ` Alain Volmat [this message]
2022-09-01 12:47 ` [Intel-gfx] [PATCH 8/9] drm/rockchip: cdn-dp: call drm_connector_update_edid_property() unconditionally Jani Nikula
2022-09-05 10:12 ` Heiko Stübner
2022-09-01 12:47 ` [Intel-gfx] [PATCH 9/9] drm/rockchip: convert to using has_audio from display_info Jani Nikula
2022-09-05 10:13 ` Heiko Stübner
2022-09-01 13:49 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm: convert to using is_hdmi and has_audio from display info Patchwork
2022-09-01 14:00 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-09-02 10:38 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=ZEQUL8UB1uRXF0Aq@imac101 \
--to=avolmat@me.com \
--cc=alain.volmat@foss.st.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=laurent.pinchart@ideasonboard.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