Files
geramyloveless 2effeb9871 linuxu: headers for the display tree and the DRM display helpers
Vendor the upstream display headers verbatim (drm/display/ DP, MST,
dual-mode, DSC, HDCP, HDMI, SCDC; drm_crtc_helper.h, drm_probe_helper.h,
drm_modeset_helper.h, drm_modeset_helper_vtables.h, drm_bridge_helper.h,
drm_audio_component.h, acpi/video.h, linux/average.h, linux/iopoll.h,
media/cec-notifier.h and the uapi linux/cec.h). The trimmed DP/MST
helper headers and the inline display stubs they carried give way to the
upstream declarations, now that the upstream helpers are built.

media/cec.h keeps only the upstream CONFIG_CEC_CORE=n API. Smaller
upstream pieces the display code reaches: fsleep()/ssleep() and
TICK_NSEC, noinline/noinline_for_stack, the in-place byteorder helpers
(kernel.h includes asm/byteorder.h as upstream does), the
DIV64_U64_ROUND_* family, the !CONFIG_ACPI companion helpers, guid_t
through mod_devicetable.h, str_*() through kernel.h/seq_file.h, and the
workqueue disable/current_work declarations.

The drm_simple_encoder_init() stub is removed: drm_simple_kms_helper.c
provides it, as drm_dp_helper.c and drm_panel_orientation_quirks.c now
provide what linuxu/src/drm/dp_helper.c carried.
2026-10-02 20:42:02 -07:00

70 lines
1.9 KiB
C

/* linuxu: SHIM (third_party/linux/include/linux/compiler_attributes.h)
* Clang-compatible attribute definitions.
* __error__ is a GCC-specific construct; clang uses __builtin_unreachable().
*/
#ifndef __LINUX_COMPILER_ATTRIBUTES_H
#define __LINUX_COMPILER_ATTRIBUTES_H
#ifndef __always_inline
#define __always_inline inline __attribute__((always_inline))
#endif
#ifndef __noinline
#define __noinline __attribute__((noinline))
#endif
/* Upstream compiler_attributes.h / compiler_types.h spellings. */
#ifndef noinline
#define noinline __attribute__((__noinline__))
#endif
#ifndef noinline_for_stack
#define noinline_for_stack noinline
#endif
#ifndef noinline_for_tracing
#define noinline_for_tracing noinline
#endif
#ifndef __weak
#define __weak __attribute__((weak))
#endif
#ifndef __cold
#define __cold __attribute__((cold))
#endif
#ifndef __hot
#define __hot __attribute__((hot))
#endif
#ifndef __must_check
#define __must_check __attribute__((warn_unused_result))
#endif
#ifndef __printf
#define __printf(a, b) __attribute__((format(printf, a, b)))
#endif
#ifndef __nonstring
#define __nonstring
#endif
#ifndef __alloc_size
#define __alloc_size(a, b) __attribute__((alloc_size(a, b)))
#endif
#ifndef __packed
#define __packed __attribute__((packed))
#endif
#ifndef __aligned
#define __aligned(a) __attribute__((aligned(a)))
#endif
#ifndef __visible
#define __visible __attribute__((visibility("default")))
#endif
#ifndef __destructor
#define __destructor __attribute__((destructor))
#endif
#ifndef __constructor
#define __constructor __attribute__((constructor))
#endif
#ifndef __assume_aligned
#define __assume_aligned(b, a) __builtin_assume_aligned((b), (a))
#endif
#ifndef __assume
#define __assume(x) __builtin_assume(x)
#endif
#ifndef __compiletime_error
#define __compiletime_error(msg) __attribute__((error(msg)))
#endif
#endif /* __LINUX_COMPILER_ATTRIBUTES_H */