drivers/gpu/drm/i915/gvt/display_helpers.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/gvt/display_helpers.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/i915/gvt/display_helpers.h
Extension
.h
Size
1246 bytes
Lines
38
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef __DISPLAY_HELPERS_H__
#define __DISPLAY_HELPERS_H__

#include "display/intel_gvt_api.h"

#define DISPLAY_MMIO_BASE(display) \
	intel_display_device_mmio_base((display))

/*
 * #FIXME:
 * TRANSCONF() uses pipe-based addressing via _MMIO_PIPE2().
 * Some GVT call sites pass enum transcoder instead of enum pipe.
 * Cast the argument to enum pipe for now since TRANSCODER_A..D map
 * 1:1 to PIPE_A..D.
 * TRANSCODER_EDP is an exception, the cast preserves the existing
 * behaviour but this needs to be handled later either by using the
 * correct pipe or by switching TRANSCONF() to use _MMIO_TRANS2().
 */
#define INTEL_DISPLAY_DEVICE_PIPE_OFFSET(display, idx) \
	intel_display_device_pipe_offset((display), (enum pipe)(idx))

#define INTEL_DISPLAY_DEVICE_TRANS_OFFSET(display, trans) \
	intel_display_device_trans_offset((display), (trans))

#define INTEL_DISPLAY_DEVICE_CURSOR_OFFSET(display, pipe) \
	intel_display_device_cursor_offset((display), (pipe))

#define gvt_for_each_pipe(display, __p) \
	for ((__p) = PIPE_A; (__p) < I915_MAX_PIPES; (__p)++) \
		for_each_if(intel_display_device_pipe_valid((display), (__p)))

#endif /* __DISPLAY_HELPERS_H__ */

Annotation

Implementation Notes