mbox series

[0/2] Convert to persistent DRM devices

Message ID 20231117174337.20174-1-quic_jhugo@quicinc.com (mailing list archive)
Headers show
Series Convert to persistent DRM devices | expand

Message

Jeffrey Hugo Nov. 17, 2023, 5:43 p.m. UTC
The qaic driver currently creates and destroys the DRM devices when the
qaic device is in an operational state for userspace. This does not match
what other DRM drivers do, and leads to a few race conditions that need
to be handled.

Instead, create the DRM device when the underlying PCIe device is detected
and destroy the DRM device when the underlying device disappears.

Use KOBJ_ONLINE/OFFLINE udev events to signal to userspace when the
underlying device is ready to accept requests, or has entered a reset
state.

Carl Vanderlip (2):
  accel/qaic: Increase number of in_reset states
  accel/qaic: Expand DRM device lifecycle

 Documentation/accel/qaic/qaic.rst   |  9 +++++-
 drivers/accel/qaic/mhi_controller.c |  2 +-
 drivers/accel/qaic/qaic.h           | 15 +++++++--
 drivers/accel/qaic/qaic_control.c   |  5 +--
 drivers/accel/qaic/qaic_data.c      | 16 ++++-----
 drivers/accel/qaic/qaic_drv.c       | 50 ++++++++++++-----------------
 6 files changed, 52 insertions(+), 45 deletions(-)

Comments

Jeffrey Hugo Dec. 1, 2023, 5:38 p.m. UTC | #1
On 11/17/2023 10:43 AM, Jeffrey Hugo wrote:
> The qaic driver currently creates and destroys the DRM devices when the
> qaic device is in an operational state for userspace. This does not match
> what other DRM drivers do, and leads to a few race conditions that need
> to be handled.
> 
> Instead, create the DRM device when the underlying PCIe device is detected
> and destroy the DRM device when the underlying device disappears.
> 
> Use KOBJ_ONLINE/OFFLINE udev events to signal to userspace when the
> underlying device is ready to accept requests, or has entered a reset
> state.
> 
> Carl Vanderlip (2):
>    accel/qaic: Increase number of in_reset states
>    accel/qaic: Expand DRM device lifecycle
> 
>   Documentation/accel/qaic/qaic.rst   |  9 +++++-
>   drivers/accel/qaic/mhi_controller.c |  2 +-
>   drivers/accel/qaic/qaic.h           | 15 +++++++--
>   drivers/accel/qaic/qaic_control.c   |  5 +--
>   drivers/accel/qaic/qaic_data.c      | 16 ++++-----
>   drivers/accel/qaic/qaic_drv.c       | 50 ++++++++++++-----------------
>   6 files changed, 52 insertions(+), 45 deletions(-)
> 

Pushed to drm-misc-next

-Jeff