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

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/de: Add intel_de_write8()

Add a write counterpart to intel_de_read8(). Will be used for
MMIO access to VGA registers on pre-g4x.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20251208182637.334-12-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>

+26
+8
drivers/gpu/drm/i915/display/intel_de.h
··· 42 42 return intel_uncore_read8(__to_uncore(display), reg); 43 43 } 44 44 45 + static inline void 46 + intel_de_write8(struct intel_display *display, i915_reg_t reg, u8 val) 47 + { 48 + drm_WARN_ON(display->drm, DISPLAY_VER(display) >= 5 || display->platform.g4x); 49 + 50 + intel_uncore_write8(__to_uncore(display), reg, val); 51 + } 52 + 45 53 static inline u64 46 54 intel_de_read64_2x32(struct intel_display *display, 47 55 i915_reg_t lower_reg, i915_reg_t upper_reg)
+8
drivers/gpu/drm/xe/compat-i915-headers/intel_uncore.h
··· 38 38 return xe_mmio_read8(__compat_uncore_to_mmio(uncore), reg); 39 39 } 40 40 41 + static inline void intel_uncore_write8(struct intel_uncore *uncore, 42 + i915_reg_t i915_reg, u8 val) 43 + { 44 + struct xe_reg reg = XE_REG(i915_mmio_reg_offset(i915_reg)); 45 + 46 + xe_mmio_write8(__compat_uncore_to_mmio(uncore), reg, val); 47 + } 48 + 41 49 static inline u16 intel_uncore_read16(struct intel_uncore *uncore, 42 50 i915_reg_t i915_reg) 43 51 {
+9
drivers/gpu/drm/xe/xe_mmio.c
··· 158 158 return val; 159 159 } 160 160 161 + void xe_mmio_write8(struct xe_mmio *mmio, struct xe_reg reg, u8 val) 162 + { 163 + u32 addr = xe_mmio_adjusted_addr(mmio, reg.addr); 164 + 165 + trace_xe_reg_rw(mmio, true, addr, val, sizeof(val)); 166 + 167 + writeb(val, mmio->regs + addr); 168 + } 169 + 161 170 u16 xe_mmio_read16(struct xe_mmio *mmio, struct xe_reg reg) 162 171 { 163 172 u32 addr = xe_mmio_adjusted_addr(mmio, reg.addr);
+1
drivers/gpu/drm/xe/xe_mmio.h
··· 17 17 void xe_mmio_init(struct xe_mmio *mmio, struct xe_tile *tile, void __iomem *ptr, u32 size); 18 18 19 19 u8 xe_mmio_read8(struct xe_mmio *mmio, struct xe_reg reg); 20 + void xe_mmio_write8(struct xe_mmio *mmio, struct xe_reg reg, u8 val); 20 21 u16 xe_mmio_read16(struct xe_mmio *mmio, struct xe_reg reg); 21 22 void xe_mmio_write32(struct xe_mmio *mmio, struct xe_reg reg, u32 val); 22 23 u32 xe_mmio_read32(struct xe_mmio *mmio, struct xe_reg reg);