From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E73D0C433E0 for ; Mon, 6 Jul 2020 09:47:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C1DDA2073E for ; Mon, 6 Jul 2020 09:47:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1DDA2073E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sntech.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1550D89E0C; Mon, 6 Jul 2020 09:47:47 +0000 (UTC) Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 16E8789E0C for ; Mon, 6 Jul 2020 09:47:46 +0000 (UTC) Received: from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jsNio-0007ip-Tk; Mon, 06 Jul 2020 11:47:34 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Sandy Huang Subject: Re: [PATCH] drm/of: Consider the state in which the ep is disabled Date: Mon, 06 Jul 2020 11:47:34 +0200 Message-ID: <5521346.QZMSPK5NSd@diego> In-Reply-To: <20200706075944.11558-1-hjc@rock-chips.com> References: <20200706075944.11558-1-hjc@rock-chips.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: huangtao@rock-chips.com, Thomas Zimmermann , David Airlie , kever.yang@rock-chips.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, andy.yan@rock-chips.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Sandy, Am Montag, 6. Juli 2020, 09:59:44 CEST schrieb Sandy Huang: > don't mask possible_crtcs if remote-point is disabled. > > Signed-off-by: Sandy Huang > --- > drivers/gpu/drm/drm_of.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c > index fdb05fbf72a0..f5f250435add 100644 > --- a/drivers/gpu/drm/drm_of.c > +++ b/drivers/gpu/drm/drm_of.c > @@ -66,6 +66,11 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, > uint32_t possible_crtcs = 0; > > for_each_endpoint_of_node(port, ep) { > + if (!of_device_is_available(ep)) { > + of_node_put(ep); You'd only need the of_node_put here, if you were exiting the loop. With the "continue" below, the next iteration of for_each_endpoint_of_node will do the put on "ep" Heiko > + continue; > + } > + > remote_port = of_graph_get_remote_port(ep); > if (!remote_port) { > of_node_put(ep); > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel