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 19FA3C7EE33 for ; Thu, 26 Jun 2025 19:16:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B02BC10E8F9; Thu, 26 Jun 2025 19:16:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="KuJV7JC0"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id A3E9710E8F9; Thu, 26 Jun 2025 19:16:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1750965390; x=1782501390; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=haE0qvnG99mhnFUNOUdYdZY0XeE7dZ7XKgywU6Ksi4k=; b=KuJV7JC0GL4cjSzbzH/MScMB2nWghlFabf8esG5UQCzAZWZ+u5AjyDM8 U6hdpG4ihhXUuMjj5W7UpQ21t90QI5fbi3fLZpo0zmwfNOXQuiA5laAXN 9j2MlGa9vk2+PHYFooMQercBYjF3BO9nfjIuZ2+2lRaAkzOQe2QWb+3fF MiRydr/NBZzdpC10219rQBGoMMYJLNF+HYMFyb3ZsFjHi0wRdN4P8WhgW vqSRlLn0dbsdRMW0/GuVgDLpRPPKLRe7kB3j66V/VCu4foHsMOqrX1yqm 60v6ugOoG2UG6lncxhSGDiW3mHnDQmtwJSfrTJqDy9+CSzP0MmcS4wAps w==; X-CSE-ConnectionGUID: x/AMKXI+SH6N5owlO3CgaA== X-CSE-MsgGUID: SgtoZ0otSZ+j20DDRy0WPw== X-IronPort-AV: E=McAfee;i="6800,10657,11476"; a="53421849" X-IronPort-AV: E=Sophos;i="6.16,268,1744095600"; d="scan'208";a="53421849" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2025 12:10:58 -0700 X-CSE-ConnectionGUID: EVQGAaobR9eGnAsx/TruSw== X-CSE-MsgGUID: XIyeqTylQGCOzHaYKdlZPQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,268,1744095600"; d="scan'208";a="158343423" Received: from dhhellew-desk2.ger.corp.intel.com (HELO localhost) ([10.245.246.120]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2025 12:10:55 -0700 From: Jani Nikula To: Lucas De Marchi Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, Rodrigo Vivi Subject: Re: [CI 3/6] drm/xe/pcode: add struct drm_device based interface In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: Date: Thu, 26 Jun 2025 22:10:52 +0300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain 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" On Thu, 26 Jun 2025, Lucas De Marchi wrote: > On Mon, Jun 23, 2025 at 02:43:46PM +0300, Jani Nikula wrote: >>In preparation for dropping the dependency on struct intel_uncore or >>struct xe_tile from display code, add a struct drm_device based >>interface to pcode. >> >>Cc: Lucas De Marchi >>Cc: Rodrigo Vivi >>Reviewed-by: Rodrigo Vivi >>Signed-off-by: Jani Nikula >>--- > > > So now we define intel_pcode_read() in both xe.ko and i915.ko. > > And intel_pcode is only called from display or > drivers/gpu/drm/i915/soc/intel_dram.c (which afair xe is concerned is > built under XE_DISPLAY only). > > We used to allow both i915 and xe as built-in as long as XE_DISPLAY is > not set, but with this patch this is now broken. > > I think we have a few possible ways to handle it. > > 1) Revert. See https://lore.kernel.org/intel-xe/3667a992-a24b-4e49-aab2-5ca73f2c0a56@infradead.org/ > > 2) Move the common symbols to a separate module. We can name the module > xe-i915-common or intel-display or something else. Then we keep moving > symbols there until we can move the entire display. From the module > point of view it's just another dependency that will get loaded. > However, looking at the implementation, they are actually helpers that > depend on the driver backing that device so it's not very > straightforward at this point. > > 3) Forbid DRM_XE=y && DRM_I915=y (rather than based on DRM_XE_DISPLAY) > > 4) ifdef the helpers based on XE_DISPLAY... because if XE_DISPLAY is > set, then XE can't be built-in. > > I have (3) ready based on an earlier patch and (4) is pretty easy. But > I'd prefer (2) to move things forward. Or maybe you already have > something else? Thoughts? I was thinking of (4) for now. Or prefix them differently and have a #define in a header. I saw the report, but didn't get around to it yet. I really don't want an ad hoc separate module. I think it's a distraction to the display module goal. BR, Jani. -- Jani Nikula, Intel