Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966044AbbBCPQO (ORCPT ); Tue, 3 Feb 2015 10:16:14 -0500 Received: from regular1.263xmail.com ([211.150.99.138]:43791 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965790AbbBCPQK (ORCPT ); Tue, 3 Feb 2015 10:16:10 -0500 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: ykk@rock-chips.com X-FST-TO: airlied@linux.ie X-SENDER-IP: 192.253.240.203 X-LOGIN-NAME: ykk@rock-chips.com X-UNIQUE-TAG: <6a17377572eb13c1fb83b02ef1038970> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Yakir Yang To: David Airlie , Russell King , Philipp Zabel Cc: Fabio Estevam , Shawn Guo , Rob Clark , Mark Yao , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Sean Cross , Jyri Sarha , Ben Zhang , alsa-devel@alsa-project.org, Heiko Stuebner , linux-arm-kernel@lists.infradead.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, djkurtz@chromium.org, mmind00@googlemail.com, dianders@chromium.org, marcheu@chromium.org, linux-rockchip@lists.infradead.org, Yakir Yang Subject: [PATCH v3 09/15] drm: bridge/dw_hdmi: enable audio support for No-CEA display resolutions Date: Tue, 3 Feb 2015 10:15:14 -0500 Message-Id: <1422976514-30306-1-git-send-email-ykk@rock-chips.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1422975418-13302-1-git-send-email-ykk@rock-chips.com> References: <1422975418-13302-1-git-send-email-ykk@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1962 Lines: 58 If the monitor support audio, so we should support audio for it, even if the display resolution is No-CEA mode. Signed-off-by: Yakir Yang --- Changes in v3: None Changes in v2: - enable audio support for No-CEA display mode drivers/gpu/drm/bridge/dw_hdmi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index 1c0515f..0bee5ea 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -1264,13 +1264,10 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode) hdmi->vic = drm_match_cea_mode(mode); - if (!hdmi->vic) { + if (hdmi->hdmi_data.video_mode.mdvi) dev_dbg(hdmi->dev, "Non-CEA mode used in HDMI\n"); - hdmi->hdmi_data.video_mode.mdvi = true; - } else { + else dev_dbg(hdmi->dev, "CEA mode used vic=%d\n", hdmi->vic); - hdmi->hdmi_data.video_mode.mdvi = false; - } if ((hdmi->vic == 6) || (hdmi->vic == 7) || (hdmi->vic == 21) || (hdmi->vic == 22) || @@ -1538,6 +1535,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector) { struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, connector); + struct hdmi_vmode *vmode = &hdmi->hdmi_data.video_mode; struct edid *edid; int ret; @@ -1549,6 +1547,8 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector) dev_dbg(hdmi->dev, "got edid: width[%d] x height[%d]\n", edid->width_cm, edid->height_cm); + vmode->mdvi = !drm_detect_hdmi_monitor(edid); + drm_mode_connector_update_edid_property(connector, edid); ret = drm_add_edid_modes(connector, edid); kfree(edid); -- 2.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/