drm/radeon: Remove test for !screen_base in fbdev probing
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 16 Mar 2023 09:37:32 +0000 (10:37 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 31 Mar 2023 15:18:42 +0000 (11:18 -0400)
The screen_base field comes from the fbdev BO and contains the fbdev
framebuffer base address. We get the BO memory via radeon_bo_kmap(),
which already reports the error -ENOMEM if the buffer could not be
mapped. So remove the later test for screen_base, which will never
be NULL at this point.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_fb.c

index cab10c4..7af038e 100644 (file)
@@ -247,11 +247,6 @@ static int radeonfb_create(struct drm_fb_helper *helper,
 
        /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
 
-       if (info->screen_base == NULL) {
-               ret = -ENOSPC;
-               goto out;
-       }
-
        DRM_INFO("fb mappable at 0x%lX\n",  info->fix.smem_start);
        DRM_INFO("vram apper at 0x%lX\n",  (unsigned long)rdev->mc.aper_base);
        DRM_INFO("size %lu\n", (unsigned long)radeon_bo_size(rbo));