[PATCH xserver] modesetting: Fix build without glamor

Hans de Goede hdegoede at redhat.com
Fri Sep 16 15:23:02 UTC 2016


Hi,

On 16-09-16 17:20, Olivier Fourdan wrote:
> Build would abort if configure without glamor:
>
> | present.c: error: implicit declaration of function
> |  ‘ms_flush_drm_events’ [-Werror=implicit-function-declaration]
> |         if (errno != EBUSY || ms_flush_drm_events(screen) < 0) {
>
> ms_flush_drm_events() is avaialble only with glamor, so avoid the
> compilation error by putting th code that use it within an
>
> Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>

There already was a fix for this posted a while ago,
but that still needs to be merged.

Regards,

Hans


> ---
>  hw/xfree86/drivers/modesetting/present.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/hw/xfree86/drivers/modesetting/present.c b/hw/xfree86/drivers/modesetting/present.c
> index 55b622c..ed2b813 100644
> --- a/hw/xfree86/drivers/modesetting/present.c
> +++ b/hw/xfree86/drivers/modesetting/present.c
> @@ -71,6 +71,7 @@ ms_present_get_ust_msc(RRCrtcPtr crtc, CARD64 *ust, CARD64 *msc)
>      return ms_get_crtc_ust_msc(xf86_crtc, ust, msc);
>  }
>
> +#ifdef GLAMOR
>  /*
>   * Called when the queued vblank event has occurred
>   */
> @@ -98,7 +99,7 @@ ms_present_vblank_abort(void *data)
>
>      free(event);
>  }
> -
> +#endif
>  /*
>   * Queue an event to report back to the Present extension when the specified
>   * MSC has past
> @@ -108,6 +109,7 @@ ms_present_queue_vblank(RRCrtcPtr crtc,
>                          uint64_t event_id,
>                          uint64_t msc)
>  {
> +#ifdef GLAMOR
>      xf86CrtcPtr xf86_crtc = crtc->devPrivate;
>      ScreenPtr screen = crtc->pScreen;
>      ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
> @@ -149,6 +151,7 @@ ms_present_queue_vblank(RRCrtcPtr crtc,
>      DebugPresent(("\t\tmq %lld seq %u msc %llu (hw msc %u)\n",
>                   (long long) event_id, seq, (long long) msc,
>                   vbl.request.sequence));
> +#endif
>      return Success;
>  }
>
>


More information about the xorg-devel mailing list