From patchwork Tue Sep 6 04:48:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Zhong X-Patchwork-Id: 9315583 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 784E0601C0 for ; Tue, 6 Sep 2016 04:49:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 690E628B59 for ; Tue, 6 Sep 2016 04:49:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DA0F28B5B; Tue, 6 Sep 2016 04:49:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2689B28B59 for ; Tue, 6 Sep 2016 04:49:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B8FC46E52F; Tue, 6 Sep 2016 04:49:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f68.google.com (mail-pa0-f68.google.com [209.85.220.68]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2B8406E52F for ; Tue, 6 Sep 2016 04:49:07 +0000 (UTC) Received: by mail-pa0-f68.google.com with SMTP id ez1so10296597pab.3 for ; Mon, 05 Sep 2016 21:49:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fpbmlsWE33G8Pj+gLCvPXnq7p2me/Tb1Tev1vWCr/Io=; b=hz9t5MoFst8kH1UlvWGvIFGW+1xUbg+uh3/z35HlVUGN17K1PzX2xy30XvKleGBWF/ +pMLEltF+t16cuNJHqQKBNCdweyGgtUbi+5klwkeORDTNhf6Im+zW2Pi4laOxEYtjjCi HjMY9Tflc9pPh+1YzWLnZ3BTashfhsCavyE+OuGsP82yx6nKyZdAZB5/m+03hlX+8o1c E1fbijVNMIyGm3sGlP4gehYdzPin8naS/HkL07i6rGDilGdFF4QQZpEYVR/QOOD1rjoN C7Btce7UE9UGUuxDFGEVnhILE9Cf++14txOdAJG5COvfMp42HHa3TRH4oFODyuUoRG++ HHyw== X-Gm-Message-State: AE9vXwM7lRiVNGGw+8Pt4qWGBD0XpoaCEIjOLtYbSS8YIPbheKWt8MfOWxkrMtaGZl3djw== X-Received: by 10.66.48.10 with SMTP id h10mr19853284pan.95.1473137346880; Mon, 05 Sep 2016 21:49:06 -0700 (PDT) Received: from user5-HP-Z620-Workstation.corp.google.com ([172.22.52.170]) by smtp.gmail.com with ESMTPSA id s7sm16113398pfk.11.2016.09.05.21.49.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Sep 2016 21:49:06 -0700 (PDT) From: Chris Zhong To: dianders@chromium.org, heiko@sntech.de, zhengxing@rock-chips.com, cychiang@chromium.org Subject: [PATCH 1/2] drm/rockchip: cdn-dp: support audio hot-plug Date: Mon, 5 Sep 2016 21:48:54 -0700 Message-Id: <1473137335-14541-2-git-send-email-zyw@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1473137335-14541-1-git-send-email-zyw@rock-chips.com> References: <1473137335-14541-1-git-send-email-zyw@rock-chips.com> Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, Chris Zhong , linux-arm-kernel@lists.infradead.org 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-Virus-Scanned: ClamAV using ClamSMTP Issue hot-plug detection, EDID update, and ELD update notifications from DP drivers. Signed-off-by: Chris Zhong --- drivers/gpu/drm/rockchip/cdn-dp-core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c index 530b7ba..e0055a9 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -185,6 +186,7 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector) drm_mode_connector_update_edid_property(connector, edid); drm_edid_to_eld(connector, edid); + hdmi_event_new_eld(dp->dev, connector->eld); } kfree(edid); } @@ -345,6 +347,7 @@ static void cdn_dp_encoder_enable(struct drm_encoder *encoder) if (dp->dpms_mode != DRM_MODE_DPMS_ON) cdn_dp_commit(encoder); + hdmi_event_connect(dp->dev); } static void cdn_dp_encoder_disable(struct drm_encoder *encoder) @@ -352,6 +355,7 @@ static void cdn_dp_encoder_disable(struct drm_encoder *encoder) struct cdn_dp_device *dp = encoder_to_dp(encoder); dp->dpms_mode = DRM_MODE_DPMS_OFF; + hdmi_event_disconnect(dp->dev); } static int cdn_dp_encoder_atomic_check(struct drm_encoder *encoder,