aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_framebuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_framebuffer.c')
-rw-r--r--drivers/gpu/drm/drm_framebuffer.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
index 6eaacd4eb8cc..1ee3d6b44280 100644
--- a/drivers/gpu/drm/drm_framebuffer.c
+++ b/drivers/gpu/drm/drm_framebuffer.c
@@ -113,6 +113,9 @@ int drm_mode_addfb(struct drm_device *dev, struct drm_mode_fb_cmd *or,
113 struct drm_mode_fb_cmd2 r = {}; 113 struct drm_mode_fb_cmd2 r = {};
114 int ret; 114 int ret;
115 115
116 if (!drm_core_check_feature(dev, DRIVER_MODESET))
117 return -EOPNOTSUPP;
118
116 r.pixel_format = drm_mode_legacy_fb_format(or->bpp, or->depth); 119 r.pixel_format = drm_mode_legacy_fb_format(or->bpp, or->depth);
117 if (r.pixel_format == DRM_FORMAT_INVALID) { 120 if (r.pixel_format == DRM_FORMAT_INVALID) {
118 DRM_DEBUG("bad {bpp:%d, depth:%d}\n", or->bpp, or->depth); 121 DRM_DEBUG("bad {bpp:%d, depth:%d}\n", or->bpp, or->depth);
@@ -352,7 +355,7 @@ int drm_mode_addfb2(struct drm_device *dev,
352 struct drm_framebuffer *fb; 355 struct drm_framebuffer *fb;
353 356
354 if (!drm_core_check_feature(dev, DRIVER_MODESET)) 357 if (!drm_core_check_feature(dev, DRIVER_MODESET))
355 return -EINVAL; 358 return -EOPNOTSUPP;
356 359
357 fb = drm_internal_framebuffer_create(dev, r, file_priv); 360 fb = drm_internal_framebuffer_create(dev, r, file_priv);
358 if (IS_ERR(fb)) 361 if (IS_ERR(fb))
@@ -387,7 +390,7 @@ int drm_mode_addfb2_ioctl(struct drm_device *dev,
387 * ADDFB. 390 * ADDFB.
388 */ 391 */
389 DRM_DEBUG_KMS("addfb2 broken on bigendian"); 392 DRM_DEBUG_KMS("addfb2 broken on bigendian");
390 return -EINVAL; 393 return -EOPNOTSUPP;
391 } 394 }
392#endif 395#endif
393 return drm_mode_addfb2(dev, data, file_priv); 396 return drm_mode_addfb2(dev, data, file_priv);
@@ -432,7 +435,7 @@ int drm_mode_rmfb(struct drm_device *dev, u32 fb_id,
432 int found = 0; 435 int found = 0;
433 436
434 if (!drm_core_check_feature(dev, DRIVER_MODESET)) 437 if (!drm_core_check_feature(dev, DRIVER_MODESET))
435 return -EINVAL; 438 return -EOPNOTSUPP;
436 439
437 fb = drm_framebuffer_lookup(dev, file_priv, fb_id); 440 fb = drm_framebuffer_lookup(dev, file_priv, fb_id);
438 if (!fb) 441 if (!fb)
@@ -509,7 +512,7 @@ int drm_mode_getfb(struct drm_device *dev,
509 int ret; 512 int ret;
510 513
511 if (!drm_core_check_feature(dev, DRIVER_MODESET)) 514 if (!drm_core_check_feature(dev, DRIVER_MODESET))
512 return -EINVAL; 515 return -EOPNOTSUPP;
513 516
514 fb = drm_framebuffer_lookup(dev, file_priv, r->fb_id); 517 fb = drm_framebuffer_lookup(dev, file_priv, r->fb_id);
515 if (!fb) 518 if (!fb)
@@ -582,7 +585,7 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
582 int ret; 585 int ret;
583 586
584 if (!drm_core_check_feature(dev, DRIVER_MODESET)) 587 if (!drm_core_check_feature(dev, DRIVER_MODESET))
585 return -EINVAL; 588 return -EOPNOTSUPP;
586 589
587 fb = drm_framebuffer_lookup(dev, file_priv, r->fb_id); 590 fb = drm_framebuffer_lookup(dev, file_priv, r->fb_id);
588 if (!fb) 591 if (!fb)