From: Jani Nikula <jani.nikula@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
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
Date: Wed, 01 Apr 2026 12:36:44 +0300 [thread overview]
Message-ID: <b2e71477fc6a2f96c2ea48f9359c9601ef8b2c23@intel.com> (raw)
In-Reply-To: <acvMGpZbVVjd6tKO@intel.com>
On Tue, 31 Mar 2026, Ville Syrjälä <ville.syrjala@linux.intel.com> 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.
>>
>> The downside is that we'll have to build vlv_sideband.c as part of xe
>> build, to avoid a plethora of stubs.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>>
>> ---
>>
>> '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="\w+" or some other tweak also improves it sometimes.
> Series is
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
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(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/vlv_sideband.c b/drivers/gpu/drm/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"
>>
>> +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,
>>
>> 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/drm/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_
>>
>> -#include <linux/bitops.h>
>> #include <linux/types.h>
>>
>> #include "vlv_iosf_sb.h"
>> @@ -13,144 +12,38 @@
>> enum dpio_phy;
>> struct drm_device;
>>
>> -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);
>>
>> -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);
>>
>> -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);
>>
>> -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 val)
>> -{
>> - 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 val)
>> -{
>> - 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 reg)
>> -{
>> - 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, u32 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);
>>
>> #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) += \
>> 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
>>
>> ifeq ($(CONFIG_ACPI),y)
>> xe-$(CONFIG_DRM_XE_DISPLAY) += \
>> --
>> 2.47.3
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-04-01 9:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 11:40 [PATCH 0/5] drm/i915: move VLV IOSF SB to display parent interface Jani Nikula
2026-03-31 11:40 ` [PATCH 1/5] drm/{i915, xe}: convert VLV sideband display wrappers into real functions Jani Nikula
2026-03-31 13:28 ` Ville Syrjälä
2026-04-01 9:36 ` Jani Nikula [this message]
2026-03-31 11:40 ` [PATCH 2/5] drm/i915: pass struct intel_display * to VLV sideband wrappers Jani Nikula
2026-03-31 11:40 ` [PATCH 3/5] drm/i915/dram: prefer display abstractions for VLV sideband Jani Nikula
2026-03-31 11:40 ` [PATCH 4/5] drm/i915: move VLV IOSF sideband to display parent interface Jani Nikula
2026-03-31 11:40 ` [PATCH 5/5] drm/{i915, xe}: add shared header for VLV IOSF sideband units and registers Jani Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b2e71477fc6a2f96c2ea48f9359c9601ef8b2c23@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox