All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/auth: Move master pointer from drm_device to drm_file
@ 2021-06-17  9:47 ` Qiang Ma
  0 siblings, 0 replies; 8+ messages in thread
From: Qiang Ma @ 2021-06-17  9:47 UTC (permalink / raw)
  To: maarten.lankhorst, mripard, tzimmermann, airlied, daniel
  Cc: dri-devel, linux-kernel, Qiang Ma

The drm_file pointer clears to zero during multi-user switching,
so it needs to call drm_new_set_master for master pointer from drm_file.

Signed-off-by: Qiang Ma <maqianga@uniontech.com>
---
 drivers/gpu/drm/drm_auth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c
index f2d46b7ac6f9..02431af6d0c5 100644
--- a/drivers/gpu/drm/drm_auth.c
+++ b/drivers/gpu/drm/drm_auth.c
@@ -302,7 +302,7 @@ int drm_master_open(struct drm_file *file_priv)
 	/* if there is no current master make this fd it, but do not create
 	 * any master object for render clients */
 	mutex_lock(&dev->master_mutex);
-	if (!dev->master)
+	if (!file_priv->master)
 		ret = drm_new_set_master(dev, file_priv);
 	else
 		file_priv->master = drm_master_get(dev->master);
-- 
2.20.1




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

end of thread, other threads:[~2021-06-22 15:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17  9:47 [PATCH] drm/auth: Move master pointer from drm_device to drm_file Qiang Ma
2021-06-17  9:47 ` Qiang Ma
2021-06-17 19:17 ` Daniel Vetter
2021-06-17 19:17   ` Daniel Vetter
2021-06-18  2:53   ` 马强
2021-06-22 14:06 ` [drm/auth] b657695085: phoronix-test-suite.supertuxkart.1280x1024.Windowed.Basic.1.OldMine.frames_per_second -90.8% regression kernel test robot
2021-06-22 14:06   ` kernel test robot
2021-06-22 14:06   ` kernel test robot

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.