Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1798867lqb; Sun, 26 May 2024 19:02:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVsI1jQISvBobE7Q5VzBa6ersv5UZYw2nn4+dP4v8golBZ1U8rZPPNCXUlG0AvTqzdtlC56XsggSBZwuxTuW/EkeGcLT6LwJAX8PqI/0g== X-Google-Smtp-Source: AGHT+IHT6FIirC6roeCaHX8WtA5NtaFyAszQKzTLhpvGkZLJ/bZpNXoO75DTjXvJJ7Lw8IZtAFQL X-Received: by 2002:a05:6a00:8c11:b0:6ed:4288:68bc with SMTP id d2e1a72fcca58-6f8f3916c82mr8122469b3a.19.1716775322800; Sun, 26 May 2024 19:02:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716775322; cv=pass; d=google.com; s=arc-20160816; b=hiYq7VUkIF2DHDOXmg9ua+p50NtUN3xxdXuQTdWn6RemWq0yXt8oLc9HiBkmK4QtbX fcKMGzWb3sk+J3y89LHFSZPnI8bUQoWcx5m1MJVVwZZHad8ZXCbdQS9mN9xqiL0tkj9T W3kwP/PMlKVLdXHR6kMQjVOh3CXGFjaudUIiLs5d+xxrJNX9uRARXGZrfYKlHdHiCiAI oWIcVhWExURnEeav0XL5z2tlBifMfDj8WLGZHxZfnH06q+N/XJFeUL5xIQzljtZXDesI WuE1MOFUfYhm6gtt822oUFOc1psoig5fERmz546yrqINyN+N+0LxN5ZJ0zxkBn67pQWA G0OA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=C4KbC23pVUx2ZjByBYlN7VlAIPsbM3xhWrQdhcgUorw=; fh=q7dAk2DvyJ7/ymfg5NKT4EMWKVYJXaHis4CfGkM30sw=; b=O7Q7b0kryLyyHFhxtsp8vIS2CFCiY4aBP2BpH4S/tBqYCfyoOmOPrlk0aVAJk5kk+T YUB6Mv7Q4EVbXt8Uz/MpFhVqT/8JpN5e9mn95AZsD3ACklzcN+5VfAN2+WtJMGiFx/PO IIwfC+qNeUmAV7q7JOVoD6iaFrmSeqlccGS9Nvv+4+loL+YMI/IL3XNxC3Tq8XxWK6Kh +yOAMbam1c13mBMPEKx+YC3GPaIxdaxmsqqp7IjGb1sE7E7ahTAGnbLdvJtnfvz7K03k LzJ8hxPqBw7yzLozYhoUWbA6Q5IvaviTKIS7NH05DNMeCqbGnOmMfhjSoQ/j4Yna/SPe lYJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=aI1YAsuy; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-189936-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189936-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f8fc051217si5281917b3a.68.2024.05.26.19.02.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 19:02:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189936-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=aI1YAsuy; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-189936-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189936-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id ED9E1B20BFF for ; Mon, 27 May 2024 02:01:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 46BB92107; Mon, 27 May 2024 02:01:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="aI1YAsuy" Received: from out-180.mta1.migadu.com (out-180.mta1.migadu.com [95.215.58.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1E2B653 for ; Mon, 27 May 2024 02:01:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716775309; cv=none; b=RUSfCmHMiYPo3KmE8xkOseWqM1fUqAecoOOYMRRYeZRmtKE0D9zv+ogzvD3uFzf9V80oPb10DROIy3TfrLRGtZrFM9ltGsvNvrNYYzYbAVU1gtSkPaagzOTPQ/5LJq1KFpZforz2FNkvCVBToR+atwqcKxQ9XPBeqi8yqBqprXk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716775309; c=relaxed/simple; bh=1iKB6LSdGo/7FZCO/nsmeCr9BVtKte1llxxIyXddlgo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WM3ge95fuJXGPMcDt0IvwAdjsWDybSWveg1llqtoN7UEDFMXNgu8KpNCQxAjcOGw67VDiGOHJ9fpXW9Uco4ecfiMWeB21jvEX1r/KU1KcjSJ3W8yKKEzv9Nzq9Lzg+TF0c4DphAASen18jRVFCPSR7AqLIDparhqFJ8iGLxkAqU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=aI1YAsuy; arc=none smtp.client-ip=95.215.58.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: dmitry.baryshkov@linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1716775304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=C4KbC23pVUx2ZjByBYlN7VlAIPsbM3xhWrQdhcgUorw=; b=aI1YAsuyn35SzhLYiWlpO+d5nNexjamENbPmTyQSbuBnXV4YNy/F9IQ3Sh1BPtVMC5VAtv dhCQQx1ME086s38TXjxcZDILTzAdK8+2w25Bss+qnOaR1m3Po54Et78J9AI1DWM09UQ9Z1 DQhvk+bhFzFdb+ySSykqQKW0B9+bOzo= X-Envelope-To: rfoss@kernel.org X-Envelope-To: laurent.pinchart@ideasonboard.com X-Envelope-To: dri-devel@lists.freedesktop.org X-Envelope-To: linux-kernel@vger.kernel.org Message-ID: <03701609-86b7-47a3-85af-db47035695fb@linux.dev> Date: Mon, 27 May 2024 10:01:35 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v6 02/10] drm/bridge: Set firmware node of drm_bridge instances automatically To: Dmitry Baryshkov Cc: Robert Foss , Laurent Pinchart , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20240526202115.129049-1-sui.jingfeng@linux.dev> <20240526202115.129049-3-sui.jingfeng@linux.dev> Content-Language: en-US, en-AU X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sui Jingfeng In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Hi, On 5/27/24 05:19, Dmitry Baryshkov wrote: > On Mon, May 27, 2024 at 04:21:07AM +0800, Sui Jingfeng wrote: >> Normally, the drm_bridge::of_node won't be used by bridge driver instances >> themselves. Rather, it is mainly used by other modules to find associated >> drm bridge drvier. Therefore, adding a drm bridge to the global bridge list >> and setting 'of_node' field of a drm bridge share the same goal. Both are >> for finding purpose, therefore better to group them to one function. >> >> Update the drm_bridge_add() interface and implementation to achieve such >> goal atomically, new implementation will fetch the device node from the >> backing device of the drm bridge driver automatically. For the majority >> cases, which is one device backing one drm bridge driver, this model works >> well. Drivers still can set it manually by passing NULL if this model >> doesn't fit. >> >> While at it, Add a 'struct device *' pointer to the drm_bridge structure. >> As it already being passed in by both of drm_bridge_add() and >> devm_drm_bridge_add(). A lot of driver instances has already added it into >> their derived structure, promote it into drm_bridge core helps to reduce >> a batch of boilerplates. >> >> Signed-off-by: Sui Jingfeng >> --- > > [trimmed] > >> @@ -231,7 +243,7 @@ static void drm_bridge_remove_void(void *bridge) >> */ >> int devm_drm_bridge_add(struct device *dev, struct drm_bridge *bridge) >> { >> - drm_bridge_add(bridge); >> + drm_bridge_add(bridge, dev); >> return devm_add_action_or_reset(dev, drm_bridge_remove_void, bridge); > > This breaks aux-hpd-bridge, which gets of_node as an external pointer > rather than dev->of_node. > Yes, you are right. I forget to modify that driver. My bad, will be fixed at the next version. -- Best regards Sui