Daniel Vetter
2019-Mar-26 13:20 UTC
[Nouveau] [PATCH 14/21] 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 Signed-off-by: Daniel Vetter <daniel.vetter at intel.com> Cc: Ben Skeggs <bskeggs at redhat.com> Cc: nouveau at lists.freedesktop.org --- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 7 +------ drivers/gpu/drm/nouveau/nouveau_fbcon.h | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 9d6dba07c727..73cc3217068a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -366,12 +366,9 @@ nouveau_fbcon_create(struct drm_fb_helper *helper, goto out_unlock; } - info->par = fbcon; - /* setup helper */ fbcon->helper.fb = &fb->base; - strcpy(info->fix.id, "nouveaufb"); if (!chan) info->flags = FBINFO_HWACCEL_DISABLED; else @@ -386,9 +383,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper, info->screen_base = nvbo_kmap_obj_iovirtual(fb->nvbo); info->screen_size = fb->nvbo->bo.mem.num_pages << PAGE_SHIFT; - drm_fb_helper_fill_fix(info, fb->base.pitches[0], - fb->base.format->depth); - drm_fb_helper_fill_var(info, &fbcon->helper, sizes->fb_width, sizes->fb_height); + drm_fb_helper_fill_info(info, &fbcon->helper, sizes); /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */ diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.h b/drivers/gpu/drm/nouveau/nouveau_fbcon.h index db9d52047ef8..73a7eeba3973 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.h +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.h @@ -32,7 +32,7 @@ #include "nouveau_display.h" struct nouveau_fbdev { - struct drm_fb_helper helper; + struct drm_fb_helper helper; /* must be first */ unsigned int saved_flags; struct nvif_object surf2d; struct nvif_object clip; -- 2.20.1
Noralf Trønnes
2019-Mar-26 14:47 UTC
[Nouveau] [PATCH 14/21] drm/nouveau: Use drm_fb_helper_fill_info
Den 26.03.2019 14.20, skrev Daniel Vetter:> 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 > > Signed-off-by: Daniel Vetter <daniel.vetter at intel.com> > Cc: Ben Skeggs <bskeggs at redhat.com> > Cc: nouveau at lists.freedesktop.org > ---Acked-by: Noralf Trønnes <noralf at tronnes.org>
Reasonably Related Threads
- [PATCH 17/26] drm/nouveau: Use drm_fb_helper_fill_info
- [PATCH v7 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests
- [PATCH v7 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests
- [PATCH 2/4] drm/nouveau: Move struct nouveau_framebuffer.vma to struct nouveau_fbdev
- [PATCH 26/26] drm/<drivers>: Don't set FBINFO_(FLAG_)DEFAULT