From patchwork Wed Dec 11 23:03:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Imre Deak X-Patchwork-Id: 13904331 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 5D0B5E7717D for ; Wed, 11 Dec 2024 23:02:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F389210E63B; Wed, 11 Dec 2024 23:02:51 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="VIaxrChW"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id C274410E63B; Wed, 11 Dec 2024 23:02:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733958171; x=1765494171; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=4+nA5Rh8hzzv8LHyim6bvM4pWRsTzuW7hqwwM3rqahY=; b=VIaxrChWukDWaJ8xyJyghIfK6vuM80ROhpwE9XSi39O4g2RupHpQM/2e Ft8bMZqghDgAEM6hK5wXmTiz5t/UhGJKEabD2H63aNDa2hJ+YSu+dSjWa yMHMhfg1lJ/KLE1vzvukMd/VHsr1Y3Lc/4j3SLN8BmZepNt0tMui1eVWf 3GcRI57aKq2kTAIbsDOa5AuN2bZYI3laJoCzXGWf/+aG/yX7h6fqMtLdO N28jyNUXv4xF93mVwJcB+hp2v//x58KSVN94xYBNbAvzLpxq0/MhVQfto Dr73gdcKObUXdYlPsF/EhyXFUle1L1dvmbgIKkOX83h+g0zjBC8zm9oX6 Q==; X-CSE-ConnectionGUID: MslBg8DDTYmsQtebp/vF8A== X-CSE-MsgGUID: A/rYCNE1TmCISwzEY4eXVg== X-IronPort-AV: E=McAfee;i="6700,10204,11283"; a="34401453" X-IronPort-AV: E=Sophos;i="6.12,226,1728975600"; d="scan'208";a="34401453" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2024 15:02:51 -0800 X-CSE-ConnectionGUID: UNGChJG5RRqOun6veJe+/w== X-CSE-MsgGUID: g8zLQkbVTZ26u4EZgFmqUA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="126962328" Received: from ideak-desk.fi.intel.com ([10.237.72.78]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2024 15:02:47 -0800 From: Imre Deak To: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, Rodrigo Vivi , Jani Nikula , Simona Vetter , Maxime Ripard , Lyude Paul , Harry Wentland , Leo Li , Wayne Lin , Alex Deucher , Karol Herbst , Danilo Krummrich Subject: [PATCH v3 0/7] drm/connector: Expose only a properly inited connector Date: Thu, 12 Dec 2024 01:03:17 +0200 Message-ID: <20241211230328.4012496-1-imre.deak@intel.com> X-Mailer: git-send-email 2.44.2 MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" This is v3 of [1], with the following changes: - Instead of the drm_connector_init_core()/drm_connector_add() add a drm_connector_dynamic_init()/drm_connector_dynamic_register() interface. Adding the connector to the connector list is now part of the registration step done by the latter function. (Sima) - Add kunit tests for the above functions. (Maxime) - Add a FIXME note for a related issue in the GETRESOURCES ioctl call. (Sima) - Add a note to depricate the use of drm_connector_register()/drm_connector_unregister() by drivers for static connectors. Cc: Rodrigo Vivi Cc: Jani Nikula Cc: Simona Vetter Cc: Maxime Ripard Cc: Lyude Paul Cc: Harry Wentland Cc: Leo Li Cc: Wayne Lin Cc: Alex Deucher Cc: Karol Herbst Cc: Danilo Krummrich [1] https://lore.kernel.org/all/20241126161859.1858058-1-imre.deak@intel.com Imre Deak (11): drm/connector: Add a way to init/add a connector in separate steps drm/connector: Add FIXME for GETRESOURCES ioctl wrt. uninited connectors drm/connector: Add deprication notes for drm_connector_register/unregister drm/dp_mst: Register connectors via drm_connector_dynamic_register() drm/i915/dp_mst: Expose a connector to kernel users after it's properly initialized drm/amd/dp_mst: Expose a connector to kernel users after it's properly initialized drm/nouveau/dp_mst: Expose a connector to kernel users after it's properly initialized drm/connector: Warn if a connector is registered/added incorrectly drm/tests: Add tests for drm_connector_dynamic_init()/register() drm/i915/dp_mst: Fix error handling while adding a connector drm/i915/dp_mst: Use intel_connector vs. drm_connector pointer in intel_dp_mst.c .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 5 +- drivers/gpu/drm/display/drm_dp_mst_topology.c | 2 +- drivers/gpu/drm/drm_connector.c | 168 ++++++- drivers/gpu/drm/drm_mode_config.c | 9 + drivers/gpu/drm/i915/display/intel_dp_mst.c | 206 ++++---- drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 +- drivers/gpu/drm/tests/drm_connector_test.c | 463 ++++++++++++++++++ include/drm/drm_connector.h | 6 + 8 files changed, 722 insertions(+), 141 deletions(-)