drm/nouveau: Use drm_fb_helper_fill_info

This changes the fb name from "nouveaufb" to "nouveaudrmfb".

Aside: I wonder whether the in_interrupt() check is good enough for
the nouveau acceleration. Cargo-cult says drm_can_sleep() is needed,
which isn't actually working if you pick a .config without PREEMPT.
For the generic fbdev defio support we've gone with offloading
everything to a worker. For the non-accel callbacks (set_par, blank
and friends) checking for oops_in_progress is good enough to catch all
the evil calling contexts.

v2: Rebase

Acked-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: nouveau@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190326132008.11781-14-daniel.vetter@ffwll.ch
This commit is contained in:
Daniel Vetter 2019-03-26 14:20:01 +01:00
parent d4eae71f81
commit f243dd0618
2 changed files with 2 additions and 7 deletions

View File

@ -366,12 +366,9 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
goto out_unlock; goto out_unlock;
} }
info->par = fbcon;
/* setup helper */ /* setup helper */
fbcon->helper.fb = &fb->base; fbcon->helper.fb = &fb->base;
strcpy(info->fix.id, "nouveaufb");
if (!chan) if (!chan)
info->flags = FBINFO_HWACCEL_DISABLED; info->flags = FBINFO_HWACCEL_DISABLED;
else else
@ -386,9 +383,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
info->screen_base = nvbo_kmap_obj_iovirtual(fb->nvbo); info->screen_base = nvbo_kmap_obj_iovirtual(fb->nvbo);
info->screen_size = fb->nvbo->bo.mem.num_pages << PAGE_SHIFT; info->screen_size = fb->nvbo->bo.mem.num_pages << PAGE_SHIFT;
drm_fb_helper_fill_fix(info, fb->base.pitches[0], drm_fb_helper_fill_info(info, &fbcon->helper, sizes);
fb->base.format->depth);
drm_fb_helper_fill_var(info, &fbcon->helper, sizes->fb_width, sizes->fb_height);
/* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */ /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */

View File

@ -32,7 +32,7 @@
#include "nouveau_display.h" #include "nouveau_display.h"
struct nouveau_fbdev { struct nouveau_fbdev {
struct drm_fb_helper helper; struct drm_fb_helper helper; /* must be first */
unsigned int saved_flags; unsigned int saved_flags;
struct nvif_object surf2d; struct nvif_object surf2d;
struct nvif_object clip; struct nvif_object clip;