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 84F76C4332F for ; Fri, 25 Nov 2022 12:19:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A7C1C10E090; Fri, 25 Nov 2022 12:19:39 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 939B510E073; Fri, 25 Nov 2022 12:19:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669378773; x=1700914773; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=0WtpDVWBG+zhh3Y4Q6BftP2unUL5fItEvjAQ+XxkdzM=; b=DW4A2Mc0OmhH0zbhcZG1skcm5WELxqBq028PnD4xX0625ixDlGu8uTam p88UdfCJP4MCao2rEgwcTO+UPNI77bXOxZdNHvnQ/34jPMTe0BiIyR2Kb 2GefoTk+sZFcV/AeCb2Pi/gnJEVqhkYekPxDNKUG6uMLDfRVxAGyfI+47 UUa49NhKyI4MrB8YJCiQtUyrxsnULWnbpU5MTQkM5e189ieS/V5AvEPs3 SPercP3+DMGK/08CtXdZ+uQkkOfp/rwu0WA/5sCLkz5Fh5NDUEtMySuCF 8NA7FDItWz3b7xIqX1ruHn69qD2/LTE6y0ICJDS80KyBKO5EHV7W46DDX w==; X-IronPort-AV: E=McAfee;i="6500,9779,10541"; a="313171321" X-IronPort-AV: E=Sophos;i="5.96,193,1665471600"; d="scan'208";a="313171321" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Nov 2022 04:19:33 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10541"; a="642690318" X-IronPort-AV: E=Sophos;i="5.96,193,1665471600"; d="scan'208";a="642690318" Received: from kbielowk-mobl.ger.corp.intel.com (HELO localhost) ([10.249.128.177]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Nov 2022 04:19:30 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: Date: Fri, 25 Nov 2022 14:19:27 +0200 Message-ID: <87wn7j446o.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Intel-gfx] [RFC 0/2] drm/connector: connector iterator with filtering 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: , Cc: Dave Airlie , Laurent Pinchart Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, 05 Oct 2022, Jani Nikula wrote: > Currently i915 assumes all drm_connectors it encounters are embedded in > intel_connectors that i915 allocated. The drm_writeback_connector forces > a design where this is not the case; we can't provide our own connector, > and writeback embeds the drm_connector it initializes itself. > > To use drm writeback, none of the i915 connector iteration could assume > the drm connector is embedded in intel_connector. Checking this is > tedious, and would require an intermediate step with > drm_connector. Here's an idea I came up with; filtering at the drm > connector iterator level with a caller supplied function. Not too much > code, and could be used for other things as well. > > Mind you, we'd still much rather modify drm writeback to allow passing > the connector i915 allocated, instead of the current midlayer design > that forces drivers to a certain model. Working around this is a bunch > of error prone and tedious code that we really could do without. Any feedback on this one? BR, Jani. > > > BR, > Jani. > > > Cc: Arun R Murthy > Cc: Dave Airlie > Cc: Laurent Pinchart > Cc: Suraj Kandpal > Cc: Ville Syrj=C3=A4l=C3=A4 > > Jani Nikula (2): > drm/connector: add connector list iteration with filtering > drm/i915: iterate intel_connectors only > > drivers/gpu/drm/drm_connector.c | 57 +++++++++++++++---- > drivers/gpu/drm/i915/display/intel_display.c | 3 +- > .../drm/i915/display/intel_display_types.h | 7 +++ > drivers/gpu/drm/i915/display/intel_dp.c | 6 +- > drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 +- > drivers/gpu/drm/i915/display/intel_hdcp.c | 3 +- > drivers/gpu/drm/i915/display/intel_hotplug.c | 12 ++-- > .../drm/i915/display/intel_modeset_setup.c | 6 +- > drivers/gpu/drm/i915/display/intel_opregion.c | 9 ++- > include/drm/drm_connector.h | 9 +++ > 10 files changed, 89 insertions(+), 26 deletions(-) --=20 Jani Nikula, Intel Open Source Graphics Center