Message ID | 20180825085620.10566-4-peda@axentia.se (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9CC1F1579 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 25 Aug 2018 08:59:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A3832B53E for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 25 Aug 2018 08:59:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B84D2B579; Sat, 25 Aug 2018 08:59:50 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 23DAE2B53E for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 25 Aug 2018 08:59:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uKr8q5rNUOKHaCcjZjGSwoa0uPWJohjfXD3ERFSAK1w=; b=GvcXxXT/BHyE4N HPNGnI4M8iJsiSjs51YB01jUmzgwL9z2DX/0u//4xmVrZxCBtqN/yZwtsN9+nIcaNP2/H9Gv38WNU h38MRGb5Io+FKeP3iKlSEV+56ri4jb3ZUoz+uhHfAqIJPKzGeGeVLirxXr31ovClGXSlSMSB1IFjr Q4E4OCQEnS9E5IPcaPfwSuJxEkYvpjFDG3lL9LQxpX+rbj20J+eDKdZIDsyjr1mjg4hi/br5sl+lp l1IfcBWWikz3FyyKckdADvwD/O4HSSMIQLMdUr5euTztJa+gWC2M+9foUlhK4xZixtaHlS+EpQ+Cy i40LEb/NsKid5DrMp7Dw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ftUQ4-0007e6-N1; Sat, 25 Aug 2018 08:59:44 +0000 Received: from mail-eopbgr80107.outbound.protection.outlook.com ([40.107.8.107] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ftUNL-0006K2-5c for linux-arm-kernel@lists.infradead.org; Sat, 25 Aug 2018 08:56:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentia.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XZh4ND8MnVhV+fnpHahXtSlare/sMZtqH6X2huHycUA=; b=m4EP8jRslBlYo6WQq6ylNY9NwHZsPH6Rl2C7SxXOT29SwU/I+WogmFzuMSd7bFcuKqiiHwTFY8y/9yWSxfsSyo0D55S3EmD1C/OVneUJIb2fNOyteqXiTv1oRclmwquKrgf//DiHZbJdCNE1U4MQ/nDj2fqdlTIgRl6HnbI1lGg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; Received: from orc.pedanet (85.226.244.23) by VI1PR0201MB2463.eurprd02.prod.outlook.com (2603:10a6:800:54::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.13; Sat, 25 Aug 2018 08:56:45 +0000 From: Peter Rosin <peda@axentia.se> To: linux-kernel@vger.kernel.org Subject: [PATCH v9 3/4] drm/atmel-hlcdc: always iterate over the first 4 output endpoints Date: Sat, 25 Aug 2018 10:56:19 +0200 Message-Id: <20180825085620.10566-4-peda@axentia.se> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180825085620.10566-1-peda@axentia.se> References: <20180825085620.10566-1-peda@axentia.se> MIME-Version: 1.0 X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: DB6PR01CA0040.eurprd01.prod.exchangelabs.com (2603:10a6:6:46::17) To VI1PR0201MB2463.eurprd02.prod.outlook.com (2603:10a6:800:54::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bfdcc90a-d5db-467d-3b87-08d60a68b058 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(7021125)(8989137)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:VI1PR0201MB2463; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0201MB2463; 3:4zdN7pnwJL7ZCFmHV3I/lNsbNSdsSG3StS44M3eU4RKmynNu5faV4toDJOMwXB1ydf+tfaW6Tj0Js7px+wo+TBc7Jj63hmDFoVls41Lb5geUgN2S+hFgMCpq1do0CcasSQo5FeJfEjs1XT/G5rGokJZRsf1eLawjsLNVjYVr7NEAcqGY1nQdeLA0rzQXWQTYbHg09WVj7fzQqhPoRfTELqiIBSHSs3OkQIWjybem9jfz6oH/UlDr3FrxGR7rkzro; 25:uSnpgL75vUNQbMTUfEck3mlrGVAbjK6iQd9LMNuKDHwu1rdxYTeo9vSM91jY20JbT41iDhdjZzOXhbsDDS2LCLajU8urlpOm4u0Ad1/DzmBrs4lZXwnDTP3yPL+IOUAL1L8+hFbqebEfh0rt96oUOtbEyEU+9c9nsedxoiWdTp/KBmx5bUWXg0ItI+ZLn1GhTHModi0FfjaNncegdl+UeXvyq1D0pfuR+NyuFzLFHDuPsn02mqx+K27DsCr8jbDhEQSozhNIBBnRNvoAuLNHLmlR1dQ0/pcll09ITqS3u4ZBhdgfC2yYD4Pz4Gn8IdE/8KoG29FYDuMY7Etk+ocPIw==; 31:QHeJ+usY535A5U9W3Q2nTNg0s/1siR6ZVi1+5Q1gGPF3lzJN/DLugb+4TxCgxuMUCzMKJIGrWcxb0wGnVD5BMoZzzmRUM+2blpVCcszGUT3UdVGDpB9jXUTOYPSXGDZNHaKaynwisDDiiyF8KWx2FwLLBmKiHf/it2wKGZ5NVLhEn3oMmOv4GpFYHraJVF6Qls9/xjbthlr+dDOJMFpBUOOHFWlle39OMztmVHQFF1c= X-MS-TrafficTypeDiagnostic: VI1PR0201MB2463: X-Microsoft-Antispam-PRVS: <VI1PR0201MB2463057D67B6D1E7477228B9BC350@VI1PR0201MB2463.eurprd02.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(2016111802025)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6043046)(201708071742011)(7699016); SRVR:VI1PR0201MB2463; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0201MB2463; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0201MB2463; 4:cHpzVeFrvCyufnvMz5R2GkJIa3nFWucfWEjtMRt2Fph1qsoKyn7l4jMsEDrbQBnHDkxhZ0QF2p5W6PpxjJuu0hV2d146lPUbPjgldkNmZZ4ZOv/WJrzQOqYcENvp+h+IxY0r+wigo0au34wFAOLMLHI147CvUxarc5swdE8KVCVDZiq5cPRsu5RO6VQFuOdtHLv3BccIpAF9fXDO/6N2gpdLhr3XsMaHqzPGnksbmiqOCrjl14FBobh3xOhIGJWwhcLY5V6B/XcwXGqRdH1+qA== X-Forefront-PRVS: 0775716B9D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(136003)(346002)(396003)(376002)(366004)(39830400003)(199004)(189003)(52116002)(54906003)(105586002)(50226002)(478600001)(476003)(11346002)(446003)(2616005)(2351001)(956004)(106356001)(316002)(16586007)(74482002)(486006)(6666003)(6916009)(81166006)(81156014)(8936002)(8676002)(7736002)(7416002)(5660300001)(2361001)(305945005)(97736004)(386003)(186003)(68736007)(26005)(6506007)(16526019)(47776003)(50466002)(51416003)(6512007)(66066001)(48376002)(2906002)(53936002)(3846002)(6116002)(5024004)(25786009)(36756003)(86362001)(4326008)(6486002)(76176011)(1076002)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0201MB2463; H:orc.pedanet; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0201MB2463; 23:IA5t9RQUr2Srvze/78Oao4o9l1KNjcFhPweGG74?= n7GZ3Aer8TpuRvrTjzd4smfOXmsYkukSpzD0WHvGq15nIN8mEI4Tj45aN6oEc02V1d8zTceBlQcKwz+VHmCnqYuuVR19vqPzNnt5Sqk6TL1LN79CQ2L9y4+mecsJM1fdUKhsib7zex5yC3eXJcwFf4jKcFPDIJtpx6QbbnrW1s8h3Qz1eheMqxsINkIPkVbYwZuJi6U4etQ8g5iDf8oyjXU95o4uKojazI+F5LKd/Af3JJ2cdz2esWcmT/zewnjbY3UVfQ5G6WSGeLv1dzBxxsV1rKLKIUJaRkAojw963hgQDx7uGk+3OplCPfOJpp2IGZmbi4RgTB8YpqcH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Lwi2SBE9Vfc8bwc44fXC/lfyP6o7fzfMAsY5J9OUsV8m5opVnQsr90R+05hhSGFOxwdfFXopa5pErW6uH9MIV5YD2JVdzHFj4b7zTLoC8RRr9wfqyH8VkBXlnsjPHMoV8OzkruN/+ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2018 08:56:45.5014 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bfdcc90a-d5db-467d-3b87-08d60a68b058 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0201MB2463 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180825_015655_248820_37FE955A X-CRM114-Status: GOOD ( 13.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Mark Rutland <mark.rutland@arm.com>, devicetree@vger.kernel.org, Alexandre Belloni <alexandre.belloni@bootlin.com>, Andrzej Hajda <a.hajda@samsung.com>, David Airlie <airlied@linux.ie>, dri-devel@lists.freedesktop.org, Russell King - ARM Linux <linux@armlinux.org.uk>, Boris Brezillon <boris.brezillon@bootlin.com>, Rob Herring <robh+dt@kernel.org>, Jacopo Mondi <jacopo+renesas@jmondi.org>, Jyri Sarha <jsarha@ti.com>, Daniel Vetter <daniel@ffwll.ch>, Sakari Ailus <sakari.ailus@iki.fi>, Peter Rosin <peda@axentia.se>, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
drm/atmel-hlcdc: bus-width override support
|
expand
|
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c index 8db51fb131db..c05c2b744981 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c @@ -78,12 +78,23 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint) int atmel_hlcdc_create_outputs(struct drm_device *dev) { int endpoint, ret = 0; + int attached = 0; - for (endpoint = 0; !ret; endpoint++) + /* + * Always scan the first few endpoints even if we get -ENODEV, + * but keep going after that as long as we keep getting hits. + */ + for (endpoint = 0; !ret || endpoint < 4; endpoint++) { ret = atmel_hlcdc_attach_endpoint(dev, endpoint); + if (ret == -ENODEV) + continue; + if (ret) + break; + attached++; + } /* At least one device was successfully attached.*/ - if (ret == -ENODEV && endpoint) + if (ret == -ENODEV && attached) return 0; return ret;
This enables more flexible devicetrees. You can e.g. have two output nodes where one is not enabled, without the ordering affecting things. Prior to this patch the active nodes had to have endpoint id zero and upwards consecutively. Signed-off-by: Peter Rosin <peda@axentia.se> --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)