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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 16264EEC285 for ; Mon, 23 Feb 2026 21:41:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6159110E2AC; Mon, 23 Feb 2026 21:41:09 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="HWYdGqDo"; dkim-atps=neutral Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9D16B10E2AC; Mon, 23 Feb 2026 21:41:08 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 5C43D42B77; Mon, 23 Feb 2026 21:41:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF471C116C6; Mon, 23 Feb 2026 21:41:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771882868; bh=t7J5Tj8RlZ5XzMAXGnsiXbH6mgB4YN/nTJgHtJEr3v4=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=HWYdGqDotHNUL4fdCzNzlGkoHmO/R1BdROR9kIfu1fiMzf28IKQ+Fg1UKDdhNbztJ aGt2C5oGfTz7x393TjjZbB4OTlJNxJPS+U1sCO7mj/uZp3wHo3k0u0uffcva8yL9bT 3sHEsFtvXKE5eQ7sAWk7xB6pNVxE2tBaEuY3Sihod0wEOAhwntdJ53OhGD3WdgxzH6 GQRXtjM4sSiCfSWII7sCPuvWdlM1JOGAdX23jF0C5X44e7/0RCXxhebalGqGNZ2D4I KVTzgr1FKhmx5NjjKvjF/ojbVHAIaelcz1Sq9Xxlv9FHs1gJJ0+B+PJyF5/oCIZgad vAE9J7gV8bcng== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 23 Feb 2026 22:41:04 +0100 Message-Id: Subject: Re: [PATCH v2] drm/tyr: Clarify driver/device type names Cc: , , , , , "dri-devel" To: "Deborah Brouwer" From: "Danilo Krummrich" References: <20260223204648.208886-1-deborah.brouwer@collabora.com> In-Reply-To: <20260223204648.208886-1-deborah.brouwer@collabora.com> 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon Feb 23, 2026 at 9:46 PM CET, Deborah Brouwer wrote: > Currently the `TyrDriver` struct implements both `platform::Driver` and > `drm::Driver`. For clarity, split up these two roles: > - Introduce `TyrPlatformDeviceData` to implement `platform::Driver`, and I think this should be TyrPlatformDriverData instead, i.e. it is the driver= 's private data that happens to be stored in (and owned by) the platform devic= e. The corresponding C setter is also called platform_set_drvdata() and not platform_set_devdata(). > - Introduce `TyrDrmDriver` to implement `drm::Driver`. > > Also rename other variables to reflect their roles in the DRM context: > - Rename `TyrDevice` to `TyrDrmDevice` > - Rename `TyrData` to `TyrDrmDeviceData` Although it might sound contradictory at first, I think for a drm::Device i= t is OK to name it TyrDrmDeviceData as opposed to TyrDrmDriverData (although tha= t would make sense as well and I'd probably prefer that). The reason is that a platform::Device being a bus device may store differen= t *driver specific* data types thoughout its whole lifetime, i.e. a platform device may be bound to multiple different drivers throughout its lifetime. But a drm::Device being a class device is always *statically* typed over it= 's private data type, i.e. drm::Device. > - Rename `File` to `TyrDrmFileData` > - Rename `DrmFile` to `TyrDrmFile` > > No functional changes are intended. > > Co-developed-by: Boris Brezillon > Signed-off-by: Boris Brezillon > Signed-off-by: Deborah Brouwer Otherwise LGTM.