On Thu, 2018-02-15 at 23:15 -0500, Louis-Francis Ratté-Boulianne wrote:
> In order to flip between compressed and uncompressed buffers -
> something drmModePageFlip explicitly bans us from doing - we need
> to port use the atomic modesetting API. It's only 'fake' atomic
> though given we still commit for each CRTC separately and
> CRTC and connector properties are not set with the atomic API.
> 
> The helper functions to retrieve DRM properties have been borrowed
> from Weston.

This doesn't build:

> +int
> +drmmode_crtc_set_fb(xf86CrtcPtr crtc, uint32_t fb_id,
> +                    int x, int y, uint32_t flags, void *data)
> +{
> +    modesettingPtr ms = modesettingPTR(crtc->scrn);
> +    xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
> +    drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
> +    int ret = 0;
> +
> +#ifdef GLAMOR_HAS_DRM_ATOMIC
> +    if (ms->atomic_modeset) {
> +        drmModeAtomicReq *req = drmModeAtomicAlloc();
> +
> +        if (!req)
> +            return 1;
> +
> +        ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_FB_ID,
> +                              fb_id);
> +        ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_CRTC_ID,
> +                              drmmode_crtc->mode_crtc->crtc_id);
> +        ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_SRC_X, x);

../hw/xfree86/drivers/modesetting/drmmode_display.c: In function 
‘drmmode_crtc_set_fb’:
../hw/xfree86/drivers/modesetting/drmmode_display.c:290:50: error: 
‘DRMMODE_PLANE_SRC_X’ undeclared (first use in this function); did you mean 
‘DRMMODE_PLANE_CRTC_ID’?
         ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_SRC_X, x);
                                                  ^~~~~~~~~~~~~~~~~~~
                                                  DRMMODE_PLANE_CRTC_ID

- ajax
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to