There are many places in X drivers where CARD64 is used mixed with uint64_t
and CARD32 mixed with uint32_t.
Initially the CARD* types were only meant to be used in the X protocol
definition and implementation. Later they got used in driver for fixed-
length unsigned integers as synonyms for uintxx_t types.
Unfortunatly on OpenBSD the definition of uint64_t and CARD64 don't match.
So take the bull by the horns and fix the CARDxx definitions using the
corresponding uintxx_t types from stdint.h.
our uint64_t is an unsinged long long, but CARD64 is defined as unsigned long
so the function pointer types in both glamor and xf86-video-amdgpu were
mismatched and clang-16 treats that as an error
ok matthieu@
LUNA's frame buffer is 'planar' type, not packed pixel. So use
shadowUpdateAfb8 as shadow framebuffer procedure to work 8bpp X
server.
It took 10 years to make X server colored on LUNA.
Originally inspired by NetBSD/amiga.
ok miod@
internally.
The functions wireToRawEvent() and copyRawEvent() get memories first,
then allocate memory blocks sequentially for several objects include
'double' from there.
On m88k, the memory area for 'double' should be 8-byte aligned, but
sizeof(XIRawEvent) is 60 and sizeof(out->valuators.mask_len) is 8.
In this case, allocated 'double' memory was not 8-byte aligned.
Because of this, 'xeyes' on luna88k was aborted with Bus Error right
after moving mouse for several years with sys/arch/m88k/m88k/trap.c
r.127.
Tested by me on luna88k, ok matthieu@
LUNA's video memory has 'linebytes * fPtr->info.height' bytes per 1
plane and the real visible area begins at 'offset' within that video
memory area, so it does not need to add 'offset' when mmap'ing video
memory.
Noticed by nono emulator.
ok miod@
For the gpu n, the main device node is /dev/dri/card<n> and the
render device node is /dev/dri/renderD<n+drmGetMinorBase()> not
/dev/dri/renderD<n>
and miod@ checked that no port should be affected.
that would cause Xlib to write entries out-of-bounds of the arrays to
store them, though this would only overwrite other parts of the Display
struct, not outside the bounds allocated for that structure.