Skip to content

Commit d840a21

Browse files
committed
drm/msm/hdmi: get rid of hdmi_mode
Use connector->display_info.is_hdmi instead of manually using drm_detect_hdmi_monitor(). Acked-by: Maxime Ripard <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/639657/ Link: https://lore.kernel.org/r/[email protected]
1 parent 384d2b0 commit d840a21

File tree

3 files changed

+4
-17
lines changed

3 files changed

+4
-17
lines changed

drivers/gpu/drm/msm/hdmi/hdmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void msm_hdmi_set_mode(struct hdmi *hdmi, bool power_on)
2525
spin_lock_irqsave(&hdmi->reg_lock, flags);
2626
if (power_on) {
2727
ctrl |= HDMI_CTRL_ENABLE;
28-
if (!hdmi->hdmi_mode) {
28+
if (!hdmi->connector->display_info.is_hdmi) {
2929
ctrl |= HDMI_CTRL_HDMI;
3030
hdmi_write(hdmi, REG_HDMI_CTRL, ctrl);
3131
ctrl &= ~HDMI_CTRL_HDMI;

drivers/gpu/drm/msm/hdmi/hdmi.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ struct hdmi {
6767
/* the encoder we are hooked to (outside of hdmi block) */
6868
struct drm_encoder *encoder;
6969

70-
bool hdmi_mode; /* are we in hdmi mode? */
71-
7270
int irq;
7371
struct workqueue_struct *workq;
7472

drivers/gpu/drm/msm/hdmi/hdmi_bridge.c

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ static void msm_hdmi_bridge_atomic_pre_enable(struct drm_bridge *bridge,
231231
msm_hdmi_phy_resource_enable(phy);
232232
msm_hdmi_power_on(bridge);
233233
hdmi->power_on = true;
234-
if (hdmi->hdmi_mode)
234+
if (connector->display_info.is_hdmi)
235235
msm_hdmi_audio_update(hdmi);
236236
}
237237

@@ -263,7 +263,7 @@ static void msm_hdmi_bridge_atomic_post_disable(struct drm_bridge *bridge,
263263
if (hdmi->power_on) {
264264
power_off(bridge);
265265
hdmi->power_on = false;
266-
if (hdmi->hdmi_mode)
266+
if (hdmi->connector->display_info.is_hdmi)
267267
msm_hdmi_audio_update(hdmi);
268268
msm_hdmi_phy_resource_disable(phy);
269269
}
@@ -319,7 +319,7 @@ static void msm_hdmi_set_timings(struct hdmi *hdmi,
319319
DBG("frame_ctrl=%08x", frame_ctrl);
320320
hdmi_write(hdmi, REG_HDMI_FRAME_CTRL, frame_ctrl);
321321

322-
if (hdmi->hdmi_mode)
322+
if (hdmi->connector->display_info.is_hdmi)
323323
msm_hdmi_audio_update(hdmi);
324324
}
325325

@@ -338,17 +338,6 @@ static const struct drm_edid *msm_hdmi_bridge_edid_read(struct drm_bridge *bridg
338338

339339
hdmi_write(hdmi, REG_HDMI_CTRL, hdmi_ctrl);
340340

341-
if (drm_edid) {
342-
/*
343-
* FIXME: This should use connector->display_info.is_hdmi from a
344-
* path that has read the EDID and called
345-
* drm_edid_connector_update().
346-
*/
347-
const struct edid *edid = drm_edid_raw(drm_edid);
348-
349-
hdmi->hdmi_mode = drm_detect_hdmi_monitor(edid);
350-
}
351-
352341
return drm_edid;
353342
}
354343

0 commit comments

Comments
 (0)