summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/sti/sti_hdmi.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2022-09-01 15:47:09 +0300
committerJani Nikula <jani.nikula@intel.com>2023-05-02 18:48:58 +0300
commit851c1aaed86260a8b5de9d03a31a5f8b0cd18dc0 (patch)
treeaecb92675a2484938d0e385e7a5bdd5c6536f77e /drivers/gpu/drm/sti/sti_hdmi.c
parentc5c51b2420625faa1f0e363f21dba1de53806ff7 (diff)
downloadlinux-851c1aaed86260a8b5de9d03a31a5f8b0cd18dc0.tar.xz
drm/sti/sti_hdmi: convert to using is_hdmi from display info
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> Acked-by: Alain Volmat <avolmat@me.com> Link: https://patchwork.freedesktop.org/patch/msgid/74fbd7a83712009734534d92e5499d4d87f0c53b.1662036058.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/sti/sti_hdmi.c')
-rw-r--r--drivers/gpu/drm/sti/sti_hdmi.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
index 8539fe1fedc4..dc1562f14ceb 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;