Message ID | 20220613144800.326124-18-maxime@cerno.tech (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A56FC433EF for <dri-devel@archiver.kernel.org>; Mon, 13 Jun 2022 14:49:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 81C5510E83B; Mon, 13 Jun 2022 14:49:01 +0000 (UTC) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id CE99410E837 for <dri-devel@lists.freedesktop.org>; Mon, 13 Jun 2022 14:48:59 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 7278C3200972; Mon, 13 Jun 2022 10:48:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 13 Jun 2022 10:48:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1655131737; x=1655218137; bh=nd A8eY6a5iymQUjqVhwiJTuImgDxQFcTtcXOYgHWCuo=; b=kAi1yhJczX7MPdDiaT Izrf8qWozX2mLQZm6TE6OM6a+3T4W3XPWSykMoBWwY7qImfX6bLPuVESmvJDrerl PdsPkWXg0TVhq6yWlxIHGpB2XcQqG2Of+1LmQchW/IEjK5urHYG7tD+cdnE39GYu qT6/s67cny8kPAOLYqDf4VQSicV2eWl1WB1uqjgxLcANIBB5jGnSZeem9vyHwJnL SyHcLBXL2CrcLAloQwlDS+8GsQ4X4p/4Tvnzz1AqcHQPu0o23Qv/57Ycbwkt4dLn qJ/HdBr9QJfZXISwmULMgiW6rtTok0Q419CrSaABhUukeBGhL5m6TC8v35i/1E1C 3PLA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1655131737; x=1655218137; bh=ndA8eY6a5iymQ UjqVhwiJTuImgDxQFcTtcXOYgHWCuo=; b=HMqq3PSD70IkmXYDcbbJS8M8WUd0m simBT4zCdqUe+xLJTgIPLrP4Rn2bCTS75mJLsccj2rWVXttI26JoH7gYNuRBoQcI L60lIpeqkzgQ0bH73ONXrXlgvz6FySmu0hSKUTpU+X0I2JalGUV4iHkHTe707lzF Bc9t+lSrQMrGJqRjwmkZu9sFjnBgi7vZgjOLMk2fibwzvmoX7srK6lqmcjeCCetv wflu4Uy+aRGpI2wEt7s5V2nkEDX2qj8gWaenLvy0VQgYxu2zNLeyUmzARPe7yCbb pyP1xS9cefx51DBZed4XaNgk/JpxZzzi3TaoxiLmLBlCzcOw1oWC2M+ZA== X-ME-Sender: <xms:WU6nYomyOOgsT6i-RywMt9H8mSoGDY5mRllXJHnesDn65R1cL_ma8g> <xme:WU6nYn02zXwUCKzPsMLSI5FWtHLU58KOlplrZvbuRC8o2fgo9HCeFluXcl8lDZewe MFF-eG3D12iXRlpzpE> X-ME-Received: <xmr:WU6nYmrZ8BpH2lSip_ZU-5oupk2onTLSxu4gg9AsIxY-yI2u0XtVxtyiMhoZdsXfhYY9-h3lAS3L3JigpxwTXM3ahb61HldqdpYQiWE> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddujedgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeelkeefteduhfekjeeihfetudfguedvveekkeetteekhfekhfdtlefgfedu vdejhfenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: <xmx:WU6nYkk6fXpx8-5t_nVZY-e7bZXR8-vbCt0dPv07P7hfeFeNpso9sA> <xmx:WU6nYm0rP-8jtkY2R15pgwdutKZXNQdCt6sE_b1fSzO9fJznJPlVIw> <xmx:WU6nYrsHTK4as33AerChKqltZEmzdmtQmbeO8shOV4r4gpYwvniX5A> <xmx:WU6nYgrMS1nkR3Y53sgJcGpjDRihthNGxj3BYOOEMKTL7r4CmLXC7Q> Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Jun 2022 10:48:57 -0400 (EDT) From: Maxime Ripard <maxime@cerno.tech> To: Daniel Vetter <daniel.vetter@intel.com>, David Airlie <airlied@linux.ie>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Thomas Zimmermann <tzimmermann@suse.de>, Maxime Ripard <maxime@cerno.tech> Subject: [PATCH 17/33] drm/vc4: hdmi: Disable audio if dmas property is present but empty Date: Mon, 13 Jun 2022 16:47:44 +0200 Message-Id: <20220613144800.326124-18-maxime@cerno.tech> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613144800.326124-1-maxime@cerno.tech> References: <20220613144800.326124-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: Phil Elwell <phil@raspberrypi.org>, stable@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
drm/vc4: Misc fixes
|
expand
|
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 6aadb65eb640..c8571e17afa8 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -2034,12 +2034,12 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi) struct device *dev = &vc4_hdmi->pdev->dev; struct platform_device *codec_pdev; const __be32 *addr; - int index; + int index, len; int ret; - if (!of_find_property(dev->of_node, "dmas", NULL)) { + if (!of_find_property(dev->of_node, "dmas", &len) || !len) { dev_warn(dev, - "'dmas' DT property is missing, no HDMI audio\n"); + "'dmas' DT property is missing or empty, no HDMI audio\n"); return 0; }