Re: [PATCH v4 20/22] drm: omapdrm: Remove global variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14/12/16 02:27, Laurent Pinchart wrote:
> Move the list of pending IRQ wait instances to the omap_drm_private
> structure and the wait queue head to the IRQ wait structure.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/omapdrm/omap_drv.h |  3 ++-
>  drivers/gpu/drm/omapdrm/omap_irq.c | 42 ++++++++++++++++++++------------------
>  2 files changed, 24 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
> index 8ef7e8963bd9..b20377efd01b 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.h
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.h
> @@ -88,7 +88,8 @@ struct omap_drm_private {
>  	struct drm_property *zorder_prop;
>  
>  	/* irq handling: */
> -	struct list_head wait_list;     /* list of omap_irq_wait */
> +	spinlock_t wait_lock;		/* protects the wait_list */
> +	struct list_head wait_list;	/* list of omap_irq_wait */
>  	uint32_t irq_mask;		/* enabled irqs in addition to wait_list */
>  
>  	/* atomic commit */
> diff --git a/drivers/gpu/drm/omapdrm/omap_irq.c b/drivers/gpu/drm/omapdrm/omap_irq.c
> index f9510c13e1a2..7555b62f6c53 100644
> --- a/drivers/gpu/drm/omapdrm/omap_irq.c
> +++ b/drivers/gpu/drm/omapdrm/omap_irq.c
> @@ -19,22 +19,21 @@
>  
>  #include "omap_drv.h"
>  
> -static DEFINE_SPINLOCK(list_lock);
> -
>  struct omap_irq_wait {
>  	struct list_head node;
> +	wait_queue_head_t wq;
>  	uint32_t irqmask;
>  	int count;
>  };

The wait_queue_head_t + count combination looks suspiciously like
completion. But as there's no wait_for_completion_count(), I guess the
current implementation is better.

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@xxxxxx>

 Tomi

Attachment: signature.asc
Description: OpenPGP digital signature

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

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux