File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -387,9 +387,11 @@ static const struct drm_fb_helper_funcs qxl_fb_helper_funcs = {
387
387
388
388
int qxl_fbdev_init (struct qxl_device * qdev )
389
389
{
390
+ int ret = 0 ;
391
+
392
+ #ifdef CONFIG_DRM_FBDEV_EMULATION
390
393
struct qxl_fbdev * qfbdev ;
391
394
int bpp_sel = 32 ; /* TODO: parameter from somewhere? */
392
- int ret ;
393
395
394
396
qfbdev = kzalloc (sizeof (struct qxl_fbdev ), GFP_KERNEL );
395
397
if (!qfbdev )
@@ -423,6 +425,8 @@ int qxl_fbdev_init(struct qxl_device *qdev)
423
425
drm_fb_helper_fini (& qfbdev -> helper );
424
426
free :
425
427
kfree (qfbdev );
428
+ #endif
429
+
426
430
return ret ;
427
431
}
428
432
@@ -438,6 +442,9 @@ void qxl_fbdev_fini(struct qxl_device *qdev)
438
442
439
443
void qxl_fbdev_set_suspend (struct qxl_device * qdev , int state )
440
444
{
445
+ if (!qdev -> mode_info .qfbdev )
446
+ return ;
447
+
441
448
drm_fb_helper_set_suspend (& qdev -> mode_info .qfbdev -> helper , state );
442
449
}
443
450
You can’t perform that action at this time.
0 commit comments