Displaying 20 results from an estimated 56 matches for "drm_fb_helper_prepare".
2017 Aug 08
1
[PATCH] drm/virtio: make drm_fb_helper_funcs const
Make these structures const as they are only passed to the function
drm_fb_helper_prepare and the corresponding argument is of type const.
Done using Coccinelle
@match disable optional_qualifier@
identifier s;
@@
static struct drm_fb_helper_funcs s = {...};
@ref@
position p;
identifier match.s;
@@
s at p
@good1@
identifier match.s;
expression e1,e2;
position ref.p;
@@
drm_fb_helper_p...
2017 Aug 08
1
[PATCH] drm/virtio: make drm_fb_helper_funcs const
Make these structures const as they are only passed to the function
drm_fb_helper_prepare and the corresponding argument is of type const.
Done using Coccinelle
@match disable optional_qualifier@
identifier s;
@@
static struct drm_fb_helper_funcs s = {...};
@ref@
position p;
identifier match.s;
@@
s at p
@good1@
identifier match.s;
expression e1,e2;
position ref.p;
@@
drm_fb_helper_p...
2024 Aug 12
1
[PATCH v2 7/9] drm/fbdev-helper: Remove drm_fb_helper_output_poll_changed()
...l_config(struct drm_fb_helper *fb_helper);
int drm_fb_helper_debug_enter(struct fb_info *info);
int drm_fb_helper_debug_leave(struct fb_info *info);
-
void drm_fb_helper_lastclose(struct drm_device *dev);
-void drm_fb_helper_output_poll_changed(struct drm_device *dev);
#else
static inline void drm_fb_helper_prepare(struct drm_device *dev,
struct drm_fb_helper *helper,
@@ -401,10 +399,6 @@ static inline int drm_fb_helper_debug_leave(struct fb_info *info)
static inline void drm_fb_helper_lastclose(struct drm_device *dev)
{
}
-
-static inline void drm_fb_helper_output_poll_changed(struct drm_device *de...
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
2016 Jul 12
6
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...if (state != FBINFO_STATE_RUNNING)
+ nouveau_fbcon_accel_save_disable(dev);
+ console_unlock();
}
int
@@ -526,6 +560,8 @@ nouveau_fbcon_init(struct drm_device *dev)
fbcon->dev = dev;
drm->fbcon = fbcon;
+ INIT_WORK(&drm->fbdev_suspend_work, nouveau_fbcon_suspend_worker);
+
drm_fb_helper_prepare(dev, &fbcon->helper, &nouveau_fbcon_helper_funcs);
ret = drm_fb_helper_init(dev, &fbcon->helper,
@@ -571,6 +607,8 @@ nouveau_fbcon_fini(struct drm_device *dev)
if (!drm->fbcon)
return;
+ flush_work(&drm->fbdev_suspend_work);
+
nouveau_fbcon_accel_fini(dev);...
2024 Sep 26
1
[PATCH v5 79/80] drm/omapdrm: Remove struct drm_fb_helper from struct omap_fbdev.
...);
> if (!fbdev)
> return;
> - helper = &fbdev->base;
> + fbdev->dev = dev;
> + INIT_WORK(&fbdev->work, pan_worker);
> +
> + priv->fbdev = fbdev;
>
> + helper = kzalloc(sizeof(*helper), GFP_KERNEL);
> + if (!helper)
> + return;
> drm_fb_helper_prepare(dev, helper, 32, &omap_fb_helper_funcs);
>
> ret = drm_client_init(dev, &helper->client, "fbdev", &omap_fbdev_client_funcs);
> if (ret)
> goto err_drm_client_init;
>
> - INIT_WORK(&fbdev->work, pan_worker);
> -
> drm_client_...
2024 Aug 21
1
[PATCH v2 78/86] drm/radeon: Run DRM default client setup
...;
- int bpp_sel = 32;
- int ret;
-
- if (rdev->mc.real_vram_size <= (8 * 1024 * 1024))
- bpp_sel = 8;
- else if (ASIC_IS_RN50(rdev) || rdev->mc.real_vram_size <= (32 * 1024 * 1024))
- bpp_sel = 16;
-
- fb_helper = kzalloc(sizeof(*fb_helper), GFP_KERNEL);
- if (!fb_helper)
- return;
- drm_fb_helper_prepare(rdev->ddev, fb_helper, bpp_sel, &radeon_fbdev_fb_helper_funcs);
-
- ret = drm_client_init(rdev->ddev, &fb_helper->client, "radeon-fbdev",
- &radeon_fbdev_client_funcs);
- if (ret) {
- drm_err(rdev->ddev, "Failed to register client: %d\n", ret);
-...
2017 Jan 12
0
[PATCH 2/2] drm/nouveau: Handle fbcon suspend/resume in seperate worker
...handle fbcon
+ * init/deinit from a seperate work thread
+ */
+ schedule_work(&drm->fbcon_work);
}
int
@@ -502,6 +526,7 @@ nouveau_fbcon_init(struct drm_device *dev)
return -ENOMEM;
drm->fbcon = fbcon;
+ INIT_WORK(&drm->fbcon_work, nouveau_fbcon_set_suspend_work);
drm_fb_helper_prepare(dev, &fbcon->helper, &nouveau_fbcon_helper_funcs);
--
2.9.3
2016 Jul 12
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...el_save_disable(dev);
> + console_unlock();
> }
>
> int
> @@ -526,6 +560,8 @@ nouveau_fbcon_init(struct drm_device *dev)
> fbcon->dev = dev;
> drm->fbcon = fbcon;
>
> + INIT_WORK(&drm->fbdev_suspend_work, nouveau_fbcon_suspend_worker);
> +
> drm_fb_helper_prepare(dev, &fbcon->helper, &nouveau_fbcon_helper_funcs);
>
> ret = drm_fb_helper_init(dev, &fbcon->helper,
> @@ -571,6 +607,8 @@ nouveau_fbcon_fini(struct drm_device *dev)
> if (!drm->fbcon)
> return;
>
> + flush_work(&drm->fbdev_suspend_work);...
2016 Jul 13
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...el_save_disable(dev);
> + console_unlock();
> }
>
> int
> @@ -526,6 +560,8 @@ nouveau_fbcon_init(struct drm_device *dev)
> fbcon->dev = dev;
> drm->fbcon = fbcon;
>
> + INIT_WORK(&drm->fbdev_suspend_work, nouveau_fbcon_suspend_worker);
> +
> drm_fb_helper_prepare(dev, &fbcon->helper, &nouveau_fbcon_helper_funcs);
>
> ret = drm_fb_helper_init(dev, &fbcon->helper,
> @@ -571,6 +607,8 @@ nouveau_fbcon_fini(struct drm_device *dev)
> if (!drm->fbcon)
> return;
>
> + flush_work(&drm->fbdev_suspend_work);...
2018 Dec 13
1
[PATCH] drm/virtio: switch to generic fbdev emulation
...p_sel = 32; /* TODO: parameter from somewhere? */
- int ret;
-
- vgfbdev = kzalloc(sizeof(struct virtio_gpu_fbdev), GFP_KERNEL);
- if (!vgfbdev)
- return -ENOMEM;
-
- vgfbdev->vgdev = vgdev;
- vgdev->vgfbdev = vgfbdev;
- INIT_DELAYED_WORK(&vgfbdev->work, virtio_gpu_fb_dirty_work);
-
- drm_fb_helper_prepare(vgdev->ddev, &vgfbdev->helper,
- &virtio_gpu_fb_helper_funcs);
- ret = drm_fb_helper_init(vgdev->ddev, &vgfbdev->helper,
- VIRTIO_GPUFB_CONN_LIMIT);
- if (ret) {
- kfree(vgfbdev);
- return ret;
- }
-
- drm_fb_helper_single_add_all_connectors(&vgfbdev->he...
2018 Jul 18
0
[PATCH 1/2] drm/fb_helper: Add drm_fb_helper_output_poll_changed_with_rpm()
...-330,6 +330,7 @@ void drm_fb_helper_fbdev_teardown(struct drm_device *dev);
void drm_fb_helper_lastclose(struct drm_device *dev);
void drm_fb_helper_output_poll_changed(struct drm_device *dev);
+void drm_fb_helper_output_poll_changed_with_rpm(struct drm_device *dev);
#else
static inline void drm_fb_helper_prepare(struct drm_device *dev,
struct drm_fb_helper *helper,
@@ -564,6 +565,10 @@ static inline void drm_fb_helper_output_poll_changed(struct drm_device *dev)
{
}
+static inline void drm_fb_helper_output_poll_changed_with_rpm(struct drm_device *dev)
+{
+}
+
#endif
static inline int
--
2.17....
2018 Aug 06
2
[PATCH v3 3/8] drm/fb_helper: Introduce hotplug_suspend/resume()
...lose(struct drm_device *dev);
> void drm_fb_helper_output_poll_changed(struct drm_device *dev);
> +
> +void drm_fb_helper_resume_hotplug(struct drm_fb_helper *fb_helper);
> +bool drm_fb_helper_suspend_hotplug(struct drm_fb_helper *fb_helper);
> +
> #else
> static inline void drm_fb_helper_prepare(struct drm_device *dev,
> struct drm_fb_helper *helper,
> @@ -564,6 +576,14 @@ static inline void drm_fb_helper_output_poll_changed(struct drm_device *dev)
> {
> }
>
> +static inline void
> +drm_fb_helper_resume_hotplug(struct drm_fb_helper *fb_helper)
> +{
> +}...
2018 Jul 19
3
[PATCH 1/2] drm/fb_helper: Add drm_fb_helper_output_poll_changed_with_rpm()
...helper_fbdev_teardown(struct drm_device *dev);
>
> void drm_fb_helper_lastclose(struct drm_device *dev);
> void drm_fb_helper_output_poll_changed(struct drm_device *dev);
> +void drm_fb_helper_output_poll_changed_with_rpm(struct drm_device *dev);
> #else
> static inline void drm_fb_helper_prepare(struct drm_device *dev,
> struct drm_fb_helper *helper,
> @@ -564,6 +565,10 @@ static inline void drm_fb_helper_output_poll_changed(struct drm_device *dev)
> {
> }
>
> +static inline void drm_fb_helper_output_poll_changed_with_rpm(struct drm_device *dev)
> +{
> +}...
2018 Jul 31
0
[PATCH v3 3/8] drm/fb_helper: Introduce hotplug_suspend/resume()
...*dev);
void drm_fb_helper_lastclose(struct drm_device *dev);
void drm_fb_helper_output_poll_changed(struct drm_device *dev);
+
+void drm_fb_helper_resume_hotplug(struct drm_fb_helper *fb_helper);
+bool drm_fb_helper_suspend_hotplug(struct drm_fb_helper *fb_helper);
+
#else
static inline void drm_fb_helper_prepare(struct drm_device *dev,
struct drm_fb_helper *helper,
@@ -564,6 +576,14 @@ static inline void drm_fb_helper_output_poll_changed(struct drm_device *dev)
{
}
+static inline void
+drm_fb_helper_resume_hotplug(struct drm_fb_helper *fb_helper)
+{
+}
+static inline bool
+drm_fb_helper_suspend_h...
2018 Sep 05
0
[PATCH] bochs: convert to drm_fb_helper_fbdev_setup/teardown
...helper_funcs bochs_fb_helper_funcs = {
> .fb_probe = bochsfb_create,
> };
>
> +const struct drm_mode_config_funcs bochs_mode_funcs = {
> + .fb_create = drm_gem_fb_create,
> +};
> +
> int bochs_fbdev_init(struct bochs_device *bochs)
> {
> - int ret;
> -
> - drm_fb_helper_prepare(bochs->dev, &bochs->fb.helper,
> - &bochs_fb_helper_funcs);
> -
> - ret = drm_fb_helper_init(bochs->dev, &bochs->fb.helper, 1);
> - if (ret)
> - return ret;
> -
> - ret = drm_fb_helper_single_add_all_connectors(&bochs->fb.helper);
> -...
2016 Jul 13
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...el_save_disable(dev);
> + console_unlock();
> }
>
> int
> @@ -526,6 +560,8 @@ nouveau_fbcon_init(struct drm_device *dev)
> fbcon->dev = dev;
> drm->fbcon = fbcon;
>
> + INIT_WORK(&drm->fbdev_suspend_work, nouveau_fbcon_suspend_worker);
> +
> drm_fb_helper_prepare(dev, &fbcon->helper, &nouveau_fbcon_helper_funcs);
>
> ret = drm_fb_helper_init(dev, &fbcon->helper,
> @@ -571,6 +607,8 @@ nouveau_fbcon_fini(struct drm_device *dev)
> if (!drm->fbcon)
> return;
>
> + flush_work(&drm->fbdev_suspend_work);...
2018 Aug 13
0
[PATCH v7 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests
...nlock(&fbcon->hotplug_lock);
+}
+
int
nouveau_fbcon_init(struct drm_device *dev)
{
@@ -505,6 +561,7 @@ nouveau_fbcon_init(struct drm_device *dev)
drm->fbcon = fbcon;
INIT_WORK(&drm->fbcon_work, nouveau_fbcon_set_suspend_work);
+ mutex_init(&fbcon->hotplug_lock);
drm_fb_helper_prepare(dev, &fbcon->helper, &nouveau_fbcon_helper_funcs);
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.h b/drivers/gpu/drm/nouveau/nouveau_fbcon.h
index a6f192ea3fa6..db9d52047ef8 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.h
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.h
@@ -41,6...
2018 Aug 13
0
[PATCH v6 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests
...;hotplug_lock);
+
+ return hotplug;
+}
+
int
nouveau_fbcon_init(struct drm_device *dev)
{
@@ -505,6 +576,7 @@ nouveau_fbcon_init(struct drm_device *dev)
drm->fbcon = fbcon;
INIT_WORK(&drm->fbcon_work, nouveau_fbcon_set_suspend_work);
+ mutex_init(&fbcon->hotplug_lock);
drm_fb_helper_prepare(dev, &fbcon->helper, &nouveau_fbcon_helper_funcs);
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.h b/drivers/gpu/drm/nouveau/nouveau_fbcon.h
index a6f192ea3fa6..148c6b2cc6da 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.h
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.h
@@ -41,6...
2016 Jul 15
1
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...; > }
> >
> > int
> > @@ -526,6 +560,8 @@ nouveau_fbcon_init(struct drm_device *dev)
> > fbcon->dev = dev;
> > drm->fbcon = fbcon;
> >
> > + INIT_WORK(&drm->fbdev_suspend_work, nouveau_fbcon_suspend_worker);
> > +
> > drm_fb_helper_prepare(dev, &fbcon->helper, &nouveau_fbcon_helper_funcs);
> >
> > ret = drm_fb_helper_init(dev, &fbcon->helper,
> > @@ -571,6 +607,8 @@ nouveau_fbcon_fini(struct drm_device *dev)
> > if (!drm->fbcon)
> > return;
> >
> > + flush_work...