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 9798ED35164 for ; Wed, 1 Apr 2026 09:36:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 46A5D10F05C; Wed, 1 Apr 2026 09:36:51 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="jmhERhPS"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id E9AFA10F059; Wed, 1 Apr 2026 09:36:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1775036210; x=1806572210; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=5fWZid7FFcOhN+mcQS1hb2PSkUhDbMDNG/3v20HGiZ8=; b=jmhERhPSZ9A3wLu91w4ewx0UbzapzBhA1hVUldGks0mV41/wHadNLHwK eiliLQgBFd7Nbv4E4z7LGkcMesCBlGJ2OJK0e2Nku1JxhGcxxQqpwgfu3 9N94sw7+n0QJ5kXNStRiZgQn6qhjpXVcTFYf+qasTCFgBbcj96Z8k3+ZL Lp7L2zqOiD0irxZnWKJfIrX9R7pQkbdGDNK8P6QJwDCPOlscsyDIJWJUN RIohwzRNHyZZh7olRloZoD9JM5jvTpUr9DInAapmlza7xzm5enjgLlRQC ddUgrRSuYFY6YiZ7Lr5dBPLVfQ54BGzUc6LCbqDgJn4V/TfOuLx7/VAh4 Q==; X-CSE-ConnectionGUID: VXr9rkGfR7qayk7HYy888Q== X-CSE-MsgGUID: sd+De3viQKOTTS9bM8bUIA== X-IronPort-AV: E=McAfee;i="6800,10657,11745"; a="86684822" X-IronPort-AV: E=Sophos;i="6.23,153,1770624000"; d="scan'208";a="86684822" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2026 02:36:50 -0700 X-CSE-ConnectionGUID: mMdBP1RIT4ilhalIp9YSIA== X-CSE-MsgGUID: K8FAI4D3Ri2UMTS3Xxi7FA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,153,1770624000"; d="scan'208";a="231559566" Received: from kniemiec-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.246.152]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2026 02:36:48 -0700 From: Jani Nikula To: Ville =?utf-8?B?U3lyasOkbMOk?= Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org Subject: Re: [PATCH 1/5] drm/{i915, xe}: convert VLV sideband display wrappers into real functions In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs Bertel Jungin Aukio 5, 02600 Espoo, Finland References: <57740dc3a820cb5fc1cfcd28e4be58b2cb48020d.1774957233.git.jani.nikula@intel.com> Date: Wed, 01 Apr 2026 12:36:44 +0300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Tue, 31 Mar 2026, Ville Syrj=C3=A4l=C3=A4 wrote: > On Tue, Mar 31, 2026 at 02:40:54PM +0300, Jani Nikula wrote: >> Convert the VLV sideband static inline wrappers into real >> functions. This will help the follow-up work of moving the VLV sideband >> to the display parent interface. >>=20 >> The downside is that we'll have to build vlv_sideband.c as part of xe >> build, to avoid a plethora of stubs. >>=20 >> Signed-off-by: Jani Nikula >>=20 >> --- >>=20 >> 'git show --color-moved' will help review > > If only --color-moved and --word-diff could play nice... Aye. > For some other other patches --word-diff alone seemed pretty good > fortunately. --word-diff-regex=3D"\w+" or some other tweak also improves it sometimes. > Series is > Reviewed-by: Ville Syrj=C3=A4l=C3=A4 Thanks, pushed the lot to din. BR, Jani. > >> --- >> drivers/gpu/drm/i915/display/vlv_sideband.c | 125 +++++++++++++++ >> drivers/gpu/drm/i915/display/vlv_sideband.h | 165 ++++---------------- >> drivers/gpu/drm/xe/Makefile | 3 +- >> 3 files changed, 156 insertions(+), 137 deletions(-) >>=20 >> diff --git a/drivers/gpu/drm/i915/display/vlv_sideband.c b/drivers/gpu/d= rm/i915/display/vlv_sideband.c >> index e18045f2b89d..2472e0412728 100644 >> --- a/drivers/gpu/drm/i915/display/vlv_sideband.c >> +++ b/drivers/gpu/drm/i915/display/vlv_sideband.c >> @@ -8,6 +8,71 @@ >> #include "intel_dpio_phy.h" >> #include "vlv_sideband.h" >>=20=20 >> +void vlv_bunit_get(struct drm_device *drm) >> +{ >> + vlv_iosf_sb_get(drm, BIT(VLV_IOSF_SB_BUNIT)); >> +} >> + >> +u32 vlv_bunit_read(struct drm_device *drm, u32 reg) >> +{ >> + return vlv_iosf_sb_read(drm, VLV_IOSF_SB_BUNIT, reg); >> +} >> + >> +void vlv_bunit_write(struct drm_device *drm, u32 reg, u32 val) >> +{ >> + vlv_iosf_sb_write(drm, VLV_IOSF_SB_BUNIT, reg, val); >> +} >> + >> +void vlv_bunit_put(struct drm_device *drm) >> +{ >> + vlv_iosf_sb_put(drm, BIT(VLV_IOSF_SB_BUNIT)); >> +} >> + >> +void vlv_cck_get(struct drm_device *drm) >> +{ >> + vlv_iosf_sb_get(drm, BIT(VLV_IOSF_SB_CCK)); >> +} >> + >> +u32 vlv_cck_read(struct drm_device *drm, u32 reg) >> +{ >> + return vlv_iosf_sb_read(drm, VLV_IOSF_SB_CCK, reg); >> +} >> + >> +void vlv_cck_write(struct drm_device *drm, u32 reg, u32 val) >> +{ >> + vlv_iosf_sb_write(drm, VLV_IOSF_SB_CCK, reg, val); >> +} >> + >> +void vlv_cck_put(struct drm_device *drm) >> +{ >> + vlv_iosf_sb_put(drm, BIT(VLV_IOSF_SB_CCK)); >> +} >> + >> +void vlv_ccu_get(struct drm_device *drm) >> +{ >> + vlv_iosf_sb_get(drm, BIT(VLV_IOSF_SB_CCU)); >> +} >> + >> +u32 vlv_ccu_read(struct drm_device *drm, u32 reg) >> +{ >> + return vlv_iosf_sb_read(drm, VLV_IOSF_SB_CCU, reg); >> +} >> + >> +void vlv_ccu_write(struct drm_device *drm, u32 reg, u32 val) >> +{ >> + vlv_iosf_sb_write(drm, VLV_IOSF_SB_CCU, reg, val); >> +} >> + >> +void vlv_ccu_put(struct drm_device *drm) >> +{ >> + vlv_iosf_sb_put(drm, BIT(VLV_IOSF_SB_CCU)); >> +} >> + >> +void vlv_dpio_get(struct drm_device *drm) >> +{ >> + vlv_iosf_sb_get(drm, BIT(VLV_IOSF_SB_DPIO) | BIT(VLV_IOSF_SB_DPIO_2)); >> +} >> + >> static enum vlv_iosf_sb_unit vlv_dpio_phy_to_unit(struct intel_display = *display, >> enum dpio_phy phy) >> { >> @@ -48,3 +113,63 @@ void vlv_dpio_write(struct drm_device *drm, >>=20=20 >> vlv_iosf_sb_write(drm, unit, reg, val); >> } >> + >> +void vlv_dpio_put(struct drm_device *drm) >> +{ >> + vlv_iosf_sb_put(drm, BIT(VLV_IOSF_SB_DPIO) | BIT(VLV_IOSF_SB_DPIO_2)); >> +} >> + >> +void vlv_flisdsi_get(struct drm_device *drm) >> +{ >> + vlv_iosf_sb_get(drm, BIT(VLV_IOSF_SB_FLISDSI)); >> +} >> + >> +u32 vlv_flisdsi_read(struct drm_device *drm, u32 reg) >> +{ >> + return vlv_iosf_sb_read(drm, VLV_IOSF_SB_FLISDSI, reg); >> +} >> + >> +void vlv_flisdsi_write(struct drm_device *drm, u32 reg, u32 val) >> +{ >> + vlv_iosf_sb_write(drm, VLV_IOSF_SB_FLISDSI, reg, val); >> +} >> + >> +void vlv_flisdsi_put(struct drm_device *drm) >> +{ >> + vlv_iosf_sb_put(drm, BIT(VLV_IOSF_SB_FLISDSI)); >> +} >> + >> +void vlv_nc_get(struct drm_device *drm) >> +{ >> + vlv_iosf_sb_get(drm, BIT(VLV_IOSF_SB_NC)); >> +} >> + >> +u32 vlv_nc_read(struct drm_device *drm, u8 addr) >> +{ >> + return vlv_iosf_sb_read(drm, VLV_IOSF_SB_NC, addr); >> +} >> + >> +void vlv_nc_put(struct drm_device *drm) >> +{ >> + vlv_iosf_sb_put(drm, BIT(VLV_IOSF_SB_NC)); >> +} >> + >> +void vlv_punit_get(struct drm_device *drm) >> +{ >> + vlv_iosf_sb_get(drm, BIT(VLV_IOSF_SB_PUNIT)); >> +} >> + >> +u32 vlv_punit_read(struct drm_device *drm, u32 addr) >> +{ >> + return vlv_iosf_sb_read(drm, VLV_IOSF_SB_PUNIT, addr); >> +} >> + >> +int vlv_punit_write(struct drm_device *drm, u32 addr, u32 val) >> +{ >> + return vlv_iosf_sb_write(drm, VLV_IOSF_SB_PUNIT, addr, val); >> +} >> + >> +void vlv_punit_put(struct drm_device *drm) >> +{ >> + vlv_iosf_sb_put(drm, BIT(VLV_IOSF_SB_PUNIT)); >> +} >> diff --git a/drivers/gpu/drm/i915/display/vlv_sideband.h b/drivers/gpu/d= rm/i915/display/vlv_sideband.h >> index 2c240d81fead..065273726379 100644 >> --- a/drivers/gpu/drm/i915/display/vlv_sideband.h >> +++ b/drivers/gpu/drm/i915/display/vlv_sideband.h >> @@ -4,7 +4,6 @@ >> #ifndef _VLV_SIDEBAND_H_ >> #define _VLV_SIDEBAND_H_ >>=20=20 >> -#include >> #include >>=20=20 >> #include "vlv_iosf_sb.h" >> @@ -13,144 +12,38 @@ >> enum dpio_phy; >> struct drm_device; >>=20=20 >> -static inline void vlv_bunit_get(struct drm_device *drm) >> -{ >> - vlv_iosf_sb_get(drm, BIT(VLV_IOSF_SB_BUNIT)); >> -} >> +void vlv_bunit_get(struct drm_device *drm); >> +u32 vlv_bunit_read(struct drm_device *drm, u32 reg); >> +void vlv_bunit_write(struct drm_device *drm, u32 reg, u32 val); >> +void vlv_bunit_put(struct drm_device *drm); >>=20=20 >> -static inline u32 vlv_bunit_read(struct drm_device *drm, u32 reg) >> -{ >> - return vlv_iosf_sb_read(drm, VLV_IOSF_SB_BUNIT, reg); >> -} >> +void vlv_cck_get(struct drm_device *drm); >> +u32 vlv_cck_read(struct drm_device *drm, u32 reg); >> +void vlv_cck_write(struct drm_device *drm, u32 reg, u32 val); >> +void vlv_cck_put(struct drm_device *drm); >>=20=20 >> -static inline void vlv_bunit_write(struct drm_device *drm, u32 reg, u32= val) >> -{ >> - vlv_iosf_sb_write(drm, VLV_IOSF_SB_BUNIT, reg, val); >> -} >> +void vlv_ccu_get(struct drm_device *drm); >> +u32 vlv_ccu_read(struct drm_device *drm, u32 reg); >> +void vlv_ccu_write(struct drm_device *drm, u32 reg, u32 val); >> +void vlv_ccu_put(struct drm_device *drm); >>=20=20 >> -static inline void vlv_bunit_put(struct drm_device *drm) >> -{ >> - vlv_iosf_sb_put(drm, BIT(VLV_IOSF_SB_BUNIT)); >> -} >> - >> -static inline void vlv_cck_get(struct drm_device *drm) >> -{ >> - vlv_iosf_sb_get(drm, BIT(VLV_IOSF_SB_CCK)); >> -} >> - >> -static inline u32 vlv_cck_read(struct drm_device *drm, u32 reg) >> -{ >> - return vlv_iosf_sb_read(drm, VLV_IOSF_SB_CCK, reg); >> -} >> - >> -static inline void vlv_cck_write(struct drm_device *drm, u32 reg, u32 v= al) >> -{ >> - vlv_iosf_sb_write(drm, VLV_IOSF_SB_CCK, reg, val); >> -} >> - >> -static inline void vlv_cck_put(struct drm_device *drm) >> -{ >> - vlv_iosf_sb_put(drm, BIT(VLV_IOSF_SB_CCK)); >> -} >> - >> -static inline void vlv_ccu_get(struct drm_device *drm) >> -{ >> - vlv_iosf_sb_get(drm, BIT(VLV_IOSF_SB_CCU)); >> -} >> - >> -static inline u32 vlv_ccu_read(struct drm_device *drm, u32 reg) >> -{ >> - return vlv_iosf_sb_read(drm, VLV_IOSF_SB_CCU, reg); >> -} >> - >> -static inline void vlv_ccu_write(struct drm_device *drm, u32 reg, u32 v= al) >> -{ >> - vlv_iosf_sb_write(drm, VLV_IOSF_SB_CCU, reg, val); >> -} >> - >> -static inline void vlv_ccu_put(struct drm_device *drm) >> -{ >> - vlv_iosf_sb_put(drm, BIT(VLV_IOSF_SB_CCU)); >> -} >> - >> -static inline void vlv_dpio_get(struct drm_device *drm) >> -{ >> - vlv_iosf_sb_get(drm, BIT(VLV_IOSF_SB_DPIO) | BIT(VLV_IOSF_SB_DPIO_2)); >> -} >> - >> -#ifdef I915 >> +void vlv_dpio_get(struct drm_device *drm); >> u32 vlv_dpio_read(struct drm_device *drm, enum dpio_phy phy, int reg); >> -void vlv_dpio_write(struct drm_device *drm, >> - enum dpio_phy phy, int reg, u32 val); >> -#else >> -static inline u32 vlv_dpio_read(struct drm_device *drm, int phy, int re= g) >> -{ >> - return 0; >> -} >> -static inline void vlv_dpio_write(struct drm_device *drm, >> - int phy, int reg, u32 val) >> -{ >> -} >> -#endif >> - >> -static inline void vlv_dpio_put(struct drm_device *drm) >> -{ >> - vlv_iosf_sb_put(drm, BIT(VLV_IOSF_SB_DPIO) | BIT(VLV_IOSF_SB_DPIO_2)); >> -} >> - >> -static inline void vlv_flisdsi_get(struct drm_device *drm) >> -{ >> - vlv_iosf_sb_get(drm, BIT(VLV_IOSF_SB_FLISDSI)); >> -} >> - >> -static inline u32 vlv_flisdsi_read(struct drm_device *drm, u32 reg) >> -{ >> - return vlv_iosf_sb_read(drm, VLV_IOSF_SB_FLISDSI, reg); >> -} >> - >> -static inline void vlv_flisdsi_write(struct drm_device *drm, u32 reg, u= 32 val) >> -{ >> - vlv_iosf_sb_write(drm, VLV_IOSF_SB_FLISDSI, reg, val); >> -} >> - >> -static inline void vlv_flisdsi_put(struct drm_device *drm) >> -{ >> - vlv_iosf_sb_put(drm, BIT(VLV_IOSF_SB_FLISDSI)); >> -} >> - >> -static inline void vlv_nc_get(struct drm_device *drm) >> -{ >> - vlv_iosf_sb_get(drm, BIT(VLV_IOSF_SB_NC)); >> -} >> - >> -static inline u32 vlv_nc_read(struct drm_device *drm, u8 addr) >> -{ >> - return vlv_iosf_sb_read(drm, VLV_IOSF_SB_NC, addr); >> -} >> - >> -static inline void vlv_nc_put(struct drm_device *drm) >> -{ >> - vlv_iosf_sb_put(drm, BIT(VLV_IOSF_SB_NC)); >> -} >> - >> -static inline void vlv_punit_get(struct drm_device *drm) >> -{ >> - vlv_iosf_sb_get(drm, BIT(VLV_IOSF_SB_PUNIT)); >> -} >> - >> -static inline u32 vlv_punit_read(struct drm_device *drm, u32 addr) >> -{ >> - return vlv_iosf_sb_read(drm, VLV_IOSF_SB_PUNIT, addr); >> -} >> - >> -static inline int vlv_punit_write(struct drm_device *drm, u32 addr, u32= val) >> -{ >> - return vlv_iosf_sb_write(drm, VLV_IOSF_SB_PUNIT, addr, val); >> -} >> - >> -static inline void vlv_punit_put(struct drm_device *drm) >> -{ >> - vlv_iosf_sb_put(drm, BIT(VLV_IOSF_SB_PUNIT)); >> -} >> +void vlv_dpio_write(struct drm_device *drm, enum dpio_phy phy, int reg,= u32 val); >> +void vlv_dpio_put(struct drm_device *drm); >> + >> +void vlv_flisdsi_get(struct drm_device *drm); >> +u32 vlv_flisdsi_read(struct drm_device *drm, u32 reg); >> +void vlv_flisdsi_write(struct drm_device *drm, u32 reg, u32 val); >> +void vlv_flisdsi_put(struct drm_device *drm); >> + >> +void vlv_nc_get(struct drm_device *drm); >> +u32 vlv_nc_read(struct drm_device *drm, u8 addr); >> +void vlv_nc_put(struct drm_device *drm); >> + >> +void vlv_punit_get(struct drm_device *drm); >> +u32 vlv_punit_read(struct drm_device *drm, u32 addr); >> +int vlv_punit_write(struct drm_device *drm, u32 addr, u32 val); >> +void vlv_punit_put(struct drm_device *drm); >>=20=20 >> #endif /* _VLV_SIDEBAND_H_ */ >> diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile >> index 9dacb0579a7d..7960c2db33bd 100644 >> --- a/drivers/gpu/drm/xe/Makefile >> +++ b/drivers/gpu/drm/xe/Makefile >> @@ -332,7 +332,8 @@ xe-$(CONFIG_DRM_XE_DISPLAY) +=3D \ >> i915-display/skl_prefill.o \ >> i915-display/skl_scaler.o \ >> i915-display/skl_universal_plane.o \ >> - i915-display/skl_watermark.o >> + i915-display/skl_watermark.o \ >> + i915-display/vlv_sideband.o >>=20=20 >> ifeq ($(CONFIG_ACPI),y) >> xe-$(CONFIG_DRM_XE_DISPLAY) +=3D \ >> --=20 >> 2.47.3 --=20 Jani Nikula, Intel