Displaying 20 results from an estimated 91 matches for "drm_mode_config_cleanup".
2020 Mar 02
1
[PATCH 29/51] drm/cirrus: Drop explicit drm_mode_config_cleanup call
We can even delete the drm_driver.release hook now!
This is made possible by a preceeding patch which added a drmm_
cleanup action to drm_mode_config_init(), hence all we need to do to
ensure that drm_mode_config_cleanup() is run on final drm_device
cleanup is check the new error code for _init().
v2: Explain why this cleanup is possible (Laurent).
v3: Use drmm_mode_config_init() for more clarity (Sam, Thomas)
Cc: Sam Ravnborg <sam at ravnborg.org>
Acked-by: Sam Ravnborg <sam at ravnborg.org>
Cc: Tho...
2020 Feb 19
0
[PATCH 30/52] drm/cirrus: Drop explicit drm_mode_config_cleanup call
...)
dev->mode_config.preferred_depth = 16;
dev->mode_config.prefer_shadow = 0;
dev->mode_config.funcs = &cirrus_mode_config_funcs;
+
+ return 0;
}
/* ------------------------------------------------------------------ */
-static void cirrus_release(struct drm_device *dev)
-{
- drm_mode_config_cleanup(dev);
-}
-
DEFINE_DRM_GEM_FOPS(cirrus_fops);
static struct drm_driver cirrus_driver = {
@@ -544,7 +545,6 @@ static struct drm_driver cirrus_driver = {
.fops = &cirrus_fops,
DRM_GEM_SHMEM_DRIVER_OPS,
- .release = cirrus_release,
};
static int cirrus_pci_probe(struct pci_d...
2020 Mar 02
2
[PATCH 28/51] drm/bochs: Drop explicit drm_mode_config_cleanup
...to check
that drm_mode_config_init succeeded. To avoid an inversion in the
cleanup we also have to move the dev_private allocation over to
drmm_kzalloc.
This is made possible by a preceeding patch which added a drmm_
cleanup action to drm_mode_config_init(), hence all we need to do to
ensure that drm_mode_config_cleanup() is run on final drm_device
cleanup is check the new error code for _init().
v2: Explain why this cleanup is possible (Laurent).
v3: Use drmm_mode_config_init() for more clarity (Sam, Thomas)
Cc: Sam Ravnborg <sam at ravnborg.org>
Cc: Thomas Zimmermann <tzimmermann at suse.de>
Cc: L...
2020 Feb 19
0
[PATCH 29/52] drm/bochs: Drop explicit drm_mode_config_cleanup
...->dev->mode_config.max_width = 8192;
bochs->dev->mode_config.max_height = 8192;
@@ -160,11 +164,3 @@ int bochs_kms_init(struct bochs_device *bochs)
return 0;
}
-
-void bochs_kms_fini(struct bochs_device *bochs)
-{
- if (!bochs->dev->mode_config.num_connector)
- return;
-
- drm_mode_config_cleanup(bochs->dev);
-}
--
2.24.1
2016 May 25
2
[PATCH 9/9] drm: Turn off crtc before tearing down its data structure
...6 +0200
>>
>> drm/core: Do not preserve framebuffer on rmfb, v4.
>>
>> Your patch shouldn't be needed with that any more. If it still is it's
>> most likely the fbdev cleanup done too late, but you /should/ get a big
>> WARNING splat in that case from drm_mode_config_cleanup().
>
> I tested it and at least with nouveau, the above-mentioned commit does *not*
> solve the issue, so patch [9/9] of this series is still needed. I do not get
> a WARN splat when unloading nouveau.
With legacy kms the only way to keep a crtc enabled is to display a
drm_framebuffer...
2018 Apr 26
0
[Intel-gfx] [PATCH] drm/core: Remove drm_dev_unref() and it's uses
...the start of
> - * armada_private for drm_dev_unref() to work correctly.
> + * armada_private for drm_dev_put() to work correctly.
> */
> BUILD_BUG_ON(offsetof(struct armada_private, drm) != 0);
>
> @@ -180,7 +180,7 @@ static int armada_drm_bind(struct device *dev)
> drm_mode_config_cleanup(&priv->drm);
> drm_mm_takedown(&priv->linear);
> flush_work(&priv->fb_unref_work);
> - drm_dev_unref(&priv->drm);
> + drm_dev_put(&priv->drm);
> return ret;
> }
>
> @@ -200,7 +200,7 @@ static void armada_drm_unbind(struct device *d...
2018 Apr 26
5
[PATCH] drm/core: Remove drm_dev_unref() and it's uses
...he drm_device structure must be at the start of
- * armada_private for drm_dev_unref() to work correctly.
+ * armada_private for drm_dev_put() to work correctly.
*/
BUILD_BUG_ON(offsetof(struct armada_private, drm) != 0);
@@ -180,7 +180,7 @@ static int armada_drm_bind(struct device *dev)
drm_mode_config_cleanup(&priv->drm);
drm_mm_takedown(&priv->linear);
flush_work(&priv->fb_unref_work);
- drm_dev_unref(&priv->drm);
+ drm_dev_put(&priv->drm);
return ret;
}
@@ -200,7 +200,7 @@ static void armada_drm_unbind(struct device *dev)
drm_mm_takedown(&priv->line...
2018 Apr 26
5
[PATCH] drm/core: Remove drm_dev_unref() and it's uses
...he drm_device structure must be at the start of
- * armada_private for drm_dev_unref() to work correctly.
+ * armada_private for drm_dev_put() to work correctly.
*/
BUILD_BUG_ON(offsetof(struct armada_private, drm) != 0);
@@ -180,7 +180,7 @@ static int armada_drm_bind(struct device *dev)
drm_mode_config_cleanup(&priv->drm);
drm_mm_takedown(&priv->linear);
flush_work(&priv->fb_unref_work);
- drm_dev_unref(&priv->drm);
+ drm_dev_put(&priv->drm);
return ret;
}
@@ -200,7 +200,7 @@ static void armada_drm_unbind(struct device *dev)
drm_mm_takedown(&priv->line...
2018 Apr 26
5
[PATCH] drm/core: Remove drm_dev_unref() and it's uses
...he drm_device structure must be at the start of
- * armada_private for drm_dev_unref() to work correctly.
+ * armada_private for drm_dev_put() to work correctly.
*/
BUILD_BUG_ON(offsetof(struct armada_private, drm) != 0);
@@ -180,7 +180,7 @@ static int armada_drm_bind(struct device *dev)
drm_mode_config_cleanup(&priv->drm);
drm_mm_takedown(&priv->linear);
flush_work(&priv->fb_unref_work);
- drm_dev_unref(&priv->drm);
+ drm_dev_put(&priv->drm);
return ret;
}
@@ -200,7 +200,7 @@ static void armada_drm_unbind(struct device *dev)
drm_mm_takedown(&priv->line...
2020 Feb 07
1
[PATCH] drm/cirrus: add drm_driver.release callback.
...u/drm/cirrus/cirrus.c
@@ -502,6 +502,16 @@ static void cirrus_mode_config_init(struct cirrus_device *cirrus)
/* ------------------------------------------------------------------ */
+static void cirrus_release(struct drm_device *dev)
+{
+ struct cirrus_device *cirrus = dev->dev_private;
+
+ drm_mode_config_cleanup(dev);
+ iounmap(cirrus->mmio);
+ iounmap(cirrus->vram);
+ kfree(cirrus);
+}
+
DEFINE_DRM_GEM_FOPS(cirrus_fops);
static struct drm_driver cirrus_driver = {
@@ -515,6 +525,7 @@ static struct drm_driver cirrus_driver = {
.fops = &cirrus_fops,
DRM_GEM_SHMEM_DRIVER_OPS,
+ .release...
2016 Jun 01
2
[PATCH 9/9] drm: Turn off crtc before tearing down its data structure
...Do not preserve framebuffer on rmfb, v4.
> > >>
> > >> Your patch shouldn't be needed with that any more. If it still is it's
> > >> most likely the fbdev cleanup done too late, but you /should/ get a big
> > >> WARNING splat in that case from drm_mode_config_cleanup().
> > >
> > > I tested it and at least with nouveau, the above-mentioned commit does
> > > *not* solve the issue, so patch [9/9] of this series is still needed.
> > > I do not get a WARN splat when unloading nouveau.
> >
> > With legacy kms the only...
2020 Feb 10
1
[PATCH v2] drm/cirrus: add drm_driver.release callback.
...p)
return -ENOMEM;
@@ -502,6 +511,14 @@ static void cirrus_mode_config_init(struct cirrus_device *cirrus)
/* ------------------------------------------------------------------ */
+static void cirrus_release(struct drm_device *dev)
+{
+ struct cirrus_device *cirrus = dev->dev_private;
+
+ drm_mode_config_cleanup(dev);
+ kfree(cirrus);
+}
+
DEFINE_DRM_GEM_FOPS(cirrus_fops);
static struct drm_driver cirrus_driver = {
@@ -515,6 +532,7 @@ static struct drm_driver cirrus_driver = {
.fops = &cirrus_fops,
DRM_GEM_SHMEM_DRIVER_OPS,
+ .release = cirrus_release,
};
static int cirrus_pci_p...
2016 Jun 01
0
[PATCH 9/9] drm: Turn off crtc before tearing down its data structure
...;> drm/core: Do not preserve framebuffer on rmfb, v4.
> >>
> >> Your patch shouldn't be needed with that any more. If it still is it's
> >> most likely the fbdev cleanup done too late, but you /should/ get a big
> >> WARNING splat in that case from drm_mode_config_cleanup().
> >
> > I tested it and at least with nouveau, the above-mentioned commit does
> > *not* solve the issue, so patch [9/9] of this series is still needed.
> > I do not get a WARN splat when unloading nouveau.
>
> With legacy kms the only way to keep a crtc enabled is...
2020 Feb 11
1
[PATCH v4] drm/cirrus: add drm_driver.release callback.
...drm_framebuffer *fb)
@@ -502,6 +525,14 @@ static void cirrus_mode_config_init(struct cirrus_device *cirrus)
/* ------------------------------------------------------------------ */
+static void cirrus_release(struct drm_device *dev)
+{
+ struct cirrus_device *cirrus = dev->dev_private;
+
+ drm_mode_config_cleanup(dev);
+ kfree(cirrus);
+}
+
DEFINE_DRM_GEM_FOPS(cirrus_fops);
static struct drm_driver cirrus_driver = {
@@ -515,6 +546,7 @@ static struct drm_driver cirrus_driver = {
.fops = &cirrus_fops,
DRM_GEM_SHMEM_DRIVER_OPS,
+ .release = cirrus_release,
};
static int cirrus_pci_p...
2016 Jun 03
1
[PATCH 9/9] drm: Turn off crtc before tearing down its data structure
...ed-by: Karol Herbst <nouveau at karolherbst.de>
> > > > > > > Signed-off-by: Lukas Wunner <lukas at wunner.de>
> > > >
> > > > With legacy kms the only way to keep a crtc enabled is to display a
> > > > drm_framebuffer on it. And drm_mode_config_cleanup has a WARN_ON if
> > > > framebuffers are left behind. There's a bunch of options:
> > > > - nouveau somehow manages to keep the crtc on without a framebuffer
> > > > - nouveau somehow leaks a drm_framebuffer, but removes it from the fb_list
> > > &g...
2016 May 24
4
[PATCH 9/9] drm: Turn off crtc before tearing down its data structure
...t linux.intel.com>
Date: Wed May 4 14:38:26 2016 +0200
drm/core: Do not preserve framebuffer on rmfb, v4.
Your patch shouldn't be needed with that any more. If it still is it's
most likely the fbdev cleanup done too late, but you /should/ get a big
WARNING splat in that case from drm_mode_config_cleanup().
-Daniel
> ---
> drivers/gpu/drm/drm_crtc.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index d2a6d95..0cd6f00 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/...
2019 Apr 01
1
[PATCH 1/3] drm/virtio: add missing drm_atomic_helper_shutdown() call.
...gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -385,5 +385,6 @@ void virtio_gpu_modeset_fini(struct virtio_gpu_device *vgdev)
for (i = 0 ; i < vgdev->num_scanouts; ++i)
kfree(vgdev->outputs[i].edid);
+ drm_atomic_helper_shutdown(vgdev->ddev);
drm_mode_config_cleanup(vgdev->ddev);
}
--
2.18.1
2019 Apr 01
1
[PATCH 2/3] drm/bochs: add missing drm_atomic_helper_shutdown() call.
...9 100644
--- a/drivers/gpu/drm/bochs/bochs_kms.c
+++ b/drivers/gpu/drm/bochs/bochs_kms.c
@@ -293,6 +293,7 @@ int bochs_kms_init(struct bochs_device *bochs)
void bochs_kms_fini(struct bochs_device *bochs)
{
if (bochs->mode_config_initialized) {
+ drm_atomic_helper_shutdown(bochs->dev);
drm_mode_config_cleanup(bochs->dev);
bochs->mode_config_initialized = false;
}
--
2.18.1
2019 Apr 02
0
[PATCH 1/2] drm/bochs: drop mode_config_initialized
...v->mode_config.max_width = 8192;
bochs->dev->mode_config.max_height = 8192;
@@ -292,9 +291,6 @@ int bochs_kms_init(struct bochs_device *bochs)
void bochs_kms_fini(struct bochs_device *bochs)
{
- if (bochs->mode_config_initialized) {
- drm_atomic_helper_shutdown(bochs->dev);
- drm_mode_config_cleanup(bochs->dev);
- bochs->mode_config_initialized = false;
- }
+ drm_atomic_helper_shutdown(bochs->dev);
+ drm_mode_config_cleanup(bochs->dev);
}
--
2.18.1
2019 Apr 02
0
[PATCH 2/2] drm/cirrus: drop mode_info.mode_config_initialized
...fig.max_height = CIRRUS_MAX_FB_HEIGHT;
@@ -613,10 +612,6 @@ int cirrus_modeset_init(struct cirrus_device *cdev)
void cirrus_modeset_fini(struct cirrus_device *cdev)
{
cirrus_fbdev_fini(cdev);
-
- if (cdev->mode_info.mode_config_initialized) {
- drm_helper_force_disable_all(cdev->dev);
- drm_mode_config_cleanup(cdev->dev);
- cdev->mode_info.mode_config_initialized = false;
- }
+ drm_helper_force_disable_all(cdev->dev);
+ drm_mode_config_cleanup(cdev->dev);
}
--
2.18.1