diff options
author | Takashi Iwai <tiwai@suse.de> | 2022-08-04 09:58:25 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2022-08-10 10:07:01 +0200 |
commit | e25d5954264d1871ab2792c7ca2298b811462500 (patch) | |
tree | db1088c2ffb6d6491a9bbd94f5f153e5a3f255cf /drivers/gpu/drm/udl/udl_drv.h | |
parent | drm/udl: Sync pending URBs at suspend / disconnect (diff) | |
download | linux-e25d5954264d1871ab2792c7ca2298b811462500.tar.xz linux-e25d5954264d1871ab2792c7ca2298b811462500.zip |
drm/udl: Kill pending URBs at suspend and disconnect
At both suspend and disconnect, we should rather cancel the pending
URBs immediately. For the suspend case, the display will be turned
off, so it makes no sense to process the rendering. And for the
disconnect case, the device may be no longer accessible, hence we
shouldn't do any submission.
Tested-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20220804075826.27036-4-tiwai@suse.de
Diffstat (limited to 'drivers/gpu/drm/udl/udl_drv.h')
-rw-r--r-- | drivers/gpu/drm/udl/udl_drv.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/udl/udl_drv.h b/drivers/gpu/drm/udl/udl_drv.h index f01e50c5b7b7..28aaf75d71cf 100644 --- a/drivers/gpu/drm/udl/udl_drv.h +++ b/drivers/gpu/drm/udl/udl_drv.h @@ -39,6 +39,7 @@ struct urb_node { struct urb_list { struct list_head list; + struct list_head in_flight; spinlock_t lock; wait_queue_head_t sleep; int available; @@ -84,6 +85,7 @@ static inline struct urb *udl_get_urb(struct drm_device *dev) int udl_submit_urb(struct drm_device *dev, struct urb *urb, size_t len); int udl_sync_pending_urbs(struct drm_device *dev); +void udl_kill_pending_urbs(struct drm_device *dev); void udl_urb_completion(struct urb *urb); int udl_init(struct udl_device *udl); |