From patchwork Fri Jan 30 11:31:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yakir Yang X-Patchwork-Id: 5754321 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A6836BF440 for ; Sat, 31 Jan 2015 12:18:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D3F7D20274 for ; Sat, 31 Jan 2015 12:18:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id BECEE20263 for ; Sat, 31 Jan 2015 12:18:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 922516E226; Sat, 31 Jan 2015 04:18:14 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from regular1.263xmail.com (regular1.263xmail.com [211.150.99.140]) by gabe.freedesktop.org (Postfix) with ESMTP id 253196E141 for ; Fri, 30 Jan 2015 03:32:27 -0800 (PST) Received: from ykk?rock-chips.com (unknown [192.168.167.172]) by regular1.263xmail.com (Postfix) with SMTP id B8D494B75; Fri, 30 Jan 2015 19:32:22 +0800 (CST) 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 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id B3E3C42D; Fri, 30 Jan 2015 19:32:18 +0800 (CST) X-RL-SENDER: ykk@rock-chips.com X-FST-TO: airlied@linux.ie X-SENDER-IP: 121.15.173.1 X-LOGIN-NAME: ykk@rock-chips.com X-UNIQUE-TAG: <5a68ad2081ed9f468be73af169478b99> X-ATTACHMENT-NUM: 0 X-SENDER: ykk@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [121.15.173.1]) by smtp.263.net (Postfix) whith ESMTP id 1085O1I9FN; Fri, 30 Jan 2015 19:32:20 +0800 (CST) From: Yakir Yang To: David Airlie , Russell King , Philipp Zabel Subject: [PATCH v2 07/12] drm: bridge/dw_hdmi: enable audio support for No-CEA display resolutions Date: Fri, 30 Jan 2015 06:31:33 -0500 Message-Id: <1422617493-25624-1-git-send-email-ykk@rock-chips.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1422617031-25098-1-git-send-email-ykk@rock-chips.com> References: <1422617031-25098-1-git-send-email-ykk@rock-chips.com> X-Mailman-Approved-At: Sat, 31 Jan 2015 04:17:55 -0800 Cc: Fabio Estevam , mmind00@googlemail.com, rockchip-discuss@chromium.org, dbehr@chromoum.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, dianders@chromium.org, Yakir Yang , marcheu@chromium.org, Mark Yao X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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 e07723c..8cc7b3d 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -1286,13 +1286,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) || @@ -1496,6 +1493,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; @@ -1507,6 +1505,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);