From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05F10C2D0D1 for ; Sun, 29 Dec 2019 17:47:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4C51207FD for ; Sun, 29 Dec 2019 17:47:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641645; bh=Fs7tE8hT5l6mmwKj3LWtQCZun+onDXT/v+ybQZEiBjY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=PoHWRJJ8xUqg6S31jqkHAtd5QBUDq3UCQpg63sF119UBHKpFd5yzxUwWTl+ia/OKv jYbsTCEenCsXCwIKVY99hZ3+Z6qIlL0ira0L/9NjfdWuTTGmvEPMHT5551z+fMpza3 vPNBicRuBncdCRkY1c0TYoAW8akJPOr0jC1/Di0M= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730990AbfL2RrZ (ORCPT ); Sun, 29 Dec 2019 12:47:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:57952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731256AbfL2RrY (ORCPT ); Sun, 29 Dec 2019 12:47:24 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4D741206A4; Sun, 29 Dec 2019 17:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641643; bh=Fs7tE8hT5l6mmwKj3LWtQCZun+onDXT/v+ybQZEiBjY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BNAfi7KBhtrFYgVN4aAEwDQUOy5fmzTouVe1ay8Ouelg7E6UKXxixLniMqy6CCn5p T72btChAEzVjlFV0dHJE0MbFP4TfsJj0zNnBS2DMYg6W2DSso3DO1SnD/GKzrgX+WL zIYGPwyZht+w6LuCtRnAw7IV+06hQqUT385g2CVw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Cheng-Yi Chiang , Daniel Kurtz , Yakir Yang , Neil Armstrong , Sasha Levin Subject: [PATCH 5.4 144/434] drm/bridge: dw-hdmi: Restore audio when setting a mode Date: Sun, 29 Dec 2019 18:23:17 +0100 Message-Id: <20191229172711.307062062@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Daniel Kurtz [ Upstream commit fadfee3f9d8f114435a8a3e9f83a227600d89de7 ] When setting a new display mode, dw_hdmi_setup() calls dw_hdmi_enable_video_path(), which disables all hdmi clocks, including the audio clock. We should only (re-)enable the audio clock if audio was already enabled when setting the new mode. Without this patch, on RK3288, there will be HDMI audio on some monitors if i2s was played to headphone when the monitor was plugged. ACER H277HU and ASUS PB278 are two of the monitors showing this issue. Signed-off-by: Cheng-Yi Chiang Signed-off-by: Daniel Kurtz Signed-off-by: Yakir Yang Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20191008102145.55134-1-cychiang@chromium.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 3e82d604201e..1326f2c734bf 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -2033,7 +2033,7 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode) /* HDMI Initialization Step E - Configure audio */ hdmi_clk_regenerator_update_pixel_clock(hdmi); - hdmi_enable_audio_clk(hdmi, true); + hdmi_enable_audio_clk(hdmi, hdmi->audio_enable); } /* not for DVI mode */ -- 2.20.1