All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] drm/mgag200: Workaround HW bug with non-0 offset
@ 2019-11-26 10:15 Thomas Zimmermann
  2019-11-26 10:15   ` Thomas Zimmermann
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Thomas Zimmermann @ 2019-11-26 10:15 UTC (permalink / raw)
  To: airlied, daniel, john.p.donnelly, kraxel, sam
  Cc: Thomas Zimmermann, dri-devel

We found an MGA chip that does not interpret the scanout offset
correctly. This patchset works around the problem by placing all
buffer objects at offset 0 on this system.

v2:
	* serarate [4/4] from the rest of the series
	* add missing tags to patch files

Thomas Zimmermann (3):
  drm/mgag200: Extract device type from flags
  drm/mgag200: Store flags from PCI driver data in device structure
  drm/mgag200: Add workaround for HW that does not support 'startadd'

 drivers/gpu/drm/mgag200/mgag200_drv.c  | 36 +++++++++++++++++++++++++-
 drivers/gpu/drm/mgag200/mgag200_drv.h  | 18 +++++++++++++
 drivers/gpu/drm/mgag200/mgag200_main.c |  3 ++-
 3 files changed, 55 insertions(+), 2 deletions(-)

--
2.23.0

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

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

* [PATCH v2 1/3] drm/mgag200: Extract device type from flags
@ 2019-11-26 10:15   ` Thomas Zimmermann
  0 siblings, 0 replies; 23+ messages in thread
From: Thomas Zimmermann @ 2019-11-26 10:15 UTC (permalink / raw)
  To: airlied, daniel, john.p.donnelly, kraxel, sam
  Cc: dri-devel, Thomas Zimmermann, Daniel Vetter, Maarten Lankhorst,
	Maxime Ripard, David Airlie, Emil Velikov, Y.C. Chen,
	Laurent Pinchart, José Roberto de Souza,
	Andrzej Pietrasiewicz, stable

Adds a conversion function that extracts the device type from the
PCI id-table flags. Allows for storing additional information in the
other flag bits.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin")
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: John Donnelly <john.p.donnelly@oracle.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: "Y.C. Chen" <yc_chen@aspeedtech.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: "José Roberto de Souza" <jose.souza@intel.com>
Cc: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v5.3+
---
 drivers/gpu/drm/mgag200/mgag200_drv.h  | 7 +++++++
 drivers/gpu/drm/mgag200/mgag200_main.c | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h
index 0ea9a525e57d..976404634092 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.h
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.h
@@ -150,6 +150,8 @@ enum mga_type {
 	G200_EW3,
 };
 
+#define MGAG200_TYPE_MASK	(0x000000ff)
+
 #define IS_G200_SE(mdev) (mdev->type == G200_SE_A || mdev->type == G200_SE_B)
 
 struct mga_device {
@@ -181,6 +183,11 @@ struct mga_device {
 	u32 unique_rev_id;
 };
 
+static inline enum mga_type
+mgag200_type_from_driver_data(kernel_ulong_t driver_data)
+{
+	return (enum mga_type)(driver_data & MGAG200_TYPE_MASK);
+}
 				/* mgag200_mode.c */
 int mgag200_modeset_init(struct mga_device *mdev);
 void mgag200_modeset_fini(struct mga_device *mdev);
diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c
index 5f74aabcd3df..517c5693ad69 100644
--- a/drivers/gpu/drm/mgag200/mgag200_main.c
+++ b/drivers/gpu/drm/mgag200/mgag200_main.c
@@ -94,7 +94,7 @@ static int mgag200_device_init(struct drm_device *dev,
 	struct mga_device *mdev = dev->dev_private;
 	int ret, option;
 
-	mdev->type = flags;
+	mdev->type = mgag200_type_from_driver_data(flags);
 
 	/* Hardcode the number of CRTCs to 1 */
 	mdev->num_crtc = 1;
-- 
2.23.0


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

* [PATCH v2 1/3] drm/mgag200: Extract device type from flags
@ 2019-11-26 10:15   ` Thomas Zimmermann
  0 siblings, 0 replies; 23+ messages in thread
From: Thomas Zimmermann @ 2019-11-26 10:15 UTC (permalink / raw)
  To: airlied, daniel, john.p.donnelly, kraxel, sam
  Cc: Laurent Pinchart, David Airlie, Daniel Vetter,
	Andrzej Pietrasiewicz, dri-devel, Thomas Zimmermann,
	José Roberto de Souza, stable, Emil Velikov

Adds a conversion function that extracts the device type from the
PCI id-table flags. Allows for storing additional information in the
other flag bits.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin")
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: John Donnelly <john.p.donnelly@oracle.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: "Y.C. Chen" <yc_chen@aspeedtech.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: "José Roberto de Souza" <jose.souza@intel.com>
Cc: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v5.3+
---
 drivers/gpu/drm/mgag200/mgag200_drv.h  | 7 +++++++
 drivers/gpu/drm/mgag200/mgag200_main.c | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h
index 0ea9a525e57d..976404634092 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.h
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.h
@@ -150,6 +150,8 @@ enum mga_type {
 	G200_EW3,
 };
 
+#define MGAG200_TYPE_MASK	(0x000000ff)
+
 #define IS_G200_SE(mdev) (mdev->type == G200_SE_A || mdev->type == G200_SE_B)
 
 struct mga_device {
@@ -181,6 +183,11 @@ struct mga_device {
 	u32 unique_rev_id;
 };
 
+static inline enum mga_type
+mgag200_type_from_driver_data(kernel_ulong_t driver_data)
+{
+	return (enum mga_type)(driver_data & MGAG200_TYPE_MASK);
+}
 				/* mgag200_mode.c */
 int mgag200_modeset_init(struct mga_device *mdev);
 void mgag200_modeset_fini(struct mga_device *mdev);
diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c
index 5f74aabcd3df..517c5693ad69 100644
--- a/drivers/gpu/drm/mgag200/mgag200_main.c
+++ b/drivers/gpu/drm/mgag200/mgag200_main.c
@@ -94,7 +94,7 @@ static int mgag200_device_init(struct drm_device *dev,
 	struct mga_device *mdev = dev->dev_private;
 	int ret, option;
 
-	mdev->type = flags;
+	mdev->type = mgag200_type_from_driver_data(flags);
 
 	/* Hardcode the number of CRTCs to 1 */
 	mdev->num_crtc = 1;
-- 
2.23.0

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

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

* [PATCH v2 2/3] drm/mgag200: Store flags from PCI driver data in device structure
@ 2019-11-26 10:15   ` Thomas Zimmermann
  0 siblings, 0 replies; 23+ messages in thread
From: Thomas Zimmermann @ 2019-11-26 10:15 UTC (permalink / raw)
  To: airlied, daniel, john.p.donnelly, kraxel, sam
  Cc: dri-devel, Thomas Zimmermann, Daniel Vetter, Maarten Lankhorst,
	Maxime Ripard, David Airlie, Y.C. Chen, Neil Armstrong,
	Thomas Gleixner, José Roberto de Souza,
	Andrzej Pietrasiewicz, stable

The flags field in struct mga_device has been unused so far. We now
use it to store flag bits from the PCI driver.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin")
Cc: John Donnelly <john.p.donnelly@oracle.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: "Y.C. Chen" <yc_chen@aspeedtech.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "José Roberto de Souza" <jose.souza@intel.com>
Cc: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v5.3+
---
 drivers/gpu/drm/mgag200/mgag200_drv.h  | 8 ++++++++
 drivers/gpu/drm/mgag200/mgag200_main.c | 1 +
 2 files changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h
index 976404634092..4b4f9ce74a84 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.h
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.h
@@ -151,6 +151,7 @@ enum mga_type {
 };
 
 #define MGAG200_TYPE_MASK	(0x000000ff)
+#define MGAG200_FLAG_MASK	(0x00ffff00)
 
 #define IS_G200_SE(mdev) (mdev->type == G200_SE_A || mdev->type == G200_SE_B)
 
@@ -188,6 +189,13 @@ mgag200_type_from_driver_data(kernel_ulong_t driver_data)
 {
 	return (enum mga_type)(driver_data & MGAG200_TYPE_MASK);
 }
+
+static inline unsigned long
+mgag200_flags_from_driver_data(kernel_ulong_t driver_data)
+{
+	return driver_data & MGAG200_FLAG_MASK;
+}
+
 				/* mgag200_mode.c */
 int mgag200_modeset_init(struct mga_device *mdev);
 void mgag200_modeset_fini(struct mga_device *mdev);
diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c
index 517c5693ad69..e1bc5b0aa774 100644
--- a/drivers/gpu/drm/mgag200/mgag200_main.c
+++ b/drivers/gpu/drm/mgag200/mgag200_main.c
@@ -94,6 +94,7 @@ static int mgag200_device_init(struct drm_device *dev,
 	struct mga_device *mdev = dev->dev_private;
 	int ret, option;
 
+	mdev->flags = mgag200_flags_from_driver_data(flags);
 	mdev->type = mgag200_type_from_driver_data(flags);
 
 	/* Hardcode the number of CRTCs to 1 */
-- 
2.23.0


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

* [PATCH v2 2/3] drm/mgag200: Store flags from PCI driver data in device structure
@ 2019-11-26 10:15   ` Thomas Zimmermann
  0 siblings, 0 replies; 23+ messages in thread
From: Thomas Zimmermann @ 2019-11-26 10:15 UTC (permalink / raw)
  To: airlied, daniel, john.p.donnelly, kraxel, sam
  Cc: Neil Armstrong, David Airlie, Daniel Vetter,
	Andrzej Pietrasiewicz, dri-devel, Thomas Zimmermann,
	José Roberto de Souza, stable, Thomas Gleixner

The flags field in struct mga_device has been unused so far. We now
use it to store flag bits from the PCI driver.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin")
Cc: John Donnelly <john.p.donnelly@oracle.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: "Y.C. Chen" <yc_chen@aspeedtech.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "José Roberto de Souza" <jose.souza@intel.com>
Cc: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v5.3+
---
 drivers/gpu/drm/mgag200/mgag200_drv.h  | 8 ++++++++
 drivers/gpu/drm/mgag200/mgag200_main.c | 1 +
 2 files changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h
index 976404634092..4b4f9ce74a84 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.h
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.h
@@ -151,6 +151,7 @@ enum mga_type {
 };
 
 #define MGAG200_TYPE_MASK	(0x000000ff)
+#define MGAG200_FLAG_MASK	(0x00ffff00)
 
 #define IS_G200_SE(mdev) (mdev->type == G200_SE_A || mdev->type == G200_SE_B)
 
@@ -188,6 +189,13 @@ mgag200_type_from_driver_data(kernel_ulong_t driver_data)
 {
 	return (enum mga_type)(driver_data & MGAG200_TYPE_MASK);
 }
+
+static inline unsigned long
+mgag200_flags_from_driver_data(kernel_ulong_t driver_data)
+{
+	return driver_data & MGAG200_FLAG_MASK;
+}
+
 				/* mgag200_mode.c */
 int mgag200_modeset_init(struct mga_device *mdev);
 void mgag200_modeset_fini(struct mga_device *mdev);
diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c
index 517c5693ad69..e1bc5b0aa774 100644
--- a/drivers/gpu/drm/mgag200/mgag200_main.c
+++ b/drivers/gpu/drm/mgag200/mgag200_main.c
@@ -94,6 +94,7 @@ static int mgag200_device_init(struct drm_device *dev,
 	struct mga_device *mdev = dev->dev_private;
 	int ret, option;
 
+	mdev->flags = mgag200_flags_from_driver_data(flags);
 	mdev->type = mgag200_type_from_driver_data(flags);
 
 	/* Hardcode the number of CRTCs to 1 */
-- 
2.23.0

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

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

* [PATCH v2 3/3] drm/mgag200: Add workaround for HW that does not support 'startadd'
@ 2019-11-26 10:15   ` Thomas Zimmermann
  0 siblings, 0 replies; 23+ messages in thread
From: Thomas Zimmermann @ 2019-11-26 10:15 UTC (permalink / raw)
  To: airlied, daniel, john.p.donnelly, kraxel, sam
  Cc: dri-devel, Thomas Zimmermann, Daniel Vetter, Maarten Lankhorst,
	Maxime Ripard, David Airlie, Y.C. Chen, Neil Armstrong,
	Thomas Gleixner, José Roberto de Souza,
	Andrzej Pietrasiewicz, stable

There's at least one system that does not interpret the value of
the device's 'startadd' field correctly, which leads to incorrectly
displayed scanout buffers. Always placing the active scanout buffer
at offset 0 works around the problem.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reported-by: John Donnelly <john.p.donnelly@oracle.com>
Tested-by: John Donnelly <john.p.donnelly@oracle.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin")
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: "Y.C. Chen" <yc_chen@aspeedtech.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "José Roberto de Souza" <jose.souza@intel.com>
Cc: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v5.3+
Link: https://gitlab.freedesktop.org/drm/misc/issues/7
---
 drivers/gpu/drm/mgag200/mgag200_drv.c | 36 ++++++++++++++++++++++++++-
 drivers/gpu/drm/mgag200/mgag200_drv.h |  3 +++
 2 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
index 397f8b0a9af8..d43951caeea0 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.c
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
@@ -30,6 +30,8 @@ module_param_named(modeset, mgag200_modeset, int, 0400);
 static struct drm_driver driver;
 
 static const struct pci_device_id pciidlist[] = {
+	{ PCI_VENDOR_ID_MATROX, 0x522, PCI_VENDOR_ID_SUN, 0x4852, 0, 0,
+		G200_SE_A | MGAG200_FLAG_HW_BUG_NO_STARTADD},
 	{ PCI_VENDOR_ID_MATROX, 0x522, PCI_ANY_ID, PCI_ANY_ID, 0, 0, G200_SE_A },
 	{ PCI_VENDOR_ID_MATROX, 0x524, PCI_ANY_ID, PCI_ANY_ID, 0, 0, G200_SE_B },
 	{ PCI_VENDOR_ID_MATROX, 0x530, PCI_ANY_ID, PCI_ANY_ID, 0, 0, G200_EV },
@@ -60,6 +62,35 @@ static void mga_pci_remove(struct pci_dev *pdev)
 
 DEFINE_DRM_GEM_FOPS(mgag200_driver_fops);
 
+static bool mgag200_pin_bo_at_0(const struct mga_device *mdev)
+{
+	return mdev->flags & MGAG200_FLAG_HW_BUG_NO_STARTADD;
+}
+
+int mgag200_driver_dumb_create(struct drm_file *file,
+			       struct drm_device *dev,
+			       struct drm_mode_create_dumb *args)
+{
+	struct mga_device *mdev = dev->dev_private;
+	unsigned long pg_align;
+
+	if (WARN_ONCE(!dev->vram_mm, "VRAM MM not initialized"))
+		return -EINVAL;
+
+	pg_align = 0ul;
+
+	/*
+	 * Aligning scanout buffers to the size of the video ram forces
+	 * placement at offset 0. Works around a bug where HW does not
+	 * respect 'startadd' field.
+	 */
+	if (mgag200_pin_bo_at_0(mdev))
+		pg_align = PFN_UP(mdev->mc.vram_size);
+
+	return drm_gem_vram_fill_create_dumb(file, dev, &dev->vram_mm->bdev,
+					     pg_align, false, args);
+}
+
 static struct drm_driver driver = {
 	.driver_features = DRIVER_GEM | DRIVER_MODESET,
 	.load = mgag200_driver_load,
@@ -71,7 +102,10 @@ static struct drm_driver driver = {
 	.major = DRIVER_MAJOR,
 	.minor = DRIVER_MINOR,
 	.patchlevel = DRIVER_PATCHLEVEL,
-	DRM_GEM_VRAM_DRIVER
+	.debugfs_init = drm_vram_mm_debugfs_init,
+	.dumb_create = mgag200_driver_dumb_create,
+	.dumb_map_offset = drm_gem_vram_driver_dumb_mmap_offset,
+	.gem_prime_mmap = drm_gem_prime_mmap,
 };
 
 static struct pci_driver mgag200_pci_driver = {
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h
index 4b4f9ce74a84..aa32aad222c2 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.h
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.h
@@ -150,6 +150,9 @@ enum mga_type {
 	G200_EW3,
 };
 
+/* HW does not handle 'startadd' field correct. */
+#define MGAG200_FLAG_HW_BUG_NO_STARTADD	(1ul << 8)
+
 #define MGAG200_TYPE_MASK	(0x000000ff)
 #define MGAG200_FLAG_MASK	(0x00ffff00)
 
-- 
2.23.0


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

* [PATCH v2 3/3] drm/mgag200: Add workaround for HW that does not support 'startadd'
@ 2019-11-26 10:15   ` Thomas Zimmermann
  0 siblings, 0 replies; 23+ messages in thread
From: Thomas Zimmermann @ 2019-11-26 10:15 UTC (permalink / raw)
  To: airlied, daniel, john.p.donnelly, kraxel, sam
  Cc: Neil Armstrong, David Airlie, Daniel Vetter,
	Andrzej Pietrasiewicz, dri-devel, Thomas Zimmermann,
	José Roberto de Souza, stable, Thomas Gleixner

There's at least one system that does not interpret the value of
the device's 'startadd' field correctly, which leads to incorrectly
displayed scanout buffers. Always placing the active scanout buffer
at offset 0 works around the problem.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reported-by: John Donnelly <john.p.donnelly@oracle.com>
Tested-by: John Donnelly <john.p.donnelly@oracle.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin")
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: "Y.C. Chen" <yc_chen@aspeedtech.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "José Roberto de Souza" <jose.souza@intel.com>
Cc: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v5.3+
Link: https://gitlab.freedesktop.org/drm/misc/issues/7
---
 drivers/gpu/drm/mgag200/mgag200_drv.c | 36 ++++++++++++++++++++++++++-
 drivers/gpu/drm/mgag200/mgag200_drv.h |  3 +++
 2 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
index 397f8b0a9af8..d43951caeea0 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.c
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
@@ -30,6 +30,8 @@ module_param_named(modeset, mgag200_modeset, int, 0400);
 static struct drm_driver driver;
 
 static const struct pci_device_id pciidlist[] = {
+	{ PCI_VENDOR_ID_MATROX, 0x522, PCI_VENDOR_ID_SUN, 0x4852, 0, 0,
+		G200_SE_A | MGAG200_FLAG_HW_BUG_NO_STARTADD},
 	{ PCI_VENDOR_ID_MATROX, 0x522, PCI_ANY_ID, PCI_ANY_ID, 0, 0, G200_SE_A },
 	{ PCI_VENDOR_ID_MATROX, 0x524, PCI_ANY_ID, PCI_ANY_ID, 0, 0, G200_SE_B },
 	{ PCI_VENDOR_ID_MATROX, 0x530, PCI_ANY_ID, PCI_ANY_ID, 0, 0, G200_EV },
@@ -60,6 +62,35 @@ static void mga_pci_remove(struct pci_dev *pdev)
 
 DEFINE_DRM_GEM_FOPS(mgag200_driver_fops);
 
+static bool mgag200_pin_bo_at_0(const struct mga_device *mdev)
+{
+	return mdev->flags & MGAG200_FLAG_HW_BUG_NO_STARTADD;
+}
+
+int mgag200_driver_dumb_create(struct drm_file *file,
+			       struct drm_device *dev,
+			       struct drm_mode_create_dumb *args)
+{
+	struct mga_device *mdev = dev->dev_private;
+	unsigned long pg_align;
+
+	if (WARN_ONCE(!dev->vram_mm, "VRAM MM not initialized"))
+		return -EINVAL;
+
+	pg_align = 0ul;
+
+	/*
+	 * Aligning scanout buffers to the size of the video ram forces
+	 * placement at offset 0. Works around a bug where HW does not
+	 * respect 'startadd' field.
+	 */
+	if (mgag200_pin_bo_at_0(mdev))
+		pg_align = PFN_UP(mdev->mc.vram_size);
+
+	return drm_gem_vram_fill_create_dumb(file, dev, &dev->vram_mm->bdev,
+					     pg_align, false, args);
+}
+
 static struct drm_driver driver = {
 	.driver_features = DRIVER_GEM | DRIVER_MODESET,
 	.load = mgag200_driver_load,
@@ -71,7 +102,10 @@ static struct drm_driver driver = {
 	.major = DRIVER_MAJOR,
 	.minor = DRIVER_MINOR,
 	.patchlevel = DRIVER_PATCHLEVEL,
-	DRM_GEM_VRAM_DRIVER
+	.debugfs_init = drm_vram_mm_debugfs_init,
+	.dumb_create = mgag200_driver_dumb_create,
+	.dumb_map_offset = drm_gem_vram_driver_dumb_mmap_offset,
+	.gem_prime_mmap = drm_gem_prime_mmap,
 };
 
 static struct pci_driver mgag200_pci_driver = {
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h
index 4b4f9ce74a84..aa32aad222c2 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.h
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.h
@@ -150,6 +150,9 @@ enum mga_type {
 	G200_EW3,
 };
 
+/* HW does not handle 'startadd' field correct. */
+#define MGAG200_FLAG_HW_BUG_NO_STARTADD	(1ul << 8)
+
 #define MGAG200_TYPE_MASK	(0x000000ff)
 #define MGAG200_FLAG_MASK	(0x00ffff00)
 
-- 
2.23.0

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

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

* Re: [PATCH v2 1/3] drm/mgag200: Extract device type from flags
@ 2019-11-27 16:29     ` Emil Velikov
  0 siblings, 0 replies; 23+ messages in thread
From: Emil Velikov @ 2019-11-27 16:29 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: Dave Airlie, Daniel Vetter, john.p.donnelly, Gerd Hoffmann,
	Sam Ravnborg, Laurent Pinchart, David Airlie, Daniel Vetter,
	Andrzej Pietrasiewicz, ML dri-devel, José Roberto de Souza,
	# 3.13+,
	Emil Velikov

Hi Thomas,

On Tue, 26 Nov 2019 at 10:15, Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> Adds a conversion function that extracts the device type from the
> PCI id-table flags. Allows for storing additional information in the
> other flag bits.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin")

Are you sure the fixes tag is correct? Neither the commit summary nor
the patch itself seems related to the changes below.

HTH
Emil

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

* Re: [PATCH v2 1/3] drm/mgag200: Extract device type from flags
@ 2019-11-27 16:29     ` Emil Velikov
  0 siblings, 0 replies; 23+ messages in thread
From: Emil Velikov @ 2019-11-27 16:29 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: john.p.donnelly, David Airlie, Daniel Vetter, ML dri-devel,
	Andrzej Pietrasiewicz, Laurent Pinchart,
	José Roberto de Souza, Dave Airlie, # 3.13+,
	Emil Velikov, Sam Ravnborg, Gerd Hoffmann

Hi Thomas,

On Tue, 26 Nov 2019 at 10:15, Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> Adds a conversion function that extracts the device type from the
> PCI id-table flags. Allows for storing additional information in the
> other flag bits.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin")

Are you sure the fixes tag is correct? Neither the commit summary nor
the patch itself seems related to the changes below.

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

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

* Re: [PATCH v2 1/3] drm/mgag200: Extract device type from flags
@ 2019-11-27 18:08       ` Thomas Zimmermann
  0 siblings, 0 replies; 23+ messages in thread
From: Thomas Zimmermann @ 2019-11-27 18:08 UTC (permalink / raw)
  To: Emil Velikov
  Cc: john.p.donnelly, David Airlie, Daniel Vetter, ML dri-devel,
	Andrzej Pietrasiewicz, Laurent Pinchart,
	José Roberto de Souza, Dave Airlie, # 3.13+,
	Emil Velikov, Sam Ravnborg, Gerd Hoffmann


[-- Attachment #1.1: Type: text/plain, Size: 1408 bytes --]

Hi Emil

Am 27.11.19 um 17:29 schrieb Emil Velikov:
> Hi Thomas,
> 
> On Tue, 26 Nov 2019 at 10:15, Thomas Zimmermann <tzimmermann@suse.de> wrote:
>>
>> Adds a conversion function that extracts the device type from the
>> PCI id-table flags. Allows for storing additional information in the
>> other flag bits.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin")
> 
> Are you sure the fixes tag is correct? Neither the commit summary nor
> the patch itself seems related to the changes below.

Yes, it's correct. It's part of a patch series [1][2][3] that fixes the bug.

Best regards
Thomas

[1]
https://cgit.freedesktop.org/drm/drm-tip/commit/?id=3a8a5aba142a44eaeba0cb0ec1b4a8f177b5e59a
[2]
https://cgit.freedesktop.org/drm/drm-tip/commit/?id=d6d437d97d54c85a1a93967b2745e31dff03365a
[3]
https://cgit.freedesktop.org/drm/drm-tip/commit/?id=1591fadf857cdbaf2baa55e421af99a61354713c

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

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2 1/3] drm/mgag200: Extract device type from flags
@ 2019-11-27 18:08       ` Thomas Zimmermann
  0 siblings, 0 replies; 23+ messages in thread
From: Thomas Zimmermann @ 2019-11-27 18:08 UTC (permalink / raw)
  To: Emil Velikov
  Cc: john.p.donnelly, Gerd Hoffmann, David Airlie, Daniel Vetter,
	ML dri-devel, Andrzej Pietrasiewicz, Laurent Pinchart,
	José Roberto de Souza, Dave Airlie, # 3.13+,
	Sam Ravnborg, Emil Velikov


[-- Attachment #1.1.1: Type: text/plain, Size: 1408 bytes --]

Hi Emil

Am 27.11.19 um 17:29 schrieb Emil Velikov:
> Hi Thomas,
> 
> On Tue, 26 Nov 2019 at 10:15, Thomas Zimmermann <tzimmermann@suse.de> wrote:
>>
>> Adds a conversion function that extracts the device type from the
>> PCI id-table flags. Allows for storing additional information in the
>> other flag bits.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin")
> 
> Are you sure the fixes tag is correct? Neither the commit summary nor
> the patch itself seems related to the changes below.

Yes, it's correct. It's part of a patch series [1][2][3] that fixes the bug.

Best regards
Thomas

[1]
https://cgit.freedesktop.org/drm/drm-tip/commit/?id=3a8a5aba142a44eaeba0cb0ec1b4a8f177b5e59a
[2]
https://cgit.freedesktop.org/drm/drm-tip/commit/?id=d6d437d97d54c85a1a93967b2745e31dff03365a
[3]
https://cgit.freedesktop.org/drm/drm-tip/commit/?id=1591fadf857cdbaf2baa55e421af99a61354713c

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

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

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

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

* Re: [PATCH v2 1/3] drm/mgag200: Extract device type from flags
  2019-11-27 18:08       ` Thomas Zimmermann
@ 2019-11-28 12:46         ` Emil Velikov
  -1 siblings, 0 replies; 23+ messages in thread
From: Emil Velikov @ 2019-11-28 12:46 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: john.p.donnelly, David Airlie, Daniel Vetter, ML dri-devel,
	Andrzej Pietrasiewicz, Laurent Pinchart,
	José Roberto de Souza, Dave Airlie, # 3.13+,
	Sam Ravnborg, Gerd Hoffmann

On 2019/11/27, Thomas Zimmermann wrote:
> Hi Emil
> 
> Am 27.11.19 um 17:29 schrieb Emil Velikov:
> > Hi Thomas,
> > 
> > On Tue, 26 Nov 2019 at 10:15, Thomas Zimmermann <tzimmermann@suse.de> wrote:
> >>
> >> Adds a conversion function that extracts the device type from the
> >> PCI id-table flags. Allows for storing additional information in the
> >> other flag bits.
> >>
> >> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> >> Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin")
> > 
> > Are you sure the fixes tag is correct? Neither the commit summary nor
> > the patch itself seems related to the changes below.
> 
> Yes, it's correct. It's part of a patch series [1][2][3] that fixes the bug.
> 
> Best regards
> Thomas
> 
> [1]
> https://cgit.freedesktop.org/drm/drm-tip/commit/?id=3a8a5aba142a44eaeba0cb0ec1b4a8f177b5e59a
> [2]
> https://cgit.freedesktop.org/drm/drm-tip/commit/?id=d6d437d97d54c85a1a93967b2745e31dff03365a
> [3]
> https://cgit.freedesktop.org/drm/drm-tip/commit/?id=1591fadf857cdbaf2baa55e421af99a61354713c
> 
I see, different alignment is required for one mga200 GPU.
Personally, I would have mentioned that in the commit message.

Regardless, hats off for the prompt fixup.

Thanks
Emil

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

* Re: [PATCH v2 1/3] drm/mgag200: Extract device type from flags
@ 2019-11-28 12:46         ` Emil Velikov
  0 siblings, 0 replies; 23+ messages in thread
From: Emil Velikov @ 2019-11-28 12:46 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: john.p.donnelly, David Airlie, Daniel Vetter, ML dri-devel,
	Andrzej Pietrasiewicz, Laurent Pinchart,
	José Roberto de Souza, Dave Airlie, # 3.13+,
	Sam Ravnborg, Gerd Hoffmann

On 2019/11/27, Thomas Zimmermann wrote:
> Hi Emil
> 
> Am 27.11.19 um 17:29 schrieb Emil Velikov:
> > Hi Thomas,
> > 
> > On Tue, 26 Nov 2019 at 10:15, Thomas Zimmermann <tzimmermann@suse.de> wrote:
> >>
> >> Adds a conversion function that extracts the device type from the
> >> PCI id-table flags. Allows for storing additional information in the
> >> other flag bits.
> >>
> >> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> >> Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin")
> > 
> > Are you sure the fixes tag is correct? Neither the commit summary nor
> > the patch itself seems related to the changes below.
> 
> Yes, it's correct. It's part of a patch series [1][2][3] that fixes the bug.
> 
> Best regards
> Thomas
> 
> [1]
> https://cgit.freedesktop.org/drm/drm-tip/commit/?id=3a8a5aba142a44eaeba0cb0ec1b4a8f177b5e59a
> [2]
> https://cgit.freedesktop.org/drm/drm-tip/commit/?id=d6d437d97d54c85a1a93967b2745e31dff03365a
> [3]
> https://cgit.freedesktop.org/drm/drm-tip/commit/?id=1591fadf857cdbaf2baa55e421af99a61354713c
> 
I see, different alignment is required for one mga200 GPU.
Personally, I would have mentioned that in the commit message.

Regardless, hats off for the prompt fixup.

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

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

* Re: [PATCH v2 2/3] drm/mgag200: Store flags from PCI driver data in device structure
@ 2019-11-28 14:23     ` Sasha Levin
  0 siblings, 0 replies; 23+ messages in thread
From: Sasha Levin @ 2019-11-28 14:23 UTC (permalink / raw)
  To: Sasha Levin, Thomas Zimmermann, airlied, daniel, john.p.donnelly

Hi,

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin").

The bot has tested the following trees: v5.3.13.

v5.3.13: Failed to apply! Possible dependencies:
    1c355c0ecfc0 ("drm/mgag200: Extract device type from flags")


NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

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

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

* Re: [PATCH v2 2/3] drm/mgag200: Store flags from PCI driver data in device structure
@ 2019-11-28 14:23     ` Sasha Levin
  0 siblings, 0 replies; 23+ messages in thread
From: Sasha Levin @ 2019-11-28 14:23 UTC (permalink / raw)
  To: Sasha Levin, Thomas Zimmermann, airlied, daniel, john.p.donnelly
  Cc: , John Donnelly, stable, Neil Armstrong, David Airlie, dri-devel,
	Gerd Hoffmann, José Roberto de Souza, Dave Airlie,
	Thomas Gleixner, Andrzej Pietrasiewicz, Sam Ravnborg

Hi,

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin").

The bot has tested the following trees: v5.3.13.

v5.3.13: Failed to apply! Possible dependencies:
    1c355c0ecfc0 ("drm/mgag200: Extract device type from flags")


NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

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

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

* Re: [PATCH v2 3/3] drm/mgag200: Add workaround for HW that does not support 'startadd'
@ 2019-11-28 14:23     ` Sasha Levin
  0 siblings, 0 replies; 23+ messages in thread
From: Sasha Levin @ 2019-11-28 14:23 UTC (permalink / raw)
  To: Sasha Levin, Thomas Zimmermann, airlied, daniel, john.p.donnelly

[-- Attachment #1: Type: text/plain, Size: 583 bytes --]

Hi,

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin").

The bot has tested the following trees: v5.3.13.

v5.3.13: Build failed! Errors:
    drivers/gpu/drm/mgag200/mgag200_drv.c:104:18: error: ‘drm_vram_mm_debugfs_init’ undeclared here (not in a function); did you mean ‘drm_client_debugfs_init’?


NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

-- 
Thanks,
Sasha

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

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

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

* Re: [PATCH v2 3/3] drm/mgag200: Add workaround for HW that does not support 'startadd'
@ 2019-11-28 14:23     ` Sasha Levin
  0 siblings, 0 replies; 23+ messages in thread
From: Sasha Levin @ 2019-11-28 14:23 UTC (permalink / raw)
  To: Sasha Levin, Thomas Zimmermann, airlied, daniel, john.p.donnelly
  Cc: , stable, Neil Armstrong, David Airlie, dri-devel, Gerd Hoffmann,
	José Roberto de Souza, Dave Airlie, Thomas Gleixner,
	Andrzej Pietrasiewicz, Sam Ravnborg

[-- Attachment #1: Type: text/plain, Size: 583 bytes --]

Hi,

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin").

The bot has tested the following trees: v5.3.13.

v5.3.13: Build failed! Errors:
    drivers/gpu/drm/mgag200/mgag200_drv.c:104:18: error: ‘drm_vram_mm_debugfs_init’ undeclared here (not in a function); did you mean ‘drm_client_debugfs_init’?


NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

-- 
Thanks,
Sasha

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

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

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

* Re:  FAILED -  [PATCH v2 3/3] drm/mgag200: Add workaround for HW that does not support 'startadd'
  2019-11-28 14:23     ` Sasha Levin
@ 2019-12-03 17:30       ` John Donnelly
  -1 siblings, 0 replies; 23+ messages in thread
From: John Donnelly @ 2019-12-03 17:30 UTC (permalink / raw)
  To: Sasha Levin
  Cc: Thomas Zimmermann, airlied, daniel, stable, Neil Armstrong,
	David Airlie, dri-devel, Gerd Hoffmann,
	José Roberto de Souza, Thomas Gleixner,
	Andrzej Pietrasiewicz, Sam Ravnborg


Hello Sasha and Thomas ,


This particular patch has failed on one class of servers that has a slightly different Sun Vendor. ID for  the BMC video device: 

I will follow up with additional details in  the review comments for the original message,. 




> On Nov 28, 2019, at 8:23 AM, Sasha Levin <sashal@kernel.org> wrote:
> 
> Hi,
> 
> [This is an automated email]
> 
> This commit has been processed because it contains a "Fixes:" tag,
> fixing commit: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin").
> 
> The bot has tested the following trees: v5.3.13.
> 
> v5.3.13: Build failed! Errors:
>    drivers/gpu/drm/mgag200/mgag200_drv.c:104:18: error: ‘drm_vram_mm_debugfs_init’ undeclared here (not in a function); did you mean ‘drm_client_debugfs_init’?
> 
> 
> NOTE: The patch will not be queued to stable trees until it is upstream.
> 
> How should we proceed with this patch?
> 
> -- 
> Thanks,
> Sasha
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIGaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=t2fPg9D87F7D8jm0_3CG9yoiIKdRg4qc_thBw4bzMhc&m=vxMDOLV77rRe2ekdNFH9IxMSBQrTccltZd8A1H6xYCc&s=efHs2lc_RQYvzLC82c-D3wa8MpX5DCU_YsIo6XruAQg&e=


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

* Re: FAILED - [PATCH v2 3/3] drm/mgag200: Add workaround for HW that does not support 'startadd'
@ 2019-12-03 17:30       ` John Donnelly
  0 siblings, 0 replies; 23+ messages in thread
From: John Donnelly @ 2019-12-03 17:30 UTC (permalink / raw)
  To: Sasha Levin
  Cc: Thomas Zimmermann, Neil Armstrong, David Airlie, stable,
	Andrzej Pietrasiewicz, dri-devel, José Roberto de Souza,
	airlied, Thomas Gleixner, Sam Ravnborg, Gerd Hoffmann


Hello Sasha and Thomas ,


This particular patch has failed on one class of servers that has a slightly different Sun Vendor. ID for  the BMC video device: 

I will follow up with additional details in  the review comments for the original message,. 




> On Nov 28, 2019, at 8:23 AM, Sasha Levin <sashal@kernel.org> wrote:
> 
> Hi,
> 
> [This is an automated email]
> 
> This commit has been processed because it contains a "Fixes:" tag,
> fixing commit: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin").
> 
> The bot has tested the following trees: v5.3.13.
> 
> v5.3.13: Build failed! Errors:
>    drivers/gpu/drm/mgag200/mgag200_drv.c:104:18: error: ‘drm_vram_mm_debugfs_init’ undeclared here (not in a function); did you mean ‘drm_client_debugfs_init’?
> 
> 
> NOTE: The patch will not be queued to stable trees until it is upstream.
> 
> How should we proceed with this patch?
> 
> -- 
> Thanks,
> Sasha
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIGaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=t2fPg9D87F7D8jm0_3CG9yoiIKdRg4qc_thBw4bzMhc&m=vxMDOLV77rRe2ekdNFH9IxMSBQrTccltZd8A1H6xYCc&s=efHs2lc_RQYvzLC82c-D3wa8MpX5DCU_YsIo6XruAQg&e=

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

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

* Re: FAILED -  [PATCH v2 3/3] drm/mgag200: Add workaround for HW that does not support 'startadd'
  2019-12-03 17:30       ` John Donnelly
@ 2019-12-06  0:48         ` John Donnelly
  -1 siblings, 0 replies; 23+ messages in thread
From: John Donnelly @ 2019-12-06  0:48 UTC (permalink / raw)
  To: Sasha Levin
  Cc: Thomas Zimmermann, airlied, daniel, stable, Neil Armstrong,
	David Airlie, dri-devel, Gerd Hoffmann,
	José Roberto de Souza, Thomas Gleixner,
	Andrzej Pietrasiewicz, Sam Ravnborg



> On Dec 3, 2019, at 11:30 AM, John Donnelly <john.p.donnelly@oracle.com> wrote:
> 
> 
> Hello Sasha and Thomas ,
> 
> 
> This particular patch has failed on one class of servers that has a slightly different Sun Vendor. ID for  the BMC video device: 
> 
> I will follow up with additional details in  the review comments for the original message,. 
> 
> 
> 
> 
>> On Nov 28, 2019, at 8:23 AM, Sasha Levin <sashal@kernel.org> wrote:
>> 
>> Hi,
>> 
>> [This is an automated email]
>> 
>> This commit has been processed because it contains a "Fixes:" tag,
>> fixing commit: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin").
>> 
>> The bot has tested the following trees: v5.3.13.
>> 
>> v5.3.13: Build failed! Errors:
>>   drivers/gpu/drm/mgag200/mgag200_drv.c:104:18: error: ‘drm_vram_mm_debugfs_init’ undeclared here (not in a function); did you mean ‘drm_client_debugfs_init’?
>> 


   I had this same issue and removed that from my local 5.4.0-rc8 build 




>> 
>> NOTE: The patch will not be queued to stable trees until it is upstream.
>> 
>> How should we proceed with this patch?
>> 
>> -- 
>> Thanks,
>> Sasha
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIGaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=t2fPg9D87F7D8jm0_3CG9yoiIKdRg4qc_thBw4bzMhc&m=vxMDOLV77rRe2ekdNFH9IxMSBQrTccltZd8A1H6xYCc&s=efHs2lc_RQYvzLC82c-D3wa8MpX5DCU_YsIo6XruAQg&e=
> 


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

* Re: FAILED - [PATCH v2 3/3] drm/mgag200: Add workaround for HW that does not support 'startadd'
@ 2019-12-06  0:48         ` John Donnelly
  0 siblings, 0 replies; 23+ messages in thread
From: John Donnelly @ 2019-12-06  0:48 UTC (permalink / raw)
  To: Sasha Levin
  Cc: Thomas Zimmermann, Neil Armstrong, David Airlie, stable,
	Andrzej Pietrasiewicz, dri-devel, José Roberto de Souza,
	airlied, Thomas Gleixner, Sam Ravnborg, Gerd Hoffmann



> On Dec 3, 2019, at 11:30 AM, John Donnelly <john.p.donnelly@oracle.com> wrote:
> 
> 
> Hello Sasha and Thomas ,
> 
> 
> This particular patch has failed on one class of servers that has a slightly different Sun Vendor. ID for  the BMC video device: 
> 
> I will follow up with additional details in  the review comments for the original message,. 
> 
> 
> 
> 
>> On Nov 28, 2019, at 8:23 AM, Sasha Levin <sashal@kernel.org> wrote:
>> 
>> Hi,
>> 
>> [This is an automated email]
>> 
>> This commit has been processed because it contains a "Fixes:" tag,
>> fixing commit: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin").
>> 
>> The bot has tested the following trees: v5.3.13.
>> 
>> v5.3.13: Build failed! Errors:
>>   drivers/gpu/drm/mgag200/mgag200_drv.c:104:18: error: ‘drm_vram_mm_debugfs_init’ undeclared here (not in a function); did you mean ‘drm_client_debugfs_init’?
>> 


   I had this same issue and removed that from my local 5.4.0-rc8 build 




>> 
>> NOTE: The patch will not be queued to stable trees until it is upstream.
>> 
>> How should we proceed with this patch?
>> 
>> -- 
>> Thanks,
>> Sasha
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIGaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=t2fPg9D87F7D8jm0_3CG9yoiIKdRg4qc_thBw4bzMhc&m=vxMDOLV77rRe2ekdNFH9IxMSBQrTccltZd8A1H6xYCc&s=efHs2lc_RQYvzLC82c-D3wa8MpX5DCU_YsIo6XruAQg&e=
> 

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

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

* Re: FAILED - [PATCH v2 3/3] drm/mgag200: Add workaround for HW that does not support 'startadd'
  2019-12-06  0:48         ` John Donnelly
@ 2019-12-06  6:02           ` Thomas Zimmermann
  -1 siblings, 0 replies; 23+ messages in thread
From: Thomas Zimmermann @ 2019-12-06  6:02 UTC (permalink / raw)
  To: John Donnelly, Sasha Levin
  Cc: Neil Armstrong, David Airlie, stable, Andrzej Pietrasiewicz,
	dri-devel, José Roberto de Souza, airlied, Thomas Gleixner,
	Sam Ravnborg, Gerd Hoffmann

Hi

Am 06.12.19 um 01:48 schrieb John Donnelly:
> 
> 
>> On Dec 3, 2019, at 11:30 AM, John Donnelly <john.p.donnelly@oracle.com> wrote:
>>
>>
>> Hello Sasha and Thomas ,
>>
>>
>> This particular patch has failed on one class of servers that has a slightly different Sun Vendor. ID for  the BMC video device: 
>>
>> I will follow up with additional details in  the review comments for the original message,. 
>>
>>
>>
>>
>>> On Nov 28, 2019, at 8:23 AM, Sasha Levin <sashal@kernel.org> wrote:
>>>
>>> Hi,
>>>
>>> [This is an automated email]
>>>
>>> This commit has been processed because it contains a "Fixes:" tag,
>>> fixing commit: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin").
>>>
>>> The bot has tested the following trees: v5.3.13.
>>>
>>> v5.3.13: Build failed! Errors:
>>>   drivers/gpu/drm/mgag200/mgag200_drv.c:104:18: error: ‘drm_vram_mm_debugfs_init’ undeclared here (not in a function); did you mean ‘drm_client_debugfs_init’?
>>>
> 
> 
>    I had this same issue and removed that from my local 5.4.0-rc8 build 

The bot used the wrong tree. The patch has been written against drm-tip.

Best regards
Thomas

> 
> 
> 
> 
>>>
>>> NOTE: The patch will not be queued to stable trees until it is upstream.
>>>
>>> How should we proceed with this patch?
>>>
>>> -- 
>>> Thanks,
>>> Sasha
>>> _______________________________________________
>>> dri-devel mailing list
>>> dri-devel@lists.freedesktop.org
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIGaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=t2fPg9D87F7D8jm0_3CG9yoiIKdRg4qc_thBw4bzMhc&m=vxMDOLV77rRe2ekdNFH9IxMSBQrTccltZd8A1H6xYCc&s=efHs2lc_RQYvzLC82c-D3wa8MpX5DCU_YsIo6XruAQg&e=
>>
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

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

* Re: FAILED - [PATCH v2 3/3] drm/mgag200: Add workaround for HW that does not support 'startadd'
@ 2019-12-06  6:02           ` Thomas Zimmermann
  0 siblings, 0 replies; 23+ messages in thread
From: Thomas Zimmermann @ 2019-12-06  6:02 UTC (permalink / raw)
  To: John Donnelly, Sasha Levin
  Cc: Neil Armstrong, David Airlie, José Roberto de Souza,
	Andrzej Pietrasiewicz, dri-devel, airlied, stable,
	Thomas Gleixner, Sam Ravnborg, Gerd Hoffmann

Hi

Am 06.12.19 um 01:48 schrieb John Donnelly:
> 
> 
>> On Dec 3, 2019, at 11:30 AM, John Donnelly <john.p.donnelly@oracle.com> wrote:
>>
>>
>> Hello Sasha and Thomas ,
>>
>>
>> This particular patch has failed on one class of servers that has a slightly different Sun Vendor. ID for  the BMC video device: 
>>
>> I will follow up with additional details in  the review comments for the original message,. 
>>
>>
>>
>>
>>> On Nov 28, 2019, at 8:23 AM, Sasha Levin <sashal@kernel.org> wrote:
>>>
>>> Hi,
>>>
>>> [This is an automated email]
>>>
>>> This commit has been processed because it contains a "Fixes:" tag,
>>> fixing commit: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin").
>>>
>>> The bot has tested the following trees: v5.3.13.
>>>
>>> v5.3.13: Build failed! Errors:
>>>   drivers/gpu/drm/mgag200/mgag200_drv.c:104:18: error: ‘drm_vram_mm_debugfs_init’ undeclared here (not in a function); did you mean ‘drm_client_debugfs_init’?
>>>
> 
> 
>    I had this same issue and removed that from my local 5.4.0-rc8 build 

The bot used the wrong tree. The patch has been written against drm-tip.

Best regards
Thomas

> 
> 
> 
> 
>>>
>>> NOTE: The patch will not be queued to stable trees until it is upstream.
>>>
>>> How should we proceed with this patch?
>>>
>>> -- 
>>> Thanks,
>>> Sasha
>>> _______________________________________________
>>> dri-devel mailing list
>>> dri-devel@lists.freedesktop.org
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIGaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=t2fPg9D87F7D8jm0_3CG9yoiIKdRg4qc_thBw4bzMhc&m=vxMDOLV77rRe2ekdNFH9IxMSBQrTccltZd8A1H6xYCc&s=efHs2lc_RQYvzLC82c-D3wa8MpX5DCU_YsIo6XruAQg&e=
>>
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-12-06  6:02 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 10:15 [PATCH v2 0/3] drm/mgag200: Workaround HW bug with non-0 offset Thomas Zimmermann
2019-11-26 10:15 ` [PATCH v2 1/3] drm/mgag200: Extract device type from flags Thomas Zimmermann
2019-11-26 10:15   ` Thomas Zimmermann
2019-11-27 16:29   ` Emil Velikov
2019-11-27 16:29     ` Emil Velikov
2019-11-27 18:08     ` Thomas Zimmermann
2019-11-27 18:08       ` Thomas Zimmermann
2019-11-28 12:46       ` Emil Velikov
2019-11-28 12:46         ` Emil Velikov
2019-11-26 10:15 ` [PATCH v2 2/3] drm/mgag200: Store flags from PCI driver data in device structure Thomas Zimmermann
2019-11-26 10:15   ` Thomas Zimmermann
2019-11-28 14:23   ` Sasha Levin
2019-11-28 14:23     ` Sasha Levin
2019-11-26 10:15 ` [PATCH v2 3/3] drm/mgag200: Add workaround for HW that does not support 'startadd' Thomas Zimmermann
2019-11-26 10:15   ` Thomas Zimmermann
2019-11-28 14:23   ` Sasha Levin
2019-11-28 14:23     ` Sasha Levin
2019-12-03 17:30     ` FAILED - " John Donnelly
2019-12-03 17:30       ` John Donnelly
2019-12-06  0:48       ` John Donnelly
2019-12-06  0:48         ` John Donnelly
2019-12-06  6:02         ` Thomas Zimmermann
2019-12-06  6:02           ` Thomas Zimmermann

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.