Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2370415pxp; Fri, 18 Mar 2022 09:09:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4PHAbcBNy3HDeym3mnoMJT/tiS3XU59NXfSWBodVJfKP9HH57ZZqNZBGjUsrcvNIXn8oG X-Received: by 2002:a17:906:dc8c:b0:6df:831e:76d4 with SMTP id cs12-20020a170906dc8c00b006df831e76d4mr9680096ejc.139.1647619785262; Fri, 18 Mar 2022 09:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647619785; cv=none; d=google.com; s=arc-20160816; b=kxwI4tnOSpBtP4eHDGKxv2uc8ZKlq9xdsn9bYxy0PwJuu1UQFnM056Fc5wTEt8g9YC hpjLBPn3m/pvNKHSqIUrlLDemCNUXu0hXYnWAOnYJaPYXEPXUBZ9vWzoyuhm3u8TvyXo TZGHvgADPx1yo0+8SU7MU03kTP06d7O1CAdG2ugmTTsNEsK6lFqdianStJY86CrAQXfI PYkV+g2jFkuNGdWJm5nC7+yOI0CaqkEYgipBUkRcAHFwT/cUdScNxX0Qtf9gMbEg1Y4f Vg7NxXPxyDvOU0lZ6gzZTk8E006qlbjXl7zIIb07pa2J4+krQiLnzHzKJ2vmApFZDMqm FjGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Ndis8xaHLE8kHSwCX3AhW36x0jTcWsO1EG2l0DatDX8=; b=T79tH7jNbZgKx2W31IpUetV2pnkgMKiN3G+Z+CaQtaR2/35lgxCUP2avTR1OsCj9Wx uJ89oHtjKXObC9EpXZIMQQ11zdPKpxGN6yhx4SQ8aIlhVydvtBKPBnHm+j3zY4S+jyho T/y6qE4trjRLWV8gc0EdskwqRggKhsZFQLuQe3l6kATXh3ns7qdyJLwsWZ8WF7+r0Twr KEV3PlWskb8RBqbwPHPbvEmgKRGxjsulmDm4ruo7lXgWQ/w8FRbiQQcYH0BO8z9+Znri OYcykVqbvp2F2Hzk2hY6wSqqAXgps7zMpYdY3+6ARy5S8l09tMRwqhKjYjYailSuxcJf Jvnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Dod9l0me; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt32-20020a1709072da000b006df76385c15si1638162ejc.181.2022.03.18.09.09.20; Fri, 18 Mar 2022 09:09:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Dod9l0me; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234948AbiCRKXW (ORCPT + 99 others); Fri, 18 Mar 2022 06:23:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234999AbiCRKXF (ORCPT ); Fri, 18 Mar 2022 06:23:05 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2D7A1ED07F for ; Fri, 18 Mar 2022 03:21:46 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: kholk11) with ESMTPSA id 967871F45DF3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1647598905; bh=R2Fab+/4Q7++fifqmPDXKzsJYJZyn9f33fmTuUB0D4I=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Dod9l0meUNiRYcJN4FDqfmbnda3tnKjwdpK3zx/jLmDpE1cs+kukPITKnv4Xo4ZQW OxatywIqPs/f7uywjxvQOONMVvJuEsba2n1AxDugu50DHmFp60tebAgLauQPyDafcb 6FoVy7FoYgmgZ0rZVYmSpsZ1OmgPSB9kzjW7EqAbYabqrdZcmU9LB5BC9OpkEhcMpj f1GaMJtUiUeb9c3kgLwBjsxHLZ1cb/3Pg7gtXR3em+ETEfvBs0KTbLbVB30UVJT+Ul J6eOsJ++nZ3HSHtqOVkBHRADiiSqlXbjkhUZiWB1q2of0qoxBkVSb+rhwQsJQAbdkz 7NVSBTzY+VH7A== Message-ID: <399aa873-4285-cc48-8c58-89673c505cb0@collabora.com> Date: Fri, 18 Mar 2022 11:21:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH 2/2 RESEND] drm/bridge: Add extra checks in pre_enable and post_enable Content-Language: en-US To: =?UTF-8?Q?Ricardo_Ca=c3=b1uelo?= , dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, andrzej.hajda@intel.com, narmstrong@baylibre.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org References: <20220311093406.4068019-1-ricardo.canuelo@collabora.com> <20220311093406.4068019-3-ricardo.canuelo@collabora.com> From: AngeloGioacchino Del Regno In-Reply-To: <20220311093406.4068019-3-ricardo.canuelo@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 11/03/22 10:34, Ricardo Cañuelo ha scritto: > Depending on the bridge code, certain userspace events during a driver > teardown (such as a DRM ioctl call) might cause a race condition where > the drm_bridge_chain_pre_enable() and drm_bridge_chain_post_enable() > functions could be called for a bridge that has just been detached and > removed from the bridge chain of an encoder. > > This change makes these functions a bit more robust by bailing out if > the bridge has already been detached. > > Tested on an Acer Chromebook R13 (Elm, MT8173) with Debian Sid. > > Signed-off-by: Ricardo Cañuelo On various chromebooks with different MediaTek SoC models, and on Qualcomm SC7180 Trogdor, Tested-by: AngeloGioacchino Del Regno