search for: fbinfo_state_running

Displaying 20 results from an estimated 53 matches for "fbinfo_state_running".

2016 Jul 12
6
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...(ret) @@ -635,7 +635,7 @@ nouveau_do_resume(struct drm_device *dev, bool runtime) NV_INFO(drm, "resuming display...\n"); nouveau_display_resume(dev, runtime); NV_INFO(drm, "resuming console...\n"); - nouveau_fbcon_set_suspend(dev, 0); + nouveau_fbcon_set_suspend(dev, FBINFO_STATE_RUNNING, false); } return 0; diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 822a021..a743d19 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -147,6 +147,7 @@ struct nouveau_drm { struct nouveau_chann...
2017 Jan 12
2
[PATCH v2 1/2] drm/nouveau: Don't enabling polling twice on runtime resume
As it turns out, on cards that actually have CRTCs on them we're already calling drm_kms_helper_poll_enable(drm_dev) from nouveau_display_resume() before we call it in nouveau_pmops_runtime_resume(). This leads us to accidentally trying to enable polling twice, which results in a potential deadlock between the RPM locks and drm_dev->mode_config.mutex if we end up trying to enable polling
2017 Jan 12
0
[PATCH 2/2] drm/nouveau: Handle fbcon suspend/resume in seperate worker
...ct drm_fb_helper_funcs nouveau_fbcon_helper_funcs = { .fb_probe = nouveau_fbcon_create, }; +static void +nouveau_fbcon_set_suspend_work(struct work_struct *work) +{ + struct nouveau_drm *drm = container_of(work, typeof(*drm), fbcon_work); + int state = drm->fbcon_new_state; + + if (state == FBINFO_STATE_RUNNING) + pm_runtime_get_sync(drm->dev->dev); + + console_lock(); + if (state == FBINFO_STATE_RUNNING) + nouveau_fbcon_accel_restore(drm->dev); + drm_fb_helper_set_suspend(&drm->fbcon->helper, state); + if (state != FBINFO_STATE_RUNNING) + nouveau_fbcon_accel_save_disable(drm->dev...
2016 Jul 12
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...@ nouveau_do_resume(struct drm_device *dev, bool runtime) > NV_INFO(drm, "resuming display...\n"); > nouveau_display_resume(dev, runtime); > NV_INFO(drm, "resuming console...\n"); > - nouveau_fbcon_set_suspend(dev, 0); > + nouveau_fbcon_set_suspend(dev, FBINFO_STATE_RUNNING, false); > } > > return 0; > diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h > index 822a021..a743d19 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_drv.h > +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h > @@ -147,6 +147,7 @@ str...
2016 Jul 13
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...@ nouveau_do_resume(struct drm_device *dev, bool runtime) > NV_INFO(drm, "resuming display...\n"); > nouveau_display_resume(dev, runtime); > NV_INFO(drm, "resuming console...\n"); > - nouveau_fbcon_set_suspend(dev, 0); > + nouveau_fbcon_set_suspend(dev, FBINFO_STATE_RUNNING, false); > } > > return 0; > diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h > index 822a021..a743d19 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_drv.h > +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h > @@ -147,6 +147,7 @@ str...
2016 Jul 15
1
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...t drm_device *dev, bool runtime) > > NV_INFO(drm, "resuming display...\n"); > > nouveau_display_resume(dev, runtime); > > NV_INFO(drm, "resuming console...\n"); > > - nouveau_fbcon_set_suspend(dev, 0); > > + nouveau_fbcon_set_suspend(dev, FBINFO_STATE_RUNNING, false); > > } > > > > return 0; > > diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h > > index 822a021..a743d19 100644 > > --- a/drivers/gpu/drm/nouveau/nouveau_drv.h > > +++ b/drivers/gpu/drm/nouveau/nouveau...
2016 Jul 13
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...@ nouveau_do_resume(struct drm_device *dev, bool runtime) > NV_INFO(drm, "resuming display...\n"); > nouveau_display_resume(dev, runtime); > NV_INFO(drm, "resuming console...\n"); > - nouveau_fbcon_set_suspend(dev, 0); > + nouveau_fbcon_set_suspend(dev, FBINFO_STATE_RUNNING, false); > } > > return 0; > diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h > index 822a021..a743d19 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_drv.h > +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h > @@ -147,6 +147,7 @@ str...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...-static void -nouveau_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) -{ - struct nouveau_fbdev *fbcon = info->par; - struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev); - struct nvif_device *device = &drm->client.device; - int ret; - - if (info->state != FBINFO_STATE_RUNNING) - return; - - ret = -ENODEV; - if (!in_interrupt() && !(info->flags & FBINFO_HWACCEL_DISABLED) && - mutex_trylock(&drm->client.mutex)) { - if (device->info.family < NV_DEVICE_INFO_V0_TESLA) - ret = nv04_fbcon_fillrect(info, rect); - else - if (device-&...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...struct fb_fillrect *rect) > -{ > - struct nouveau_fbdev *fbcon = info->par; > - struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev); > - struct nvif_device *device = &drm->client.device; > - int ret; > - > - if (info->state != FBINFO_STATE_RUNNING) > - return; > - > - ret = -ENODEV; > - if (!in_interrupt() && !(info->flags & FBINFO_HWACCEL_DISABLED) && > - mutex_trylock(&drm->client.mutex)) { > - if (device->info.family < NV_DEVICE_INFO_V0...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...gt;> -{ >> - struct nouveau_fbdev *fbcon = info->par; >> - struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev); >> - struct nvif_device *device = &drm->client.device; >> - int ret; >> - >> - if (info->state != FBINFO_STATE_RUNNING) >> - return; >> - >> - ret = -ENODEV; >> - if (!in_interrupt() && !(info->flags & FBINFO_HWACCEL_DISABLED) && >> - mutex_trylock(&drm->client.mutex)) { >> - if (device->info.famil...
2015 Jan 05
2
drm/nouveau: dont switch vt on suspend
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at ubuntu.com> --- diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 3ed12a8cfc91..a4a586807903 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -370,6 +370,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper, ret = -ENOMEM; goto
2023 Jan 10
1
[PATCH v2] drm/nouveau: Remove file nouveau_fbcon.c
...-static void -nouveau_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) -{ - struct nouveau_fbdev *fbcon = info->par; - struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev); - struct nvif_device *device = &drm->client.device; - int ret; - - if (info->state != FBINFO_STATE_RUNNING) - return; - - ret = -ENODEV; - if (!in_interrupt() && !(info->flags & FBINFO_HWACCEL_DISABLED) && - mutex_trylock(&drm->client.mutex)) { - if (device->info.family < NV_DEVICE_INFO_V0_TESLA) - ret = nv04_fbcon_fillrect(info, rect); - else - if (device-&...
2016 Jul 13
2
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...t drm_device *dev, bool runtime) > > NV_INFO(drm, "resuming display...\n"); > > nouveau_display_resume(dev, runtime); > > NV_INFO(drm, "resuming console...\n"); > > - nouveau_fbcon_set_suspend(dev, 0); > > + nouveau_fbcon_set_suspend(dev, FBINFO_STATE_RUNNING, false); > > } > > > > return 0; > > diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h > > index 822a021..a743d19 100644 > > --- a/drivers/gpu/drm/nouveau/nouveau_drv.h > > +++ b/drivers/gpu/drm/nouveau/nouveau...
2013 Oct 04
2
[PATCH] drm/nouveau/fb: fix suspend/resume fbcon
...restore_accel(dev); > console_unlock(); > > Cheers, > Emil Hi! That was my first try! I guessed the same but I got exactly one trap message on resume. So it's about first put the bucket and then open the water tap. ;) chris ps: just found these macros for the state in fb.h: FBINFO_STATE_RUNNING = 0 FBINFO_STATE_SUSPENDED = 1
2010 Jan 03
1
[PATCH] nouveau: nv50: fix ->pseudo_palette usage
...bcon.c @@ -10,6 +10,7 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) struct drm_device *dev = par->dev; struct drm_nouveau_private *dev_priv = dev->dev_private; struct nouveau_channel *chan = dev_priv->channel; + uint32_t color; if (info->state != FBINFO_STATE_RUNNING) return; @@ -31,7 +32,12 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) OUT_RING(chan, 1); } BEGIN_RING(chan, NvSub2D, 0x0588, 1); - OUT_RING(chan, rect->color); + if (info->fix.visual == FB_VISUAL_TRUECOLOR || + info->fix.visual == FB_VISUAL_DIR...
2020 Oct 16
2
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...o *info, char __user *buf, > + size_t count, loff_t *ppos) > +{ > + unsigned long p = *ppos; > + u8 *dst; > + u8 __iomem *src; > + int c, err = 0; > + unsigned long total_size; > + unsigned long alloc_size; > + ssize_t ret = 0; > + > + if (info->state != FBINFO_STATE_RUNNING) > + return -EPERM; > + > + total_size = info->screen_size; > + > + if (total_size == 0) > + total_size = info->fix.smem_len; > + > + if (p >= total_size) > + return 0; > + > + if (count >= total_size) > + count = total_size; > + > + if (cou...
2020 Oct 22
2
[PATCH v5 10/10] drm/fb_helper: Support framebuffers in I/O memory
...t; + return -EFAULT; > + > + return count; > +} > + > +static ssize_t drm_fbdev_fb_read(struct fb_info *info, char __user *buf, > + size_t count, loff_t *ppos) > +{ > + loff_t pos = *ppos; > + size_t total_size; > + ssize_t ret; > + > + if (info->state != FBINFO_STATE_RUNNING) > + return -EPERM; > + > + if (info->screen_size) > + total_size = info->screen_size; > + else > + total_size = info->fix.smem_len; > + > + if (pos >= total_size) > + return 0; > + if (count >= total_size) > + count = total_size; > + if (tota...
2020 Oct 24
1
[PATCH v5 10/10] drm/fb_helper: Support framebuffers in I/O memory
...t; + return -EFAULT; > + > + return count; > +} > + > +static ssize_t drm_fbdev_fb_read(struct fb_info *info, char __user *buf, > + size_t count, loff_t *ppos) > +{ > + loff_t pos = *ppos; > + size_t total_size; > + ssize_t ret; > + > + if (info->state != FBINFO_STATE_RUNNING) > + return -EPERM; > + > + if (info->screen_size) > + total_size = info->screen_size; > + else > + total_size = info->fix.smem_len; > + > + if (pos >= total_size) > + return 0; > + if (count >= total_size) > + count = total_size; > + if (tota...
2020 Oct 16
1
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...o *info, char __user *buf, > + size_t count, loff_t *ppos) > +{ > + unsigned long p = *ppos; > + u8 *dst; > + u8 __iomem *src; > + int c, err = 0; > + unsigned long total_size; > + unsigned long alloc_size; > + ssize_t ret = 0; > + > + if (info->state != FBINFO_STATE_RUNNING) > + return -EPERM; > + > + total_size = info->screen_size; > + > + if (total_size == 0) > + total_size = info->fix.smem_len; > + > + if (p >= total_size) > + return 0; > + > + if (count >= total_size) > + count = total_size; > + > + if (cou...
2020 Oct 02
2
[PATCH v3 6/7] drm/fb_helper: Support framebuffers in I/O memory
...o *info, char __user *buf, > + size_t count, loff_t *ppos) > +{ > + unsigned long p = *ppos; > + u8 *dst; > + u8 __iomem *src; > + int c, err = 0; > + unsigned long total_size; > + unsigned long alloc_size; > + ssize_t ret = 0; > + > + if (info->state != FBINFO_STATE_RUNNING) > + return -EPERM; > + > + total_size = info->screen_size; > + > + if (total_size == 0) > + total_size = info->fix.smem_len; > + > + if (p >= total_size) > + return 0; > + > + if (count >= total_size) > + count = total_size; > + > + if (cou...