drm/via: copy DRM_WAIT_ON as VIA_WAIT_ON and use it
VIA_WAIT_ON() is a direct copy of DRM_WAIT_ON() from drm_os_linux.h. The copy is made so we can avoid the dependency on the legacy header. A more involved approach had been to introduce wait_event_* but for this legacy driver the simpler and more safe approach with a copy of the macro was selected. Added the relevant header files for the functions used in VIA_WAIT_ON. v3: - Updated users of DRM_WAIT_ON => VIA_WAIT_ON (Emil) - Updated $subject (Emil) Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Cc: Kevin Brace <kevinbrace@gmx.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com> Cc: Mike Marshall <hubcap@omnibond.com> Cc: Ira Weiny <ira.weiny@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Michel Dänzer <michel@daenzer.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190723200944.17285-3-sam@ravnborg.org
This commit is contained in:
@@ -233,12 +233,12 @@ via_driver_irq_wait(struct drm_device *dev, unsigned int irq, int force_sequence
|
||||
cur_irq = dev_priv->via_irqs + real_irq;
|
||||
|
||||
if (masks[real_irq][2] && !force_sequence) {
|
||||
DRM_WAIT_ON(ret, cur_irq->irq_queue, 3 * HZ,
|
||||
VIA_WAIT_ON(ret, cur_irq->irq_queue, 3 * HZ,
|
||||
((via_read(dev_priv, masks[irq][2]) & masks[irq][3]) ==
|
||||
masks[irq][4]));
|
||||
cur_irq_sequence = atomic_read(&cur_irq->irq_received);
|
||||
} else {
|
||||
DRM_WAIT_ON(ret, cur_irq->irq_queue, 3 * HZ,
|
||||
VIA_WAIT_ON(ret, cur_irq->irq_queue, 3 * HZ,
|
||||
(((cur_irq_sequence =
|
||||
atomic_read(&cur_irq->irq_received)) -
|
||||
*sequence) <= (1 << 23)));
|
||||
|
Reference in New Issue
Block a user