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: Introduce intel_de.c and move intel_de_{read,write}8() there

intel_de_{read,write}8() aren't performance critical so having them
as static inline is pointless. Introduce intel_de.c and move the
implementation there.

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

+28 -19
+1
drivers/gpu/drm/i915/Makefile
··· 254 254 display/intel_crtc_state_dump.o \ 255 255 display/intel_cursor.o \ 256 256 display/intel_dbuf_bw.o \ 257 + display/intel_de.o \ 257 258 display/intel_display.o \ 258 259 display/intel_display_conversion.o \ 259 260 display/intel_display_driver.o \
+23
drivers/gpu/drm/i915/display/intel_de.c
··· 1 + // SPDX-License-Identifier: MIT 2 + /* 3 + * Copyright © 2026 Intel Corporation 4 + */ 5 + 6 + #include <drm/drm_print.h> 7 + 8 + #include "intel_de.h" 9 + 10 + u8 intel_de_read8(struct intel_display *display, i915_reg_t reg) 11 + { 12 + /* this is only used on VGA registers (possible on pre-g4x) */ 13 + drm_WARN_ON(display->drm, DISPLAY_VER(display) >= 5 || display->platform.g4x); 14 + 15 + return intel_uncore_read8(__to_uncore(display), reg); 16 + } 17 + 18 + void intel_de_write8(struct intel_display *display, i915_reg_t reg, u8 val) 19 + { 20 + drm_WARN_ON(display->drm, DISPLAY_VER(display) >= 5 || display->platform.g4x); 21 + 22 + intel_uncore_write8(__to_uncore(display), reg, val); 23 + }
+3 -19
drivers/gpu/drm/i915/display/intel_de.h
··· 6 6 #ifndef __INTEL_DE_H__ 7 7 #define __INTEL_DE_H__ 8 8 9 - #include <drm/drm_print.h> 10 - 11 9 #include "intel_display_core.h" 12 10 #include "intel_dmc_wl.h" 13 11 #include "intel_dsb.h" ··· 16 18 { 17 19 return to_intel_uncore(display->drm); 18 20 } 21 + 22 + u8 intel_de_read8(struct intel_display *display, i915_reg_t reg); 23 + void intel_de_write8(struct intel_display *display, i915_reg_t reg, u8 val); 19 24 20 25 static inline u32 21 26 intel_de_read(struct intel_display *display, i915_reg_t reg) ··· 32 31 intel_dmc_wl_put(display, reg); 33 32 34 33 return val; 35 - } 36 - 37 - static inline u8 38 - intel_de_read8(struct intel_display *display, i915_reg_t reg) 39 - { 40 - /* this is only used on VGA registers (possible on pre-g4x) */ 41 - drm_WARN_ON(display->drm, DISPLAY_VER(display) >= 5 || display->platform.g4x); 42 - 43 - return intel_uncore_read8(__to_uncore(display), reg); 44 - } 45 - 46 - static inline void 47 - intel_de_write8(struct intel_display *display, i915_reg_t reg, u8 val) 48 - { 49 - drm_WARN_ON(display->drm, DISPLAY_VER(display) >= 5 || display->platform.g4x); 50 - 51 - intel_uncore_write8(__to_uncore(display), reg, val); 52 34 } 53 35 54 36 static inline u64
+1
drivers/gpu/drm/xe/Makefile
··· 249 249 i915-display/intel_dbuf_bw.o \ 250 250 i915-display/intel_ddi.o \ 251 251 i915-display/intel_ddi_buf_trans.o \ 252 + i915-display/intel_de.o \ 252 253 i915-display/intel_display.o \ 253 254 i915-display/intel_display_conversion.o \ 254 255 i915-display/intel_display_device.o \