On Wed, Sep 06, 2023 at 05:42:37AM -0600, Robert Nagy wrote:
> CVSROOT: /cvs
> Module name: xenocara
> Changes by: [email protected] 2023/09/06 05:42:37
>
> Modified files:
> driver/xf86-video-amdgpu/src: amdgpu_present.c drmmode_display.h
> xserver/glamor : glamor.h glamor_egl.c
>
> Log message:
> unbreak build with clang-16 by fixing up function definitions to match
>
> 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@
This broke the tree. Here's a potential fix.
Index: src/drmmode_display.c
===================================================================
RCS file: /cvs/xenocara/driver/xf86-video-amdgpu/src/drmmode_display.c,v
retrieving revision 1.4
diff -u -p -r1.4 drmmode_display.c
--- src/drmmode_display.c 5 Dec 2022 16:41:17 -0000 1.4
+++ src/drmmode_display.c 7 Sep 2023 04:49:05 -0000
@@ -161,7 +161,7 @@ drmmode_ConvertToKMode(ScrnInfoPtr scrn,
*/
Bool
drmmode_wait_vblank(xf86CrtcPtr crtc, drmVBlankSeqType type,
- uint32_t target_seq, unsigned long signal, uint64_t *ust,
+ uint32_t target_seq, unsigned long signal, CARD64 *ust,
uint32_t *result_seq)
{
int crtc_id = drmmode_get_crtc_id(crtc);
Index: src/drmmode_display.h
===================================================================
RCS file: /cvs/xenocara/driver/xf86-video-amdgpu/src/drmmode_display.h,v
retrieving revision 1.5
diff -u -p -r1.5 drmmode_display.h
--- src/drmmode_display.h 6 Sep 2023 11:42:37 -0000 1.5
+++ src/drmmode_display.h 7 Sep 2023 04:49:05 -0000
@@ -284,13 +284,13 @@ Bool amdgpu_do_pageflip(ScrnInfoPtr scrn
amdgpu_drm_abort_proc abort,
enum drmmode_flip_sync flip_sync,
uint32_t target_msc);
-int drmmode_crtc_get_ust_msc(xf86CrtcPtr crtc, uint64_t *ust, uint64_t *msc);
+int drmmode_crtc_get_ust_msc(xf86CrtcPtr crtc, CARD64 *ust, CARD64 *msc);
int drmmode_get_current_ust(int drm_fd, CARD64 * ust);
void drmmode_crtc_set_vrr(xf86CrtcPtr crtc, Bool enabled);
Bool drmmode_wait_vblank(xf86CrtcPtr crtc, drmVBlankSeqType type,
uint32_t target_seq, unsigned long signal,
- uint64_t *ust, uint32_t *result_seq);
+ CARD64 *ust, uint32_t *result_seq);
extern miPointerSpriteFuncRec drmmode_sprite_funcs;