From patchwork Wed Jan 16 14:36:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Stach X-Patchwork-Id: 1988491 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id A5CA43FC85 for ; Wed, 16 Jan 2013 14:37:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8B446E6902 for ; Wed, 16 Jan 2013 06:37:57 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from km20343-01.keymachine.de (ns.km20343-01.keymachine.de [84.19.182.79]) by gabe.freedesktop.org (Postfix) with ESMTP id 3195EE68DA for ; Wed, 16 Jan 2013 06:36:48 -0800 (PST) Received: from localhost.localdomain (g228245060.adsl.alicedsl.de [92.228.245.60]) by km20343-01.keymachine.de (Postfix) with ESMTPA id 476757D42E3; Wed, 16 Jan 2013 15:36:47 +0100 (CET) From: Lucas Stach To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 2/2] drm: tegra: check HDMI sink capability Date: Wed, 16 Jan 2013 15:36:42 +0100 Message-Id: <1358347002-10999-2-git-send-email-dev@lynxeye.de> X-Mailer: git-send-email 1.8.0.2 In-Reply-To: <1358347002-10999-1-git-send-email-dev@lynxeye.de> References: <1358347002-10999-1-git-send-email-dev@lynxeye.de> Cc: linux-tegra@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Check if sink is HDMI capable when enabling an output. This disables HDMI audio/infoframes if we are talking to a plain DVI sink. All things except this check are already in place. Signed-off-by: Lucas Stach Reviewed-by: Thierry Reding Reviewed-by: Jon Mayo --- drivers/gpu/drm/tegra/hdmi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index e060c7e..3405313 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -660,6 +660,9 @@ static int tegra_output_hdmi_enable(struct tegra_output *output) usleep_range(1000, 2000); tegra_periph_reset_deassert(hdmi->clk); + /* if the connected sink is not HDMI capable fall back to plain DVI */ + hdmi->dvi = !drm_detect_hdmi_monitor(output->edid); + tegra_dc_writel(dc, VSYNC_H_POSITION(1), DC_DISP_DISP_TIMING_OPTIONS); tegra_dc_writel(dc, DITHER_CONTROL_DISABLE | BASE_COLOR_SIZE888,