search for: drm_mode_config_init

Displaying 20 results from an estimated 37 matches for "drm_mode_config_init".

2020 Mar 02
2
[PATCH 28/51] drm/bochs: Drop explicit drm_mode_config_cleanup
Instead rely on the automatic clean, for which we just need 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...
2020 Feb 19
0
[PATCH 29/52] drm/bochs: Drop explicit drm_mode_config_cleanup
Instead rely on the automatic clean, for which we just need 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. Signed-off-by: Daniel Vetter <daniel.vetter at intel.com> Cc: Gerd Hoffmann <kraxel at redhat.com> Cc: virtualization at lists.linux-foundation.org --- drivers/gpu/drm...
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....
2018 Nov 06
2
[PATCH] drm/nouveau: tegra: Initialize mode configuration
From: Thierry Reding <treding at nvidia.com> Irrespective of whether or not the device has any usable outputs, the modesetting helpers will try to register all the resources such as CRTCs and planes. Unfortunately, the helpers rely on drm_mode_config_init() to properly set up internal data structures. Since the Tegra GPU does not have a display engine, the Nouveau driver doesn't set this up for Tegra, which results in the following oops on driver probe: [ 18.776221] Unable to handle kernel NULL pointer dereference at virtual address 0000006c...
2018 Nov 07
2
[PATCH] drm/nouveau: tegra: Initialize mode configuration
...wrote: > > From: Thierry Reding <treding at nvidia.com> > > > > Irrespective of whether or not the device has any usable outputs, the > > modesetting helpers will try to register all the resources such as CRTCs > > and planes. Unfortunately, the helpers rely on drm_mode_config_init() to > > properly set up internal data structures. Since the Tegra GPU does not > > have a display engine, the Nouveau driver doesn't set this up for Tegra, > > which results in the following oops on driver probe: > > Remove DRIVER_MODESET ? Yeah, that works as well. T...
2020 Jul 09
3
[PATCH 2/2] drm/virtio: Remove open-coded commit-tail function
...atomic_commit_tail = vgdev_atomic_commit_tail, -}; - static const struct drm_mode_config_funcs virtio_gpu_mode_funcs = { .fb_create = virtio_gpu_user_framebuffer_create, .atomic_check = drm_atomic_helper_check, @@ -346,7 +327,6 @@ void virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev) drm_mode_config_init(vgdev->ddev); vgdev->ddev->mode_config.quirk_addfb_prefer_host_byte_order = true; vgdev->ddev->mode_config.funcs = &virtio_gpu_mode_funcs; - vgdev->ddev->mode_config.helper_private = &virtio_mode_config_helpers; /* modes will be validated against the framebuffer...
2020 Jul 09
3
[PATCH 2/2] drm/virtio: Remove open-coded commit-tail function
...atomic_commit_tail = vgdev_atomic_commit_tail, -}; - static const struct drm_mode_config_funcs virtio_gpu_mode_funcs = { .fb_create = virtio_gpu_user_framebuffer_create, .atomic_check = drm_atomic_helper_check, @@ -346,7 +327,6 @@ void virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev) drm_mode_config_init(vgdev->ddev); vgdev->ddev->mode_config.quirk_addfb_prefer_host_byte_order = true; vgdev->ddev->mode_config.funcs = &virtio_gpu_mode_funcs; - vgdev->ddev->mode_config.helper_private = &virtio_mode_config_helpers; /* modes will be validated against the framebuffer...
2020 Feb 19
0
[PATCH 30/52] drm/cirrus: Drop explicit drm_mode_config_cleanup call
...e_config_funcs cirrus_mode_config_funcs = { .atomic_commit = drm_atomic_helper_commit, }; -static void cirrus_mode_config_init(struct cirrus_device *cirrus) +static int cirrus_mode_config_init(struct cirrus_device *cirrus) { struct drm_device *dev = &cirrus->dev; + int ret; + + ret = drm_mode_config_init(dev); + if (ret) + return ret; - drm_mode_config_init(dev); dev->mode_config.min_width = 0; dev->mode_config.min_height = 0; dev->mode_config.max_width = CIRRUS_MAX_PITCH / 2; @@ -522,15 +526,12 @@ static void cirrus_mode_config_init(struct cirrus_device *cirrus) dev->mode_co...
2020 Sep 08
1
[PATCH 1/3] drm/qxl: use drmm_mode_config_init
...(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index fa79688013b7..4be04eaf7f37 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -1190,7 +1190,9 @@ int qxl_modeset_init(struct qxl_device *qdev) int i; int ret; - drm_mode_config_init(&qdev->ddev); + ret = drmm_mode_config_init(&qdev->ddev); + if (ret) + return ret; ret = qxl_create_monitors_object(qdev); if (ret) @@ -1223,5 +1225,4 @@ int qxl_modeset_init(struct qxl_device *qdev) void qxl_modeset_fini(struct qxl_device *qdev) { qxl_destroy_monitors_obje...
2018 Nov 06
0
[PATCH] drm/nouveau: tegra: Initialize mode configuration
...5PM +0100, Thierry Reding wrote: > From: Thierry Reding <treding at nvidia.com> > > Irrespective of whether or not the device has any usable outputs, the > modesetting helpers will try to register all the resources such as CRTCs > and planes. Unfortunately, the helpers rely on drm_mode_config_init() to > properly set up internal data structures. Since the Tegra GPU does not > have a display engine, the Nouveau driver doesn't set this up for Tegra, > which results in the following oops on driver probe: Remove DRIVER_MODESET ? > > [ 18.776221] Unable to handle kernel N...
2018 Nov 07
0
[PATCH] drm/nouveau: tegra: Initialize mode configuration
...rom: Thierry Reding <treding at nvidia.com> > > > > > > Irrespective of whether or not the device has any usable outputs, the > > > modesetting helpers will try to register all the resources such as CRTCs > > > and planes. Unfortunately, the helpers rely on drm_mode_config_init() to > > > properly set up internal data structures. Since the Tegra GPU does not > > > have a display engine, the Nouveau driver doesn't set this up for Tegra, > > > which results in the following oops on driver probe: > > > > Remove DRIVER_MODESET ? >...
2019 Apr 02
0
[PATCH 1/2] drm/bochs: drop mode_config_initialized
...hs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 93cb27f93d39..485f9cf05e8b 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -267,7 +267,6 @@ const struct drm_mode_config_funcs bochs_mode_funcs = { int bochs_kms_init(struct bochs_device *bochs) { drm_mode_config_init(bochs->dev); - bochs->mode_config_initialized = true; bochs->dev->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-&gt...
2019 Apr 02
0
[PATCH 2/2] drm/cirrus: drop mode_info.mode_config_initialized
...ff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c index 32ce2c1040b4..b109cd71426f 100644 --- a/drivers/gpu/drm/cirrus/cirrus_mode.c +++ b/drivers/gpu/drm/cirrus/cirrus_mode.c @@ -575,7 +575,6 @@ int cirrus_modeset_init(struct cirrus_device *cdev) int ret; drm_mode_config_init(cdev->dev); - cdev->mode_info.mode_config_initialized = true; cdev->dev->mode_config.max_width = CIRRUS_MAX_FB_WIDTH; cdev->dev->mode_config.max_height = CIRRUS_MAX_FB_HEIGHT; @@ -613,10 +612,6 @@ int cirrus_modeset_init(struct cirrus_device *cdev) void cirrus_modeset_fini(...
2020 Jul 09
0
[PATCH 2/2] drm/virtio: Remove open-coded commit-tail function
...ommit_tail, > -}; > - > static const struct drm_mode_config_funcs virtio_gpu_mode_funcs = { > .fb_create = virtio_gpu_user_framebuffer_create, > .atomic_check = drm_atomic_helper_check, > @@ -346,7 +327,6 @@ void virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev) > drm_mode_config_init(vgdev->ddev); > vgdev->ddev->mode_config.quirk_addfb_prefer_host_byte_order = true; > vgdev->ddev->mode_config.funcs = &virtio_gpu_mode_funcs; > - vgdev->ddev->mode_config.helper_private = &virtio_mode_config_helpers; > > /* modes will be validate...
2020 Sep 08
0
[PATCH 1/3] drm/virtio: use drmm_mode_config_init
...gpu_mode_funcs = { .atomic_commit = drm_atomic_helper_commit, }; -void virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev) +int virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev) { - int i; + int i, ret; + + ret = drmm_mode_config_init(vgdev->ddev); + if (ret) + return ret; - drm_mode_config_init(vgdev->ddev); vgdev->ddev->mode_config.quirk_addfb_prefer_host_byte_order = true; vgdev->ddev->mode_config.funcs = &virtio_gpu_mode_funcs; @@ -343,6 +346,7 @@ void virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev) vgdev_output_init(vgdev, i); drm_mode_config_r...
2020 Sep 29
0
[PATCH v2 1/4] drm/qxl: use drmm_mode_config_init
...(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 65de1f69af58..5bef8f121e54 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -1186,7 +1186,9 @@ int qxl_modeset_init(struct qxl_device *qdev) int i; int ret; - drm_mode_config_init(&qdev->ddev); + ret = drmm_mode_config_init(&qdev->ddev); + if (ret) + return ret; ret = qxl_create_monitors_object(qdev); if (ret) @@ -1219,5 +1221,4 @@ int qxl_modeset_init(struct qxl_device *qdev) void qxl_modeset_fini(struct qxl_device *qdev) { qxl_destroy_monitors_obje...
2018 Dec 10
2
TK1: DRM, Nouveau and VIC
...gt; Ben, can you pick up the two patches above? They're kind of high- > priority because they fix issues that crept into v4.20-rc1, so should > ideally be fixed before v4.20 final. Actually, it looks as if only the last patch is needed, since it superseeds the first. The second one calls drm_mode_config_init() via nouveau_display_create() and nouveau_drm_device_init(), making the first patch obsolete. There's more confirmation here: https://lists.freedesktop.org/archives/nouveau/2018-December/031636.html So Ben, correction, please only apply: https://patchwork.freedesktop.org/patch/263587/ P...
2018 Sep 05
0
[PATCH v2 6/6] drm/virtio: fix DRM_FORMAT_* handling
...d->pixel_format != DRM_FORMAT_HOST_ARGB8888) + return ERR_PTR(-ENOENT); + /* lookup object associated with res handle */ obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]); if (!obj) @@ -354,6 +358,7 @@ int virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev) int i; drm_mode_config_init(vgdev->ddev); + vgdev->ddev->mode_config.quirk_addfb_prefer_host_byte_order = true; vgdev->ddev->mode_config.funcs = &virtio_gpu_mode_funcs; vgdev->ddev->mode_config.helper_private = &virtio_mode_config_helpers; diff --git a/drivers/gpu/drm/virtio/virtgpu_fb.c b/d...
2018 Sep 19
0
[PATCH v3 5/5] drm/virtio: fix DRM_FORMAT_* handling
...d->pixel_format != DRM_FORMAT_HOST_ARGB8888) + return ERR_PTR(-ENOENT); + /* lookup object associated with res handle */ obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]); if (!obj) @@ -355,6 +359,7 @@ int virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev) int i; drm_mode_config_init(vgdev->ddev); + vgdev->ddev->mode_config.quirk_addfb_prefer_host_byte_order = true; vgdev->ddev->mode_config.funcs = &virtio_gpu_mode_funcs; vgdev->ddev->mode_config.helper_private = &virtio_mode_config_helpers; diff --git a/drivers/gpu/drm/virtio/virtgpu_fb.c b/d...
2018 Dec 10
0
TK1: DRM, Nouveau and VIC
...of high- > > > priority because they fix issues that crept into v4.20-rc1, so > > > should > > > ideally be fixed before v4.20 final. > > > > Actually, it looks as if only the last patch is needed, since it > > superseeds the first. The second one calls drm_mode_config_init() via > > nouveau_display_create() and nouveau_drm_device_init(), making the > > first patch obsolete. > > > > There's more confirmation here: > > > > > > https://lists.freedesktop.org/archives/nouveau/2018-December/031636.html > > > >...