Message ID | 20180825085620.10566-4-peda@axentia.se (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.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 6F4D41390 for <patchwork-dri-devel@patchwork.kernel.org>; Mon, 27 Aug 2018 07:38:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 527C12925B for <patchwork-dri-devel@patchwork.kernel.org>; Mon, 27 Aug 2018 07:38:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 459C529266; Mon, 27 Aug 2018 07:38: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=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 F19452925B for <patchwork-dri-devel@patchwork.kernel.org>; Mon, 27 Aug 2018 07:38:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1CB2D6E248; Mon, 27 Aug 2018 07:36:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80127.outbound.protection.outlook.com [40.107.8.127]) by gabe.freedesktop.org (Postfix) with ESMTPS id CE8916E7DF for <dri-devel@lists.freedesktop.org>; Sat, 25 Aug 2018 08:56:49 +0000 (UTC) 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+3OplCPf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dsfEwu56/mXHs22TuNjGEP+VLwi2SBE9Vfc8bwc44fXC/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-Mailman-Approved-At: Mon, 27 Aug 2018 07:34:43 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 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: Mark Rutland <mark.rutland@arm.com>, devicetree@vger.kernel.org, Alexandre Belloni <alexandre.belloni@bootlin.com>, David Airlie <airlied@linux.ie>, Nicolas Ferre <nicolas.ferre@microchip.com>, 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>, Sakari Ailus <sakari.ailus@iki.fi>, Peter Rosin <peda@axentia.se>, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.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(-)