Skip to content

Commit 87acfb7

Browse files
committed
modesetting: rename drmmode_bo_has_bo to drmmode_bo_get_bo
Signed-off-by: stefan11111 <[email protected]>
1 parent 4ea25e9 commit 87acfb7

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

hw/xfree86/drivers/video/modesetting/drmmode_display.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,15 +1039,15 @@ drmmode_bo_get_pitch(drmmode_bo *bo)
10391039
return bo->dumb->pitch;
10401040
}
10411041

1042-
static Bool
1043-
drmmode_bo_has_bo(drmmode_bo *bo)
1042+
static void*
1043+
drmmode_bo_get_bo(drmmode_bo *bo)
10441044
{
10451045
#ifdef GLAMOR_HAS_GBM
10461046
if (bo->gbm)
1047-
return TRUE;
1047+
return bo->gbm;
10481048
#endif
10491049

1050-
return bo->dumb != NULL;
1050+
return bo->dumb;
10511051
}
10521052

10531053
uint32_t
@@ -2257,11 +2257,7 @@ drmmode_shadow_fb_allocate(xf86CrtcPtr crtc, int width, int height,
22572257
return NULL;
22582258
}
22592259

2260-
#ifdef GLAMOR_HAS_GBM
2261-
if (drmmode->gbm)
2262-
return bo->gbm;
2263-
#endif
2264-
return bo->dumb;
2260+
return drmmode_bo_get_bo(bo);
22652261
}
22662262

22672263
static void *
@@ -2316,7 +2312,7 @@ drmmode_shadow_fb_create(xf86CrtcPtr crtc, void *data, int width, int height,
23162312
}
23172313
}
23182314

2319-
if (!drmmode_bo_has_bo(bo)) {
2315+
if (!drmmode_bo_get_bo(bo)) {
23202316
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
23212317
"Couldn't allocate shadow pixmap for CRTC\n");
23222318
return NULL;

0 commit comments

Comments
 (0)