I discovered there are things we can make const, so I decided to do it
all over the place. Having things const has documentary value.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Look up underscan settings in weston.ini, validate them, and pass them on
to the compositor.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
For now, we're going to use either margin or underscan properties to
set up a symmetrical underscan - that way we have feature parity no
matter which props the driver supports.
We can orthogonally expose the things margins can do that symmetrical
borders can't later with a centering offset option, if we want to.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
These are a more standard way of configuring underscan. Add the properties
for now, we'll hook them up later.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Grab them from the output and set them if necessary. Since nothing can
set them yet, this will always be off/0 currently.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
When a flip fails we can't re-use the state, so make sure the forced
rebuild flag is set for all flip failures, not just flip failures that
stem from a reuse.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
The code always reports the framerate once the first frame appears
that's 5 seconds or more after the frame we started counting on.
However, this time is not guaranteed to be exactly 5 seconds after we
started counting, yet we were treating it as such.
This patch changes it by updating the start time to 5 seconds after the
last measurement, so that the reported value matches the 5 second
interval and the rest of the time is included in this measurement.
It also restarts counting if too much time has elapsed - likely the
window had been hidden and not received frame callbacks, so the
framerate isn't reliable.
Signed-off-by: Benjamin Otte <otte@redhat.com>
Adds a time_since typedef and _Generic annotator - we can typecast any
timestamp to a time_since for annotation, and the result will be the time
in microseconds between the timestamp and the current time (ie: the time
the annotations are being commit)
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This patch seems to fix the following compiler warning (as error) from
GCC 16.1.1:
../../git/weston/libweston/backend-rdp/rdpclip.c: In function ‘clipboard_process_html’:
../../git/weston/libweston/backend-rdp/rdpclip.c:417:31: error: ‘%08u’ directive writing between 8 and 10 bytes into a region of size 0 [-Werror=format-overflow=]
417 | sprintf(cur, "%08u", fragment_start);
| ^~~~
../../git/weston/libweston/backend-rdp/rdpclip.c:417:17: note: ‘sprintf’ output between 9 and 11 bytes into a destination of size 0
417 | sprintf(cur, "%08u", fragment_start);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../git/weston/libweston/backend-rdp/rdpclip.c:420:31: error: ‘%08u’ directive writing between 8 and 10 bytes into a region of size 0 [-Werror=format-overflow=]
420 | sprintf(cur, "%08u", fragment_end);
| ^~~~
../../git/weston/libweston/backend-rdp/rdpclip.c:420:30: note: using the range [0, 4294967295] for directive argument
420 | sprintf(cur, "%08u", fragment_end);
| ^~~~~~
../../git/weston/libweston/backend-rdp/rdpclip.c:420:17: note: ‘sprintf’ output between 9 and 11 bytes into a destination of size 0
420 | sprintf(cur, "%08u", fragment_end);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is a false-positive, as the destination is fixed via the hardcoded
HTML header and the offsets into it.
First I thought the problem was with the "region of size 0" and could
not make sense of it. Turns out the warnings were triggered by the
potential of formatting numbers longer than 8 decimal characters.
Ensuring the numbers cannot need more than 8 characters makes the
compiler happy.
If the numbers were more than 8 characters, the header would get
corrupted, and the numbers itself would get corrupted. Hence it seems
prudent to just bail off in that case. Input data is not trusted anyway,
and although unlikely, a 100+ MB blob does seem possible in theory.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
With DECLARE_TEST_LIST(), there is no need for the custom ELF section.
We can use a plain variable to refer to the list of test functions.
This makes the test harness more reliable as we are no longer relying on
internal compiler behavior on laying out objects in sections. This is
also obvious to memory access checkers that the accesses are valid.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() and TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() and TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace PLUGIN_TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace PLUGIN_TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace PLUGIN_TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace PLUGIN_TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>