Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp899477ybj; Fri, 20 Sep 2019 01:41:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTBncfIvhfuqoFvA6tgsMDHr3QTou3ztx1U5+d94WoSyK8KcSJwYPDYJtkGFqYKWHNL6s8 X-Received: by 2002:a50:b6c8:: with SMTP id f8mr20866863ede.33.1568968912992; Fri, 20 Sep 2019 01:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568968912; cv=none; d=google.com; s=arc-20160816; b=eRfIXpmL6tbuB1kMEMF3N/ikaFfafxIqwq5HVn5BRohu9hgRhwycbTYM7q+HlbyqRf dz9JVeExh3uCV0Juohs5u0aZpYa9/PC2r0uoFmyJXIKFz8B7HRlvLKEB1CmxngPVFkHL ytik+oSKV7sWH4VdlAgQImu4xGDwI0PHB7qZg+ojedMJXJPvpNiwq74qhUd/pf4qL001 wB66uPTMKXxqN07xq2FR+0SCxqJDdbuG3Jdd0hpM0gTQVrF6+VhMfPC4WCt5V0Grs1C+ znF7TKU+7c083ywf18DBd3YtICW1mIq1RlS28MFQSQJgJ20+/yXaa0zhDY4r/iPzlVdA 9LRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4H/H/zZg9yN+fn9I2aCGadI2ofANPTwTJoGEC531p0Y=; b=XlJ3EVmJ12sN7Pw+PdpWNNpEt2eA31b/QWoZyFSu1YBY2+g/mxrl4ZVe2xWaakrzu3 M6vA8tQBxCb9iZJN55463WH+3mnbicgy6TtoghH7RxTSyUror6NSv1otAQuJtqLbbI2C Wqs0bdFwG7cxuApuToBWGTHPFmOqSpsgnjHfKppTj5FfssaoK5F2uARQS/SyZz+9vyUl 5jAFuvB5XyobSAyZBkd9TCWA5YiryMb8pts1cHVhnUz/li4yJ/gb7buKmeLxKPpOxlnR krm1lGJwEzzlavbiz+1Bi+9Ku6OHRjTkERzOnW2kxSHMtVNIXCclGUli2jlOb11wRvKZ 6lUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XPzPfDlT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c20si699527ejs.197.2019.09.20.01.41.29; Fri, 20 Sep 2019 01:41:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XPzPfDlT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393454AbfISWIi (ORCPT + 99 others); Thu, 19 Sep 2019 18:08:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:46462 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391216AbfISWIc (ORCPT ); Thu, 19 Sep 2019 18:08:32 -0400 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 BDF8321A4C; Thu, 19 Sep 2019 22:08:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568930911; bh=5NRVbviL4hGRRTEFYHM8bP08XnwcxyDGbBIrfHxPVpM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XPzPfDlTSB2lmeM/Bx7HDvx7WZChnvP78cnkVyOKOopc7mhuUOscsQSdap+CrBYac VYfA9XTUtixAssA3TFHdviumnCsPL/wni7M1Hjo+ovuxxuQ7bTcLvaDw4McbXvnKoR jvYdAm6+9WlNc41wE3LwEQLodk5np9d2+gfKEti0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Laurent Pinchart , Tomi Valkeinen , Aaro Koskinen , Sasha Levin Subject: [PATCH 5.2 059/124] drm/omap: Fix port lookup for SDI output Date: Fri, 20 Sep 2019 00:02:27 +0200 Message-Id: <20190919214821.145939136@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919214819.198419517@linuxfoundation.org> References: <20190919214819.198419517@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Laurent Pinchart [ Upstream commit 8090f7eb318d4241625449252db2741e7703e027 ] When refactoring port lookup for DSS outputs, commit d17eb4537a7e ("drm/omap: Factor out common init/cleanup code for output devices") incorrectly hardcoded usage of DT port 0. This breaks operation for SDI (which uses the DT port 1) and DPI outputs other than DPI0 (which are not used in mainline DT sources). Fix this by using the port number from the output omap_dss_device of_ports field. Fixes: d17eb4537a7e ("drm/omap: Factor out common init/cleanup code for output devices") Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20190821183226.13784-1-laurent.pinchart@ideasonboard.com Tested-by: Aaro Koskinen Signed-off-by: Sasha Levin --- drivers/gpu/drm/omapdrm/dss/output.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c index de0f882f0f7b0..14b41de44ebcd 100644 --- a/drivers/gpu/drm/omapdrm/dss/output.c +++ b/drivers/gpu/drm/omapdrm/dss/output.c @@ -4,6 +4,7 @@ * Author: Archit Taneja */ +#include #include #include #include @@ -20,7 +21,8 @@ int omapdss_device_init_output(struct omap_dss_device *out) { struct device_node *remote_node; - remote_node = of_graph_get_remote_node(out->dev->of_node, 0, 0); + remote_node = of_graph_get_remote_node(out->dev->of_node, + ffs(out->of_ports) - 1, 0); if (!remote_node) { dev_dbg(out->dev, "failed to find video sink\n"); return 0; -- 2.20.1