Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/sbi: split out intel_sbi_regs.h

Split out display/intel_sbi_regs.h from i915_reg.h. Include both the SBI
interface MMIO as well as the known sideband offsets.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/c96197159e05ebcb63fcc05f0f0801624cd4fdeb.1748343520.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Jani Nikula 0b6d7dbf ad3cfb65

+55 -42
+1
drivers/gpu/drm/i915/display/intel_pch_refclk.c
··· 12 12 #include "intel_panel.h" 13 13 #include "intel_pch_refclk.h" 14 14 #include "intel_sbi.h" 15 + #include "intel_sbi_regs.h" 15 16 16 17 static void lpt_fdi_reset_mphy(struct intel_display *display) 17 18 {
+1 -1
drivers/gpu/drm/i915/display/intel_sbi.c
··· 7 7 8 8 #include <drm/drm_print.h> 9 9 10 - #include "i915_reg.h" 11 10 #include "intel_de.h" 12 11 #include "intel_display_core.h" 13 12 #include "intel_sbi.h" 13 + #include "intel_sbi_regs.h" 14 14 15 15 /* SBI access */ 16 16 static int intel_sbi_rw(struct intel_display *display, u16 reg,
+51
drivers/gpu/drm/i915/display/intel_sbi_regs.h
··· 1 + /* SPDX-License-Identifier: MIT */ 2 + /* Copyright © 2025 Intel Corporation */ 3 + 4 + #ifndef __INTEL_SBI_REGS_H__ 5 + #define __INTEL_SBI_REGS_H__ 6 + 7 + #include "i915_reg_defs.h" 8 + 9 + /* 10 + * Sideband Interface (SBI) is programmed indirectly, via SBI_ADDR, which 11 + * contains the register offset; and SBI_DATA, which contains the payload. 12 + */ 13 + #define SBI_ADDR _MMIO(0xC6000) 14 + #define SBI_DATA _MMIO(0xC6004) 15 + #define SBI_CTL_STAT _MMIO(0xC6008) 16 + #define SBI_CTL_DEST_ICLK (0x0 << 16) 17 + #define SBI_CTL_DEST_MPHY (0x1 << 16) 18 + #define SBI_CTL_OP_IORD (0x2 << 8) 19 + #define SBI_CTL_OP_IOWR (0x3 << 8) 20 + #define SBI_CTL_OP_CRRD (0x6 << 8) 21 + #define SBI_CTL_OP_CRWR (0x7 << 8) 22 + #define SBI_RESPONSE_FAIL (0x1 << 1) 23 + #define SBI_RESPONSE_SUCCESS (0x0 << 1) 24 + #define SBI_BUSY (0x1 << 0) 25 + #define SBI_READY (0x0 << 0) 26 + 27 + /* SBI offsets */ 28 + #define SBI_SSCDIVINTPHASE 0x0200 29 + #define SBI_SSCDIVINTPHASE6 0x0600 30 + #define SBI_SSCDIVINTPHASE_DIVSEL_SHIFT 1 31 + #define SBI_SSCDIVINTPHASE_DIVSEL_MASK (0x7f << 1) 32 + #define SBI_SSCDIVINTPHASE_DIVSEL(x) ((x) << 1) 33 + #define SBI_SSCDIVINTPHASE_INCVAL_SHIFT 8 34 + #define SBI_SSCDIVINTPHASE_INCVAL_MASK (0x7f << 8) 35 + #define SBI_SSCDIVINTPHASE_INCVAL(x) ((x) << 8) 36 + #define SBI_SSCDIVINTPHASE_DIR(x) ((x) << 15) 37 + #define SBI_SSCDIVINTPHASE_PROPAGATE (1 << 0) 38 + #define SBI_SSCDITHPHASE 0x0204 39 + #define SBI_SSCCTL 0x020c 40 + #define SBI_SSCCTL6 0x060C 41 + #define SBI_SSCCTL_PATHALT (1 << 3) 42 + #define SBI_SSCCTL_DISABLE (1 << 0) 43 + #define SBI_SSCAUXDIV6 0x0610 44 + #define SBI_SSCAUXDIV_FINALDIV2SEL_SHIFT 4 45 + #define SBI_SSCAUXDIV_FINALDIV2SEL_MASK (1 << 4) 46 + #define SBI_SSCAUXDIV_FINALDIV2SEL(x) ((x) << 4) 47 + #define SBI_DBUFF0 0x2a00 48 + #define SBI_GEN0 0x1f00 49 + #define SBI_GEN0_CFG_BUFFENABLE_DISABLE (1 << 0) 50 + 51 + #endif /* __INTEL_SBI_REGS_H__ */
+1
drivers/gpu/drm/i915/gvt/handlers.c
··· 56 56 #include "display/intel_fdi_regs.h" 57 57 #include "display/intel_pps_regs.h" 58 58 #include "display/intel_psr_regs.h" 59 + #include "display/intel_sbi_regs.h" 59 60 #include "display/intel_sprite_regs.h" 60 61 #include "display/intel_vga_regs.h" 61 62 #include "display/skl_universal_plane_regs.h"
-41
drivers/gpu/drm/i915/i915_reg.h
··· 3590 3590 #define _DDI_DP_COMP_PAT_B 0x615F4 3591 3591 #define DDI_DP_COMP_PAT(pipe, i) _MMIO(_PIPE(pipe, _DDI_DP_COMP_PAT_A, _DDI_DP_COMP_PAT_B) + (i) * 4) 3592 3592 3593 - /* Sideband Interface (SBI) is programmed indirectly, via 3594 - * SBI_ADDR, which contains the register offset; and SBI_DATA, 3595 - * which contains the payload */ 3596 - #define SBI_ADDR _MMIO(0xC6000) 3597 - #define SBI_DATA _MMIO(0xC6004) 3598 - #define SBI_CTL_STAT _MMIO(0xC6008) 3599 - #define SBI_CTL_DEST_ICLK (0x0 << 16) 3600 - #define SBI_CTL_DEST_MPHY (0x1 << 16) 3601 - #define SBI_CTL_OP_IORD (0x2 << 8) 3602 - #define SBI_CTL_OP_IOWR (0x3 << 8) 3603 - #define SBI_CTL_OP_CRRD (0x6 << 8) 3604 - #define SBI_CTL_OP_CRWR (0x7 << 8) 3605 - #define SBI_RESPONSE_FAIL (0x1 << 1) 3606 - #define SBI_RESPONSE_SUCCESS (0x0 << 1) 3607 - #define SBI_BUSY (0x1 << 0) 3608 - #define SBI_READY (0x0 << 0) 3609 - 3610 - /* SBI offsets */ 3611 - #define SBI_SSCDIVINTPHASE 0x0200 3612 - #define SBI_SSCDIVINTPHASE6 0x0600 3613 - #define SBI_SSCDIVINTPHASE_DIVSEL_SHIFT 1 3614 - #define SBI_SSCDIVINTPHASE_DIVSEL_MASK (0x7f << 1) 3615 - #define SBI_SSCDIVINTPHASE_DIVSEL(x) ((x) << 1) 3616 - #define SBI_SSCDIVINTPHASE_INCVAL_SHIFT 8 3617 - #define SBI_SSCDIVINTPHASE_INCVAL_MASK (0x7f << 8) 3618 - #define SBI_SSCDIVINTPHASE_INCVAL(x) ((x) << 8) 3619 - #define SBI_SSCDIVINTPHASE_DIR(x) ((x) << 15) 3620 - #define SBI_SSCDIVINTPHASE_PROPAGATE (1 << 0) 3621 - #define SBI_SSCDITHPHASE 0x0204 3622 - #define SBI_SSCCTL 0x020c 3623 - #define SBI_SSCCTL6 0x060C 3624 - #define SBI_SSCCTL_PATHALT (1 << 3) 3625 - #define SBI_SSCCTL_DISABLE (1 << 0) 3626 - #define SBI_SSCAUXDIV6 0x0610 3627 - #define SBI_SSCAUXDIV_FINALDIV2SEL_SHIFT 4 3628 - #define SBI_SSCAUXDIV_FINALDIV2SEL_MASK (1 << 4) 3629 - #define SBI_SSCAUXDIV_FINALDIV2SEL(x) ((x) << 4) 3630 - #define SBI_DBUFF0 0x2a00 3631 - #define SBI_GEN0 0x1f00 3632 - #define SBI_GEN0_CFG_BUFFENABLE_DISABLE (1 << 0) 3633 - 3634 3593 /* LPT PIXCLK_GATE */ 3635 3594 #define PIXCLK_GATE _MMIO(0xC6020) 3636 3595 #define PIXCLK_GATE_UNGATE (1 << 0)
+1
drivers/gpu/drm/i915/intel_gvt_mmio_table.c
··· 21 21 #include "display/intel_lvds_regs.h" 22 22 #include "display/intel_pfit_regs.h" 23 23 #include "display/intel_psr_regs.h" 24 + #include "display/intel_sbi_regs.h" 24 25 #include "display/intel_sprite_regs.h" 25 26 #include "display/intel_vga_regs.h" 26 27 #include "display/skl_universal_plane_regs.h"