From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 575421D5ADD for ; Wed, 11 Dec 2024 08:43:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733906597; cv=none; b=DeTlXehDpicEssBYnS2/d+BXgPZGdFXOiO7Cvt7OXPI8kgdekYliYcFRmtT/3QoK2UJl7BNBBmmW84ZfPDV+030G+caqBSsERf4RUmHBjXObzU9WBF2sq1nPydL7bU+0oOFzn/mnKlBKWX7ch/GdJj378nnzynY54Lfl5H1j4ag= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733906597; c=relaxed/simple; bh=E+6hicwdN2qZVg3hca/JtaXyTtyPi20GrborVG3YtZA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=syko8wj1AxZ3qKi1nW7i1xHj3DFx9jQ7lU5e9bpq+SjsWtlzc1hzerYSOqMMvFhns5i4DhbDzbbm6dOn+O5zxX2nOlY33uaBc2MAOnT6LhJ18JSleeKCLyAn+UtYGv1RHml34xRlopfWXIgTrwttjQ+DzjXQWIH6Me3Q8I4AZfg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch; spf=none smtp.mailfrom=ffwll.ch; dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b=Xf+mOKfP; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ffwll.ch Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="Xf+mOKfP" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-434a2033562so55972585e9.1 for ; Wed, 11 Dec 2024 00:43:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; t=1733906594; x=1734511394; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=eDl8Jb1frNHxOgKdgBmezzKCSNHw67jaTRZ7H3Dd+tA=; b=Xf+mOKfPvS5p0ZhSBByjp0EM6ub1vRfuR1lWlmnjA/SeSreleavtg4mgf5utPbce4z uTcdsZ43uWMbPGFp9eeq8uFMkg3c20RbeICPpzQYoV5AXQG2zMnmOOQyFs60efVtuFB5 DP0qWBHkcEQ53jm91htLgkh2Y1tORpa097HNk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733906594; x=1734511394; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eDl8Jb1frNHxOgKdgBmezzKCSNHw67jaTRZ7H3Dd+tA=; b=A0bBq56efyj0O0u35ZDIsnlkzum0icqzeMhSIFpSTsBAFx7DaO6I3Cl8Msmyr3J2a5 OE63DUe506a2iQSd3KPmCv4gSGzfqgPxydLliLlmH35hTHZXBYGK21jnY7gkOEoNb/P+ follKpM36Ctir/+sE5ZE1uxzCgwdjttrOBnP8MI319waUfDkffEp+kZTzK38lNAnU67h qrvwsyf9bULO2vxH3KPR1SPqqZbGHxtW4c2wJ2mDFVv/PmewwnSD+l0qBMs4CZ6FKz+9 fs1ThYeA2Uo/WeEYnM9rVcf5HLA9nhMJJsxEaLXAThCYQ4PDCYJVgjnIWbgWt/NCVahn th4Q== X-Forwarded-Encrypted: i=1; AJvYcCXjAite+0hJagNFi0lI/Y55nDKtscOWMHU/jlhz9OiCqnoYcR6+00OsZQV7wcgidXQ/ISbJNM4YHXeWaDXyuQ==@vger.kernel.org X-Gm-Message-State: AOJu0YzjoQEIrj+gnoEhd8aV6Sm4zxNUNPMV89IycQHGHXmxbMD1NSoY uAF9pOqFEBPPmkE0t5I81WGnYbWHrLLegQarwjQxuIY4mWKTm094P5h1Y8VBCGU= X-Gm-Gg: ASbGncvQNoMruiFXzSenzBnxKA9H4rNDpQmbNllYU3Nr1V63AEAU0BEuwnte/90ed8/ z7Gi/gJq1rgnM4UUF1xa5q6xlZ0+qEzdAQult1pS5Wq7EhdM04xG2lZpdVlfJ36Hsy0OuF/j+I+ VBgb4hYo0DAricqOIBp9uBNykh3V8KGePC0khzysXgB1FVnokE3ToHQtCeG/2ZpCmfsPtcLVyLt N3i/sgNtd09t9jxshzj8y3PZlrYduADfZiE68jLkFBMdnywV9uhgzUYrxysLMb2mg== X-Google-Smtp-Source: AGHT+IEC5s1ABwh+QmwDOLYC0yNnP/Duuq98w6DzbDd3sOm9WXsmU9pvk2PMVd0L51eFeLkr3RWVKw== X-Received: by 2002:a05:600c:8718:b0:436:aaf:7eb9 with SMTP id 5b1f17b1804b1-4361c429eaamr11213005e9.20.1733906593293; Wed, 11 Dec 2024 00:43:13 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:5485:d4b2:c087:b497]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434da119abbsm222094855e9.43.2024.12.11.00.43.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 00:43:12 -0800 (PST) Date: Wed, 11 Dec 2024 09:43:10 +0100 From: Simona Vetter To: Lyude Paul Cc: Daniel Almeida , dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org, Asahi Lina , Danilo Krummrich , mcanal@igalia.com, airlied@redhat.com, zhiw@nvidia.com, cjia@nvidia.com, jhubbard@nvidia.com, Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , open list Subject: Re: [WIP RFC v2 05/35] rust: drm/kms: Add bindings for drm_connector Message-ID: Mail-Followup-To: Lyude Paul , Daniel Almeida , dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org, Asahi Lina , Danilo Krummrich , mcanal@igalia.com, airlied@redhat.com, zhiw@nvidia.com, cjia@nvidia.com, jhubbard@nvidia.com, Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , open list References: <20240930233257.1189730-1-lyude@redhat.com> <20240930233257.1189730-6-lyude@redhat.com> <02A84CFD-BE91-40E6-995C-4E81A8DAB92C@collabora.com> <7b57940a3987532963ce5fbd3a999665c17611ab.camel@redhat.com> Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7b57940a3987532963ce5fbd3a999665c17611ab.camel@redhat.com> X-Operating-System: Linux phenom 6.11.6-amd64 On Tue, Dec 10, 2024 at 06:41:52PM -0500, Lyude Paul wrote: > On Tue, 2024-11-26 at 18:25 -0300, Daniel Almeida wrote: > > Hi Lyude, > > > > > On 30 Sep 2024, at 20:09, Lyude Paul wrote: > > > > > > + > > > +impl Connector { > > > + /// Construct a new [`Connector`]. > > > + /// > > > + /// A driver may use this to create new [`Connector`] objects. > > > + /// > > > + /// TODO: Add a way to handle creating connectors after device registration. Also, that's why we > > > + /// don't ask for a UnregisteredKms device here. > > > > Can you elaborate? We can try to help if you describe this a bit better :) > > oh - totally forgot to respond to this! > > So: out of all of the mode objects, Connectors are a bit special. They can > actually be created and destroyed after registration (hence why they have a > refcount). This is not terribly difficult to handle before registration, the > complication comes after registration - where we'll likely need to split > Connector into two different types: > > UnregisteredConnector > > Connector > > Where you have to sacrifice the UnregisteredConnector to get to the Connector > object. I don't think this will actually be too difficult to implement, I just > didn't get around to it yet because there were so many other open questions I > had about the design here in general. For connnnector lifetime fun please also see Imre's patches for fixing some races around mst hotplug. At least on the C side I think we will split connectors into dynamic and static ones, to be able to handle things correctly. It's a bit a mess unfortuantely. -Sima -- Simona Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch