All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/vgem: Fix vgem_init to get drm device available.
@ 2018-10-23 16:35 Emil Velikov
  2018-10-23 16:35 ` [PATCH 2/3] drm: BUG_ON if passing NULL parent to drm_dev_init Emil Velikov
  2018-10-23 16:35 ` [PATCH 3/3] drm/virtio: document drm_dev_set_unique workaround Emil Velikov
  0 siblings, 2 replies; 8+ messages in thread
From: Emil Velikov @ 2018-10-23 16:35 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, emil.l.velikov

From: Deepak Sharma <deepak.sharma@amd.com>

Modify vgem_init to take platform dev as parent in drm_dev_init.
This will make drm device available at "/sys/devices/platform/vgem"
in x86 chromebook.

v2: rebase, address checkpatch typo and line over 80 characters

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Deepak Sharma <deepak.sharma@amd.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/vgem/vgem_drv.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
index ec6af8b920da..f1f7ab9dcdbf 100644
--- a/drivers/gpu/drm/vgem/vgem_drv.c
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -471,31 +471,31 @@ static int __init vgem_init(void)
 	if (!vgem_device)
 		return -ENOMEM;
 
-	ret = drm_dev_init(&vgem_device->drm, &vgem_driver, NULL);
-	if (ret)
-		goto out_free;
-
 	vgem_device->platform =
 		platform_device_register_simple("vgem", -1, NULL, 0);
 	if (IS_ERR(vgem_device->platform)) {
 		ret = PTR_ERR(vgem_device->platform);
-		goto out_fini;
+		goto out_free;
 	}
 
 	dma_coerce_mask_and_coherent(&vgem_device->platform->dev,
 				     DMA_BIT_MASK(64));
+	ret = drm_dev_init(&vgem_device->drm, &vgem_driver,
+			   &vgem_device->platform->dev);
+	if (ret)
+		goto out_unregister;
 
 	/* Final step: expose the device/driver to userspace */
 	ret  = drm_dev_register(&vgem_device->drm, 0);
 	if (ret)
-		goto out_unregister;
+		goto out_fini;
 
 	return 0;
 
-out_unregister:
-	platform_device_unregister(vgem_device->platform);
 out_fini:
 	drm_dev_fini(&vgem_device->drm);
+out_unregister:
+	platform_device_unregister(vgem_device->platform);
 out_free:
 	kfree(vgem_device);
 	return ret;
-- 
2.19.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] drm: BUG_ON if passing NULL parent to drm_dev_init
  2018-10-23 16:35 [PATCH 1/3] drm/vgem: Fix vgem_init to get drm device available Emil Velikov
@ 2018-10-23 16:35 ` Emil Velikov
  2018-10-26  6:02   ` Sharma, Deepak
  2018-10-23 16:35 ` [PATCH 3/3] drm/virtio: document drm_dev_set_unique workaround Emil Velikov
  1 sibling, 1 reply; 8+ messages in thread
From: Emil Velikov @ 2018-10-23 16:35 UTC (permalink / raw)
  To: dri-devel; +Cc: Deepak Sharma, Daniel Vetter, emil.l.velikov

From: Emil Velikov <emil.velikov@collabora.com>

Previous commit removed the only reason why we were allowing NULL as
a parent device. With that resolved, we can enforce nobody else does
that mistake.

With that we can drop the ugly drm_dev_set_unique workaround.

v2: rebase, silence checkpatch "== NULL" warning

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Deepak Sharma <deepak.sharma@amd.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_drv.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 36e8e9cbec52..aa1cef794f9a 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -476,8 +476,6 @@ static void drm_fs_inode_free(struct inode *inode)
  * The initial ref-count of the object is 1. Use drm_dev_get() and
  * drm_dev_put() to take and drop further ref-counts.
  *
- * Note that for purely virtual devices @parent can be NULL.
- *
  * Drivers that do not want to allocate their own device struct
  * embedding &struct drm_device can call drm_dev_alloc() instead. For drivers
  * that do embed &struct drm_device it must be placed first in the overall
@@ -502,6 +500,8 @@ int drm_dev_init(struct drm_device *dev,
 		return -ENODEV;
 	}
 
+	BUG_ON(!parent);
+
 	kref_init(&dev->ref);
 	dev->dev = parent;
 	dev->driver = driver;
@@ -556,9 +556,7 @@ int drm_dev_init(struct drm_device *dev,
 		}
 	}
 
-	/* Use the parent device name as DRM device unique identifier, but fall
-	 * back to the driver name for virtual devices like vgem. */
-	ret = drm_dev_set_unique(dev, parent ? dev_name(parent) : driver->name);
+	ret = drm_dev_set_unique(dev, dev_name(parent));
 	if (ret)
 		goto err_setunique;
 
-- 
2.19.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] drm/virtio: document drm_dev_set_unique workaround
  2018-10-23 16:35 [PATCH 1/3] drm/vgem: Fix vgem_init to get drm device available Emil Velikov
  2018-10-23 16:35 ` [PATCH 2/3] drm: BUG_ON if passing NULL parent to drm_dev_init Emil Velikov
@ 2018-10-23 16:35 ` Emil Velikov
  2018-10-23 16:54   ` Laszlo Ersek
  2018-10-24 14:42   ` [PATCH v2] " Emil Velikov
  1 sibling, 2 replies; 8+ messages in thread
From: Emil Velikov @ 2018-10-23 16:35 UTC (permalink / raw)
  To: dri-devel
  Cc: Daniel Vetter, emil.l.velikov, Gerd Hoffmann, Laszlo Ersek,
	Hans de Goede

From: Emil Velikov <emil.velikov@collabora.com>

A while back we removed it, yet that lead to regressions. At some later
point, I've attempted to remove it again without fully grasping the
unique (pun intended) situation that virtio is in.

Add a bulky comment to document any the call should stay as-is, for the
next person who's around.

As a Tl;Dr: virtio sits on top of struct virtio_device, which confuses
dev_is_pci(), wrong info gets sent to userspace and X doesn't start.
Driver needs to explicitly call drm_dev_set_unique() to keep it working.

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
 drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 31 ++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
index 757ca28ab93e..54f12b862231 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
+++ b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
@@ -53,6 +53,37 @@ int drm_virtio_init(struct drm_driver *driver, struct virtio_device *vdev)
 									  0,
 									  "virtiodrmfb");
 
+		/*
+		 * Normally the drm_dev_set_unique() call is done by core DRM.
+		 * The following comment covers, why virtio cannot rely on it.
+		 *
+		 * Unlike the other virtual GPU drivers, virtio abstracts the
+		 * underlying bus type by using struct virtio_device.
+		 *
+		 * Hence the dev_is_pci() check, used in core DRM, will fail
+		 * and the unique returned will be the virtio_device "virtio0",
+		 * while a "pci:..." one is required.
+		 *
+		 * A few other ideas were considered:
+		 * - Extend dev_is_pci() check [in drm_set_busid] to consider
+		 * virtio.
+		 *   Seems like a bigger hack than what we have already.
+		 *
+		 * - Point drm_device::dev to the parent of the virtio_device
+		 *   Semantic changes:
+		 *   * Using the wrong device for i2c, framebuffer_alloc and
+		 *     prime import.
+		 *   Visual changes:
+		 *   * Helpers such as DRM_DEV_ERROR, dev_info, drm_printer,
+		 *     will print the wrong information.
+		 *
+		 * We could address the latter issues, by introducing
+		 * drm_device::bus_dev, ... which will be used solely for this.
+		 *
+		 * So for the moment keep things as-is, with a bulky comment
+		 * for the next person who feels like removing this
+		 * drm_dev_set_unique() quirk.
+		 */
 		snprintf(unique, sizeof(unique), "pci:%s", pname);
 		ret = drm_dev_set_unique(dev, unique);
 		if (ret)
-- 
2.19.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] drm/virtio: document drm_dev_set_unique workaround
  2018-10-23 16:35 ` [PATCH 3/3] drm/virtio: document drm_dev_set_unique workaround Emil Velikov
@ 2018-10-23 16:54   ` Laszlo Ersek
  2018-10-24 14:42   ` [PATCH v2] " Emil Velikov
  1 sibling, 0 replies; 8+ messages in thread
From: Laszlo Ersek @ 2018-10-23 16:54 UTC (permalink / raw)
  To: Emil Velikov, dri-devel; +Cc: Daniel Vetter, Gerd Hoffmann, Hans de Goede

On 10/23/18 18:35, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov@collabora.com>
> 
> A while back we removed it, yet that lead to regressions. At some later
> point, I've attempted to remove it again without fully grasping the
> unique (pun intended) situation that virtio is in.

pun appreciated :)

> 
> Add a bulky comment to document any the call should stay as-is, for the
> next person who's around.

s/any/why/?

> 
> As a Tl;Dr: virtio sits on top of struct virtio_device, which confuses
> dev_is_pci(), wrong info gets sent to userspace and X doesn't start.
> Driver needs to explicitly call drm_dev_set_unique() to keep it working.
> 
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
> ---
>  drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 31 ++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 
> diff --git a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
> index 757ca28ab93e..54f12b862231 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
> @@ -53,6 +53,37 @@ int drm_virtio_init(struct drm_driver *driver, struct virtio_device *vdev)
>  									  0,
>  									  "virtiodrmfb");
>  
> +		/*
> +		 * Normally the drm_dev_set_unique() call is done by core DRM.
> +		 * The following comment covers, why virtio cannot rely on it.
> +		 *
> +		 * Unlike the other virtual GPU drivers, virtio abstracts the
> +		 * underlying bus type by using struct virtio_device.
> +		 *
> +		 * Hence the dev_is_pci() check, used in core DRM, will fail
> +		 * and the unique returned will be the virtio_device "virtio0",
> +		 * while a "pci:..." one is required.
> +		 *
> +		 * A few other ideas were considered:
> +		 * - Extend dev_is_pci() check [in drm_set_busid] to consider
> +		 * virtio.

I suggest "Extend [the] dev_is_pci() check" for a more "fluent" reading
experience. (I should note however that I'm not a native speaker.)

In addition, the word "virtio" doesn't appear correctly indented, within
the comment.

> +		 *   Seems like a bigger hack than what we have already.
> +		 *
> +		 * - Point drm_device::dev to the parent of the virtio_device
> +		 *   Semantic changes:
> +		 *   * Using the wrong device for i2c, framebuffer_alloc and
> +		 *     prime import.
> +		 *   Visual changes:
> +		 *   * Helpers such as DRM_DEV_ERROR, dev_info, drm_printer,
> +		 *     will print the wrong information.
> +		 *
> +		 * We could address the latter issues, by introducing
> +		 * drm_device::bus_dev, ... which will be used solely for this.

s/will/would/?

> +		 *
> +		 * So for the moment keep things as-is, with a bulky comment
> +		 * for the next person who feels like removing this
> +		 * drm_dev_set_unique() quirk.
> +		 */
>  		snprintf(unique, sizeof(unique), "pci:%s", pname);
>  		ret = drm_dev_set_unique(dev, unique);
>  		if (ret)
> 

Semantically: I've by now totally forgotten about these details, so if
you wanted to, you could totally sell me on some "underhanded
inaccuracies" in this comment.

That said, I feel the comment (and the commit message) are great. The
comment makes me recall the details on the subject, and I think it'll be
pretty effective as a warning, effective at preventing further
regressions in the area.

With the typos fixed:

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks!
Laszlo
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] drm/virtio: document drm_dev_set_unique workaround
  2018-10-23 16:35 ` [PATCH 3/3] drm/virtio: document drm_dev_set_unique workaround Emil Velikov
  2018-10-23 16:54   ` Laszlo Ersek
@ 2018-10-24 14:42   ` Emil Velikov
  2018-10-30  5:34     ` Gerd Hoffmann
  1 sibling, 1 reply; 8+ messages in thread
From: Emil Velikov @ 2018-10-24 14:42 UTC (permalink / raw)
  To: dri-devel
  Cc: Daniel Vetter, emil.l.velikov, Gerd Hoffmann, Laszlo Ersek,
	Hans de Goede

From: Emil Velikov <emil.velikov@collabora.com>

A while back we removed it, yet that lead to regressions. At some later
point, I've attempted to remove it again without fully grasping the
unique (pun intended) situation that virtio is in.

Add a bulky comment to document why the call should stay as-is, for the
next person who's around.

As a Tl;Dr: virtio sits on top of struct virtio_device, which confuses
dev_is_pci(), wrong info gets sent to userspace and X doesn't start.
Driver needs to explicitly call drm_dev_set_unique() to keep it working.

v2: Fix handful of typos (Laszlo)

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
---
Thanks for the quick feedback and corrections Laszlo. They're spot-on
and I've addressed them all here.

Sending it out for posterity-sake. Modulo any objections I'll merge
this via drm-misc.
---
 drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 31 ++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
index 757ca28ab93e..0887e0b64b9c 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
+++ b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
@@ -53,6 +53,37 @@ int drm_virtio_init(struct drm_driver *driver, struct virtio_device *vdev)
 									  0,
 									  "virtiodrmfb");
 
+		/*
+		 * Normally the drm_dev_set_unique() call is done by core DRM.
+		 * The following comment covers, why virtio cannot rely on it.
+		 *
+		 * Unlike the other virtual GPU drivers, virtio abstracts the
+		 * underlying bus type by using struct virtio_device.
+		 *
+		 * Hence the dev_is_pci() check, used in core DRM, will fail
+		 * and the unique returned will be the virtio_device "virtio0",
+		 * while a "pci:..." one is required.
+		 *
+		 * A few other ideas were considered:
+		 * - Extend the dev_is_pci() check [in drm_set_busid] to
+		 *   consider virtio.
+		 *   Seems like a bigger hack than what we have already.
+		 *
+		 * - Point drm_device::dev to the parent of the virtio_device
+		 *   Semantic changes:
+		 *   * Using the wrong device for i2c, framebuffer_alloc and
+		 *     prime import.
+		 *   Visual changes:
+		 *   * Helpers such as DRM_DEV_ERROR, dev_info, drm_printer,
+		 *     will print the wrong information.
+		 *
+		 * We could address the latter issues, by introducing
+		 * drm_device::bus_dev, ... which would be used solely for this.
+		 *
+		 * So for the moment keep things as-is, with a bulky comment
+		 * for the next person who feels like removing this
+		 * drm_dev_set_unique() quirk.
+		 */
 		snprintf(unique, sizeof(unique), "pci:%s", pname);
 		ret = drm_dev_set_unique(dev, unique);
 		if (ret)
-- 
2.19.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* RE: [PATCH 2/3] drm: BUG_ON if passing NULL parent to drm_dev_init
  2018-10-23 16:35 ` [PATCH 2/3] drm: BUG_ON if passing NULL parent to drm_dev_init Emil Velikov
@ 2018-10-26  6:02   ` Sharma, Deepak
  0 siblings, 0 replies; 8+ messages in thread
From: Sharma, Deepak @ 2018-10-26  6:02 UTC (permalink / raw)
  To: Emil Velikov, dri-devel; +Cc: Daniel Vetter

Patch is Acked-by: Deepak Sharma <Deepak.sharma@amd.com>

Thanks,
Deepak

-----Original Message-----
From: Emil Velikov <emil.l.velikov@gmail.com> 
Sent: Tuesday, October 23, 2018 9:36 AM
To: dri-devel@lists.freedesktop.org
Cc: emil.l.velikov@gmail.com; Daniel Vetter <daniel.vetter@ffwll.ch>; Sharma, Deepak <Deepak.Sharma@amd.com>
Subject: [PATCH 2/3] drm: BUG_ON if passing NULL parent to drm_dev_init

From: Emil Velikov <emil.velikov@collabora.com>

Previous commit removed the only reason why we were allowing NULL as a parent device. With that resolved, we can enforce nobody else does that mistake.

With that we can drop the ugly drm_dev_set_unique workaround.

v2: rebase, silence checkpatch "== NULL" warning

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Deepak Sharma <deepak.sharma@amd.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_drv.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 36e8e9cbec52..aa1cef794f9a 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -476,8 +476,6 @@ static void drm_fs_inode_free(struct inode *inode)
  * The initial ref-count of the object is 1. Use drm_dev_get() and
  * drm_dev_put() to take and drop further ref-counts.
  *
- * Note that for purely virtual devices @parent can be NULL.
- *
  * Drivers that do not want to allocate their own device struct
  * embedding &struct drm_device can call drm_dev_alloc() instead. For drivers
  * that do embed &struct drm_device it must be placed first in the overall @@ -502,6 +500,8 @@ int drm_dev_init(struct drm_device *dev,
 		return -ENODEV;
 	}
 
+	BUG_ON(!parent);
+
 	kref_init(&dev->ref);
 	dev->dev = parent;
 	dev->driver = driver;
@@ -556,9 +556,7 @@ int drm_dev_init(struct drm_device *dev,
 		}
 	}
 
-	/* Use the parent device name as DRM device unique identifier, but fall
-	 * back to the driver name for virtual devices like vgem. */
-	ret = drm_dev_set_unique(dev, parent ? dev_name(parent) : driver->name);
+	ret = drm_dev_set_unique(dev, dev_name(parent));
 	if (ret)
 		goto err_setunique;
 
--
2.19.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] drm/virtio: document drm_dev_set_unique workaround
  2018-10-24 14:42   ` [PATCH v2] " Emil Velikov
@ 2018-10-30  5:34     ` Gerd Hoffmann
  2018-10-30 15:54       ` Emil Velikov
  0 siblings, 1 reply; 8+ messages in thread
From: Gerd Hoffmann @ 2018-10-30  5:34 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Daniel Vetter, Laszlo Ersek, dri-devel, Hans de Goede

On Wed, Oct 24, 2018 at 03:42:52PM +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov@collabora.com>
> 
> A while back we removed it, yet that lead to regressions. At some later
> point, I've attempted to remove it again without fully grasping the
> unique (pun intended) situation that virtio is in.
> 
> Add a bulky comment to document why the call should stay as-is, for the
> next person who's around.
> 
> As a Tl;Dr: virtio sits on top of struct virtio_device, which confuses
> dev_is_pci(), wrong info gets sent to userspace and X doesn't start.
> Driver needs to explicitly call drm_dev_set_unique() to keep it working.
> 
> v2: Fix handful of typos (Laszlo)
> 
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>

> Sending it out for posterity-sake. Modulo any objections I'll merge
> this via drm-misc.

Ah, good, leaving merging to you then ;)

cheers,
  Gerd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] drm/virtio: document drm_dev_set_unique workaround
  2018-10-30  5:34     ` Gerd Hoffmann
@ 2018-10-30 15:54       ` Emil Velikov
  0 siblings, 0 replies; 8+ messages in thread
From: Emil Velikov @ 2018-10-30 15:54 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: Daniel Vetter, Laszlo Ersek, ML dri-devel, Hans de Goede

On Tue, 30 Oct 2018 at 05:34, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> On Wed, Oct 24, 2018 at 03:42:52PM +0100, Emil Velikov wrote:
> > From: Emil Velikov <emil.velikov@collabora.com>
> >
> > A while back we removed it, yet that lead to regressions. At some later
> > point, I've attempted to remove it again without fully grasping the
> > unique (pun intended) situation that virtio is in.
> >
> > Add a bulky comment to document why the call should stay as-is, for the
> > next person who's around.
> >
> > As a Tl;Dr: virtio sits on top of struct virtio_device, which confuses
> > dev_is_pci(), wrong info gets sent to userspace and X doesn't start.
> > Driver needs to explicitly call drm_dev_set_unique() to keep it working.
> >
> > v2: Fix handful of typos (Laszlo)
> >
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Cc: Hans de Goede <hdegoede@redhat.com>
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
> > Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>
> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
>
Thanks Gerd.

> > Sending it out for posterity-sake. Modulo any objections I'll merge
> > this via drm-misc.
>
> Ah, good, leaving merging to you then ;)
>
I've pushed the commit to drm-misc with Laszlo's RB a bit before your reply.
Hope it's not a problem, but for the future I'll be more patient.

-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-10-30 15:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-23 16:35 [PATCH 1/3] drm/vgem: Fix vgem_init to get drm device available Emil Velikov
2018-10-23 16:35 ` [PATCH 2/3] drm: BUG_ON if passing NULL parent to drm_dev_init Emil Velikov
2018-10-26  6:02   ` Sharma, Deepak
2018-10-23 16:35 ` [PATCH 3/3] drm/virtio: document drm_dev_set_unique workaround Emil Velikov
2018-10-23 16:54   ` Laszlo Ersek
2018-10-24 14:42   ` [PATCH v2] " Emil Velikov
2018-10-30  5:34     ` Gerd Hoffmann
2018-10-30 15:54       ` Emil Velikov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.