Skip to contentSkip to conversation

Patch "drm/mgag200: Extract device type from flags" has been added to the 5.4-stable tree

PATCH [email protected] 1 participant 1 message Dec 19, 2019

Subsystems (3)
lore
Share & tools
lore

[email protected]

author Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

drm/mgag200: Extract device type from flags

to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-mgag200-extract-device-type-from-flags.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From 3a8a5aba142a44eaeba0cb0ec1b4a8f177b5e59a Mon Sep 17 00:00:00 2001
From: Thomas Zimmermann <[email protected]>
Date: Tue, 26 Nov 2019 11:15:27 +0100
Subject: drm/mgag200: Extract device type from flags
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Thomas Zimmermann <[email protected]>

commit 3a8a5aba142a44eaeba0cb0ec1b4a8f177b5e59a upstream.

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.

Fixes 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin")
Cc John Donnelly <[email protected]>
Cc Gerd Hoffmann <[email protected]>
Cc Dave Airlie <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc David Airlie <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Emil Velikov <[email protected]>
Cc "Y.C. Chen" <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc "José Roberto de Souza" <[email protected]>
Cc Andrzej Pietrasiewicz <[email protected]>
Cc <[email protected]> # 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(-)
drivers/gpu/drm/mgag200/mgag200_drv.h +7 -0
@@ -159,6 +159,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 {
@@ -188,6 +190,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);
drivers/gpu/drm/mgag200/mgag200_main.c +1 -1
@@ -94,7 +94,7 @@ static int mgag200_device_init(struct dr
 	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;

Patches currently in stable-queue which might be from [email protected] are

queue-5.4/drm-mgag200-flag-all-g200-se-a-machines-as-broken-wrt-startadd.patch queue-5.4/drm-mgag200-store-flags-from-pci-driver-data-in-device-structure.patch queue-5.4/drm-mgag200-add-workaround-for-hw-that-does-not-support-startadd.patch queue-5.4/drm-mgag200-extract-device-type-from-flags.patch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel