Received: by 10.192.165.156 with SMTP id m28csp1725563imm; Tue, 17 Apr 2018 04:36:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx49S0h7i/KpYeTfwwzVey5Ah5riybxn5BRzu8r5nu1Ho7Br4KuTVdBE1HZs+aSGGbE+/naY1 X-Received: by 2002:a17:902:1681:: with SMTP id h1-v6mr1687615plh.145.1523965000335; Tue, 17 Apr 2018 04:36:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523965000; cv=none; d=google.com; s=arc-20160816; b=qC/HG7QQckGJXJcbMOpEFdDw/D0hiQLlXIKGrIX2m8QuN6xZRMA90CNoeAYHHMlCMj bdIswboHu4hpM+8eMwAsOCfV4mKDB75DPHp3/krteA20ygeQCYGxiWfc9jg+K+ZCgylu +UlfIp88IQgIpK+PGr+hOi+yNhVIX2b8r4ZyscOfocXryriE9bnK9jXA06wCB0BKxs27 AuDwHeFykvVVkfd1NeRpXH7w61hdZ1R7odBQJrsTS6Yx+FAblipmW0RP4kIYNeGLaynx I9Ujy2qigcuT5VWEntqnYxfvaXsrsO8AqwAjuK1god1Xl5uLf0S4sD+ZcsY2zQB46uGc d+Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=J9rnSikW1MS+/eWuqMh3qBiEMBUBaf90V2vqHat4X+U=; b=vwItVEePZrvhwU4yBtUSSyU83kQOgaWn5RPwXJlw/wTgfxCUMS898kDgcT/Rf5JjP0 MI8BxJEly2Q4UouG+oJ+efTGYylKWPuQrJup6yGDZeT9nWtNIlE/Cenv1Y7nJFFiGJfq c0JRAmtB7XykMky8teB9IooxmF8N7Y1Btz83OfbYQo2MTAE4K5R3Bxadj3QGEKAB+Aus FXL4VfKODIZ/2pRNxH8wXzgO5elpr7IEchEUlzfdgcZmHveZDzx//KqmCzKGk/qaTZci ACID38dI+v4QfHCOO8EJKw7noaC4/ZIn7mrU2eFJ/Qk1RUcjLRQniRl4lMLlLXhAOilY WXYA== ARC-Authentication-Results: i=1; mx.google.com; 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 b12si1214549pge.252.2018.04.17.04.36.25; Tue, 17 Apr 2018 04:36:40 -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; 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 S1752744AbeDQLfK (ORCPT + 99 others); Tue, 17 Apr 2018 07:35:10 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:15975 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752087AbeDQLfJ (ORCPT ); Tue, 17 Apr 2018 07:35:09 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w3HBYe1f028850; Tue, 17 Apr 2018 13:35:00 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2hbd6cxfna-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 17 Apr 2018 13:35:00 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1320F34; Tue, 17 Apr 2018 11:35:00 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id E4E3929E2; Tue, 17 Apr 2018 11:34:59 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 17 Apr 2018 13:34:59 +0200 Received: from localhost (10.201.23.32) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 17 Apr 2018 13:34:59 +0200 From: Philippe Cornu To: Yannick Fertre , Philippe Cornu , Benjamin Gaignard , Vincent Abriou , David Airlie , , CC: Alexandre Torgue Subject: [PATCH] drm/stm: ltdc: fix deferred endpoint management Date: Tue, 17 Apr 2018 13:34:41 +0200 Message-ID: <20180417113441.8214-1-philippe.cornu@st.com> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.201.23.32] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-17_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When a driver related to one of the endpoints is deferred due to probe dependencies (i2c, spi...) but the other one is ready, ltdc probe continues and the deferred driver will never be probed again. The fix consists in waiting for all deferred endpoints before continuing the ltdc probe. Signed-off-by: Philippe Cornu --- drivers/gpu/drm/stm/ltdc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index e3121d9e4230..014cef8cef37 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -987,14 +987,13 @@ int ltdc_load(struct drm_device *ddev) &bridge[i]); /* - * If at least one endpoint is ready, continue probing, - * else if at least one endpoint is -EPROBE_DEFER and - * there is no previous ready endpoints, defer probing. + * If at least one endpoint is -EPROBE_DEFER, defer probing, + * else if at least one endpoint is ready, continue probing. */ - if (!ret) + if (ret == -EPROBE_DEFER) + return ret; + else if (!ret) endpoint_not_ready = 0; - else if (ret == -EPROBE_DEFER && endpoint_not_ready) - endpoint_not_ready = -EPROBE_DEFER; } if (endpoint_not_ready) -- 2.15.1