@@ -1042,7 +1042,7 @@ drmmode_bo_get_handle(drmmode_bo *bo)
10421042}
10431043
10441044static  void  * 
1045- drmmode_bo_map (drmmode_ptr  drmmode , drmmode_bo  * bo ,  Bool   map_glamor )
1045+ drmmode_bo_map (drmmode_ptr  drmmode , drmmode_bo  * bo )
10461046{
10471047    int  ret ;
10481048
@@ -1051,9 +1051,6 @@ drmmode_bo_map(drmmode_ptr drmmode, drmmode_bo *bo, Bool map_glamor)
10511051
10521052#ifdef  GLAMOR_HAS_GBM 
10531053    if  (bo -> gbm ) {
1054-         if  (!map_glamor ) {
1055-             return  FALSE;
1056-         }
10571054        void  * map_data  =  NULL ;
10581055        uint32_t  stride  =  0 ;
10591056
@@ -1199,13 +1196,15 @@ drmmode_create_cursor_bo(drmmode_ptr drmmode, drmmode_bo *bo,
11991196    bo -> height  =  height ;
12001197
12011198#ifdef  GLAMOR_HAS_GBM 
1202-     uint32_t  format  =  gbm_format_for_depth (bpp );
1199+     if  (drmmode -> gbm ) {
1200+         uint32_t  format  =  gbm_format_for_depth (bpp );
12031201
1204-     bo -> gbm  =  gbm_bo_create (drmmode -> gbm , bo -> width , bo -> height ,
1205-                             format ,
1206-                             GBM_BO_USE_CURSOR  | GBM_BO_USE_WRITE );
1207-     if  (bo -> gbm ) {
1208-         return  TRUE;
1202+         bo -> gbm  =  gbm_bo_create (drmmode -> gbm , bo -> width , bo -> height ,
1203+                                 format ,
1204+                                 GBM_BO_USE_CURSOR  | GBM_BO_USE_WRITE );
1205+         if  (bo -> gbm ) {
1206+             return  TRUE;
1207+         }
12091208    }
12101209#endif 
12111210
@@ -2332,7 +2331,7 @@ drmmode_shadow_fb_create(xf86CrtcPtr crtc, void *data, int width, int height,
23322331        return  NULL ;
23332332    }
23342333
2335-     pPixData  =  drmmode_bo_map (drmmode , bo , FALSE );
2334+     pPixData  =  drmmode_bo_map (drmmode , bo );
23362335    pitch  =  drmmode_bo_get_pitch (bo );
23372336
23382337    pixmap  =  drmmode_create_pixmap_header (scrn -> pScreen ,
@@ -4879,7 +4878,7 @@ drmmode_create_initial_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
48794878void  * 
48804879drmmode_map_front_bo (drmmode_ptr  drmmode )
48814880{
4882-     return  drmmode_bo_map (drmmode , & drmmode -> front_bo , FALSE );
4881+     return  drmmode_bo_map (drmmode , & drmmode -> front_bo );
48834882}
48844883
48854884void  * 
@@ -4907,7 +4906,7 @@ drmmode_map_cursor_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
49074906        xf86CrtcPtr  crtc  =  xf86_config -> crtc [i ];
49084907        drmmode_crtc_private_ptr  drmmode_crtc  =  crtc -> driver_private ;
49094908
4910-         if  (!drmmode_bo_map (drmmode_crtc -> drmmode , & drmmode_crtc -> cursor .cursor_bo , TRUE )) {
4909+         if  (!drmmode_bo_map (drmmode_crtc -> drmmode , & drmmode_crtc -> cursor .cursor_bo )) {
49114910            return  FALSE;
49124911        }
49134912    }
0 commit comments