]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915/display: Add APIs to be used by gvt to get the register offsets
authorAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Fri, 19 Dec 2025 06:02:55 +0000 (11:32 +0530)
committerAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Mon, 29 Dec 2025 12:09:56 +0000 (17:39 +0530)
commitf3255cf4490ef63b477c1142fc608cf6388e66d4
tree5493830c5e65bd9cf2af010b9b3307d76a386cf3
parent71813ecc8436a6b10d528b305a827238e98530c9
drm/i915/display: Add APIs to be used by gvt to get the register offsets

GVT code uses macros for register offsets that require display internal
structures. This makes clean separation of display code and
modularization difficult.

Introduce APIs to abstract offset calculations:
- intel_display_device_pipe_offset()
- intel_display_device_trans_offset()
- intel_display_device_cursor_offset()
- intel_display_device_mmio_base()

These APIs return absolute base offsets for the respective register
groups, allowing GVT to compute MMIO addresses without using internal
macros or struct fields. This prepares the path to separate
display-dependent code from i915/gvt/*.

v2:
- Build GVT APIs only when GVT is actually enabled. (Jani)

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com> (#v1)
Link: https://patch.msgid.link/20251219060302.2365123-3-ankit.k.nautiyal@intel.com
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/display/intel_display_limits.c [new file with mode: 0644]
drivers/gpu/drm/i915/display/intel_gvt_api.c [new file with mode: 0644]
drivers/gpu/drm/i915/display/intel_gvt_api.h [new file with mode: 0644]