| @@ -664,31 +664,35 @@ drmmode_set_scanout_pixmap_cpu(xf86CrtcP | | | @@ -664,31 +664,35 @@ drmmode_set_scanout_pixmap_cpu(xf86CrtcP |
664 | ppriv = msGetPixmapPriv(drmmode, ppix); | | 664 | ppriv = msGetPixmapPriv(drmmode, ppix); |
665 | if (!drmmode_crtc->slave_damage) { | | 665 | if (!drmmode_crtc->slave_damage) { |
666 | drmmode_crtc->slave_damage = DamageCreate(NULL, NULL, | | 666 | drmmode_crtc->slave_damage = DamageCreate(NULL, NULL, |
667 | DamageReportNone, | | 667 | DamageReportNone, |
668 | TRUE, | | 668 | TRUE, |
669 | crtc->randr_crtc->pScreen, | | 669 | crtc->randr_crtc->pScreen, |
670 | NULL); | | 670 | NULL); |
671 | } | | 671 | } |
672 | ptr = drmmode_map_slave_bo(drmmode, ppriv); | | 672 | ptr = drmmode_map_slave_bo(drmmode, ppriv); |
673 | ppix->devPrivate.ptr = ptr; | | 673 | ppix->devPrivate.ptr = ptr; |
674 | DamageRegister(&ppix->drawable, drmmode_crtc->slave_damage); | | 674 | DamageRegister(&ppix->drawable, drmmode_crtc->slave_damage); |
675 | | | 675 | |
676 | if (ppriv->fb_id == 0) { | | 676 | if (ppriv->fb_id == 0) { |
677 | drmModeAddFB(drmmode->fd, ppix->drawable.width, | | 677 | int ret = drmModeAddFB(drmmode->fd, ppix->drawable.width, |
678 | ppix->drawable.height, | | 678 | ppix->drawable.height, |
679 | ppix->drawable.depth, | | 679 | ppix->drawable.depth, |
680 | ppix->drawable.bitsPerPixel, | | 680 | ppix->drawable.bitsPerPixel, |
681 | ppix->devKind, ppriv->backing_bo->handle, &ppriv->fb_id); | | 681 | ppix->devKind, ppriv->backing_bo->handle, &ppriv->fb_id); |
| | | 682 | if (ret) { |
| | | 683 | ErrorF("failed to set scanout pixmap cpu\n"); |
| | | 684 | return FALSE; |
| | | 685 | } |
682 | } | | 686 | } |
683 | return TRUE; | | 687 | return TRUE; |
684 | } | | 688 | } |
685 | | | 689 | |
686 | static Bool | | 690 | static Bool |
687 | drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix) | | 691 | drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix) |
688 | { | | 692 | { |
689 | drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; | | 693 | drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; |
690 | drmmode_ptr drmmode = drmmode_crtc->drmmode; | | 694 | drmmode_ptr drmmode = drmmode_crtc->drmmode; |
691 | | | 695 | |
692 | if (drmmode->reverse_prime_offload_mode) | | 696 | if (drmmode->reverse_prime_offload_mode) |
693 | return drmmode_set_scanout_pixmap_gpu(crtc, ppix); | | 697 | return drmmode_set_scanout_pixmap_gpu(crtc, ppix); |
694 | else | | 698 | else |